Non AJAX alternative for mobile phones
I am currently working on a forum and using a lot of raw AJAX in it for things like showing new threads, adding new thread, new comment, login, watching profile overview etc. But low bandwidth mobile connection create a mess out of the AJAX. So I would like to have a non AJAX solution for mobile devices. Since I already have the AJAX solution written modularly, how can I add this ne开发者_Go百科w functionality without losing the modularity? Thank you.
As you've probably seen, many sites have a separate "mobile" version of their interfaces, usually via m.<somesite>.com (m.facebook.com, m.twitter.com, etc.). Whether or not they make use of AJAX is another question, the important part is that you should be designing a separate interface for your mobile clients.
You may choose to disable AJAX for the mobile version of the site for bandwidth/responsiveness reasons, and if you do, the "modularity" of your existing AJAX code won't matter. Since your interface will be completely different (different CSS, [potentially] different markup), the modularity would be contained in the business logic of your app, not the client side html/css. Remember, this is if you use no AJAX (and probably very little JS at all) for your mobile site.
If you do plan on keeping AJAX around for the mobile devices, it's hard to tell you without seeing any design or code "how" to keep things modular. It depends very much on what your code actually looks like. However, it doesn't really seem as though your question is specific to AJAX methodologies.
精彩评论