How to Build Trust on Your Website: The 5-Second Test
You've just learnt HTML and CSS, and everything seems straightforward. But when you go onto a forum, everybody is having a go at React, Angular, or Vue. One person firmly recommends a particular tool, another thinks it's excessive, and at that point you start to question whether you've been doing things incorrectly.
The straightforward answer is that it all comes down to what you're constructing. Although frameworks are useful, there are many websites which work perfectly well without them. If you know where the boundary is, you'll avoid a great deal of confusion.
A framework is simply a ready-made foundation consisting of a collection of tools, patterns, and rules which show you how to build an application; rather than creating each component from scratch, you carry out the development within a structure that has already been tested by other people.
It's somewhat similar to preparing a meal. You could chop it up, grind it, and mix it all yourself, or you could use ready-made ingredients if you're short of time. In either case, you end up with a meal, and the appropriate choice will depend on the occasion.
It is also necessary to distinguish between frameworks and libraries. A library is like a toolbox that you use when you need a particular thing, whereas a framework generally determines the overall structure of your project. Although React is in fact a library, Angular is a complete framework.
The use of reusable components reduces the need for repetition; for example, an online shop can create a single product card and use it on all the pages.
The reason large codebases don't become a mess is that consistent patterns are maintained.
When everyone adheres to the same conventions, it becomes much easier to read a colleague's code.
There's also extra functionality in the form of ready-made solutions for routing, testing, and data handling in most ecosystems.
The larger the project, the more important these advantages become.
It isn't always the case that a personal portfolio, a café website, or a single landing page needs a framework in order to be well built, since plain HTML, CSS, and JavaScript are often sufficient, and the use of a framework usually brings extra weight without providing any additional value.
Imagine an appointment-booking app that has logins, payments, and real-time updates. It's quick and messy to keep everything in order by hand, and having a framework provides you with a structured approach and reusable components.
What we're aiming for is not the most spectacular technology; rather, it's the simplest option that will accomplish the task.
"Vanilla JavaScript" refers to writing JavaScript without the use of any additional framework or library. It is flexible and helps you to understand how the web works at a fundamental level, which is why it's well suited to small projects and simple interactions.
You are asked to learn new ideas at the beginning with frameworks, but they prove their value when the interfaces become complicated; neither approach is superior by default, so you should consider the size of the project, how long you'll keep it, and what you already know.
React is a library used for creating interactive interfaces such as dashboards and online shops.
Angular is a complete framework designed for large, structured applications.
Vue.js is a flexible and approachable framework for user interfaces.
Django is a Python framework used for handling the backend logic and for creating complete web applications.
Bootstrap is a front-end toolkit which includes ready-made styles and responsive layouts.
The tools cannot be swapped over, so you should match the tool to the task.
A great number of people choose a tool merely because it's currently in fashion, while others go straight for frameworks and leave out the fundamentals. Both of these practices make the learning process more difficult than it should be.
Start by learning HTML, CSS, and JavaScript. Do a number of small projects, and don't feel the need to learn three frameworks at the same time, since it usually doesn't help in the early stages.
Is it possible for me to become a web developer without first learning a framework?
Yes, it is possible to build real websites using only HTML, CSS, and JavaScript, although knowing a relevant framework can lead to more job opportunities.
Should I study JavaScript before learning React?
Yes, if you understand functions, arrays, objects, events, and asynchronous code, then React will be a lot less confusing.
Does a small business website require a framework?
Most of the time it doesn't; instead, a content management system or a website builder carries out the task.
What framework should I start by learning?
Begin with the basics of JavaScript, then have a go at React or Vue for the front end; if you'd rather work with Python on the backend, you should consider Django.
Frameworks can be useful tools, but they aren't something that has to come first; you should master the fundamentals, build small projects, and then introduce a framework only when it actually solves a problem.