8

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.

4
  • How do you define a more standard web app?
    – Chris
    Jun 3, 2011 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, 2011 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. Jun 3, 2011 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? Jun 3, 2011 at 17:22

3 Answers 3

6

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.

6

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.

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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