The “app” top-level directory contains all source control-based resources that will go into the code package that will be uploaded to App Engine as part of Melange‘s release. It contains several third-party code directories, the “soc” directory that contains Melange’s first-party production code, and the configuration files and outermost scripts that mediate App Engine‘s interaction with Melange’s code.
app/soc is the root of Melange's first-party (authored by Melange developers) code. It is divided into:
Melange code is in many places divided into three parallel packages named “logic”, “models”, and “views”. At such places, (1) the “models” package will contain modules and classes making use of (and inheriting from) App Engine‘s db.Model class to describe how Melange data is persisted in App Engine’s data store, (2) the “views” package will contain modules and classes making use of (and inheriting from) Melange's RequestHandler class to create views of web pages in response to user HTTP requests, and (3) the “logic” package will contain utility modules and functions.
Melange maintains an attempted-but-imperfect separation between the code foundational to Melange itself and the code only needed for its (currently two) programs Google Summer of Code and Google Code-in. The foundational code for Melange itself is kept in the “logic”, “models”, and “views” directories of app/soc, and the code required for each program is kept under app/soc/modules/program_name.
Melange certainly should have some lines of internal segmentation, fault-tolerance, and protection when running, but this is an area for future development.