Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create web application with ajax from the beginning or add ajax later?

I'm working on my first Ruby on Rails aplication and it's quite big (at least for me ;) - database has about 25 tables). I'm still learning Ruby and Rails and I never wrote anything in Javascript nor Ajax.

Should I add Ajax to my application from the beginning? Or maybe it will be better to add it latter?

Or in the other words: is it (relatively) easy to add ajax to existing web application?

like image 459
klew Avatar asked Feb 13 '09 14:02

klew


People also ask

What way AJAX is used in web application?

Ajax enables a web application user to interact with a web page without the interruption of constant web page reloading. Website interaction happens quickly with only portions of the page reloading and refreshing. Ajax is made up of the following technologies: XHTML and CSS for presenting information.

What is AJAX explain steps required to process AJAX with example?

AJAX allows web pages to be updated asynchronously by exchanging data with a web server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.

Is AJAX front end or backend?

AJAX is a technology for asynchronous execution of HTTP requests from client-side JavaScript code. JavaScript front-end apps use AJAX calls to access the back-end services and APIs and consume data from the Web server over the HTTP protocol.


2 Answers

Jeremy Keith has written a great article on this topic, which he refers to as Hijax

In short:

  • Plan for Ajax from the start.
  • Implement Ajax at the end.
like image 105
Mark Hurd Avatar answered Oct 30 '22 07:10

Mark Hurd


Depends on how important Ajax is for the application. Since you are probably going to use Ajax for progressive usability enhancements only, I would say it is best to start with a traditional non-Ajax software, and add Ajax features only when you have the first features working. You can do this feature by feature, or write the whole software first, and then start ajaxing it.

Adding Ajax may be easier if you familiarize yourself with unobtrusive JavaScript techniques. Use jQuery instead of Prototype.js, or LowPro in addition to Prototype.js. For the latter, see e.g. Jarkko Laine's PDF book Unobtrusive Prototype.js.

like image 36
Antti Tarvainen Avatar answered Oct 30 '22 07:10

Antti Tarvainen