logo

Make web development powerful & efficient

Applications are roots of buildable object trees composing the user interface. They are used to dispatch requests to other buildables, typically widgets, and hold their state. Unlike widgets they don't have one building method but several controller methods used to dispatch requests to the right buildable object.

Base path

Concrete application classes must answer a path string in the class method #path. This represents the base path of the application.

Iliad.ILApplication subclass: ExampleApplication [
    
    ExampleApplication class >> path [
        "Answer the base path of the application"
        ^'example'
    ]
]

If Iliad is running on port 8888, instances of ExampleApplication will be reached at:

Controllers

Controller methods are special building methods used to dispatch requests. The default controller method is #index. Concrete applications should always override this method to answer an appropriate controller or widget.

In the following example, #index answers another controller method.

index [
    
    ^self otherController
]

In this example, three urls will have the same behaviour:

/index
/otherController