There’s a significant difference between the code we’ve planned to write and the actual code which powers our final projects. The question is: is planning so important? Many developers say that it depends on client’s needs, others say they do not have so much time to devote to planning and there are also developers who simply rely on client’s emails and mockups (if any), thus skipping completely the planning phase. But when we look under the hood of a web project, the lack of planning comes out inevitably.
I’ve read several books on web development. In all of these books several chapters discussed the importance of planning, prototyping and brainstorming in the development process.
How many projects did I create so far? Ten major projects and a plethora of minor projects (mainly slight modifications). Among these ten projects, none was actually developed with a well-defined planning procedure.
This was because I didn’t make clear to the client that we needed to plan our project according to the following points:
- Target audience.
- Project goals.
- Usability and IA (Information Architecture).
- Content.
- Design.
For example, if you know in advance that the overall majority of your users access your contents through a mobile device, then you can focus on certain aspects of web development (e.g. application cache, responsive design, mobile frameworks etc.).
But if you neglect this useful information because you simply don’t have the slightest idea of who your users are (possibly), it’s more likely that you should double your efforts and your code.
You can access this information by simply consulting the website’s statistics. This will give you a clearer idea of how your code should be initially designed.
When a project is ill-planned or not planned at all, usually the underlying code is full of contradictions, redundancies and is lacking of flexibility. Flexibility means that when your client decides to modify the original design, you don’t have to rewrite all your code from scratch or modify hundreds of lines just to add a new feature.
It doesn’t matter if you follow the OOP approach or the procedural one: you can’t escape from the lack of planning. Using OOP, you’ll probably end up with giant classes which are mere wrappers for a series of methods that in some cases duplicate your code by performing the same action (with few changes) on data.
All the time spent with planning is useful when it comes to write down your code, now and in the future. All the time spent without planning is something that will lead you to future disasters.