Ajax Development: some keys to a modern architecture javascript
a time when Ajax is spreading to invade many jobs from and some specialized sites where more and more code returns the client side, it becomes necessary to ask some questions about the architecture developments Javascript.
These questions are these:
1 - use-t-on (or not) frameworks integrating server and client (Backbase, GWT, webdev)?
2 - The javascript is located there only or client-side then he will also be generated by the server?
3 - What js libraries use client side? how to articulate them?
4 - Use-t-on (or not) as a true JavaScript object language with " namespaces" and " classes" inherit from each other?
5 - What layers distinguished in the development JavaScript and how to articulate them both and with the layers server?
6 - What architectural practice generally followed in js?
I give you faster MY answers to these questions ... I quite frankly slice give rise to better the debate!
1 - A server-side Ajax framework?
No, delegate the Responsibilities of the client server technology is a bad idea. It may allow you time to be more productive, but certainly not over time. To address problems on the client side, it is of course much more efficient to use a client technology ... although it may seem painful to some (re) making Javascript, XHTML and CSS.
2 - JS client-side only?
Yes, as much as possible ... The advantages are many: clear separation of application layers, performance, productivity development in the long term.
3 - what JS libraries?
A good bookstore and a single "core" (prototype or jQuery is my first choice, but it is not forbidden to look elsewhere ... being very careful!) To be used in background: no question, for example used only for prototype Ajax.Request! The core library is intended to event handling, DOM manipulation and AJAX calls throughout your code.
If you have chosen the core library, elements that come to hang up (especially the advanced graphical effects) you should not miss.
4 - classes and namespaces?
Yes, of course! Although Javascript does not natively these possibilities, it is quite possible to simulate and to reap the benefits that it has long server-side to these practices. Prototype is an excellent example.
5 - which layers side JS?
At a time when local storage becomes a reality in Ajax applications, establish a real data access layer seems increasingly inevitable: read about the very good brief team of Google Gears.
Generally, the layers will look like side JS increasingly to those commonly known "server side" data / data access / business logic / interface. The challenge will be to link this with the responsibilities assigned to the server: the task is feasible in reality.
6 - Good architectural practices JS?
This is obviously not quite the same as on a server technology: JavaScript is a language very specific (but not a sub-language!) And the rich client poses very specific problems. However, it does not, rather, to use design patterns to properly address and resolve most problems: a ride on Ajax Patterns be useful to anyone who asks good questions on the subject.
Go ahead, react, you indignant, run me flowers, insult me! These issues are crucial, then it is better to talk ...
0 comments:
Post a Comment