[Nitro] Help understanding ... process

Marcus Edwards redentis at gmail.com
Tue Aug 2 11:47:25 EDT 2005

Hi All,

I've been working through the Nitro tutorial at NitroHQ and have a
question based on section
"Chapter 7: Shaping Up" http://www.nitrohq.com/view/NSBS_Shaping_Things_Up.

The tutorial states:
"...The form action is set to "post_entry," so you'll need to add some
server code to respond to that request ... First, Nitro will look for
post_entry.html. If not found, then post_entry.xhtml is the target. If
that does not exist, Nitro will attempt to invoke post_entry on the
default component..."

This is all perfectly logical and it what I would expect. However, the
text then goes on to say:
"...Finally, add a new template (named post_entry.xhtml to map to the
method) to render the new entry..."

My question then is this: if the dispatch sequence for requests looks
for .xhtml templates *ahead* of the controllers (first quote),
wouldn't adding the .xhtml template "to render the results of the
request" (second quote) short-circuit the process and prevent the
dispatcher from using the controller?

It would help me enormously if someone could describe the whole
decision chain from when a request is received until the response is
returned. E.g.

1. Server: request received
2. Server: apply request filters...
3. Dispatcher: find controller
    3.1 .html? ...
         3.1.1 html controller (SimpleController)
    3.2 .xhtml
         3.2.1 xhtml controller (SimpleController? Compiler?)
    3.3 Server.map[request url fragment #1]? 
          3.3.1 Controller: has method matching request url fragment #2? 

Obviously a UML sequence diagram would be superb but a description at
the very least would help. I'm more then happy to sketch up the
diagram if someone can explain how it works. I'll try walking through
the code to get at the answer to this but if someone has a ready
explanation, I'm all ears.


More information about the Nitro-general mailing list