public

Maintaining large JavaScript applications

Most people think that it is extremely difficult to maintain large JavaScript applications. And I tend to agree with them, maintaining large JavaScript apps is nearly, if not entirely, impossible.

10 years ago

Latest Post Deferring decisions in Evolutionary Architecture by Tim Sommer public

Most people think that it is extremely difficult to maintain large JavaScript applications. And I tend to agree with them, maintaining large JavaScript apps is nearly, if not entirely, impossible.

Only JavaScript applications?

It's fair to say that maintainability directly relates to the complexity, scale and code quality of the application itself. If it's difficult to write, it will most likely be difficult to maintain.

There are plenty of maintainable large-scale .NET and Java applications out there. Yet in my experience, there are just as many unmaintainable ones as well. Complexity and magnitude of a project are certainly factors. But the developers' experience, the development process and the technical architecture are equally important, if not more important.

It is true that some features of the JavaScript languages make it more difficult to create maintainable architectures. Dynamic types. anonymous functions and global scope are just a few examples. But creating maintainable architectures in JavaScript is not impossible. You just need the correct toolset and experience amongst your developers.

Larger than life

What is a large application? Sure, huge numbers of lines of code in your application classify it as a 'large' application. But I've seen small applications that were written so badly, that it took hours to just understand it's basic functionalities. And I'm not talking about just JavaScript applications at the moment.

You should never write 'large applications'. You should write small, maintainable modules; that are simple to test, read, write and understand. And if you do that correctly, it doesn't really matter what technology stack you use. If you write SOLID code, you will be able to maintain it. In all technologies, in every team, in every language.

Maintaining JavaScript applications

Make no mistake, maintaining JavaScript applications is harder than maintaining applications created in Java or C#. But if you take the following points into account, you should be fine:

Tim Sommer

Published 10 years ago

Comments?

Leave us your opinion.