Changes between Version 85 and Version 86 of DeveloperGuidelines


Ignore:
Timestamp:
03/24/10 22:18:17 (12 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines

    v85 v86  
    11[[TOC]]
     2= Developer Guide =
    23== Understand the Sahana mission ==
    34Before you start on the Sahana project, understand clearly what the project is about and what it strives to accomplish. You can find most of this in the Sahana [http://www.sahana.lk/overview Overview and objectives]
     
    910InstallationGuidelinesDeveloper
    1011
    11 == Python ==
     12== Introduction ==
     13
     14=== Python ===
    1215Indentation matters (use 4 spaces instead of Tabs)
    1316 * http://diveintopython.org/
     
    1922More details at: DeveloperGuidelinesCodeConventions
    2023
    21 == Web2Py ==
     24=== Web2Py ===
    2225This is an [http://en.wikipedia.org/wiki/Model-view-controller MVC] environment (like [http://web2py.com/AlterEgo/default/show/103 Rails] & [http://web2py.com/AlterEgo/default/show/101 Django]. [http://vimeo.com/6507384 Django polls turorial conversion course]).
    2326
     
    3033python web2py.py -S sahana -M
    3134}}}
    32 === Model ===
     35==== Model ====
    3336Defines databases in: {{{/models/module.py}}}
    3437
     
    3740The Models are imported in alphabetical order, so we load the files which other modules depend on 1st, hence naming them appropriately:[[BR]]{{{00_db.py}}}, {{{01_RESTlike_controller.py}}}, {{{02_pr.py}}}, {{{03_gis.py}}}
    3841
    39 === Controller ===
     42==== Controller ====
    4043Python functions in {{{/controllers/module.py}}} [[BR]]
    4144e.g.
     
    4649}}}   
    4750
    48 === View ===
     51==== View ====
    4952HTML/Javascript templates in {{{/views/module/function.html}}}
    5053 * these are normal HTML/JS files with the ability to add in Python code (e.g. variables) surrounded by brackets: {{ interpreted python here }}
     
    5558Static CSS/Javascript files are stored in {{{/static}}}
    5659
    57 == Javascript ==
     60=== Javascript ===
    5861 * jQuery is used for client-side business logic (hiding fields, opening up tabs, etc):
    5962  * Tutorial 1: http://docs.jquery.com/Tutorials:How_jQuery_Works
     
    7073 * W3Schools' basic JS: http://www.w3schools.com/js/
    7174
    72 == Reserved Keywords ==
     75=== Reserved Keywords ===
    7376 * 'request' -> web2py internal use
    7477 * 'key' as a db row name -> MySQL confuses it with internal keyword KEY
     
    7679 * http://www.postgresql.org/docs/8.1/static/sql-keywords-appendix.html
    7780
     81== Other Guidelines ==
    7882
    79 == Guidelines ==
    8083 * WSGI likes print statements to go to {{{sys.stderr}}} not {{{sys.stdout}}}: http://code.google.com/p/modwsgi/wiki/DebuggingTechniques
    8184