What framework should I choose to build a web app?

adminMeteor PlatformLeave a Comment

There are many platform options when building an application now days that this decision alone can determine success or failure. How does this decision alone determine success or failure well here are some answer..

  1. Getting access to quality developers who can product clean, useable, scaleable code at times can be a challenge. Yes there is always the cheap developers from various countries but I am a big believer in you get what you pay for. And I have witnessed first hand what cheaper is not always better when it takes months longer to create what you want, along with the issue of it just not being clean code another developer can pick up and continue to work with.
  2. Be careful of the work “Refactor” if you are continually having to refactor your code this means you have bigger issues that need to be resolved like code architecture.
  3. What does it take for the code to work on mobile? Yes that’s right your code will be accessed from mobile devices and different screen sizes so how are you going to cater for this? What do you have to do to allow and facilitate this user experience? Just saying we will deal with mobile later is NOT a viable solution. This can mean bigger more costly challenges are headed your way.
  4. What is your access to developer talent? What are the skills you have available and how current and open are they to the trends in the industry. This alone will INFLUENCE your decisions and as a result may not be for the better. If your only tool is a hammer you treat the world like nails and this is not what you want in todays technology world.
  5. How are you learning about your app’s needs? Do you know the needs of the users? How will your users be using the app or software you are creating? Is it standalone what about offline mode. Yes, offline mode does happen and don’t take it for granted that  you have a reliable internet connection, or unlimited data plan because end users may not.
  6. How big will your app be? How many users online accessing data in real-time? Do you even have a real-time data need?

These are just some of the questions you need to answer as you choose a platform but I can tell you that choosing Meteor has been one of the best decisions I have ever made. But the question remains…

What technology stack should you use to build a new web application?

Python + JavaScript?
Ruby on Rails + JavaScript?
PHP + …
Node.Js
C+
Swift
Html5
And so on – the choice was never easy. But for those that are paying attention the choice is getting easier for many of the reasons I will highlight in this post.

Why it should be at least Javascript based:

JavaScript is the universal scripting language in browsers. This means that any modern web application will need JavaScript on the client. Why not use JavaScript on the backend as well then? This would save time and build expertise – a front-end developer can work on the backend comfortably, and they don’t have to switch context between Ruby/Python/Java/PHP/whatnot and JavaScript. “One language – everywhere.”

As of 2015, “JavaScript everywhere” is (too slowly, some might say), becoming the de-facto standard for building web apps. The “MEAN” stack (MongoDB, Express, AngularJS, Node.js) is highly popular, and knowledge of AngularJS is listed as a requirement in many job descriptions.

JS_stack_solutions

What are we left with for the server-side then? Actually, why not look at an integrated, client-server, full-stack solution?

There is an ever growing list of such full-stack JavaScript frameworks Derby, Wakanda, Meteor. The one with the largest momentum is, indubitably, Meteor.

Largest momentum? What do you mean… well check this out:

The business case for Meteor

For a more indepth discussion about why Meteor check out the post by Dan Dascalescu here.

Meteor is an open-source, production-ready, real-time, and cross-platform web application framework built on top of proven technology, that allows for very rapid prototyping and produces cross-platform (web, Android, iOS) code. Rather than being minimalistic, it offers a lot out of the box, while working with other technologies in the ecosystem. A Tinder-like application has been built from scratch with Meteor in 6 weeks, several startups built with Meteor have already been acquired, and the number of companies using Meteor is growing.

Meteor Development Group has received $11.2M in funding from the prestigious venture capital firm Andressen Horowitz, who has also invested in Twitter, Airbnb, and Foursquare. Founded in 2011, Meteor was a startup incubated by YCombinator, the most successful startup incubator. Meteor founders and early employees include former Googlers, early employees at Asana, and the creator of Etherpad.

Investing in Meteor is indisputably worth it, given the framework’s developer base and momentum. Around November 2014, version v1.0 was launched on Oct 28, Meteor surpassed 21,000 stars on Nov 1st, becoming the 11th most starred project on GitHub, and over 4000 developers from 130+ cities in 40 countries gathered in person on November 6, 2014 to celebrate Meteor Day.

mNm6UOV

By contrast, the next most popular full-stack JavaScript framework, Derby.js, has 1/10th the footprint on StackOverflow, GitHub and Quora. Another worthwhile contender, AngularJS (albeit for the front-end only), is being radically revamped in the upcoming 2.0 version, and “users will need to get to grips with a new kind of architecture. It’s also been confirmed that there will be no migration path from Angular 1.X to 2.0“. Moreover, the consensus seems to be that Angular 2 won’t really be ready for use until a year or two from now.

“Meteor is what we should have built in 1994 at Netscape”
— Marc Andreessen, co-founder Netscape, Ning, Andreessen Horowitz

What makes Meteor easy to learn

  • Meteor was designed to be easy to learn, including by beginners. One of the seven principles of Meteor is “Simplicity equals productivity.”
  • Meteor has been called “embarrassingly easy to learn” when compared to AngularJS, which was characterized as being a set of “band-aids over self-inflicted wounds“.
  • JavaScript everywhere – on the server (Node.js, Underscore) and on the client (jQuery). You only need to know one language.
  • Same MongoDB interface on the client as well as the server (no need to learn some new model code), via an in-memory MiniMongo instance
  • No esoteric concepts (unlike Angular), clear documentation, well-established coding conventions, and a shallow learning curve. A simple chat app can be built by someone familiar with JavaScript in about an hour.
  • Meteor gets you to your first live deployed web app right away. For beginners, having your own tangible project to hack on is hugely motivating, and that makes you much more likely to succeed in your goal of becoming a developer.
  • There is one book unanimously acknowledged as the best for learning Meteor: Discover Meteor, by the authors of many Meteor packages, including the package repository itself, Atmosphere.

Mobile support

Mobile apps can be generated from the same codebase, usging PhoneGap/Cordova. An app built with Meteor + Cordova + Famo.us has real-time data capabilities, while being cross-platform and native-feeling. Deploying a simple chat app to iOS takes about an hour.

Ecosystem

Atmosphere, Meteor’s package repository, holds about 4,000 packages. Meteor canalso use any of the more than 115,000 packaged modules in the Node.js ecosystem.

This makes Meteor a much richer framework than Backbone, which expressly states that, “You can read and understand the source of in an afternoon.”

Case in point – while a login system with support for OAuth via Facebook, Twitter or GitHub requires several hundreds of lines of code with Angular, in Meteor all you have to do is add one core package and specify where to place the login button. Password reset is included. Even with the most popular token login package, OAuth is far from simple with Angular.

Does Meteor Scale?

This seems to be one of the hottest questions that people are asking right now about Meteor and the answer is yes it scales and we have not had any issues with our deployments to date.

For a great post about “Does Meteor scale” visit MeteorHacks for a more indepth discussion.

But here is some of the initial logic that answers this question that Meteor certainly does scale.

  1. Meteor is built on top of Node.js and MongoDB. Node is notoriously scalable – 1 million concurrent connections laughs at C10K and in raw terms, Node is faster than PHP. PayPal rewrote with Node.js their account overview page, one of the most trafficked apps on the website and formerly written in Java. The result: double the requests per second, 35% decrease in the average response time, and built almost twice as fast thanks to engineers being able to work full-stack in JavaScript. IBM wrote a white paper on highly scalable Node.js apps. Node is used at Yahoo!, eBay, Dow Jones, Microsoft, Uber, LinkedIn and other large companies.MongoDB is also highly scalable – used to store petabytes of data and perform billions of operations daily at eBay, FIFA, Adobe, Craigslist, McAffee, Foursquare and others.
  2. Meteor is most often used for new (“greenfield”) projects. These typically have users in the hundreds, thousands or tens of thousands. By the time your new web app will reach a million users, you’ll have resources to scale, and Meteor will have been optimized even further. For example, in December 2013, Meteor 0.7.0 introduced oplog tailing, a MongoDB driver which watches queries much more efficiently, without requerying the database on each update. Subscriptions that before took seconds to return data, now take under 30ms. Then in February 2015, MongoDB launched version 3.0, which brings 7-10x better write performance and an 80% reduction in storage by using compression. Meteor support landed in March 2015, along with a 10x Meteor speedup for write operations applicable to any version of Mongo.