Hi, I'm very proud to announce ucw+ implementing ajax.
* What is ucw+? This is an add-on to ucw_dev repository implementing event-based web programming. It makes easier to write web applications and provides a desktop like programming style to web applications. * What is event-based/event-driven programming? Event based programming is the idea that decouples controller from the view. Current <ucw: tags couples view(html) with the controller (actions) and makes html output unreadable, unmaintanable. So, event-based programming allows us to define controller seperately and blesses us with the MVC pattern. * What about ajax? ucw+ implements ajax very cleanly and elegantly discarding <ucw: tags. As said, It encourages implementing controller seperately via (render-javascript ajax-component) method of ajax-component. The rule is, provide all necessary actions in the controller and provide only permalinks in the render method (i.e. (<:a :href (href "show-user.ucw" :id *id*)) so that search engines can crawl. This cleans the view(html) which can be observed in the tests. Also, as a bonus, every ajax-component has a render-css method which provides component specific style. Via this component specific style option, It enables us to produce "style customizable web applications" which is a unique feature afaik. Ucw+ enables us to connect any DOM events of any html element, and resulting applications will be more interactive and more responsive. Finally, i've added some dojo fade-in/out special effects. * Does ucw+ interfere with ucw_dev? No. ucw+ does not change/alter anything that currently ucw_dev has. This's a very big advantage for those who wants to use vanilla ucw_dev. I'll be happy to merge ucw+ with ucw_dev if everybody likes the idea. * Why not ucw_ajax? Current ucw_ajax has lots of ucw_dev refactoring which i personaly has strong opposing ideas. Let me summarize them: - Action refractoring is not needed to provide ajax actions and complicates action handling a lot. I didn't like the raw-request-handling macros since it breaks the usual request-response loop. It's very hard to debug and catch the cycle for me:( - with-action-args macro is nearly the same as in lol code that Drew Crampsie owns. It is very long, hairy and unmaintainable imo. - Coupling controller and view makes "back-button" support impossible to implement since frames are going to expire and ucw will tell you "No Frame/Action found". This is a very big design handicap since average web users will use "backbutton" a lot. I'vent implemented back-button support yet since i couldn't able to run backbutton support of dojo.io.bind but the rest is trivial, just go to previous frame and call render method of the current-window. - Disabling frame generation at action handling is something that disobeys the nature of the ucw and i really didn't want to break session/frame/action chain. - Current ucw_ajax supports only onclick event which is not enough to implement an interactive web application. To hook another type of event, users have to implement additional js stack and modify <ucw: tags which is a hard task for average user to do. - ucw+ js stack implementation is much smaller and readble than current ucw_ajax. - afaik, ucw_ajax does not support IE6. (Attila, please correct me if i'm wrong, dojo.dom.textContent fails in IE6) * Which browsers it supports? I've tested ucw+ with Mozilla, Firefox, Internet Explorer 6 and Opera. On safari, ucw+ gives [Dom Exception 8]. Unfortunately, i don't own a Mac so fixes are welcome. * Enough, show me it in action. Aycan Irican is currently working on a project using ucw+, until it's done one may see tests at: http://coretal.core.gen.tr:8080/ucw-plus/index.core * How to use it? Just load ucw+ asdf system i.e. (asdf:oos 'asdf:load-op :ucw+) to get ucw+ code go into ucw package. It does not defines any packages in order not to complicate the situation more. To see the tests running, create a *default-server* and load ucw+.test system i.e. (asdf:oos 'asdf:load-op :ucw+.test) and go to the url http://localhost/ucw-plus/index.core. If you don't have a *default-server* running, it'll try to create a mod-lisp backended server which is what i'm using. I've provided the dojo profile that i use as c0r3.profile.js for users who wants to build dojo by their own. If not, just set *dojo-url* to "http://coretal.core.gen.tr/dojo/dojo.js" and use it over the net. *Currently*, as 07.07.2006, parenscript is broken. So, please unpull the patches belonging to that date. I'm sure Attila Lendvai is going to fix it soon. * Where is the code? To grab a fresh copy, one may execute: darcs get http://common-lisp.net/project/core-services/repos/ucw+ Have a nice day. Evrim. _______________________________________________ cs-lisp mailing list [email protected] http://church.cs.bilgi.edu.tr/lcg http://cs.bilgi.edu.tr/mailman/listinfo/cs-lisp

