开发者

How to do progressive enhancement when using Ext JS or similar tools?

开发者 https://www.devze.com 2023-01-04 00:39 出处:网络
Does it require deve开发者_JAVA技巧lopment of two almost separate front-ends for the app, one using Ext JS and the other one with no JS at all?Well, pretty much. If you really want a NO-JS version of

Does it require deve开发者_JAVA技巧lopment of two almost separate front-ends for the app, one using Ext JS and the other one with no JS at all?


Well, pretty much. If you really want a NO-JS version of your site, you will need to stick to very basic HTML, and a trip back to the server and a full reload with any click. If you want your real site to be ajaxy, then this would require two different front ends to the site.

May I ask, why are you worried about people with no JavaScript? There are very few people out there with no JavaScript, even mobile phones have decent JavaScript performance.


Your application should be built to allow users without js to access the same content. All form posts and action on the app must have server side handling. This is to allow for non-js browsers as well for security reasons as the js can be edited on the fly by hackers.

Once you have this basic functionality you can start adding your css to make it look good and add the js to add additional functionality with postbacks done by ajax. You should use feature detection instead of browser detection with your css and javascript as browsers are updated with new support all the time.

Therefore you only need one frontend which includes both solutions.

0

精彩评论

暂无评论...
验证码 换一张
取 消