Design for Maintainability
Design for Maintainability
Take a look at what maintainability is, and why it is important to develop and design while keeping maintainability in mind.
Join the DZone community and get the full member experience.Join For Free
You've been hearing a lot about agile software development, get started with the eBook: Agile Product Development from 321 Gang.
There are many attributes to design for; however, to understand the beauty of programming, you must practice the techniques that come with Maintainability.
Let’s start with a few examples:
• When you want to add a logging feature in some layer/place and this will be achieved by modifying one place or couple of places.
• When that logging feature needs to be changed and all you should do is to drop the new logic in a specific path, change a configuration file, and restart the application if needed.
• When you want to extend a completed and operational functionality, and all you should do is add this new reference to your solution.
What Maintainability Means
It means many concepts and techniques. It means extensibility, modularity, reusability, pluggability, readability, clean code, separation-of-concern, and SOLID principles.
When we build a large software, we are thinking of it as tower-building: the more we expand in-depth and horizontally, the more we can expand vertically, and we have a strong base that can support the upcoming expansions.
For me, the Redundancy-Elimination as motivation is enough to apply the M; it leads me to develop many reusable components. It leads me to use the following techniques:
- Polymorphism (Late-binding)
- Generic classes/methods
- Events (Pub-Sub)
- Reflection (Dynamic-programming)
- Custom attributes
- Extension Methods
Design a Skeleton with Joints for Pluggability
What Does "Design Skills" Mean?
- Assess design/architecture
- Ability to Refactor.
- Guarding design
- Developing a UML diagrams and technical documentations.
What Practices Will Help You Promote Your Software in the Maintainability Scale?
- Improve readability by writing a Clean-Code and following code standardization
- Well understanding of the code context witch you are going to add and layers roles, so you will add the logic in the right place.
- Is it Client or Server side?
- Is it Technical or Business?
- If technical, is it functional or non-functional?
- Is the new code relates to Abstraction or Implementation / Concrete?
- Is it PL, BL or DAL?
- Is it a schema definition or operational?
There are many advantages that come when you are designing for Availability, Reliability, and Scalability. With them you feel—in some situation—like that the “system” has a soul, like it's is reacting. Testability is an important software attribute; it becomes a development driver with TDD.
The ROI of Maintainability as you see comes here in shortened time, effort, and cost.
There no excuse to not write a well-designed code.
Whenever you are a developer, you are a designer. Remember, don't just be a technologist.
Opinions expressed by DZone contributors are their own.