Hello everyone 👋. I am Aman Virk, the creator of AdonisJS (a fully-featured web framework for Node.js). Today I am starting a blog posts series to introduce you to the framework, where we together build a little todo app.
If you are someone who is just starting with Node.js or looking to explore a framework that you can use going forward, then I welcome you to follow the entire series and also become part of the AdonisJS community 🙂
Even though the app we are building doesn't have many features, this series will still get quite long, as I will be covering a lot of fundamentals initially.
The outline briefly looks as follows:
- Introduction ( this post )
- Get to know AdonisJS
- Routing & Controllers
- Creating & designing pages
- Building frontend assets
- Planning the todo app
- ORM setup
- Creating models & migrations
- Using the AdonisJS REPL
- Rendering todos
- Creating a todo
- Marking a Todo as done
- Deleting a todo
- Deploying to Digital ocean via Cleavr
- Deploying to Digital ocean via App platform
This might be the first question you have in your mind. "Why should I even give AdonisJS a try?"
Luckily, answering this question is easy enough for me, since AdonisJS proposes a different paradigm for writing your web servers in Node.js. It's possible that you may or may not like the paradigm altogether, but the framework itself is unique enough to not cause any confusion for its existence.
The popular approach I have always witnessed in Node.js is to start with microframeworks like Express, Koa, or Fastify and then build things on top of it. Even the basic stuff like parsing the request body, validating forms, the logger has to be pulled in separately and AdonisJS is the opposite of this.
Philosophically AdonisJS follows the approach of Laravel, Ruby on Rails, or Django. We believe that baseline features for creating a web server are pretty much settled and asking someone to configure them manually has no upsides. Features like
- Parsing the request body
- Validating form data
- File uploads
- Logging throughout the framework
- Cookies + session management
- SQL ORM
- Template engine
- Support for sending emails
and much more are already baked into AdonisJS so that you can kick start your projects vs spending time assembling your projects.
Along with the benefits of rapidly developing your apps. There are a few more advantages of using a fully-featured framework like AdonisJS.
- The API across all the packages of the framework is consistent and follows similar naming and code conventions. In turn, there is a less cognitive load on you.
- Since the framework already knows a lot about your application, it can ship exclusive tooling to further improve your development experience. AdonisJS REPL is a great example of the same.
The goal of this post was to mainly introduce you to the framework. Moving forward, we will be writing a lot of code using AdonisJS, Tailwind CSS, and a little bit of AlpineJS.
I will be writing one blog post every day and all you need is to take out 30-45mins and follow along as we create our little todo app. Meanwhile, you can visit the following links to learn more about AdonisJS and show some love ❤️