Loopback Framework

Sofyan Hadi Ahmad
3 min readSep 17, 2017

--

Edit notes: I have to remove Vuejs from the title since turns out I don’t have enough time to write Loopback and Vuejs plus, I’m switching technology from Loopback into NestJS.

We have a new project and it has a very tight deadline. So we've conducted some research to find out the best programing language and framework to help us start coding and be productive without any hassle, and since we just startup we need technology that will cut the cost of training when we hire new developers. Based on the research we decided to use Loopback and VueJS.

Why Loopback?

http://loopback.io/

The main reason we choose loopback are:

  • Loopback is extremely simple. Loopback is model-based framework, you just have to focus on your application model and loopback will do the rest. Including but not limited to database auto migration or auto update, table relation and ACL.
  • RESTful API out of the box. Loopback provides basic authentication and OAuth as their standard package. Loopback also provides Swagger documentation. When you run node . don’t be surprised to see a beautiful swagger UI plus User and authentication API service on your screen.
  • Backed by the giant. Loopback is backed by IBM and used by them in one of their product, API Connect. You don’t have to worry about the future of loopback, as long as IBM still there the development will continue aggressively.

Why Vue?

https://vuejs.org

  • React have sex with Angular === VueJs. IMO React with redux is too complicated for beginners. Suppose there is a bug, we have to check whether action, reducer, saga, and jsx is correct. We have to open multiple files just to find out the action parameter was named differently in reducer. But Angular in the other hand is so 2015 and an old standard, that what “kids jaman now” things, they will tell you that it’s so not cool to code on Angular. By using VueJS, it’s kind of using cool stuff like React but in a simpler way just like Angular. Like driving Maserati, you have the coolness with way more cheaper price than S Class.
  • VueJs is simple and fast. Using VueJS we can efficiently be rendering tons of objects. More than 10K of rows, in split of seconds.
  • The most important reason is to keep the overhead of introducing a new technology small. When you have a new project and you need to hire new developers, one of the key factors of your success is how fast are your developers start to code and be productive. Using VueJS you just need 1 day to start coding and understand all its basic concepts.

Install Loopback

make sure you already have node and npm installed in your machine. If not please install them.

  • Loopback cli. You can install loopback-cli easily by typing
npm install -g loopback-cli
  • Create new application
# to create new app, type `lb app appName` 
$ lb app myProject
? What's the name of your application? (myProject)
? Enter name of the directory to contain the project: (myProject)

? Which version of LoopBack would you like to use? 3.x (current)
? What kind of application do you have in mind? empty-server (An empty LoopBack API,
without any configured models or datasources)
...
  • Create new models
# to create new mode, type `lb model modelName`
$ lb model product
$ lb model category
  • Start the application
node .

Tadaaaa,… just browse http://localhost:3000/explorer, and be amazed of what you accomplished just in few minutes

--

--

Sofyan Hadi Ahmad
Sofyan Hadi Ahmad

Written by Sofyan Hadi Ahmad

Innovation | Opensource | Human | Charity

Responses (4)