Sunday, November 8, 2009

Importance of Design

Application Design is one of the most simple or sometimes one of the most complex activities for any Application Architect. This depends mainly on how you approach the problem at hand. Over the years programming languages have evolved towards providing the best support for creating good designs for applications. From the early days of "C" to the evolution of C++ and the advent of Java & C# and many other popular programming languages the real objective has never changed. It has always been to create simple, elegant, scalable and maintainable solutions.

I have a question. Is "C" a good programming language? If you can you achieve all the functionality with "C" then what’s the need to develop a high level language like C++ or Java or C# or any other? Right, you know the answer. It because "C" is a procedural language. It’s easier to design, develop, maintain & extend using an OO language like Java. Wrong. These are purely marketing terms used to sell or popularize any new language or technology. The real reason has nothing with these marketing terms.

Maintaining solutions require resources, people actually. Complex solutions require more people and time to change & maintain. Simple and scalable solutions require less people and less time. This translates into the one thing that makes this world goes around. Money. So, does it mean that new languages, frameworks, platforms and technology advances are made only to save money? The answer is yes and no. It's a bit like saying why have planes when you already have a car to travel. There is the very important aspect of saving cost, but there is also the important part of creating/innovating new ways of doing things.

But saving money while creating or maintaining solutions is a key part about creating new languages and frameworks. If Java/Servlets are good enough to develop solutions why to have frameworks like Struts or Spring? The same reason, save time & effort which in turn means save money.

Going back to the point of "C" being good then why Java. The answer from vendors is that maintaining Java solutions are easier than "C" or so we are led to believe. The reality is that this depends on the context of the application. A badly designed/written Java solution could be more complex to maintain than a well designed/written "C" solution. So what does this mean? It simply means that a good design for an application is the protection towards changing requirements and extending features. It helps save a lot of cost both in terms of development and maintenance over a period of time.

But one of the anomalies of software development is that few people actually give due importance to this aspect even though everyone agrees that a good design for any solution is very important. On paper all applications do undergo this part of the normal SDLC process. But mostly it’s just that. A part of the process that must be done. How well done most times really does not matter. Many Project Managers are willing to invest a lot of time, effort and money into Load Testing, Profiling & Bug Fixing. They are willing to commit more time & resources fixing the solution rather than spend the right kind of effort towards designing a good solution. Have you ever tried asking a Project Manager more time so that you can design the solution well...? If you have you would know the answer.

The loss due to this negligence and lack of foresight is that most solutions fall into the Continuous Correction Cycle.

The language, platform or framework does not matter, or maybe it does. But thats not the point. What is important is to design and design well the first time. But don’t leave it at that. Apply the same concepts every time you change the software diligently. It’s called as Continuous Design. And your application will serve you well, being fast, performant, simple to change and extendable as long as you use it. The importance of Design can never be understated and Simplification is the key to a good design.

Thanks for listening.

No comments:

Post a Comment