📜 ⬆️ ⬇️

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

What is Meteor?


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

You can read the official information on the portal www.meteor.com , and I want to tell you about my favorite features.

  1. We write logic in the same 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 engaged in the development of support for this technology: Apple allows hot code push in mobile apps ; 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, the work with which is built on a solid top five. Monthly devshop-events at headquarters in SF , support via stackoverflow , excellent and always current description of the API . I would also like to mention a grand 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 built-in Fibers . In 99% of cases, when working with Meteor, you write normal synchronous code, and it works asynchronously! Strange? Nothing strange: every call to the server method works in its own Fiber and does not affect the work of the other calls. This unrealistically simplifies the structure of the code: any calls to the database and other external resources are written in a synchronous style. Recently I looked at a piece of code from a well-written, ordinary asynchronous node.js application, and I had tears in my eyes. If someone else is not familiar with Fibers, I highly recommend it!

  4. 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. Not less cool abstraction for calling server methods, which looks like a call to an asynchronous function with a callback. Forget about server paths, xhr and complex code structure! In Meteor, everything is done very simply.

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

  7. All routine optimizations (code minification, assembly into one file) and recompilations (less -> css, coffeescript -> js, etc.) are performed automatically and with almost no tuning (goodbye newborn gulp and ugly grunt). For some operations, it is required to install a package, which is also achieved by a single input of the console command.

  8. 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), running on top of WebSockets and SockJS. It is also easy to read, which may be necessary in the case of very deep debugs. By the way, if you need a REST API, then no one forbids its use. Even 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 - the heir to handlebars), css and js. A clear separation between only server, only client and shared code. A system of packages with explicit dependencies (Meteor, npm, cordova), explicit API export and complete package isolation - a dream for node.js programmers!


And there are still a lot of goodies implemented without strange design decisions. As a result, we obtain a tool that will allow solving problems without being distracted by the routine. If you now choose the node.js framework for your future project, do not hesitate to stop at Meteor - your sufferings will stop, and your hair will become soft and silky.

Literature




For those who could not stand it and flipped through to the end: Meteor is the coolest thing. For developers: start working with it now, because tomorrow Meteor-developers will become very popular. For businessmen: one Meteor developer will replace the frontend, backend, IOS and Android developer; 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!

Source: https://habr.com/ru/post/242113/


All Articles