Meteor: how to develop simple applications in JavaScript

3 min reading
Developers / 26 February 2016
Meteor: how to develop simple applications in JavaScript
Meteor: how to develop simple applications in JavaScript


It is simple and quick, but perhaps also incomplete. In today’s world, no application developer expects a digital product to be the finished item on launch. By which we don’t mean the product might still need some finishing touches on the day of its launch: we mean that – after short and simple development – it is consciously unfinished and can then be refined based on user experience.

Rapid App Development (RAD) has become one of the clearest trends in modern software development. The idea is to launch simple, multiplatform products at low cost that can be improved based on user experiences. Suitable developments frameworks include Angular JS, Backbone JS, Ember JS, React JS, Polymer and Knockout  for user interfaces, and Apache Cordova and PhoneGap for apps. Meteor is another rapid application design platform, but it covers ever aspect of development: the client side; the server side and the database side.

Meteor looks after everything an application needs: from data flows between the cloud and client applications to the user interface, through Blaze, its user interface development framework. It achieves this in a single design process using Apache Cordova, enabling simultaneous development for both iOS (Apple Store) and Android (Google Play). Meteor uses the Mongo DB database, with JavaScript programming, which is totally scalable. This open source database is used in many JS projects.

Meteor also offers developers a cloud service, known as Galaxy. The advantages of this integrated service include:

●      Coordinated code updates for the client and the server.

●      Real time client monitoring: facilitating metrics.

●      Galaxy runs on Amazon ECS: giving the development team real time data on memory, the CPU, etc.

Meteor: how to start to use it

The first step is to install it on your machine:

●      The .exe file for Windows can be downloaded from: Meteor installation for Microsoft operating system. Then all you need to do is run the .exe file and follow the instructions.

●      For users of OS X or Linux operating systems, run the following command in the Meteor terminal:
curl | sh

●      Xcode, Apple’s integrated development environment, must be installed on the machine for iOS development. This can be downloaded free from the Apple Store.

The next step is to add mobile support to the project. As we have mentioned, the Cordova platform is integrated into Meteor, unifying development across all mobile operating systems: iOS, Android and Windows Phone. However, it needs to be run using the following specific commands in the terminal for Meteor projects:

●      iOS operating systems: meteor add-platform ios.

●      Android operating systems: meteor add-platform android.

Creating your first application project in Meteor is a walk in the park. First, open the terminal in the platform and enter the following command: meteor create simple-all. This automatically creates a folder called simple-all, where all the app elements will be found:

simple-all.js       # a JavaScript file loaded on both client and server
simple-all.html     # an HTML file that defines view templates
simple-all.css      # a CSS file to define your app’s styles
.meteor               # internal Meteor files

Use the following command to run the new application:

cd simple-all

Open the browser in Meteor’s right-hand screen and enter the hosting url local: http: // localhost: 3000. This is where the new project is executed. The developer can view changes to the application’s HTML, CSS and JavaScript elements in the browser.

GitHub, the most widely known collaborative development platform in the world, offers a number of very interesting tutorials for designing projects in Meteor.

The final step is to test whether the application runs as expected:

●      For iOS devices: meteor run ios.

●      For Android devices: meteor run android.


Meteor’s features offer several advantages over other application development platforms:

●      Meteor was designed with developers in mind, no special effort is needed to learn how to use it.

●      Applications can be designed in a single language: JavaScript. It doesn’t matter if you are working on the front-end, the back-end or the database, the developer only needs to know JavaScript syntax.

●      There is a large Meteor community: this means there is a lot of documentation out there, and it is easy to tap into the experience of other developers, etc. There are a lot of advantages. A useful list of Meteor learning resources.

●      Designer-friendly coding: the code for programming applications has been optimized. Meteor saves a lot of lines of code, mainly because you do not need to include all the HTML tags or CSS and JS files.

There can be no doubt that if we analyze the most successful and highly appreciated repositories on GitHub, Meteor is one of the best positioned. It has ¡Error! Referencia de hipervínculo no válida., behind the Bootstrap, Angular JS, d3 and jQuery repositories. The most successful projects on GitHub are in JavaScript.

Follow us on @BBVAAPIMarket


It may interest you