Types of frameworks

Now that you know quite a lot about what a framework can offer you, you are in a position to decide what kind of framework you would like to use. In order to make this decision, it might be useful to know what kinds of frameworks are available. This categorization is nothing official, just some guidelines that we offer you to make your choice easier.

Complete and robust frameworks

This type of framework comes with the whole package. It contains all the features that we discussed earlier, so it will allow you to develop very complete applications. Usually, these frameworks allow you to create applications very easily with just a few configuration files that define things such as how to connect to a database, what kind of roles you need, or whether you want to use a cache. Other than this, you will just have to add your controllers, views, and models, which saves you a lot of time.

The problem with these frameworks is the learning curve. Given all the features they contain, you need to spend quite a lot of time on learning how to use each one, which is usually not very pleasant. In fact, most companies looking for web developers require that you have experience with the framework they use; otherwise, it will be a bad investment for them.

Another thing you should consider when choosing these frameworks is whether they are structured in modules or come as a huge monolith. In the first case, you will be able to choose which modules to use that add a lot of flexibility. On the other hand, if you have to stick with all of them, it might make your application slow even if you do not use all of the features.

Lightweight and flexible frameworks

Even when working on a small application, you would like to use a framework to save you a lot of time and pain, but you should avoid using one of the larger frameworks as they will be too much to handle for what you really need. In this case, you should choose a lightweight framework, one that contains very few features, similar to what we implemented in previous chapters.

The benefit of these frameworks is that even though you get the basic features such as routing, you are completely free to implement the login system, cache layer, or internationalization system that suits your specific application better. In fact, you could build a more complete framework using this one as the base and then adding all the complements you need, making it completely customized.

As you can note, both types have their pros and cons. It will be up to you to choose the correct one each time, depending on your needs, the time that you can spend, and the experience that you have with each one.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.245.140