Software Development: Directory Structure

[article] [edit page] [discussion] [history]

From Humanitarian-FOSS Project Development Site

Directory Structure

Software development involves working with many files, and in this class we will not only do that, but also work on several different projects. Therefore it is imperative that you put together a decent directory (folder) structure in which to store various applications, projects, etc. Here are my strong recommendations:

  • Make a directory named comp342 for everything associated to this class. Whatever you call this directory, I will refer to it as $COMP342 below.
  • In $COMP342, make a directory called apps. This is where you will install various applications such as Tomcat, Ant, and Eclipse. These will live in subdirectories of apps; e.g., you might install Tomcat into $COMP342/apps/apache-tomcat-6.0.18.
  • In $COMP342 make a directory called examples. This is for examples that I put together for you to download and play with. Each example goes into its own directory.
  • In $COMP342 make a directory called projects. This is for our initial round of projects (not OpenMRS). Have a subdirectory for each project. I'd suggest uninteresting but informative names like project1, project2, etc.
  • When it comes to working on OpenMRS, I'll have additional suggestions.

So while working on Project 1, your $COMP342 directory might look like the following:

comp342/
    apps/
        apache-tomcat-6.0.18/
            LICENSE
            NOTICE
            ...
            bin/
            conf/
            lib/
            ...
    examples/
        petstore1/
            petstore/
                WEB-INF/
                    web.xml
                    classes/
                        comp342/
                            InventoryBean.class
                            Petstore.class
                web/
                    petstore.jsp
            src/
                comp342/
                    InventoryBean.java
                    Petstore.java
    projects/
        project1/
            currconv/
                ...
            src/
                ...
	workspace/

If you are using Windows or Mac OS X, you may choose to install some applications in default locations; e.g., maybe under Windows you installed Tomcat as a Windows service or under OS X you installed Eclipse in /Applications. In those cases, you would not have a corresponding directory under apps.

Personal tools