|
Val's Blog
Lots of stuff for Web 2.0 freaks and Javaholics
|
|
|
Alan M. Davis: "If you believe that you know the requirements better than the customer, you are part of the problem, not the solution." |
[ Login ] |
|
The AJAX technology stack is gently establishing itself as a de facto standard for developing Rich Internet Applications. Though, AJAX sure needs to mature a little bit more to become mainstream and to let common usage and design patterns emerge. I recently went through an interesting blog entry on Joe Walker's blog where the author states that his current project contains 2% HTML code (~100 SLOC), 4% Java code (~200 SLOC) and 96% Javascript code (~4,500 SLOC).
What this tells me is that as AJAX applications will gain in popularity and be increasingly deployed across numerous academic and industrial settings, AJAX developers will not only need effective tool support for dealing with all that complexity but they would also greatly benefit from integrating technologies with proven added value, such as AOP, into their JavaScript code. I won't delve into the details of AOP now as there are currently enough resources on the web that you can read during your next 15 reincarnations. When I look at a modern AJAX application what I usually see is lots of JavaScript code featuring functions, objects and prototypes where pretty much all concerns are mixed up. The only way of modularizing and organizing a little bit JavaScript code is by using distinct physical files that contain only related code and that can be included in HTML files when their code is needed. Period. You have actually no other choices than to mix your networking, event handling and layout concerns in the same JavaScript file. For this reason I have started writing my own AOP framework for JavaScript which hasn't been baptized yet. Then, as I was halfway through my AOP journey, I came across an interesting article that made my day on dotvoid.com titled Aspect-Oriented Programming and JavaScript, which explains that AOP support has been included into the Toxic framework. The support is still limited compared to what other frameworks, such as AspectJ, provide but in my opinion it covers 90% of the cases where aspectual code is needed. Basically, the Toxic framework provides the following support for writing aspect-oriented JavaScript code:
Introduction support is pretty complete whereas it is currently only possible to define an advice on method calls and nothing else. Moreover, there is no way to explicitly declare pointcuts. As I said, this is really far from being dramatic as Toxic AOP support should cover most of our needs for now. I thank wholeheartedly dotvoid.com for including AOP support into their Toxic framework. That should get me going while I finish up my framework since I don't have any a fixed release date planned as I have to deal with a pretty hectic schedule myself. If anyone knows of any other worthy AOP frameworks for JavaScript, please drop me a comment.
Update:
TrackBacks[0]
Comments[4]
Posted by val on July 23, 2005 6:12:08 AM CEST
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Content © Val | Powered by Pebble 1.9.1 |