This question popped into my mind a few days back, during a discussion about projects I’m working on. As a full-stack developer, I’ve had to experience both kind of frameworks, and I have to say that it’s not an easy one.
The fast answer is “start with what you know”. But as experience grows, the area of expertise of a developer grows as well. You become skilled at an increasing number of things, and you get to ask yourself more and more questions before starting a new project. You become picky.
So here is my guide to decide whether I’m going to start with a VueJS project, or a Symfony project. With a React project, or with a Laravel project. But first, I’ll sum up the characteristics of both universes.
Will your application allow users to create data to be shared with other client devices ? If the answer is no, go with a front-end framework. That’s what we did when developing BROMSE. It’s basically a meta-search-engine, just for books. Users don’t need to login, nothing about them or their searches is stored, so no database. The list of bookshops is a simple JSON file on our server.
But if your application does need to let users create data, back-end framework is not necessarily the go to answer. Off course your code will be closer to the “source of truth”, almost always on the same server. A back-end application is directly connected to the database(s), so treatments are really fast.
In the case of a front-end application, data can be stored on the client side, with tools like Web Storage or IndexedDB. But it may be deleted if your web browser needs space, or incoherent if you’re using multiple web browser. It’s not data that you can call persistent. You will need to use a distant database if you want your user to not lose their data, or if they want to share them between devices. And there is a lot of fine services for that, like Firebase, Backendless, or Parse. This last one you can even host yourself if you want to.
Back-end applications on the other end, will run on a server you chose. So you should know what it is capable of. And you have the authority to upgrade it if it becomes slow. Languages like PHP are also not compiled, but because you are in control of the machine your application runs on, you can write functions in C (just an example), compiled to machine code, and call them from your PHP. This is a good way to speed up heavy processing.
Applications nowadays tend to embed more and more dynamic elements. Of course if you choose to go with a front-end framework, you are probably aiming for a single page application (SPA), which is all dynamic.
So if SEO is something important to you, if you’re building a blog platform for example, go with a back-end framework application.
This is in the same movement as dynamic user interfaces. Real-time collaboration, like in Google docs where you can see every participant’s cursors, may be a main feature for you. And this means that the user interface must constantly be updated. Or maybe you need real-time in-app notifications?
Which to choose ?
Well, for some cases, it’s a no-brainer. Do you need SEO? Do you need to store data ? Is it all dynamic like a collaborative drawing app?
And for some others, it’s kind of hard to choose… You want an SPA but the SaaS back-ends are missing some features important to you. Or you’re developing a real-time collaborative CRM. In those cases, you may have to develop your own back-end in the form of an API, and start a front-end project also.
I hope this was helpful. Thanks for reading me. Have a nice day!