Meteor JavaScript App

Meteor

by Meteor

JavaScript App Platform
Helps with: JavaScript
Similar to: Flot App jQuery App jQuery Mobile App jQuery OSK App More...
Source Type: Open
License Types:
MIT
Supported OS:
Languages: C Java Script

What is it all about?

Meteor is an open-source web development framework accessible and simple. it based on Javascript Node.js

Key Features

Ship more with less code: Accomplish in 10 lines what would otherwise take 1000, thanks to an integrated JavaScript stack that extends from the database to the end user's screen. Build apps for any device: Use the same code whether you’re developing for web, iOS, Android, or desktop. Hot push new features without app store approval or forcing users to download a new native app. Integrate technologies you already use: Use popular frameworks and tools, right out-of-the-box. Focus on building features instead of wiring disparate components together yourself.


Pricing

Yearly
Monthly
Lifetime
Free
Freemium
Trial With Card
Trial No Card
By Quote

Description

free - see site

Alternatives

View More Alternatives

View Less Alternatives

Product Analysis

JavaScript

Javascript frameworks and libraries

Meteor review

Meteor review

By Alvie Amar | 6/7/2016 | Product Analysis |Beginners

MeteorJS, also known simply as Meteor, is a cohesive development platform and open-source JavaScript web structure created using Node.js by the Meteor Development Group. Meteor allows for quick prototyping and conveys cross-stage code, for example: web, Android, iOS.  On the client side, Meteor depends on jQuery and can be utilized with any JavaScript UI gadget library.

 

Meteor was initially presented in December 2011 under the name Skybreak.

 

In October 2014, Meteor Development Group obtained Y Combinator alum FathomDB, with the objective of growing Meteor's database support.

 

Meteor has been based on ideas from different systems and libraries in a way that makes it simple to model applications. Basically, it makes web development simpler. It's adaptable and requires less code, which implies less bugs and normally a higher quality and more consistent end result.

 

Meteor has become a new favorite for many developers due to some of the features listed below:

  • Full-Stack Solution
  • Advancement Ecosystem
  • Isomorphic JavaScript Code
  • Built-in front-end solution
  • Database Integration
  • Custom Package Manager
  • Real-time from scratch

 

At present, Meteor.js is a vigorous and full-stack JavaScript framework for developing real-time web and mobile applications.

 

What is Meteor good for?

 

Why use Meteor? Indeed, the best and shortest answer will be "Meteor is Fun". This framework is useful for making web applications since it is straightforward and has the objective of allowing developers to assemble applications quickly. Besides that, Meteor concentrates more on the usefulness of your application than the essentials of matching up information and serving pages. Also, Meteor consequently performs live updates, so data changes show up instantly in your project window, and even code changes to the application itself are pushed to all browsers and devices "real-time".

 

The advantages of Meteor:

  • It is easy to learn for beginning developers
  • It is ahead of the tech bend
  • Applications are constant by default
  • Can create with just one language
  • Can spare a great deal of time with smart packages
  • The community is strong and supportive
  • It was created with designer happiness in mind

 

Examples and code snippets

 

Let's assume that you are familiar with JavaScript and have already download and configure Meteor. Henceforth, we will move forward developing our first simple chat app using Meteor.js.  

 

At first let's create our app

meteor create chatApp

Then next, create the client folder 

mkdir client

We will put our client side code in this directory. 

 

Before moving forward, we have to create a MongoDB collection. In the event that we make a file named models.js, Meteor will get it as the database file. Inside we will make the new Mongo collection.

 

You may be wondering when we need to make the MongoDB database, but actually we don't! Meteor creates a database for your application automatically when you make a new Meteor application.

/**
* Create new collection if not present.
*/
Messages = new Meteor.Collection('messages');

 

Inside the client, let’s make three files named client.html, client.css and client.js. 

 

Check the code below for the client.html.

 

<html>
<head>
 <title>Meteor Chat Application.</title>
</head>

<body>  
 <h1>Chatapp</h1>
 {{> welcome }}
 {{> input }}
 {{> messages }}
</body>

<template name="welcome">
 <p>
   Let's chat.
 </p>
</template>

<template name="messages">
 {{#each messages}}
   <strong>{{name}}:</strong> {{message}}<br>
 {{/each}}
</template>

<template name="input">
 <p>Message: <input type="text" id="message"></p>
</template>
</html>

As you can see inside the body section, we defined these:

 {{> welcome }}
 {{> input }}
 {{> messages }}

These are template names, and every name will be replaced by the code in the template block, which we did in the same document, so when you run the HTML file welcome, you will get:

<p>
   Let's chat.
</p>

 

Here is the client.css code:

html {
   padding: 10px;
   font-family: Verdana, sans-serif;
}

.login-buttons-dropdown-align-right {
   float: right;
}

 

Here is the most important file: client.js:

/**
* Templates
*/
if (Meteor.isClient) {
   Template.messages.helpers({
       messages: function() {
           return Messages.find({}, { sort: { time: -1}});
       }
   });

   Template.input.events = {
     'keydown input#message' : function (event) {
       if (event.which == 13) { // 13 is the enter key event
         if (Meteor.user())
           var name = Meteor.user().profile.name;
         else
           var name = 'Anonymous';
         var message = document.getElementById('message');
         if (message.value != '') {
           Messages.insert({
             name: name,
             message: message.value,
             time: Date.now(),
           });

           document.getElementById('message').value = '';
           message.value = '';
         }
       }
     }
   }
}

 

Go to the project folder and run following command:

meteor

Now go to localhost:3000 using two browser windows using different profiles. 

 

Conclusion

 

We've now learned how to configure and create an example Meteor application. Hope this is a good stepping stone to begin learning this exciting new technology. Your specific circumstances will help you figure out whether or not a specific framework is ideal for you and your creations, however every developer should at least play around a bit with this framework for a week or so. With such a variety of exciting features, Meteor.js is fast becoming one of the best JavaScript development platforms.  Additionally, it is supported and subsidized by an immense group of designers who are committed to enhancing its functionality and components for optimizing its performance. You can also find many different sites online which serve as great resources for learning Meteor. So give it a try—I'm sure you'll be glad that you did.

By Alvie Amar | 6/7/2016 | Product Analysis

{{CommentsModel.TotalCount}} Comments

Your Comment

{{CommentsModel.Message}}

Top DiscoverSDK Experts

User photo
3355
Ashton Torrence
Web and Windows developer
GUI | Web and 11 more
View Profile
User photo
2340
Meir Rabinovich
Real time and embedded developer
Hardware and RT | General Libraries and 5 more
View Profile
User photo
1540
Nathan Gordon
Full Stack developer
Web | JavaScript and 1 more
View Profile
User photo
1490
Ronan McCarthy
Cross-Platform & Web developer.
Web | Mobile and 6 more
View Profile
Show All

Interested in becoming a DiscoverSDK Expert? Learn more

X

Compare Products

Select up to three two products to compare by clicking on the compare icon () of each product.

{{compareToolModel.Error}}

Now comparing:

{{product.ProductName | createSubstring:25}} X
Compare Now