Programming for other developers: Frameworks and Dependencies

Developers tend to have this amazing sense of power.  Using only a computer, they can create things that bring useful features, knowledge, and particularly value to other people.  The developer tends to be coveted for their creative and problem solving skills, and for delivering solutions to product managers, project owners, and ultimately customers.

This ability to impress people and be useful is an empowering experience, but it also makes it easy to forget one important consumer of the product: other developers.  

The code that you as a developer create today is likely to be around for a long time.  You may create something today and then not see it again for months or years, or never.  More importantly, perhaps other developers will continue working on your creation. When your future self or others look at your source code, what will they see beneath the surface?  Will your creative power translate into something that another developer can utilize or improve upon without tearing their hair out?

Maintaining a developer friendly codebase and application is an important part of developing software. Perhaps the best place to start considering the other guys, or the future you that has forgotten everything about the product, is the frameworks and libraries that you use to create software in the first place.

When starting a project, or adding on to an existing project, it’s important to consider how easy it is to use and maintain the dependencies you are adding.  For example, when starting a new PHP project, there are a wide number of frameworks to choose from. Do you use a well established framework, do you use a framework that caters specifically to the exact needs of the application, or perhaps do you create your own software from scratch and pull in dependencies through Composer?

Choosing frameworks and dependencies can have a major effect on the maintainability of your project.  Selecting a great looking framework that has no documentation or is not actively being used by many others means that down the road you might run into time consuming problems that lack easily accessible answers.  Or perhaps you may have a question that is not answered by the documentation and you have to dig through the source code yourself, taking away valuable time from the work you actually need to do. Even the most well intentioned framework or library is a gamble if there isn’t documentation, a community, and a team of developers supporting it.

Once you’ve selected a framework that seems like a good fit, it also helps to utilize the resources provided by the framework in the manner described in the documentation.  If the framework provides a router, use the router in the way described as much as possible. This will save time for the future you or other developers facing similar problems down the road.  It will be easier to learn how to modify your code as well as solve problems.

The next time you start a project, remember that with great power comes great responsibility.  Consider how easy it will be for other developers to pickup and work on your project.  Consider also how much time and frustration you can save by using proven code with documentation, and supported by a community of people trying to create things using the same tools you are using.  The time savings during the project will more than make up for the quickness of haphazardly throwing things together in the beginning.


Leave a Reply

Your email address will not be published. Required fields are marked *