Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Maybe I'm doing it wrong, but in my experience, developing and maintaining heavily ajax-based web apps is much more difficult then a "more standard" web app.

I'm not talking about an app that uses ajax to load in some data here and there, but the style where the page the server sends out is just a frame, and all the data is filled in at load time.

I'd love to hear from those with experience in developing these types of apps. My personal experience is that they take more hours to both build and maintain.

share|improve this question
    
How do you define a more standard web app? –  Chris Jun 3 '11 at 16:37
    
one that doesn't use ajax for everything? For example, 37signals webapps are decidedly non-ajax, despite the fact they use a sprinkling here and there –  Erik Jun 3 '11 at 16:39
1  
More difficult than what? Than something that uses hacked-together, non-standard technologies to achieve the same results? If you make your app more complex (e.g. by adding intrapage interactivity) it's only reasonable to expect some increased cost to maintain it. –  Alex Feinman Jun 3 '11 at 16:56
    
Specifically, are you asking whether the sorts of websites Ajax is used on tend to be harder than the sorts of websites that don't use it, or are you asking whether Ajax websites are harder than non-Ajax websites for the same functionality? –  David Thornley Jun 3 '11 at 17:22

3 Answers 3

I would put forward that both developing and maintaining an application that uses JavaScript is a more complex and more challenging task than developing "classic" web apps.

The reason for that lies with the simple fact that the more heterogeneous technology stack you use the more difficult the work will be.

In this case with JavsScript what we basically have is programming against an automated server output which on its own is a weird idea. The pages of dynamic web applications are generated on the server using some programming language. At the server side you get all sweeties like syntax check, type check, all kinds of automated analysis and refactoring tools are at your disposal.

JavaScript works on the other side of the fence, where there is no information about the big things happening on the server. JavaScript work against an auto-generated markup which is rather volatile and is subject to change. Which is why a developer must pay attention to keep both in sync. The larger an app gets the more challenging the task becomes. And that task is typically a manual work which cannot be automated sufficiently to seamlessly scale with your app.

Therefore yes, JavaScript-rich apps are more difficult to maintain.

share|improve this answer

I find that long term that my ajax apps (all intranet's) are easier to maintain because they seem to me much more modular. For instance if I have a page that then loads other content into containers that same content can be easily reused and rendered elsewhere. Source code for each piece is in different files for the views and methods on the controller making debugging/enhancing an easier task. It would really depend on how your using AJAX and how your setting your apps up.

share|improve this answer

The difficulty is primarily a question of experience. If you aren't experienced in maintaining heavily AJAX-based web apps, then yes: it is more difficult.

However, there does seem to be more complexity in a UI model with rerendering capability than one with a single render, like a traditional web page served via a single request. This is true for a number of reasons:

  • The rendering code is divided between server-side code that performs the initial rendering and JavaScript code that performs client-side rendering. This can be made easier by, for example, using JavaScript on the server as well as the client.
  • In general, a lot of your code may need to be duplicated (e.g. validation) on both the client and the server.
  • Rather than directly rendering data into HTML with server-side code, you need an AJAX handler that formats data into JSON, and then more code to format the JSON into HTML. Frameworks can make this easier.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.