Each URL identifies a chain of HV2 objects connected in a parent-child relationship.
Each object in the chain may dynamically modify the dispatch of HTTP requests and the corresponding responses.
How does this work?
Each part of the URL corresponds to a message understood by an HV2 object.
These methods implement the dispatch and response logic of your application.
For example, let's say
that the url http://localhost/users/ is requested to your application.
HV2 will translate this request as a message #users to be sent to the root HV2 object of your application.
#users will return an object that can be converted into an HTTP response.
No templates used!
Instead of templates HV2 uses a builder system.
Automatic form handling: no need to name your forms and the fields within them: HV2 will take care of that. The values of a submitted form may be easily retrieved simply by sending a #value message to right objects. This makes form creation as easy as building GUIs!
Small codebase: the whole framework is just a handful of classes.
Now, fire up HelloWorld - read class comment of HVHelloWorld. All samples can be started/stopped on port 8080 by simple sending "startDebug" or "stop" to the class. You can also stop any running sample by sending "stopAll" to any sample class.
HV2 and Seaside
HV2 exploits the HTTP request/response model that Seaside abstracts away. This makes HV2 well suited for RESTful, asynchronous web applications that don't require an high degree of interactivity, while Seaside is ideal for complex, interactive web applications.
More: HttpView2 versus Seaside