Slashdot Mirror


Arranging Multi-Language Source Code Trees?

jodonn queries: "Often software developers are called upon to write code in multiple languages for a single project. For instance, I've had to write Java applications with C hooks into legacy native applications and batch processes primarily in C++ with some additional code in Perl, and of course I have to support the build process for all these things, often across platforms using Make and Ant. I'd like to hear some tips about best practices when laying out the source code hierarchy for situations like these, with an eye toward ease in compiling and deployment."

1 of 8 comments (clear)

  1. Organize by function, not language! by Manax · · Score: 2, Interesting
    Gah, I HATE it when projects I've worked on store their code based on language... perl in one directory, C++ in another, SQL in another... or all top-level code in one directory (regardless of use) and all 'function-files' in another directory...

    In general, I'd suggest basing the heirarchy on functionality.... something along the lines of "node_type/functional_area/process/{main|libs}/*". Sure, there are difficulties with that too, but symbolic links are a good thing! ;)

    Although a bad tree is difficult, the most painful thing I've encountered is how the 'product' is released. That you need to specify that up front, that everything is built in it's own dir, but installs itself into a "release" area, that can be tarred up/archived/copied as necessary. To be fair, it depends a lot on your product, but I hate it when there isn't a release process, you just have to know the files, and where to copy them... bleck.

    babble... babble.

    --
    "Why should I be content to simply live in this world, when I, as a human being, can CREATE it?" - Oertel