Forum OpenACS Q&A: Re: ]project-open[: Current thinking about AJAX, Sencha and AOLserver

We do a lot of Sencha+OpenACS work, so here are a few notes/suggestions:

-- Sencha Touch has some issues with many HTC android devices and many pre 2.2 android versions with things like scrolling performance. It also doesn't work (although I haven't tested - they don't claim support and I'm pretty sure it would fail to work) on Windows 7 phones (although the market share is tiny, Gartner thinks they'll pick up steam and Nokia will probably give them a big boost) nor several custom browsers (opera/firefox mobile) vs the native webkits on iphone/android. If you are fine with 85% of the mobile market in compatibility, then great - otherwise you would want to use jquery mobile.

Remember, both can take advantage of json data from a RESTful API, and you have to have a different front-end anyways for mobile, so its possible to use jquery mobile but Sencha's ExtJS.

-- I think it will probably be difficult to use openACS but not aolserver or at least not worth the trouble. It seems like switching from both at once would be less painful. What does aolserver do that you don't like?

-- If you want a really tiny REST interface that returns JSON, PHP is probably the most obvious choice, but you could also look at node.js (its javascript on the back end) as it makes that very convenient.

-- start your forms in Extjs 4.0 (vs 3.X) since they have trashed the form layout (now you just use regular layouts like vbox to position elements), as well as graphing being migrated to HTML5 from flash.

Your note here:

"- There is a smooth migration path with little overhead: We start with rewriting the most important pages in Sencha while maintaining the HTML GUI for the more complex cases. Later we could get rid of the HTML GUI completely."

Is exactly what we did. Its too big to replace openACS/aolserver, re-write all the code, etc. at once.

Taras,

Can you discuss accessibility in relation to Sencha ExtJS? It seems that it is much more work to make that type of UI that totally builds the DOM from Javascript accessible.

If you have an experience with that type of thing it would be very helpful.

Thanks!

By 'accessibility', do you mean ARIA/Section 508 compliance like keyboard shortcuts, color themes visibility-impaired users, etc.?

Or you do mean accessible like being able to programatically access variables, objects, UI widgets and manipulate them like you would with jquery selectors/manipulation where the DOM structure is more traditional?

This one: " ARIA/Section 508 compliance like keyboard shortcuts, color themes visibility-impaired users, etc.?"
Our apps have been largely for non-government or general public usage and haven't had such compliance concerns, so I wouldn't be an expert on such matters, but they do have some examples:

keyboard navigation:

http://dev.sencha.com/deploy/ext-4.0.2a/examples/key-feed-viewer/feed-viewer.html

tree keyboard navigation:

http://dev.sencha.com/deploy/ext-4.0.2a/examples/tree/treegrid.html

You can create event handlers on pretty much everything - I don't create a lot of arrow-key handlers but I've written plenty of right click, enter-key, hover-over, etc. events and you can bubble those up for some more generic handling.

dark theme:

http://dev.sencha.com/deploy/ext-4.0.2a/examples/form/form-grid-access.html

but basically all the styles/colors/buttons are now css driven and don't rely on images (unless you use icons) so its pretty easy to theme.

Hello everyone, I bump this old thread to share my opinion as it is quite strong and this is an important matter in nowadays Web.

I do think as you that client-side Ajax and REST webservices on the server side is the way to go for the web (and most of general purpose applications too, maybe), but I would definitely not strive to get rid of Tcl instead of PHP. Rather the countrary.

I find Tcl much more suitable to web development, in particular for its string manipulation capabilities and funcional-style features, such as executing a string as a piece of code in a very simple way.

Plus, OpenAcs is a perfect structure for developing webservices: cleanest interaction with db ever, auto-sanitizing of strings in queries, clean definition and checking of allowed page query variables, a clean and simple filesystem API, the adp templating system... And all this stays true even throwing away all of the HTML user interface features.

Programs in Tcl/OpenAcs are shorter and clearer, and all the Tcl you will ever use is in 12 short webpages... the rest is in the specific api-doc page which is auto-generated each procedure you declare.

The plus of PHP is... the user base.


Speaking about ExtJs: it is a very powerful tool, but I personally don't like it. I understand this is all a matter of taste, but I don't like frameworks which are too structured, because they always end getting in my way. While it certainly tries to hide and encapsulate everything, I found myself (and most of the people on the forums, even Sencha's) wrestling with the framework, with very unelegant results. Also, as we can see with ajax-filestorage package here on OpenAcs which is no longer functioning on modern browsers, you cannot rely on it on the long term, and this because it is a very complex and unstable library (in the sense of features, not plain bugs).

JQuery and it's extensions, make a more light and elegant, yet powerful choice. It is agnostic respect to your development style, saves you lines of code without really telling you how you should get things done, and can be engineered at will if you so desire.

A lot of strong opinions here. I want to make clear that all of this products are free software which I used and used to love, so I didn't mean to be disrespectful. This is just my technical opinion. If somebody would like to bring his/her point of view I would gladly discuss about it.