Overview
Web application frameworks are software frameworks that are designed for the efficient development of web applications. The framework that is available for usage can depend heavily on what server-side programming language is used. For example, one framework available to JavaScript is Express.js.
Most web application frameworks nowadays follow the MVC design pattern.
MVC refers to the dividing of an application into various Model, View, and Controller parts based on the functionalities of each part. The Model contains the business logic, rules, and data structure of the application. The View is the front-end display that the user interacts directly with, and the Controller components accept inputs from the users and translate them into commands for the Model or View.
A web application framework that follows the MVC design pattern controls the web application process based on the MVC concept. This framework also provides development templates and functions to developers.
Learning Objectives
Many web applications in today's world are developed using a certain web application framework. If we want to get into serious development, we will need to gain knowledge about frameworks.
If we use frameworks, there are defined rules and templates that can be used which can greatly improve development efficiency. At the same time, certain frameworks provide the developer with a predefined file structure that the developer can use to prevent confusion when dividing the web application code.
Take a look at the basic operations and structure of web application frameworks by using an actual framework.
Learn from Here
A popular web application framework used in JavaScript with the Node.js runtime is Express.js. Although it's tuned for backend development, we can utilize it with something like Embedded JavaScript (.ejs) to render and serve pages to users. Express.js also provides a number of functionalities and methods that you can use to reduce the amount of code you will need to write. We can visualize the principles and techniques by creating some simple functionalities for a shopping list app.
Using Express.js
Understand Middleware
Use express-generator to Generate the File Structure
Serve Web Pages in Express.js with Embedded JavaScript
Understand Routing
Understand Route Handlers
Utilize a Database
Redirect Users
Recommended Materials
Node.js Study I | Progate
The Node.js course on Progate teaches you about the basic concepts of routing using Express.js in Node.js. Do take a look!
Node.js Study I | Progate
Progate is an online platform to learn programming. Learn to build your own apps and services.
progate.com