Squeak SmalltalkJoker Squeak Smalltalk : Network : prevnext Homepage Builder

HomepageBuilder

Published 2003-10-29

On a boat trip to Vaxholm I was sitting and talking to Stefan, CEO for 
BWell. After a while we started discussing IT and I asked if he is 
satisfied with their homepage. BWell is a small expansive product 
company working with health care and helping companies take good care 
of their employees. Among other things they lease completely amazing 
massage chairs. I would give my left arm to have one of those at 
home...

Well, said Stefan, it's probably ok, but it is far to complicated to 
change the content. I want to be able to enter news and information 
about our services on a daily basis without having to call someone to 
do it for me - otherwise it will not happen. And I have no interest 
nor time to learn a tool to make homepages, said Stefan.

Ok, I said and took on my Bluefish cape. :-) I can solve your problem 
if we at Bluefish can try to make a product out of the solution. Sure, 
Stefan said!

Said and done. We sat down and Stefan described what he wanted to be 
able to do with the tool. With this simple list as a base I sat down 
and ... The direction of the solution was getting clear:

    * The tool is to be completely web based.

    * Stefan gave me free hands to make a design of the homepage that 
      he later could approve.

    * The homepage including the domain is hosted at Bluefish, BWell 
      wanted a pure service without having to install any 
      infrastructure nor software.

    * The homepage should be capable of "living" information, meaning 
      that the result isn't static HTML pages.

    * The visual design should be completely separated from the 
      content and should be able to be changed with a single click of 
      the mouse.

    * The tool should not demand a manual, you should be able to "just 
      use it".

    * The tool should handle things like news items, products, 
      customers etc, the domain objects of BWell. Not pages.

The last bullet above may be the thing that separates HomepageBuilder 
from competing systems. In HomepageBuilder you are not working with 
pages, instead the focus is on the domain information of the company. 
As a user you enter and edit news items, customers, products, 
employees etc - you do not work with the visual design of pages. 
Screenshot employees Picture 1. Entering and changing the employees of 
the company. (swedish)

In HomepageBuilder you enter information about the employees of the 
company. This information is among other things used to automatically 
generate a page with contact information. Of course you are not forced 
to use this function, but for small companies it is a simple way to 
always have correct contact information on the homepage. Screenshot 
documents Picture 2. Images and other documents can easily be uploaded 
to the homepage. (swedish)

Images and documents that the user should be able to download is 
easily added in HomepageBuilder where you can also add an alias and a 
short description of the file. Documents and images can then easily be 
linked to or embedded in the texts on the homepage. Skärmbild 
textinmatning Picture 3. A simple wiki-syntax is used when entering 
all text.

Using a syntax similar to the one used in Swiki (and other 
wiki-implementations) it is easy to make hyperlinks in the material, 
you simply type asterisks around the thing you want to link. 
HomepageBuilder is "clever" and automatically makes links to products, 
employees, news items or uploaded documents. In the picture we see a 
link to the product BFG-2000, a link to an uploaded brochure (text 
being shown in the link is "broschyr"), an image embedded in the page 
(bfg70.jpg) and a link to Göran - an employee.

Note: The homepage of Acme is just an example for the article and no 
substantial effort was made to make it visually appealing. Screenshot 
test homepage Picture 4. A test homepage is always available showing 
the homepage with the current edits applied.

The visual design of the homepage is automatic. While you are working 
with the homepage you can always see how it currently looks by having 
a "test homepage" open in another browser window. As soon as any 
change is made you just need to press "refresh" in that browser window 
to see the effects.

When you are satisfied you press "Save" and you can of course roll 
back the homepage to an older version in case you made any mistakes! 
In picture 4 we have opened the test homepage in a tab of its own in 
the web browser Firebird.

Now BWell has used HomepageBuilder since december 2002. Stefan is 
pleased and we are working on a list of improvements and new features. 
We have also started polishing the product for some more marketing and 
a few more customers have started using it. Screenshot BWells newspage 
Bild 5. The news page at BWell.

HomepageBuilder is today in my opinion one of the simplest ways you 
can maintain a homepage. And we are working on making it even easier! 
We are also adapting HomepageBuilder for our customers and all 
development is purely customer driven - no unnecessary features or 
functions are added unless some of our customers want it. We are even 
actively trying to hide functionality based on the needs of the 
specific customer - everything to make the tool as easy as possible to 
use.

In case you are interested in a flexible solution for your company or 
organisation, or if you think the product looks interesting to offer 
your customers - send us an email!

There is also a product flyer with price information etc but it is not 
yet available in English.
  
HomepageBuilder inside.   

HomepageBuilder (in Swedish HemsideByggaren) is built with a bit 
unusual technology:

    * Squeak version 3.4

    * Comanche version 5.1

    * HttpView version 030604

Today all of these components exist in newer versions and the upcoming 
version 1.2 of HomepageBuilder will be upgraded to use these. Squeak

Squeak is a modern Smalltalk under open source with many fascinating 
features. With a development environment beating almost everything by 
a mile, portability better than Java (!) and an incredibly exciting 
community Squeak is a very interesting alternative today.

My intention is to write more about Squeak in future articles here at 
Bluefish. Comanche

Comanche is a web server written completely in Squeak. It uses the 
lightweight processes in Squeak and it has in tests shown performance 
approaching 30-50% of Apache, which is quite impressive. One of the 
nice things in using a web server written in Squeak is that everything 
is debuggable and open for manipulation all the was down to the Socket 
level.

Everything is also adaptable for your own needs and the risk of 
security holes is practically zero. :-)

Today there is a reimplementation of Comanche called KomHttpServer. 
KomHttpServer has much more features than the original Comanche and in 
future projects and future version of HomepageBuilder I will switch 
over to using that one instead.

I also have a good relation to Stephen Pair who is the maintainer of 
KomHttpServer and there are other active projects using it, like for 
example the very interesting web framework Seaside (which at least in 
a small part has been inspired by HttpView!).

Seaside is a unique web framework clearly more advanced than HttpView, 
but since the frameworks take different approaches they also fit 
different tasks. HttpView

HttpView is our own web framework which we have used in 3-4 different 
web applications to this day. HttpView is written completely in Squeak 
and is an abstraction layer on top of Comanche. The framework is 
Smalltalk code centric and all HTML/CSS is generated dynamically using 
page builder objects.

HomepageBuilder today consists of 100% Squeak code. There are no HTML 
files, no template file and no communication with another system for 
persistence. Everything is an object, exactly as it should be when you 
work in an object oriented system. :-)

Note: In an upcoming article I will present HttpView in closer detail 
with 4 different sample programs. Persistence

Persistence of the domain objects is done using so called 
ImageSegments. It is a very fast technique in Squeak to store and 
reload object models directly from object memory. This means that only 
20 lines of code has been written totally to deal with persistence in 
HomepageBuilder.

Well, there isn't much more to say about 20 lines of code! Platform

HomepageBuilder has alternatively been developed under Linux and 
Windows. Currently HomepageBuilder is deployed on a Debian Linux 
server, but most development is done on my laptop that (cough) runs 
Windows XP.

The Linux server is an old Pentium-II/233 Mhz but it is quite 
sufficient! HomepageBuilder actually only consumes about 16Mb RAM. 
That may sound impressive compared to other systems but it should 
actually consume only about 3-5 Mb since the current configuration 
includes the full development environment including the Squeak user 
interface so that I can inspect and fix any bugs through VNC from home 
or from my laptop... Performance

Performance in HomepageBuilder is very satisfactory. Squeak has both a 
good base implementation and a good Socket layer, in HomepageBuilder 
there is also no communication between processes on the server side 
which is a big performance bottleneck in most systems. Everything 
executes in one and the same server process, no unnecessary 
conversions or similar things are being done.

When doing a simple (and primitive) comparison with Fixafest.nu (which 
is built in Java/JSP) the response time for a simple page was about 
the same up to 50 requests/second. The time was about 15-20 ms, this 
in spite of the fact that Fixafest is running on a machine 
approximately twice as fast!

From there on Fixafest held up to almost the double number of 
requests/second until response times started to suffer, which fits 
pretty well with the difference in hardware.

In short, performance is excellent. Conclusions

Using the above listed combination of tools, web applications (and 
other applications) can be developed in a frightening speed. 
Everything is running in one and the same environment with full tool 
support. Debugging and correction is being done in "real time", no 
recompilations or other operations are needed to restart the system.

We have even been able to develop a system at the same time as it is 
being run and correct bugs on the fly - a bug leads to a debugger 
being opened on the server (straight in my face), the bug has in some 
cases been fixed directly in the debugger, the method then 
automatically recompiled and execution continued so that the web page 
eventually is being returned to the browser. The only thing the user 
noted at these occasions was that it took a bit of extra time! :-)

Remember - there are alternatives out there!

If you want to be better than all the rest you also need to have the 
courage to use different tools. If your boss want's you to outdrive 
all the others, and they are driving Volvos, then a Volvo isn't your 
best choice -pick a Pantera instead.

It may be unusual but that doesn't mean it won't blow the tires off a 
Volvo. :-)

/Göran Krampe