AdonisJs vs. MeteorJs

Kenneth Ekandem
6 min readMar 11, 2021

Over the years since the launch of Javascript in September 1995, a lot of developers have come up with easier ways to use the language. A lot of these ways included creating new frameworks built from Javascript which targeted particular or multiple aspects of programming ranging from server-side programming, front-end development, and a mix of both in some cases. Others target speed and performance in applications that have sent a couple of Javascript development communities into a frenzy about which performs best. In this article, we will be looking at how AdonisJs differ from MeteorJs, the pros, and cons, which are preferable, and their best use cases.

Introduction

In this article we will be covering:

  • What is the AdonisJs framework?
  • AdonisJs installation and directory structure
  • What is MeteorJs?
  • Installation guidelines for MeteorJs
  • Best applications of both frameworks
  • Pros and Cons of both frameworks
  • AdonisJs or MeteorJs, which is better?

What is AdonisJs?

AdonisJs is a NodeJs MVC framework that runs on all operating systems. It offers a stable eco-system to write a server-side web application and micro-services that is scalable and easy to access. AdonisJs is not a monolithic framework but instead, it comprises packages that perform different functions.

Installing AdonisJs

To install and use AdonisJs you’ll need to have the below installed on your system:

  1. Node.js and
  2. npm package manager

If you have installed them or already have them installed then you can go ahead and download the AdonisJs framework CLI globally using:

npm i -g @adonisjs/cli

Then go ahead and install your AdonisJs application into the system directory. My application name in this tutorial is adonis_new

adonis new adonis_new

cd adonis_new

then you can go ahead and serve your application which will open a localhost::3333 local port.

adonise serve --dev

File Structure for AdonisJs

AdonisJs adopts the MVC (model, view, controller) architecture. In this architecture, the Model handles data-related logic, the view handles logic concerning the UI and the Controller acts are an interface between the model and view.

A standard AdonisJs installation looks something like so:

  • The app directory is where the model and controller logic is.
  • The config is where all the configurations for the application are handled
  • The resources are where the logic for view and UI is

For the sake of this article, we won’t go in-depth into the directory but this just points out the MVC architecture which AdonisJs fully adopts. For a more detailed explanation on the file directory, check out their official docs using this link.

What is MeteorJs?

Meteor is an open-source framework for seamlessly building and deploying Web, Mobile, and Desktop applications in Javascript. Meteor allows for rapid prototyping and produces cross-platform (Android, iOS, Web) code. It integrates with MongoDB and uses the Distributed Data Protocol and a publish–subscribe pattern to automatically propagate data changes to clients without requiring the developer to write any synchronization code.

Meteor can be considered as a standalone framework as it doesn’t depend on other packages built on javascript to fully function. It has a templating system called Blaze, a database on the client called Minimongo, and more.

Installing MeteorJs

Unlike AdonisJs, MeteorJs does not depend on Node.js and NPM to be installed in your local machine. To install MeteorJs on your local machine varies on if you are using Windows or an OSX/Linux.

To install on Windows you first have to install Chocolatey then run the command using an administrative command prompt:

choco install meteor

For macOS or Linux you simply run the below command:

curl https://install.meteor.com/ | sh

When the installation is done, you can then create a new instance of your meteor application named meteor-app using:

meteor create meteor-app --blaze

Then you can step into the directory and kick-start your application which will open localhost::3000 port with your localhost:

cd simple-todos

meteor

Best application for both frameworks

Now, this is fishy, you see AdonisJs is mainly a server-side framework and it draws its strength from that, but MeteorJs is a full-stack framework which means it can do what AdonisJs does and more. This makes it more draining to decide which framework to use for specific purposes. So I will try as much as possible to better narrow which framework most favors us in a particular application in the below points.

  1. Structure of Project

So, one of the most important factors to consider in building an application is the structure. This is reliant on the architecture of the framework and if it best suits your need.

  • If you are best suited to using the MVC architecture which separates the logic into your model, view, and controller then it is advisable to use AdonisJs as it fully embodies it.
  • On the other hand, MeteorJs uses an isomorphic architecture. In translation, this architecture blends a server-rendered (server-side) application into a single-page (client-side) application.
  1. Type of Application

Choosing a framework or even a programming language to use relies greatly on the type of application you want to build, application types can range from applications that rely on real-time updates to simple API issuing for CRUD requests and authentication, applications that handle a light request to running a server with bulky data and rendering it, building desktop or mobile applications, etc. Let’s just tackle a couple of them and see the best use cases for them.

Real-time rendering: for real-time rendering, MeteorJs is highly recommended as it is built and integrated into the MeteorJs framework whereas, in AdonisJs, you’ll have to integrate web sockets for real-time communication between the server and the client.

Simple APIs for CRUD requests: If you just want to create a simple CRUD request application with a nit of authentication then AdonisJs is for you. MeteorJs is robust and so using it for simply making requests doesn’t use half of the functionality MeteorJs has to offer.

Desktop and Mobile Application: MeteorJs thrives in building desktop and mobile applications as it supports popular mobile building plugins like Cordova, React native, and Hot code push whereas AdonisJs just focuses on web-based applications.

These are but a few instances of which framework to use when building your specific application.

  1. Community Support

Another important factor to consider when you are about to dive into a framework is its community. Communities in a way determine the popularity of a framework but it goes beyond that to even finding a fix for bugs, suggestions that if incorporated make the frameworks more usable and flexible and so many others.

As of the time this article is written, MeteorJs has a very broad and wider community than AdonisJs and big companies like IKEA uses the framework for their application, but AdonisJs shows a lot of promise, and its community is constantly growing daily and with the switch of AdonisJs to Typescript that community increases. With that being said, both framework communities are great and you can easily navigate the frameworks with their support.

Pros and Cons

Performance: When it comes to performance, MeteorJs gets the point but that can very much become a loss if your application is built in a way that will undermine that performance. AdonisJs when handling a lightweight application shows great stats in performance but it declines when the application becomes heavy or requests become massive.

Simplicity: When it comes to simplicity, MeteorJs is as simple as it goes with a fresh installation and it has a straightforward logic even when using the mobile aspect of it.

Packages: MeteorJs has a massive list of libraries and packages which is very useful while AdonisJs has but a few which are important to the framework. For AdonisJs that cannot really be defined as a con.

AdonisJs or MeteorJs, which is better?

Honestly, you can’t place them in the same category to make a valid decision on which is better. AdonisJs is preferable to use when you are building lightweight applications that do not require a robust amount of processing power while on the other hand, MeteorJs has a lot of capabilities to be used only for minor CRUD requests.

AdonisJs is a good switch for developers who are migrating from Laravel since it embraces the MVC architecture Laravel is known for.

MeteorJs is okay for advanced-level Javascript programming for building desktop and mobile applications.

For a valid comparison, we have to streamline it to the backend aspect of both frameworks, and from my experience MeteorJs does a better job than AdonisJs but AdonisJs is consistently growing so let’s see who it goes.

Conclusion

In this article, I pointed out the difference between MeteorJs and AdonisJs, their pros and cons, use cases in the building of application (web, mobile, desktop) based and process to install the frameworks on your local machine and kickstart that next big application you want to build, I hope this was helpful.

--

--

Kenneth Ekandem

I am a Back-end Developer with a desire to explore into the depths of programming. A total freak of good books written by awesome authors like Dan Brown..