An architecture for content-centric web applications (Part 1)

posted 03:40PM Oct 20, 2007 with tags architecture content jcr microsling sling web webdevelopment by Lars Trieloff

One thing I enjoyed most at the HPI and Mindquarry were discussions with Hagen about architectures for content-centric applications. Interestingly after having some discussions, reading blog entries and mailing list posts with David (where is your blog), Carsten and Bertrand, I am surprised to see Sling and Microsling which looks like many of Hagen's ideas having come to life.

Unfortunately the Sling website does not have a good description of the big picture and overall architectural ideas, so I will try to explain the ideas I have identified in the next blog posts. The goal is to go from the very high level of abstraction down to concrete code and examples.

Let's start with the helicopter perspective: Users want to interact with content, want to read, write and modify content.

http://weblogs.goshaky.com/weblogs/lars/resource/contentweb1.png

(I am using the fundamental modeling concepts notation here. Boxes with angled corner are active system components, boxes with rounded corners are passive system components, storage.)

The way we usually implement this interaction is trough a web application that works as a proxy for the content.

http://weblogs.goshaky.com/weblogs/lars/resource/contentweb2.png

(The small bubble between user and web application is a communication channel, indicating that the user interacts with the web application by means of HTTP and the web browser)

Dealing with content usually means providing one human-readable representation of the content through a component I call renderer and providing a behavior for dealing with user inputs. This means validating user input, writing input to the storage if it is correct or triggering custom actions.

http://weblogs.goshaky.com/weblogs/lars/resource/contentweb3.png

In the next issue of this mini-series I will further examine the nature of renderers and behaviors and show how a framework can implement this architecture.

Why is my web application slow

posted 10:24AM Jul 25, 2007 with tags performance webdevelopment yahoo by Lars Trieloff

http://weblogs.goshaky.com/weblogs/lars/resource/yslow.png

Yahoo has released a nice tool for the Firefox web development tool: YSlow analzes the performance of your web application and gives easy to implement tips on improving performance like reducing the number of stylesheets and JavaScript files, using GZip compression and more. (via Nico Brünjes)

| Comments[2]

Phobos: Another Server-side Javascript framework I did not know

posted 10:42PM Jul 08, 2007 with tags javascript web20 webdevelopment by Lars Trieloff

Javascript seems to be the hottest language on the web these days. Not on the client side, but on the server side. Today I came across Phobos, a server-side Javascript framework with good integration into the Netbeans IDE.

Some other interesting frameworks with server-side Javascript support are:

The advantage of server-side Javascript frameworks: You can use one language for much of the web programming on the client and on the server-side, Javascript is easy to learn, yet powerful and incredibly flexible and as most of these frameworks are powered by Rhino, you have access to all libraries running in the JVM, and that is a lot.

posted 10:38AM May 23, 2007 with tags gnome usability webdevelopment by Lars Trieloff

What makes a good icon? A good icon is a good visual representation of the subject of the icon. In cases where no visual representation is possible, icon designers usually use metaphors. A good metaphor is the stop symbol that is modeled after the street sign: A red (warning color in most cultures) sign with eight corners is percieved as a stop sign, even without the four letters STOP on it. A case where no metaphor is neccessary are the icons for bold, underline and italic. Just an bold, underlined or italic letter is enough to make the point.

What about link icons, especially the insert link button that can be found in many visual HTML editors of WYSIWYG Wikis: A long time ago an icon designer must have decided to go with an metaphor, more specifically using the fact that a link in the english language can denote a hyperlink or a link in a chain. Thus, the chain became the most prevalent symbol for hyperlinks. In order to emphasize the hyperlink-nature, often a globe symbol was added to the icon, making the original chain almost irrecognizable. A very good icon modeled after the hyperlink=chain link idea can be found in the GNOME desktop:

http://weblogs.goshaky.com/weblogs/lars/resource/gnome-link.png

The problem with this icon and all other icons modeled after the idea of equivalence of hyperlinks and links of a chain is that it is not understood by non-native english speakers who do not recoginze the chain link in the icon and do not equate the concept of a link in a chain with a hyperlink between web pages. The other problem is that is metaphor is not neccessary. When you ask people what mental model of a link they have you will get not one single answer, but when asking how links are perceived, the answer is clear: "a link is underlined text, often blue that turns my mouse cursor into a hand when hovering". Following this observation, my take on a link icon would be modeling what the user percieves as a link, similar to the text formatting icons mentioned before:

http://weblogs.goshaky.com/weblogs/lars/resource/mindquarry-link.png

Now I have only one problem left: What is a good icon for a concept like WikiWords or hot links, e.g. an action that takes the currently selected text and creates a link out of it?

| Comments[2]

Everything I learned about Javascript, I learned on the web

posted 10:39AM May 22, 2007 with tags javascript softwaredevelopment webdevelopment by Lars Trieloff

Yesterday, during an interview I said regarding the fact that, according to Ohloh our applications is written mostly in Javascript: "Javascript is an impressive elegant, but often misunderstood language.". The applicant answed that this was the first time he heard someone saying that, but recent signs show I am not alone with my opinion:

The interesting thing is: I have been developing in Javascript for nearly all of my programmer's life, but have never possessed a single Javascript book. This is part due to a misunderstanding of the language ("It's just a toy language for scripting web pages" - which it is not) and part due to the great resources on the web for developing Javascript.

With more and more applications built unpon Javascript, server-side, client side in web sites, in rich internet applications based on Firefox, Thunderbird or XULRunner or Actionscript, developers will have to learn about the beauty of Javascript, but also about the dark sides.

| Comments[1]