in reply to Push style templating systems
-- Terence Parr, "Enforcing Strict Model View Separation in Template Engines"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Nes - a new Push style templating system
by Skriptke (Acolyte) on May 01, 2010 at 11:23 UTC | |
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 | '-------------------------------------------' | [reply] |