Friday, August 22, 2014

What's so great about meanjs?

Yarr
(Note: this is a more technically-oriented article, and I plan to write another, more accessible version in the near future)
I'm sure you've heard the hype: "Node is taking over.  Batten down the hatches, me hearties."  And they're right.  With the new fullstack javascript frameworks that are coming out (namely meanjs and meanio), node, angular, and all their buddies are taking the development world by storm.  To implement a basic blogging service with user accounts, passport authentication, a complete json api and more is as simple as typing
yo meanjs
The way things are going with things like alchemyAPI, node robots and web sockets, us developers will be out of a job some day, which leads me to my point: meanjs is the greatest thing ever (so far).  So, what is meanjs, exactly? (I apologize in advance for all the mean puns)



  • What "mean" means
  • What mean means for me
    • I don't have to learn 4 (four)  flippin' different languages!  Back in the good old days, people needed to learn PHP and SQL for the backend and JavaScript and ActionScript on the frontend.  This process was further complicated when other tools and frameworks emerged, like Java Applets.
  • Wait, how does meanjs change that?
    • From the meanjs site: "MEAN.JS is a full-stack JavaScript solution that helps you build fast, robust and maintainble production web applications using MongoDB, Express, AngularJS, and Node.js."
    • "a full-stack JavaScript solution"
    • You only have to learn one programming language!  That is a very big deal.
  • So why should I use meanjs instead of rolling my own full-stack js framework?
    • One word: boilerplate
    • meanjs is distributed via a yeoman generator
      • This tool autogenerates content common to every fullstack js application, thereby infinitely expediting the development process
      • It even comes with bootstrap ❤ (a beautiful html and css boilerplate compilation)
  • yeoman generator
    • The meanjs yeoman generator generates static boilerplate code fine, but it also generates application-specific modules for you as well
      • The crud module generator automatically generates frontend and backend modules for segments of your application.  However, this is no simple ajax.  In fact, every crud module generated is turned into a REST endpoint, so your entire site interacts using public (or private, should you choose) api calls.
      • This means the api won't get neglected: the usefulness of the application is directly related to how good your api is
      • How to use the crud module generator:
        • yo meanjs:crud-module modulename
  • So, how much does this meanjs thing cost me?
    • Nothing, it's free and open source software (github page) thanks to the superheroic efforts of Amos Haviv :-)
  • Ok, I'm ready to learn this framework.  How many years will it take?
    • Don't make me laugh.  If you've got a good deal of determination, and the ability to reason through problems, you can be up and producing within 2 months.  The framework is, after all, only in its infancy
This framework is so exciting because anyone can pick it up and be superheroic while working with it.  I want to teach everyone that will listen how to code.  With these modern frameworks that make programming so accessible, I plan to share this knowledge with historically underrepresented demographics in computer science, and to level out the playing field for the future.  Frameworks like this will change the world.

No comments:

Post a Comment