#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2015
    Location
    Sydney, Australia
    Posts
    5
    Rep Power
    0

    Advice on JS development


    I've just starting developing with JavaScript and I'm wondering what set of technologies I should be using. There are so many choices that I get a bit confused as to what I need.

    I finished a qualification in Web Development last year and have been using a lot of PHP (fairly vanilla stuff) for some clients as part of a freelancing thing. I've also been using the same technology for the sites I've been making at work. They use PHP e-commerce plugins, so we thought we might as well go with a PHP front-end as well.

    However, I recently saw a graph saying that node.js is the fastest growing framework, so I thought I'd try it and I really like the basic framework, I just need more functionality and I'm not sure if I should use Angular.js, Vue.js, React.js?

    I'm going with MongoDb for now. If I remember correctly, I chose it because I don't really need an Excel style database, just a user/password/content type thing.

    Can I get some advice as to what other people are using and why? What they like and what they don't? Just so you know, I'm trying to develop a pretty basic social media type app, at the moment.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2015
    Posts
    50
    Rep Power
    2
    NodeJS is a thing for server-side Javascript. It's what happens when someone thinks "we really like Javascript, and really hate Perl/PHP/C#/Java/etc, so let's make something to take care of that."

    If you want to build server-applications in Javascript, NodeJS (now IO.js, mind you, but I will call it node) is about all there is (most popular, npm is a pretty good package manager, etc).

    Client-side Javascript is also a thing, and where Javascript began. Fancy applications and such.

    But let's not get ahead of ourselves. If you want to do anything Javascript, you have to learn your Javascript. I don't mean "I can use some jQuery" I mean you gotta appreciate things like

    Code:
    Object.prototype.toString.call(this).slice(8, -1)
    Then there's the DOM, events, Prototypical OOP as a concept and a practice, etc. Then architectures like MV* (MVC, MVVM, etc) and Flux. Javascript: The Definitive Guide is a great starter.

    Additionally, looking into things like RequireJS and ES6 (the newest standard) are more or less necessary.

    The goal, after all, isn't just to create web pages anymore. You need to be able to create Web Applications That Mimic Desktop Applications. Real time as possible, interactive as possible.

    A few thoughts on specific JS libraries before I head to bed:

    jQuery

    Kind of indepensible, great cross-browser support, and makes transversing the DOM so much easier, but a lot of tutorials also encourages a lot of bad behaviors. For instance, every time you see something like "data-*", take a shot. Never mix data and templating, anywhere.

    Strengths: Easy to learn, makes it easier to learn a lot of core Javascript practices.

    Weaknesses: Makes it too easy to learn a lot of bad Javascript practices

    AngularJS

    My personal favorite, but it also has a really steep learning curve. Factories, service providers, dependency injection. Things that I'm right at home with, but something that can confuse a lot of new people.

    Strengths: Built-in templating system, making it easy to separate views from models from controllers. Large ecosystem with a lot of stuff easy to get right off the shelf. As fast as your server connection can make it (i.e, templates are loaded once per load of the application).

    Weaknesses: Insanely hard to get into. Learning how Angular does scoping is enough to keep you away. Also, 1.* is on the way out, and 2.0 looks kind of bad, so I'll probably jump ship to Ember or a mix of React with something else

    EmberJS

    All the strengths of Angular, but some of the weaknesses of jQuery. If you know what you're doing and have a solid foundation, it's fantastic.

    Strengths: lots of great built-in functionality, easy to debug

    Weaknesses: Not a huge eco-system to be honest, so if you find yourself in a situation, be prepared to build something.

    Flux

    Flux is not a web application framework. It's only for displaying stuff. It provides little to no support for models, controllers, or making waffles.

    Strengths: It does some cool stuff, but...

    Weaknesses: It's a pain in every sense. Just ignore it and go about your busness.

    Backbone

    Backbone lets you build applications. It, with a templating engine and jQuery, is extremely powerful.

    Strengths: Lets you decide what is best. Works great with RESTful backends, great documentation, etc.

    Weaknesses: Chooses the "configuration over convention" path too often.

    Also, a note on MongoDB: just don't. It's a nice idea, but CouchDB is much better and more reliable (and even then, you probably shouldn't. We made the decision to use Cassandra in our warehouse system since a) it had to be distributed and b) it had to be fast, but that's an edge case. We still did weeks of research and stress tests).

    Comments on this post

    • Will-O-The-Wisp agrees : Thank you! This is an awesome response!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2015
    Location
    Sydney, Australia
    Posts
    5
    Rep Power
    0
    Thank you @oakleaf. I'm glad someone took their time to give us noobs a few words. I'll look into that definitive guide book. The things you mention about web apps mimicking web apps is kind of what I was thinking of doing. Also, the tip on Db's is great too.

IMN logo majestic logo threadwatch logo seochat tools logo