Looking for future: AJAX via Atlas - good or bad [Articles]
Web Services
Atlas provides us with very easy ability to call Web services. This is very simple now.
December release even support session (September releases didn't).
Any web service could be called if it is defined in <script> block.
Somewhere in client Page Load, Atlas generates a proxy class with function
which makes such call completely transparent from JavaScript.
Also very good that such function is asynchronous - you need
to provide additional parameter OnMethodComplete,
which will be called when result will be returned.
I was able to relatively easy create a simple demo - grid which operates through Web Services.
My Web service generates a Html code which was replaced into table cells using innerHTML property.
Atlas and Web Controls
This is good and simple when trying to work with HTML controls. If you need to add some ASP.NET controls -
you can count only on yourself. I lost many hours to add validators. In general, my strategy could be described as:
Fortunately, I was faced with relatively simple controls: repeater, textbox, button, and RegularExpressionValidator.
"Atlas controls"
In September 2005 version of Atlas, it has a set of controls which
provided unique functionality - TextBox with autocompletition, ListView.
It was strange to see parallel hierarchy of controls in ASP.NET and it was removed in
December Release.
Instead, we get Extender concept.
For example, AutoCompleteExtender
able to turn simple TextBox, Input with type="text" (or maybe even something else) into
AutoComplete-style control.
DragOverlayExtender add drag to any control.
How this is implemented? Atlas generates a special xml in your page,
which defines all this behavior. On page loading, this xml is analyzed, and necessary
JScript classes instantiated, initialized, and configured.
And there is a fcuk. How we could even talk about dynamical page behavior, if we could not create new controls dynamically?
We cannot add AutoComplete to our edit box, which appears in Edit mode of grid.
Who will survive
I could see two options:
Some library which provides completely new and customizable(!) tree of controls to use
AJAX advances
--- or ---
we need to find (or create) reasonable and easy to use way to create and manage collection of atlas controls using JavaScript.

0 Comments:
Post a Comment
<< Home