Prev | Current Page 467 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


In the class constructor, the function arguments are stored in instance variable for later use. In the case of
URI, the value is changed into the special value /root when the requested URI is the base root address.
In this way, you get a reference name root also for the homepage that can now be treated as any other
dynamically created page.
As you have probably noticed, in the main method of the WikiApplication class, the WikiController
is instantiated and then the method execute() is invoked. It is in this method that the real action takes
place. The execute method decides which view must be rendered and instantiates the relative class. All
the classes that actually produce the real output, the HTML code, are children of the abstract class Page
and, thus, they all share the same method render() , which finally produces the desired result. The
result is sent to the user agent that requested it by using the neko.Lib.print() method. In the case of
the save action, the execute() method is also responsible for calling the savePage() or removePage()
methods.


Pages:
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479