About Meteor in detail: why is the future of web development

What is Meteor?


This is not another javascript framework. Putting it on a par with derby, sails, angular or backbone is incorrect. Meteor is a platform for creating modular highly interactive client-server applications. Let it sounds a bit pompous and reminds marketing bulschit slogan, but in fact very accurately reflects the mission and the current state of Meteor. Just a few days ago, the Meteor API released the first stable version (1.0).

You can read the official information on the portal www.meteor.com , but I want to talk about features that I especially love.

  1. We write logic in one language - the result works on all platforms: server, browser, cordova (Android, IOS). Naturally, it can’t do without features, but these are little things in life. Apple and Google see great potential in cordov and are developing support for this technology: Apple allows hot code push in mobile apps ; The new Chromium WebView is now updated via Google Play and supports Web Components .

  2. The project management includes smart and experienced developers who understand the value of the community whose work is built on a solid five. Monthly devshop events at headquarters in SF , support via stackoverflow , excellent and always up-to-date API description . Separately, I want to note the grandiose event - Worldwide Meteor Day , dedicated to the release of the first version. In Russia, by the way, the event is held in 2 cities: in Moscow and Kursk .

  3. Convenient asynchronous server programming with integrated Fibers . In 99% of cases when working with Meteor you write regular synchronous code, and it works asynchronously! Is it weird? Nothing strange: each call to the server method works in its own Fiber and does not affect the operation of other calls. This unrealistically simplifies the code structure: any calls to the database and other external resources are written in a synchronous style. I recently looked at a piece of code from a well-written regular asynchronous node.js application, and tears came to my eyes. If someone else is not familiar with Fibers, I highly recommend it!

  4. A well-designed abstraction for working with data through collections. Collections represent the same interface on the server and on the client, which allows you to implement logic in the same style and even share the code between the server and the client.

  5. No less cool abstraction for calling server methods, looking like calling an asynchronous function with a callback. Forget server paths, xhr, and complex code structure! In Meteor, everything is done very simply.

  6. Convenient deploy applications. Especially if you are just starting your project: with one command from the console your project is published on the .meteor.com domain; after the deployment, you can reconfigure to your_domain.com. If the project has grown and needs to be transferred to professional hosting, then, again, with one team the project is assembled into a node.js application with a single dependency - npm.

  7. All routine optimizations (code minification, assembly into one file) and recompilation (less -> css, coffeescript -> js, etc.) are performed automatically and almost without configuration (goodbye to the newborn gulp and ugly grunt). For some operations, you need to install a package, which is also achieved by a single entry of the console command.

  8. The DDP protocol , designed to replace the REST API. This is a very simple but powerful protocol based on EJSON (extended JSON). DDP supports RPC and two-way data transfer (to and from there), runs on top of WebSockets and SockJS. It is also easy to read, which may be required in the case of particularly deep debugs. By the way, if you need a REST API, then no one forbids using it. On the contrary, there are approaches for every taste . Just do not want to step back.

  9. Best practices enforcement. Html, css, less and coffeescript must be valid (otherwise the project will not compile), a clear separation between the templates (spacebars is the successor to handlebars), css and js. A clear separation between only server, only client and shared code. A package system with explicit dependencies (Meteor, npm, cordova), explicit export of APIs and complete package isolation is a dream for node.js programmers!


And many more goodies realized without strange design decisions. As a result, we get a tool that allows us to solve problems without being distracted by the routine. If you are currently choosing a node.js framework for your future project, do not hesitate to stop at Meteor - your torment will stop and your hair will become soft and silky.

Literature




For those who could not stand it and leafed through to the end: Meteor is the coolest thing. For developers: start working with him now, because tomorrow Meteor developers will become very popular. For businessmen: one Meteor developer will replace the frontend, backend, iOS and Android developers; no, this is not a joke: examples of successfully invested and even (some) sold projects: https://respond.ly/ , http://versoapp.com/#verso , http://www.classcraft.com/ , http: //blonk.co/ , https://lookback.io/ .

Boo!

Also popular now: