Web Development with NodeJS and MongoDB will show you how to build powerful web applications from the ground up. Starting with the simplest "hello world"-based script and moving on to more and more advanced techniques, this course will show you what is possible while building your application.
We'll begin with some of the basic concepts of NodeJS, ExpressJS, and MongoDB and build on this knowledge with practical examples. With each concept, the application will get more powerful and you will be able to process any business logic you may need.
We will then learn about ExpressJS to make web applications and MongoDB to persist your data. Then you will find out how to build on the shoulders of giants by consuming a RESTful API or become a giant by serving your own API. Later on, you’ll get to grips with automatically testing your application to make sure it is functioning properly.
At the end, we will take a look at deploying our application and improving its performance. The course closes with suggestions on further improvements that can be made to the application.
About The Author
Andrew Marcinkevičius is a professional web developer, and he has been building web applications for more than 5 years. He has worked with small businesses, government agencies, and start-ups to solve their problems in the field of web development.
One of his beliefs is that continuous learning should be a part of everyone's life and you learn in-depth knowledge while teaching others. He works as an independent developer and shares his thoughts on his website.
This video will provide the overview of the entire course.
There are a lot of languages and frameworks that can be used for web development. This video will explain what NodeJS is, where it's used, and when you might want to use it.
It’s important to know about when and how the tool will be used. In this video, we will learn a little more about how NodeJS works.
To start making an application with NodeJS, we need to have a development environment. For this, we will install NodeJS and nodemon to help us with development.
Every programming language has its own way of executing code. You will learn how to build a sample CLI application and how to debug it.
To have good quality code, it's important to separate it into small pieces (modules). You will learn about CommonJS and how to make your code modular.
It's not valuable to write something that already exists and has been improved by multiple people. To start reusing the code, we will see how to use npm.
To write good applications, we need to know how the code is executed. We will see how code is executed in NodeJS.
Slow performance and high resource consumption can lower the application's quality by a great margin. Knowing how to use streams will improve the application’s performance and use fewer resources.
Working with files is a big part of making applications. You will learn how to manipulate the files using NodeJS.
NodeJS allows us to create what we want, but we will have to make a lot of repeating solutions ourselves to have a working web application. This can be solved by using a web framework and third-party libraries.
Applications grow fast and it can lead to spaghetti code which is hard to maintain. Adding some proved structure allows to keep applications easy to maintain, test and reuse.
To have a truly dynamic application it requires some way of distinguishing what a user is requesting. This can be done by defining routing for an application to respond to specific requests.
Creating new applications often contain the same steps. To avoid iterative tasks we can use tools and third-party libraries to scaffold our applications.
When developing dynamic applications, pages need to change depending on the data provided. Using a templating engine allows us to generate HTML pages without having to repeat ourselves.
It's very hard to make a dynamic application without storing our data for retrieval and manipulation. We will learn about the MongoDB database for persisting our data.
Different problems have different requirements for solving that problem. Knowing what NoSQL is and what it provides, allows us to choose the best tool for the job.
To have a solution which solves our problems with good performance, we need to model our data as close as possible to a real model. This can be achieved by knowing how MongoDB structures and stores data in the database.
To make the most of databases, you need to learn how to use them. We will see how to execute CRUD operations in MongoDB database.
To have the dynamic application, we need to be able to manipulate our database from our application. We will see how to connect to MongoDB and execute database operations from NodeJS.
The data we work with often contains business logic and requires things such as validation. This can be solved by representing data as objects and adding behaviors to them.
There can be a scenario where you need to consume data from another vendor or provide your data to a vendor. RESTful APIs provide a simple way of sharing and consuming the data.
Before providing a RESTful API for consumers, we need to know how to make one. We will see how ExpressJS helps us with that and how our API will look.
When an application is based on a different application, we need a way to consume that data. Using different ways, we will consume data from the Meetup API.
RESTful APIs start to shine when they are consumed by front-end applications. Consuming an API from the frontend allows developing the application and API separately.
CRUD is the most common operation that would be performed with our data. If our RESTful API provides them, it allows any consumer to manipulate our data.
Fixing bugs and manual testing takes a lot of time and effort. Using unit testing and test-driven development allows us to automate testing and fix bugs early.
Manual testing is tedious and time consuming. You will learn about tools that allow us to write automated tests.
Our code should be easy to test, but it often has dependencies making it harder to test. Spying, stubbing, and faking allow us to make our code easier to test.
Our code should be easy to test, but it often has dependencies that make it harder to test. Spying, stubbing and faking allow us to make our code easier to test.
Manually managing dependencies is time consuming. We can automate it by using a package manager.
Writing the same code again and again takes a lot of time. By publishing the package, we can simplify sharing and reusing that code.
For other people to start using our application, it has to be hosted somewhere. We will look into one of the choices for hosting—PaaS.
To make our application available for the public, it has to be hosted somewhere. Using Heroku, we can deploy it to the cloud without having to manage the infrastructure.
Slow applications can lead to lost users and revenue. Optimizing page performance enables users to continue using the application.
Applications are made from different components that often have the same logic. Making the application isomorphic allows using the same code on the server and the client.
The bigger the application grows the more complex it gets to generate its assets. Using webpack, we can automate the generation of application assets.
Some actions take a long time to finish giving an appearance of slow performance. By delegating the actions to a job queue, an application can respond faster.
There is a lot that can be done with an application. This often depends on the project requirements and resources. We will look into some ways to improve our application and improve the development workflow.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.