vteam #638 was hired to develop a web application using the legacy styled custom core PHP code. For review, a basic set of old codes was provided by the client. Firstly, vteams engineer Muhammad Saleem had to understand the legacy code and develop the application features within the given deadline. In order to achieve a maintainable, reusable and scalable code base, Saleem had to apply some optimizations according to the coding standards.
To further organize the code, the following were defined:
- Re-usable views
To use common functions in the application, basic query builder class and some helper classes were created. For real time messages, HTML 5 server notification was used.
Saleem modified and improved all the existing features of the application to save time. After that, he created multiple user level directories for each type of user i.e patients, physicians, pharmaceutical companies and admins (including super admins). As most of the views were having similarity, so he created common views & models in the modified modules and also included them in each directory file. Hence it saved the time of development and maintenance was made easy.
Using modular approach, a good level of optimization was achieved while maintaining the old style core PHP code. The application was developed as per the client’s requirements within the given deadline. As an outcome, a stable code base was achieved and made it maintainable, reusable and scalable for future use.