Wednesday, January 16, 2008

Alternatives to Server-side Web Frameworks


Changing tack from previous posts, this article gives examples on how an application can be made without using Server-side Web Frameworks, thus reducing complexity and lowering costs.

I got many good replies to my recent post "The End Of Web Frameworks". In it I argued for the need to bypass all existing Web Frameworks on the server, to avoid their high complexity costs.

I realized the other day, on a related note, that Ajax in and of itself actually means not using Server-Side Web Frameworks. Think about it; Asynchronous JavaScript And XML which implements out-of-band channels where raw (XML) data is transferred between browser and server. Where in that proposal do you see the need to regenerate the client (again, and again) out of complex config files on the server?

Instead of just bashing though, I thought I should devote some time to explain what the alternative(s) are, and how one can go about designing an application without retorting to using Web Frameworks (WFs for short).


I have outlined fairly well the reasons for removing the web rendering from the server-side completely, and instead construct modular clients in JavaScript in my last post on this subject . The main points are the following:

1) Current server-side web framworks are very complex.
2) The reason that they are complex is because they try to generate a client out of the server.
3) If you remove the web client generation complexity from the server, the server becomes simpler.
4) If you program a client _on_ the client, using state of the art client frameworks, you get a simpler client (than the server-config-file client-in-parts, just add water, you had before).
5) This is a big win

The Client:

To begin with, on the client, nobody in his or hers right mind tries to reinvent the wheel and write hundreds of separate function supporting cross-browser oddities (read; IE) from scratch. Since several years ago there exists mature, well-tested cross-browser compatible "Ajax" libraries with copious documentation.

Good choices when coding your in-browser client;

1. Dojo 1.x
Reason: Dojo has a simple markup language, which the dojo 'runtime' will parse when loaded. It amounts to adding a tojoType="" tag to existing HTML markup, which make compact code.

Also, and more importantly, Dojo has very well designed data-binding structure, called Most high-end widgets such as Tree or Grid support reading their data (and sometimes writing as well) from a datastore, which can among other things be a csv file, an XML-generating service, or a custom component. This makes it easy to swap data sources, and presentations, without ever involving the server-side.

Dojo is also maybe the largest open "Ajax" framework in existence today, sporting encryption, Google Gears integration, cross-browser 2D and 3D graphics, charting, a powerful template-based, modularized and easily extensible widget system, complex Drag and Drop features (even in Trees), i18N support (currency, date, time, et.c.) for widgets and even support for widgets who have to display data right-to-left like Arabic, Japanese, et.c. Disclaimer: I'm a fanboy :).

2. Ext 2.0
Reason: Ext is perhaps the most polished "Ajax" framework, having very slick design and pixel-perfect looks. Ext also have powerful data bindings to its widgets, just like Dojo.

3. (commercial but with LGPL client library).
Reason: The SmartClient guys have fairly covered all bases. They have about as much functionality as previously mentioned frameworks, but with the added twist of WSDL data bindings. This means that their widgets can read directly from a web service, or you can make a form which calls a web service directly. It is really quite a lot of stuff they're releasing as LGPL, so if you're missing anything from your current choice du jour, it might be a good idea to browse about the SDK. No, we're not affiliated, I just like what they're doing.

4. YUI (Yahoo User Interface)
Reason: Very good data-binding widgets, such as their datatable (with good pagination examples), et.c.

Reason: TIBCO has not only a very enterprise-y approach to building clients; Treetables (Matrices), extremely good support for WSDL Web services and a free visual GUI for creating browser-based clients.

The reason I'm not mentioning jQuery, Prototype or Mochikit and others is that I would like to emphasize the need for data binding and management as a key issue for a client-side framework, which is missing in the more basic ones, where the emphasis is more on design and effects.

The Server:

OK, we still need data from a server, of course. And if we place the client on the client, we don't need no client-code on the server, leaving us with a much more specific and "slim" server-side. Examples of servers which have well-defined interfaces to browser-based clients are;

1. DWR (Direct Web Remoting)
Reason: DWR is one of the slimmest offerings out there, which does the following, in their own words; "DWR is a RPC library which makes it easy to call Java functions from JavaScript and to call JavaScript functions from Java (a.k.a Reverse Ajax)". It is easy to get started with and fairly low on the configuration file department. It uses one XML file to map incoming queries to Java classes. It only returns data. Sweet. :)

2. Sling (RESTlike JCR implementation)
Reason: Sling is a fairly young project which implements the Java Component API, which looks like a traditional web server, serving static pages from the outside, but where focus is on resource access and not page access. Each component can be implemented as a script (Rhino, Ruby, JSP or what have you). This means that Sling can be used as a stand-alone or servlet-droppable application which automatically maps requests for resources to specific scripts which generate data, thus making it more simple to focus on business-logic only on the server.

3. DIY (Because you're just serving yourself data anyway)
Url: http://localhost/yourapp
Reason: You get started in no time flat (if you're using scripting, like JSP or PHP). A little longer, perhaps, if you insist on compiling and bundling stuff up. You will not reinvent the wheel again and create yet another framework. Why? Because the client resides in a separate HTML file, which loads it's js libraries by itself. You will only implement security, business logic and serve data!


The SOFEA team has a very detailed description of why server-side web frameworks are complex, in an excellent PDF.

Bob Bufone at rockstar apps has a very succinct and insightful post on client vs. server-side frameworks, which is a must-read. He ha a webinar on the subject with a downloadable PDF as well.

Per Olesen has also done some research into which server framework to choose for the development of Rich Internet Application apps, which is an interesting read.



Jeff Haynie said...

I'd like to introduce you Appcelerator as well. We believe that server-oriented MVC are going to be a thing of the past soon.

You can try it out at or download it from

Our product is open source and supports services built in Java, PHP, Rails, .NET, Python and Perl. The client uses a capability we call the web expression language that makes it fast and easy to build powerful RIA apps and integration them into your SOA.

Peter Svensson said...

Hi Jeff,

Sorry to not have you in the list from the beginning, but it's a big web :)

You have an interesting approach by using your own templating/macro language.

I like very much that you have separate backends, so that you're not tied to any one platform.


Anonymous said...

Hi Nice Blog .If your time is less valuable, then it is probably less worthwhile to web time clock .

Anonymous said...

ugg bootsTHE SNOW wholesale ugg bootsSTARTED TO FALLWholesale handbags SEVERAL HOURS wholesale clothingBEFORE HER laborWholesale jewelry began.wholesale clothing A few flakes wholesale handbagsfirst, wholesale furniturein the dull Furniture Wholesalegray late-afternoon Wholesale jewelrysky,Ceramic tileand then Micro sd cardswind-driven swirls Wholesale clothingand eddies Wholesale Jewelryaround the edges Wholesale fashion jewelryof their wide Wholesale costume jewelryfront porch. ugg bootsHe stood by her wholesaleside at the windowwholesale electronics, watching sharp gusts of snow billow,skin care products
then swirl and drift to the ground. All around the neighborhood, lights came on, and the naked branches of the trees turned white.

Anonymous said...

[URL=]ugg boots[/URL]It had been [URL=]uggs[/URL]an excellent [URL=]High pressure blower[/URL]pregnancy, without medical[URL=]Industrial fan[/URL] restrictions.[URL=]Industrial blower[/URL] Even so,[URL=]Commercial blower[/URL] he had not been [URL=]wholesale[/URL]able to make love [URL=]china wholesale[/URL]to her for [URL=]wholesale shoes[/URL]several months. [URL=]wholesale clothing[/URL]He found himself wanting [URL=]watches[/URL]to protect her instead, to carry her up[URL=]pressure blower[/URL] flights of stairs, [URL=]pressure blowers[/URL]to wrap her in blankets,[URL=]fans[/URL] to bring her cups of custard. [URL=]blowers[/URL]"I'm not an invalid," she protested each time, laughing. "I'm not some fledgling you discovered on the lawn."

Anonymous said...

[URL=]wholesale[/URL]She was eleven[URL=]wholesale atv[/URL] years younger than he was.[URL=]wedding dresses[/URL] He had first[URL=]MP3 player[/URL] seen her not much
[URL=]wholesale mp3[/URL] more than[URL=]Wholesale Mp4[/URL] a year ago, [URL=]digital camera wholesale[/URL]as she rode up an[URL=]consumer electronics[/URL] escalator in a department [URL=]mp5 player[/URL]store downtown, [URL=]memory cards[/URL]one gray November[URL=]Car video players[/URL]Saturday while[URL=]gps devices[/URL] he was buying ties.[URL=]bluetooth headset[/URL] He was thirty-three[URL=]Mp3 Wholesale[/URL] years old and[URL= ]Mp3 Wholesale[/URL] new to Lexington,[URL=]Mp4 Wholesale[/URL] Kentucky, [URL=]Mp4 Wholesale[/URL]and she had risen out of the crowd like some kind of vision, her blond hair swept back in an elegant chignon。

Anonymous said...

The Nets wow goldwent 9-7 in October and November, wow goldand they went 6-10 in January. wow goldThe falloff offensively haswow gold outweighed the improvementwow gold defensively. But we see wow goldnow that the fast start was a bit of a mirage.

Anonymous said...

There aredofus kamas three teams that appearkamas dofus twice above. The Thunderdofus kamas are on the right end of kamas dofusboth lists. They'veacheter dofus improved bothbuy kamas offensively and defensively, acheter kamasthanks in part to how horrible they were early in the season. They had nowhere to go but up.

Anonymous said...

These areworld of warcraft gold relatively smallcheap wow gold sample sizes, wow orand factors otherwow power leveling than how world of warcraft goldwell the wow poteam is playing (injuries, schedule)wow orhave certainly buy wow goldhad an effect. But the Nets'cheap wow gold improvementwow power leveling on the wow powerlevelingdefensive end dofus kamasisn't too hard tokamas dofus explain. They had a lot of roster turnover and Lord of the Rings Online Goldhave several LOTRO Goldyoung players, LOTR Goldincluding two rookies, flyff moneyin their rotation.flyff penyaSo, as their team buy flyff goldhas grown together ffxi giland their young buy ffxi gilguys have Final Fantasy XI giladjusted to the buy Warhammer goldspeed of theWarhammer gold game, they've improved defensively.EverQuest 2 gold"Experience is a eq2 platlot of it," says rookie Ryan Anderson, who has started the last 12 games in the absence of Yi Jianlian. "I know I've improved a ton defensively this season."

Anonymous said...

It could be that wow gold farmingmarks wow gold guidethe sell wow goldfirst wow gold pricesWheatieswow gold hacks appearance forwow gold guides Reed. cheap wow gold euOther wow gold gameWheaties make wow goldBlack wow gold shopHistory wow europe goldMonthwow fishinghonorees wow gold tradehave wow gold makingincluded wow gold onlineMuhammad Ali, wow hacksHank paladin wowAaron,paladin wow Jackie gold in wowRobinson, wow druidJosh wow gold mmoGibson, wow warlockSatchellwow gold tips Paige, wow free goldJames wow gold farming"Cool Papa" wow gold usBell, wow instant goldAlthea Gibson,wow map Arthur gold seller wowAshe, to wow goldWalter very cheap wow goldPayton, wow 1000 goldBill wow addonsRussell wow gold sellerand wow goldsJulius buy gold for wow"Dr. wow eu gold" europe The wow forumsnewwow gold exchange 15.6-ounce wow gold fastWheaties wow gold paypalpackage wow guidesis cheap gold for wownow selling wow goldavailablewow gold guide nationwide.Thewow gold price NBA, wow gold sellingfoundedwow private server in best wow gold1946, isgold on wowa globalof wow gold sports wow characterandwow gold on entertainmentwow gold and brand how to wowthatwow gold for sale features wow patch30buy cheap wow gold teams buy wow gold cheapin buying wow goldthe Unitedwow cd key Stateswow gold sale and buy wow accountsCanada. During gold for wowthe wow farming2008-09wow gold for season, wow guideNBA games sell wow goldwill reach guild wars gold215 countries cheapest gold wowand cheapest wow goldterritories wow accountin 41 wow accountslanguages. Thewow pvp It could be that Devin Harris was playing a little over his head earlier in the season. He shot 49 percent in the first month and 39 percent in January.

Anonymous said...

wholesale jewelry , supply vast kinds of styles handmade jewelry,mainly engage in handmade jewelry wholesale handmade jewelry,such as wholesale pearl wholesale crystalwholesale gemstone,wholesale costume jewelry,also wholesale fashion jewelry like wholesale swarovski crystal,wholesale beads,wholesaleturquoise,wholesale coral,wholesale costume jewelry ,shell jewelrycostume jewelry and discount jewelry, jewelry wholesale, just on AYpearl jewelry store.
fashion jewelry

Anonymous said...

1。那混合物是更缓慢的 ... 但是 Lexus 的即将到来混合版本 ' 将是比气体气体更快的唯一的版本如好地有多马力。不要自夸速度,但是我被吸引轮流开送行为 90,是警察给我一次休息。
... 只是通过在城市乘公交车往返我储蓄过来 $ 5000/yr 与我的以前的汽车,吉普车切诺基相比。超过 5 年,会是 $ 更不用说会进一步增强我的储蓄的最近的比率远足的 20K。这样除非你是在你的父母的地产上吸的一个浪费的儿子,你的声明是一束公牛。

Anonymous said...

3. 45 (90 r/t)
45mpg 天是 2 我的车上> 8 加>>比。那每天是 6 >仑的一笔>蓄, 120 月, 1440 每年者 5040 (根 3.5 元/) ... 加上它发表 1/10th CO2。多愚蠢是它不要骑一个,去算进今天和年龄。
4.缺少了解 ... 是真的,实际上我个人这样那样喜欢它我可能享受所有鼓励;税,合伙用车,免费停车米, prius 业主之间的秘密的信号,等等;这样自私地说那我真地在那里在享受在所有气体汽车业主上的所有权那没有一个想法多少我这辆汽车有的嬉戏。我 junked 我的 SL,郊区对我的 Prius ... 你应该也。

Anonymous said...

Your blog is wonderful, I like it very much, thank you!
By the way, do you like polo shirts, which are very chic, especially the polo t shirts, I love them very much. I also like playing tennis rackets, it can keep healthy, what do you like to do?
polo t shirts women
polo t shirts on sale
polo t shirts for women
polo shirts on sale
polo shirts men
men's polo shirt
men polo shirt
mens polo shirts
mens polo shirt
cheap polo shirts
discount polo shirts
men's polo shirts
women's polo shirts
cheap tennis racket
discount tennis racket
prince tennis racquet
head tennis rackets
wilson tennis racket
babolat tennis racquet

Dali_Tour said...

Christian Louboutin|Louboutin shoes|Louis Vuitton

linxiao said...

I think you are a wonderful person after read your blog, for your blog is the best one I have ever seen. If you do not mind, I would like to know do you like fashion? Have you ever heard of polo t shirts, which are very chic, especially the discount polo t shirts, I love them very much.
Now, I'd like to introduce our masterpieces, such as
polo t shirts on sale
polo t shirts cheap
cheap polo mens shirts
besides we also sell
cheap polo men t shirts
cheap polo t shirts
polo t shirts women
if you are a fashion chaser, you should not miss
polo t shirts for women
polo shirts on sale
discount polo shirts
and the warmly welcomed
men's polo t shirt
polo men t shirts

jimmychooshoes said...

mcqueen shoes
alexander mcqueen heels
Alexander McQueen Store
Jimmy Choo sale
Replica jimmy choo shoes
manolo blahnik online store
manolo shoes
manolo blahnik sale
replica christian louboutin shoes
discount christian louboutin shoes
alexander mcqueen shoes
jimmy choo outlet
jimmy choos
jimmy shoes
Manolo Blahnik Shoes
christian shoes
Alexander McQueen Geometric leather pumps
Alexander McQueen Band leather sandals

Friday said...

The christian louboutin store was designed for the ladies. Since the louboutin heelswas born, the ladies life become colorful.The elegant pattern, the delicate style all mold the ladies perfect leg profile. The christian louboutin evening pumps are the god's masterwork. Who invited the christian louboutin pumps? Seldom people knew, but I think every lady would be grateful for him. Among the countless pumps, the christian louboutin peep toe is the most outstanding ones. Flowers in the spring of 2011 creeping, up from hair to clothes continue to footwear, have had a brilliant up. In such a glamor, spring and summer flowers now here. Romance is a woman's mood, exquisite flowers just right of expression in our gestures, the woman, how can we not love the romantic temperament so that they distributed the flowers do? 2011 flowers bloom will enjoy different poses! The Christian Louboutin 2011 Sandals also can adds the hright of the ladies, it bring surprise to the short lady. Especially the red sole of the louboutin heels, magic and sexy, many ladies are crazy. The red sole, the first feature of the Christian Louboutin heels.