Software design is an important part of software development. Designing your software properly before you start writing your code will save time and effort down the line. Here I've shared a few thoughts about planning and designing your software first.
Watch the video below to find out why its a good idea to plan your code and code your plan.
A common mistake that a lot of programmers make, is to have an idea of what they want to code and then, instead of planning it out first, they immediately start to code their idea without a plan.
They might think that they are getting their program out there quickly and don’t want to waste time on planning and designs first. They’ll just think about it as they code it.
The problem with this approach is that you actually waste time by not designing and planning your system first.
What can happen is that half way through coding your system, you can hit a snag and realise you have a major design flaw in the system which will prevent you from completing the project. This means that you have to go back to the drawing board, try to fix and update your current code and then continue. You end up wasting quite a lot of time going back and forth trying to re-fix the code.
Spending some time beforehand to design your system first, will save you time in the long run and bring out some situations that you would not have thought about otherwise.
Before you start designing your system, you need to determine what you would like to accomplish and have a clear-cut specification of the requirements that is needed for your system.
Once you have your requirements worked out, you need to decide on your coding conventions, best practices, tools and architecture that you are going to use for your project.
This is especially important if you are part of a team. Just imagine if everyone on the team has their own way of doing things. You will soon find your codebase in a big mess that nobody wants to touch.
Picking the right architecture for your project is just as important. It will influence your design and the tools you need for the project. You need to know which database you are going to use and the reasons for choosing that specific database. Is it a distributed system running off the web or a stand-alone application on a desktop or mobile device. Which front-ends would be needed, web-based with HTML and CSS or mobile devices with javascript or Swift. Will you use spring framework or JEE for the backend? What about the communication between the front and back ends? Thymeleaf templates or Restful Webservices. These are just some of the decisions that needs to be made.
Once you have worked out your architecture and tools to use, you can start designing your system by using use cases, class diagrams and sequence diagrams for example.
This will help you sort out your data model as well as which classes you will need and the relationships between those classes. Follow good design practices, to make your code extensible and easy to read.
You will then find that your code is much easier to write when you follow a good design.
Leave a comment
Your email address will not be published
Write a comment