Changes between Version 109 and Version 110 of DeveloperGuidelines


Ignore:
Timestamp:
07/21/10 09:14:50 (15 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines

    v109 v110  
    11[[TOC]]
    22= Developer Guide =
    3 === Install a Development Environment ===
     3== Install a Development Environment ==
    44  - see [wiki:InstallationGuidelinesDeveloper]
    55
    6 === Python ===
     6== Python ==
    77Indentation matters (use 4 spaces instead of Tabs)
    88 * http://diveintopython.org/
     
    1414More details at: DeveloperGuidelinesCodeConventions
    1515
    16 === Web2Py ===
     16== Web2Py ==
    1717This 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]).
    1818
     
    2727
    2828Web2Py can be extended through [http://www.web2py.com/plugins Plugins] & also has a [http://web2pyslices.com recipes site].
    29 ==== Model ====
     29
     30== Tutorial ==
     31This tutorial was given at !SahanaCamp in Delhi:
     32 * http://www.slideshare.net/AidIQ/sahana-eden-introduction-to-the-code
     33
     34=== Model ===
    3035Defines databases in: {{{/models/module.py}}}
    3136
     
    3439The 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
    3540
    36 ==== Controller ====
     41=== Controller ===
    3742Python functions in {{{/controllers/module.py}}} [[BR]]
    3843e.g.
     
    4348}}}   
    4449
    45 ==== View ====
     50=== View ===
    4651HTML/Javascript templates in {{{/views/module/function.html}}}
    4752 * these are normal HTML/JS files with the ability to add in Python code (e.g. variables) surrounded by brackets: {{ interpreted python here }}
     
    5257Static CSS/Javascript files are stored in {{{/static}}}
    5358
    54 === Javascript ===
     59== Javascript ==
    5560 * jQuery is used for client-side business logic (hiding fields, opening up tabs, etc):
    5661  * Tutorial 1: http://docs.jquery.com/Tutorials:How_jQuery_Works
     
    6772 * W3Schools' basic JS: http://www.w3schools.com/js/
    6873
    69 === Reserved Keywords ===
    70  * 'request' -> web2py internal use
    71  * 'key' as a db row name -> MySQL confuses it with internal keyword KEY
    72  * http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords-5-0.html
    73  * http://www.postgresql.org/docs/8.1/static/sql-keywords-appendix.html
    74 
    7574== Developer Guidelines ==
    76 
    77  * WSGI likes print statements to go to {{{sys.stderr}}} not {{{sys.stdout}}}: http://code.google.com/p/modwsgi/wiki/DebuggingTechniques
    7875
    7976 * [wiki:DeveloperGuidelinesS3Framework Sahana Eden Framework: S3]