Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
HttpView2
Last updated at 11:05 pm UTC on 30 October 2018
No Files. No HTML. Just Smalltalk code!

HttpView2, also known as HV2 or HVHttpView2 is a lightweight web framework, suitable for building RESTful web applications.

It is the engine that powers SqueakMap.

HV2 was created by Goran Krampe, and was developed by Goran Krampe and Giovanni Corriga.

http://swiki.krampe.se/gohu/6


Repository

 MCHttpRepository
    location: 'http://www.squeaksource.com/HttpView2'
    user: ''
    password: '
Global: Read And Write

License

MIT

Features

URL-based component activation:

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


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.

Getting started

From SqueakMap install in order


Save the image. :)

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

Known Uses


Download

HttpView2 may be downloaded from SqueakMap

Tutorial



Development roadmap


Contacts


See also

WebServer (= the web server now in trunk, not directly related to KomHttpServer on which HttpView2 is based).
Teapot micro web framework (Pharo, probably based on a modified version of WebServer)
Building and Deploying a Small Web application (Pharo)