A quick way to build a fast application.
There is a fear among developers that quick fixes are a problem. Where the fears come from - in the absence of the possibility of scaling up your application in the future. After all, you need to think about the architecture! And what if it was thought out for you. You are not trying to reinvent the wheel?
Fast and scalable - this is how the Ember ecosystem positions itself. A JavaScript framework with a clear modern and extensible architecture, capable of creating a working framework in minutes, not only for a large multi-functional site, but also for a desktop application using Electron, which is so popular today.
And after all, he was restlessly ambitious - he even swung at our, so to speak, mobile younger brother. What came of it - let's take a look.
Stack of technologies used
Without going into details of the rationale for the choice, let it start with the following:
')
- Ember.js
- Cordova
- Handlebars
- CSS (no S (A / C) SS)
- HTML
- Javascript
Why ember
Why not just take Cordova and do what we need? Yes, but we need the scalability and maintainability of our application, which we have already thought of for us! And yes, we want to have a ready-made architecture.
Creating your project
First, we need to make sure that the necessary libraries are present and that the working environment is set up correctly.
Install the necessary packages:
npm install -g ember-cli npm install -g cordova
Now you are ready to create your project:
ember new my_freaking_awesome_app
Ember.js + Cordova
One of the key problems of different frameworks is the fact that you have to constantly attach something to something. In our case, everything was again thought out for us. It remains to install the necessary "twist":
ember install ember-cli-cordova
Run the built-in generator:
ember generate cordova-init com.my_company.my_freaking_awesome_app
This generator allows you to create our mobile application identifier -
com.my_company.my_freaking_awesome_app .
Specify the target platform iOS or Android - we can later through Cordova.
Trial run
Our project framework was created and we can see how it looks like:
ember serve
Run this command from the command line in the project folder and open the browser at
localhost: 4200 .
While this is an empty project, but easily scalable with a ready-made architecture. And yes, with built-in tests. Yes, yes, testing with Ember is fun and easy.
This we will do in the following articles.
Thanks to
João Moura for the idea and the easy explanation.