Building your own framework in the real world
No matter if you are working on frontend or backend. Building your own framework for your business activity is a huge mistake for me! It can be a very good experience if you are a beginner and you are learning a new programming language but not in the real world when teams of developers must work with the same software. Many companies write their framework because they want to have full control of the software but they often obtain the opposite result! I have seen companies that want security and then they work with Wordpress! I usually write a list of pros and cons but here there are no other advantages! I cannot find them and here are my reasons:
Reinventing the wheel
There are many frameworks for any technologies and any purpose. No one of these is perfect. We have to search for the best framework for what we need and NEVER change how the framework works.
For example: building a mechanism around the workflow of the framework is a BAD idea. I have even seen a framework written as a wrapper around Angular with no test cases, no documentation and only one person able to build some decent user interface. The final result sucks and the company wants to force teams of developers using this framework...
Frustration: writing a new framework means solving old problems that are already solved.
Following best practices and a style guide can be very good instead: use a well-known framework, keep the dependencies updated and build the app in the best and known way the framework suggest!
All available frameworks have all kind of tests. If you write your own framework you have to work both on framework tests and then build your application. Why wasting time writing something you can have for free using an online available and open source framework?
During the years you have to update the framework that becomes old and it will not be a good solution anymore for your new applications
You have to write documentation for all colleagues for usage, code snippets and more for anyone using the framework. Are you sure you want to waste time writing documentation instead of building something new for your application? Are you sure
New team members
if the boss decides to hire a new developer, he must spend time learning a huge and unknown framework instead understanding how the new application works and how to develop a new feature. And that's in the best case! In other cases, the new developer must debug the software AND the framework or even do the reverse engineering of the same framework to understand how all the things work!
Examples: in PHP you have great frameworks like Yii 2, Laravel or Symfony. There is no need to write another one for any purpose. Java: Spring and Spring Boot are great solutions with many features available. Spring Boot lets us save a LOT of time.
Legacy projects and applications
You have your own framework and your application is now old. You have no tests and no time to put your system under test. In this situation, you will update the project only if necessary and you will build a new project following all the best practices avoiding to be in this situation in the future. For example, you can identify the resources you need and expose them through a backend API. A frontend application will offer new user interfaces.
If you work with a custom framework, this software will be good only for your company. Meanwhile, other companies will require other open source technologies and I ensure you will not have time to learn them, Another frustrating situation where you probably spend your free time learning something new and more interesting rather than thinking and working on your custom, boring and custom framework you have since years now.
I have seen and worked with proprietary software many times over the years. They always fail and they often bring to many frustrating situations.
The world of software development is huge and we have to keep simple all things when possible. Building your own framework is NOT a good idea in any case.
If you think your framework is better than Spring, Spring Boot, Laravel, Symfony, Yii2 rather than Angular, React or Vue I encourage you to make it open source. You will gain a lot of popularity but I ensure it will be very difficult.