Development directory Structure [closed]

2020-06-04 04:14发布

I am wondering what directory structure are commonly used in development projects. I mean with the idea of facilitating builds, deploys release, and etc.

I recently used a Maven structure for a java project, but I am not sure it's the best structure for a non-maven driven project.

So, I have two questions: When you guys start new projects, what structure you use? And: What if you need to integrate two different languages, like for example java classes into a PHP application; PHP files are source files, web files, you you use a /src, /classes, webapps/php ? What are your choices in such scenarios.

As a note: I am wondering also what are you choices for directories names. I like the 3-letters names (src, lib, bin, web, img, css, xml, cfg) but what are your opinions about descriptive names like libraris, sources or htdocs/public_html ?

4条回答
3楼-- · 2020-06-04 04:19

I just found a interesting document about Directory structures on Zend website:
http://framework.zend.com/wiki/display/ZFDEV/Choosing+Your+Application%27s+Directory+Layout

查看更多
孤傲高冷的网名
4楼-- · 2020-06-04 04:21

Although we don't use Maven, we use the Maven directory structure.

We've found that it accurately reflects the concepts we need (e.g. separation of deployment code from test code, code from data, installers from code). Also we figure that if someday we switched to Maven, most of our process would remain the same.

查看更多
劫难
5楼-- · 2020-06-04 04:37

After a couple years working with different structures I recently found a structure that hols most variations for me:

/project_name     (everything goes here)
  /web            (htdocs)
    /img
    /css
  /app            (usually some framework or sensitive code)
  /lib            (externa libs)
    /vendor_1
    /vendor_2
  /tmp
    /cache
  /sql            (sql scripts usually with maybe diagrams)
  /scripts
  /doc            (usually an empty directory)
查看更多
登录 后发表回答