Changes between Version 4 and Version 5 of DeveloperGuidelines/Tutorial


Ignore:
Timestamp:
01/17/13 22:18:42 (12 years ago)
Author:
Michael Howden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Tutorial

    v4 v5  
    33= Tutorial =
    44
    5 The following material from [wiki:SahanaCamp/1.2 SahanaCamp 1.2] may be useful:
    6  * [http://eden.sahanafoundation.org/attachment/wiki/SahanaCamp/1.2/Sahana%20Eden%20-%20Developer%20Environment%20(VM).pdf Sahana Eden - Developer Environment (VM)]
    7  * [http://eden.sahanafoundation.org/attachment/wiki/SahanaCamp/1.2/Sahana%20Eden%20-%20Introduction%20to%20the%20Code.pdf Sahana Eden - Introduction to the Code]
    8  * [http://eden.sahanafoundation.org/attachment/wiki/SahanaCamp/1.2/Sahana%20Eden%20-%20Bug%20Reporting.pdf Sahana Eden - Bug Reporting]
    9  * [http://eden.sahanafoundation.org/attachment/wiki/SahanaCamp/1.2/Sahana%20Eden%20-%20Localisation.pdf Sahana Eden - Localisation]
    10  * [wiki:DeveloperQuickstart]
     5== Sahana Eden Essential Guide ==
     6Have a look at the [wiki:Book Sahana Eden Essential Guide Book] and follow the tutorial chapters:
     7 * [http://en.flossmanuals.net/sahana-eden/customisation/ Customisation]
     8 * [http://en.flossmanuals.net/sahana-eden/building-a-new-application/ Building a New Module]
    119
    1210== Python ==
    1311DeveloperGuidelines#Python
    1412
     13=== MVC Architecture ===
    1514== Model ==
    16 Defines databases in: {{{/models/module.py}}}
     15Defines databases in: {{{/modules/models/*}}}
    1716
    1817The Models are loaded 1st within Web2Py processing, before the controllers.[[BR]]
     
    2019The Models are imported in alphabetical order, so we load the files which other modules depend on 1st, hence naming them appropriately:[[BR]]{{{000_config.py}}}, {{{01_crud.py}}}, {{{02_pr.py}}}, {{{03_gis.py}}}, etc
    2120
     21== View ==
     22HTML/Javascript templates in {{{/views/*}}}
     23 * these are normal HTML/JS files with the ability to add in Python code (e.g. variables) surrounded by brackets: {{ interpreted python here }}
     24 * there should be an .html file available for each function in the module (name normally being the same as the function)
     25 * these normally inherit from {{{views/layout.html}}} which also includes the !JavaScript from {{{views/*_ajax.html}}}
     26 * if there is no view defined then a default view will be displayed, which will show the values of all the data it can see, but not be formatted nicely
     27
    2228== Controller ==
    23 Python functions in {{{/controllers/module.py}}} [[BR]]
     29Python functions in {{{/controllers/*}}} [[BR]]
    2430e.g.
    2531{{{
     
    2935}}}   
    3036
    31 == View ==
    32 HTML/Javascript templates in {{{/views/module/function.html}}}
    33  * these are normal HTML/JS files with the ability to add in Python code (e.g. variables) surrounded by brackets: {{ interpreted python here }}
    34  * there should be an .html file available for each function in the module (name normally being the same as the function)
    35  * these normally inherit from {{{views/layout.html}}} which also includes the !JavaScript from {{{views/*_ajax.html}}}
    36  * if there is no view defined then a default view will be displayed, which will show the values of all the data it can see, but not be formatted nicely
    37 
    3837Static CSS/Javascript files are stored in {{{/static}}}