Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Nes - a new Push style templating system

by Skriptke (Acolyte)
on May 01, 2010 at 11:23 UTC ( #837927=note: print w/replies, xml ) Need Help??


in reply to Nes - a new Push style templating system
in thread Push style templating systems

Only 'SELECT' statement. Since the template does not modify the application data.

    Nes Model:

    .----------------------------------------------.
    |                 | Nes Object |               |
    |                 '------------'               |
    | .-------------------.    .-----------------. |
    | |  template.nhtml   |    |    script.pl    | |
    | |-------------------|    |-----------------| |
    | |        _          |--->|    _       _    | |
    | |        |          |<---|    |       |    | |
    | '--------|----------'    '----|-------|----' |
    '----------|--------------------|-------|------'
               |                    |       |
               |                    |       '------------------.
               |                    |                          |
               v                    v                          v
    .----------------------.  .-----------------------.  .------------.
    |                      |  |                       |  |            |
    |  Nes Object Library  |  |  My App Perl Library  |  |    CPAN    |
    |                      |  |                       |  |            |
    '----------------------'  '-----------------------'  '------------'

    Nes Object:

    .------------------------------------------------------------------------------------.
    |                                 | Nes Object |                                     |
    |                                 '------------'                                     |
    | .-----------------------------------.    .---------------------------------------. |
    | |          template.nhtml           |    |              script.pl                | |
    | |-----------------------------------|    |---------------------------------------| |
    | |                                   |--->|                                       | |
    | |    {: Nes 1.0 ('script.pl') :}    |    | Nes::Singleton->new('template.nhtml') | |
    | |                                   |<---|                                       | |
    | '-----------------------------------'    '---------------------------------------' |
    '------------------------------------------------------------------------------------'

    Nes Request:
    
    .-------------------------------------------.
    |         GET or POST HTTP Request          |
    |     http://example.com/template.nhtml     |
    '-------------------------------------------'
                        |
                        v
    .-------------------------------------------.
    |        /cgi-bin/nes/dispatch.cgi          |
    '-------------------------------------------'
                        |
                        v
    .-------------------------------------------.
    |              Nes::Singleton               |
    |-------------------------------------------|
    | new {'CFG'} for this dir                  |
    | new {'top_container '} for template.nhtml |
    '-------------------------------------------'
                        |
                        v
    .-------------------------------------------.
    |     Nes::Singleton->{'top_container'}     |
    |-------------------------------------------|
    | new {'register'}                          |
    | new {'query'}                             |
    | new {'cookies'}                           |
    | new {'session'}                           |
    | new {'container'} for template.nhtml      |
    '-------------------------------------------'             
                        |
                        v
    .-------------------------------------------.
    |       Nes::Singleton->{'container'}       | <---.
    |-------------------------------------------|     |
    | get {  NES 1.0 ...  } line                |     |
    | new {'content_obj'} for this content type |     |
    '-------------------------------------------'     |          
                        |                             |
                        v                             |
    .-------------------------------------------.     |
    |             do Perl scripts               |     |
    |-------------------------------------------|     |
    | Nes::Singleton->out()                     |     |
    '-------------------------------------------'     |
                        |                             |
                        v                             |
    .-------------------------------------------.     |
    | Nes::Singleton->{'container'}->interpret  |     |
    '-------------------------------------------'     |
                        |                             |
                        v                       ( interaction )
             .---------------------.                  |
             | {  include  }   ?   |---{ yes }--------'
             '---------------------'                         
                        |
                      { no }
                        |
                        v
    .-------------------------------------------.
    | print HTTP Headers                        |
    | print the out                             |
    '-------------------------------------------'  
  • Comment on Re: Nes - a new Push style templating system

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://837927]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2017-06-23 18:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (552 votes). Check out past polls.