Which framework should I use?
Frameworks are everywhere these days. You've got your frontend frameworks, your backend frameworks, your fullstack frameworks, your enterprise frameworks, specialization frameworks, and a dozen more. How are you suppose to choose just one, especially when it will affect your business forever as it moves forward?
Fear not, as a developer, I've used a ton of the biggest frameworks out there and I'm here to discuss what each of them provides, and what they may lack.
The first big question you should ask yourself is what kind of framework your business or website will need. I'm going to present this particular blog as an an interactive quiz style experience, but if you want all the info just keep scrolling down. Please keep in mind that I will only be discussing frameworks I have personal experience with, and some of that experience is more recent than others. Frameworks tend to go through multiple major version releases, and this affects the entire architecture for those systems. I am a certified developer in some of these frameworks, so I may not be an expert at everything they offer, but I've had enough time and experience with them to judge them fairly.
What sort of site are you building?
- Software as a Service Business
- Blog or Article-based Business
- Online shopping based Business
- Small Business (under 20 items for sale)
- Social media based Business
- Personal Website or Game
Does your site require any sort of user commenting or rating product system?
How many products do you intend for your site to sell?
- None, its revenue is ad-based or through stock shares
- Under 100
- Over 100
Will your site be storinig personally identifiable or sensitive customer information?
Does your site need a user registration process for your customers?
The first category, Software as a Service, or SAAS as its commonly referred to, is going to require the most consideration before choosing a framework. Typical SAAS companies have development teams of 3 or more developers who will work inside the framework you choose every single day, and if you choose one poorly, your business will have to work around that mistake forever, whether it costs extra time in development for every new feature or bugfix or if it just costs you in customers willing to invest in you to begin with. So what sort of framework options does a SAAS software model have and which one might be right for you? Keep reading to find out.
I won't lie, Laravel is my current favorite framework. I have used it for years, and it delivers on just about every front, which is why I'll talk about it first. Laravel has a templating system based on Blade which allows easy and fast modifications to its layout, which out of the box is completely vanilla/blank. Laravel has an impressive suite of baked in functionality, including almost every security feature under the sun (CSRF, DAL with injection/XSS handling, password management, redirect routing whitelisting...and more) and its documentation is bar-none on quality. It has some of the best documentation I have ever read, and that says a lot since I have read at least 4 dozen different site's documentation cover to cover.
Laravel follows an MVC pattern, with Helpers as well. It is flexible, easy to maintain (runs on composer) and extensible. As with almost everything on this list, it comes with thousands of packages in its library, although some are of course better than others.
I would recommend Laravel for any SAAS company looking for a solid framework to build their in house software on. Because of its package library, there is minimal to no bloat in Laravel's core build, which makes it ideal for performance and long-term maintenance.
Let me start by saying I have never met a custom in-house framework that has impressed me. Typically, these frameworks are scrambled together as proof of concept for tight deadlines, but there is no time allocated after the fact to correct or maintain them. Some of them have sort of frankenstiened features where someone has halfway-fixed some of the inherent flaws with the custom framework, others have piles and piles of dead code that does absolutely nothing. I've seen some clever hackery worked into custom frameworks (specifically in routers, APIs) but when you look at the competition and the time-requirement for building a custom framework vs using an existing one, unless you are a government facility looking for absolute control over all code (and disallowing 3rd party packages) I don't think a custom build is worth the time sink. I say this, having built custom frameworks myself, including the one this site runs on.
Drupal is a bit of behemoth in terms of codebase. It has a ton of functionality, but this is one system that has outgrown itself a tad. It has a nice admin interface for users, but its hook system and other elements of its database make it a system you'll need specialized devs who are experts in Drupal to maintain. It has an elaborate maze of database tables (over 100), each with their own very specialized area of influence.
The hook and module based system it uses is not overly difficult to learn, but the breadth of content within that system is so massive that it takes at least several months for a seasoned developer to find and memorize all the appropriate functions to call for every possible use case, rather than defaulting to building things from scratch (which will always take longer). Drupal is a framework that works well for some established businesses, but the sheer amount of bloat code and time-requirements for using the system I believe outweigh its value.
Back in its hayday, CodeIgniter was a big deal. Nowadays...not so much. Its been revived in recent years by a new team of devs, but I have not had the opportunity to use it since that revival happened. When I used it a few years ago, it had a nice admin interface but was a little cumbersome to modify the core codes for. I don't honestly remember too much about it since its been years since I last touched it, and it could have come a long way since then, but 2.x had some security vulnerabilities and other problems that would rule it out as anything I'd recommend for a business.
I would like to disclose up front that I have limited experience with Yii (under 3 months). From my time in Yii, I can say that Yii is quite usable and extensible for developers, although I cannot say with confidence how large its package library is or how secure or flexible its codebase is. What I remember is that Yii could be easily extended out to new functionality and it was not painful to use. Even though I've only had a few months coding experience with Yii, I'd say its a great option for a framework a business might choose to use.
Magento is a shopping cart style site builder, meant for large scale resale of hundreds or thousands or products. Its based on multiple layers of caching and XML parsing, with its own extensive admin interface for easy user-control.
Unfortunately, Magento (1.x and 2.x) frameworks have been outclassed while trying to catch up to themselves. The codebase it was originally written on is woefully outdated, with the XML-based parsing system in particular becoming a ruthlessly ineffecient way to manage the organization of a page structure, and crippled by its MVVM/Database structure, which requires an extensive knowledge to even use properly with prewritten functions because of how outdated it is. XML as a data-storage language has since been outperformed by JSON repeatedly, and organizing your layout through XML has been outdone time and time again by templating languages like Liquid, Mustache, Twig, and Blade. The largest problem with using Magento nowadays is that very few developers are competent in its systems due to their age, and one false move from an junior developer within this particular framework can cost you dozens if not hundreds of man hours to repair, rewrite or undo. I would not in good faith recommend Magento as a framework to anyone.
Magento does have an extensive library of pre-built packages, but they are almost always unvetted. I have personally seen security flaws, functionality bugs, and several other major issues with the package library that Magento maintains, including mistakes from junior devs as mentioned above, so if you choose to go this route, know that you do so at your own risk.
Slim is exactly what it claims to be--a lightweight. It doesn't come with much of anything prebaked, and that makes using it quite challenging. Its not a bad framework, but I'd say its actually too small to be good without significant build time dedicated to growing its codebase. It relies on composer and has a well-written coebase, but again, there is not enough of it to validate using this framework for a business in my opinion.
Oh Phpbb. I have such mixed feelings about this framework, mostly because of the vast chasm that exists between 3.0.x versions and 3.2 versions. 3.0 had security issues, problems with extending its code base...the list is very long. 3.2, however, seems to have patched all the security problems, completely reformatted how its extensions/modifications systems work so that it is much simpler to write for and maintain, and added improvements for everything from php 7 support to responsive design. Phpbb 3.2 is likely the best free forum framework that exists.
The phpbb admin is not clean, its clunky, but its functionality is solid. It has almost everything you could want control over baked into its admin interface somewhere, its just difficult to navigate and use without an experienced developer to help.
Phpbb has a massive library of code for its extensions, and it has it separated out by the ones that are approved and the ones that are still in development (or unapproved). This is something not every framework does, but its hugely helpful in knowing which extensions are safest to use for your site. If your business is game or social media focused, I highly recommend PHPbb 3.2 as the best free forum option available.
Got over a hundred products and not sure the best way to sell them? Shopify is probably your best bet. Shopify has a clean admin interface for easy management of your products, and uses the templating language Liquid for its frontend design control. Shopify is the only framework on this list that uses Ruby on Rails, which makes it unique in other ways as well. It has several premade SDKs for Java/mobile but can be extended out using its Ruby API as well. Warning, biased opinion incoming, but Ruby is one of the easiest backend languages to pick up and learn as a dev who has worked in literally any other backend language like python, php, C# or C++. That means finding developers to work on your store if its built in Shopify will likely be painless but also riskier, as developers who have worked in nothing but Ruby may be over-confident in their ability to code due to the ease with which that particular language can be used.
Shopify has a large library of extensions in its app store, and it has an approval process for those apps which is great. This ensures a high level of quality from the apps within that store, and provides users with hundreds of options for modifications they can click to install on their site. For large product-focused businesses looking to get going quickly, Shopify is the best framework option on this list.
All of these options are grouped together because they are frontend code only. This can be great for some business models and downright awful for others. If you're looking to have a lot of user-specific data such as tracking activity, comments, carts and such, using a frontend only framework is likely not a good road to go down. If you're looking for a basic front-facing site that can offer things like custom interactive elements or planning to sell under 100 products, I would say these frameworks are likely your best options. They can be paired with backend frameworks, but MongoDB is a giant store of JSON encoded data in place of a database, meant to run immediate stored code without the hassle of updating often. These frameworks are easy to decouple from each other, so they have a high degree of reliability on how they render out and are not fail-proof, but close. If you're working with Reactjs in particular, one part of your site may break, but the majority of it should still function even without that component whereas most other frameworks on this list will take down your entire site if they crash.
For small businesses and SAAS companies, these are top-notch choices of frameworks to use. Easy to maintain, thousands of external libraries to pull from, and easily extendable.
Security is an issue with frontend frameworks like this, however, given that almost all of the code for your site is exposed to the user. If you intend to use things like a rating/review system, a user-profile, or other features that would require data that is specific to each user, you'll need to stay vigilient about keeping security standards high when working with these frameworks, or use a different framework.
Wordpress is the framework every developer loves to hate. Its not hard to work in, but its not fun at all and it follows what I consider some bad practices in how its system works (echoing php out to the fronted instead of using a templating language). Its been a couple years since I last touched wordpress, but it has a hook system for its functions similar to drupal, which requires someone knowledgable in its particular functions to know which is appropriate to call for every piece of functionality. Its plugin system build is very decoupled from the rest of its code, which is great, but its core-functionality is just about impossible to modify. For a first time blogger, wordpress is a great option since their admin interface is top of the line in usability. Wordpress also has plugins and migration tools for a lot of the other frameworks listed here, so if you've used one of these other options and come away dissatisfied, Wordpress might be a good new direction to try since it has many of these tools readily available.
I'd recommend wordpress to anyone looking to start a blog with no web experience, and for small businesses, but not for larger companies looking to sell hundreds or thousands of products or offer specialized coded features. If you end up using a dozen 3rd party mods for your website, it will make changing even the tiniest pieces of functionality quite difficult, and maintaining a host of custom built plugins can be just as challenging.
I'm going to talk about these two as if they were the same thing, just because their products are so similar. Wix is free for initial use, but requires the Wix logo to be visible in your footer of every page, whereas Squarespace is pay for initial use. Both of them have great build your own site tools, but are limited in the scope of what they can deliver by that same token. Need something that isn't available in the preset suite of tools they offer? You may be out of luck. I would recommend taking a close look at the full list of what they have available and making a decision then about whether or not one of these two site providers will work for your business. They work best for small businesses, and require a dedicated webmaster (but not a developer) to maintain. These are excellent products for a first site or a personal site, and I have seen them work well for smaller businesses as well.
There are other frameworks out there for PHP and other languages (Joomla, Django, Ruby on Rails) but for web based businesses PHP is still king in choice of frameworks.