Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 2 and Version 3 of LageApplication


Ignore:
Timestamp:
04/22/06 19:59:21 (13 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LageApplication

    v2 v3  
    1313=== The TG way === 
    1414Introduced in TG 0.9a2 , the tgbig template adds a controllers package to the template. 
    15 controllers.py is replaced with a controllers directory 
     15 
     16the single file controllers.py is then replaced with a controllers directory/package that consolidates the root level controllers to controllers/root.py 
    1617 {{{ 
    1718        tg-admin quickstart -t tgbig  
    1819 }}} 
    1920 
     21creates 
     22 
     23  *  controllers/ 
     24    * __init__.py 
     25    * root.py 
     26 
    2027=== The Other ways === 
    21 Some people prefer these.  Several on the Newsgroup seemed to have implemented variations on this 
     28Some people prefer an alternal approach.  Several on the Newsgroup seemed to have implemented variations on the tgbig behaviour 
    2229         
    2330==== The FastTrack way ==== 
     
    3643}}} 
    3744  
    38 Note that model needs to be specifically addressed in regards to namespace 
     45Note that model needs to be specifically addressed in regards to namespace when being imported 
    3946 
    4047==== Another way ==== 
     
    6168    json_api = JsonApiController()  
    6269}}} 
     70 
     71if this method is used, the start-APPNAME.py script must be altered to reference controller.py 
    6372  
     73=== The Difference Between the Two Approaches === 
     74 
     75The main difference between the approaches is that tgbig is more 'pythonic' -- controllers is a package, with root.py being the main controller.  the alternate methods are more simlar to other web frameworks, and keep controller(s).py as the main controller and mount a tree of controllers under it - much like a tree of directories on a web server. 
     76 
    6477=== Related Newsgroup Postings: === 
    6578 * [http://groups.google.com/group/turbogears/browse_thread/thread/e7fe18aadf6979da/2894f193485fde01?q=tg-big&rnum=3#2894f193485fde01 TurboGears 0.9a2 released!]