开发目录结构 [英] Development directory Structure

查看:95
本文介绍了开发目录结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道开发项目中通常使用什么目录结构。我的意思是方便构建,部署发布等。

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

我最近使用了 Java项目的Maven结构,但我不确定对于非Maven驱动的情况,它是否是最佳结构

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.

所以,我有两个问题:当你们开始新项目时,您使用什么结构?并且:如果您需要集成两种不同的语言,例如将Java类集成到PHP应用程序中,该怎么办? PHP文件是源文件,Web文件,您使用的是/ src,/ classes,webapps / php吗?在这种情况下您有什么选择。

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.

请注意:我也想知道您为目录名称选择了什么。我喜欢3个字母的名称(src,lib,bin,web,img,css,xml,cfg),但是您对诸如libraris,来源或htdocs / public_html之类的描述性名称有何看法?

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 ?

推荐答案

在使用不同的结构工作了几年之后,我最近发现了一个对我来说变化最大的结构:

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)

这篇关于开发目录结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆