Example

6 views
Skip to first unread message

epitka

unread,
Sep 25, 2010, 5:07:08 PM9/25/10
to jquery-claypool
Hi,
Just started looking at claypool an I am wondering if anybody has
tried porting corMVC's example to claypool so that one can compare
the approaches

http://www.bennadel.com/blog/1730-Building-Single-Page-Applications-Using-jQuery-And-ColdFusion-With-Ben-Nadel-Video-Presentation-.htm

I found it easy to follow his presentation but I am not sure with
claypool...

chris thatcher

unread,
Sep 27, 2010, 10:01:57 AM9/27/10
to jquery-...@googlegroups.com
I can certainly look at providing an equivalent example.  I could probably get it done very quickly.  In the mean time I'd recommend looking at the source code for http://github.com/thatcher/recordsofexistence and visit the site over at http://www.recordsofexistence.com/

Its a very small application that is actually a single url application until your disable javascript in the browser and it runs as a server-side application (aka progressive enhancement).  It also has a nice mobile stylesheet for iphone and android.

Claypool, I would argue after looking at Nanal's slides, is an even more forward thinking framework which allows you to build apps like you would server-side apps and then simply decide which, if any portions of the application you want to leave on the server, or move to the client.  It is a very DRY approach because everything is written with jquery/javascript/html (even the 'server-side' code).  So moving it from server to client requires no additional coding.

Much of the patterns used to achieve this are architectural patterns.  You'll notice that every url from recordsofexistence exposes itself as json, for example:

http://www.recordsofexistence.com/artists?fo=json

Notice also that every template is accessible via an http request as well:

http://www.recordsofexistence.com/app/templates/html/pages/artists.html

Regardless of where the application is run the templates are loaded via an ajax request and rendered using the json from the application.

On the client we simply use a technique called Hijax to intercept link clicks and form submissions, load the template and data, and render client-side.We have enabled a few optimizations, precompiling the templates and could have even prebundled the data services to make it purely client-side. 

Claypool is also very concise and readable.  I'll try to create some slides as I go which provide just enough information.  Claypool is a very robust, though small framework and is used in production for many projects including at the Library of Congress.

Thatcher


--
You received this message because you are subscribed to the Google Groups "jquery-claypool" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to jquery-claypo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jquery-claypool?hl=en.




--
Christopher Thatcher
Reply all
Reply to author
Forward
0 new messages