Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Should I learn PHP or Node.js

Options
2»

Comments

  • Registered Users Posts: 403 ✭✭counterpointaud


    If you're going to go with learning Javascript why not just master the MEAN stack?

    MongoDB
    ExpressJS
    AngularJS
    NodeJS

    That way you can write fullstack applications and that'll open up your entire career to a wider range of possibilities than just front end or just backend. With this you wont end up as a jack of all trades because your entire stack will be Javascript based. You'll end up mastering Javascript.

    I would agree generally, but I think there are some caveats to this.

    - The Javascript you write for the server often looks very different to that which you write for the client

    - There are better JS-stack friendly databases than MongoDB (IMHO)

    - There are better server-side frameworks than Express (IMHO)

    - React is a probably a more solid choice than Angular at this point if you want to learn Javascript, as you generally use language features rather than framework features in day-to-day work.

    - You may not need a front-end or back-end framework at all, depending on the project

    MEAN is a nice acronym, but there are many options for full-stack Javascript these days.


  • Registered Users Posts: 6,010 ✭✭✭Talisman


    If you're going to go with learning Javascript why not just master the MEAN stack?
    MEAN is fine for prototyping an application. It has been massively successful in the world of entry level web coding due to a combination of good marketing and the belief that everything "just works" and you get unlimited scale "for free".

    In reality scaling MongoDB is a lesson in insanity. During development the minimum number of servers required is 1, it's fast because the database is in RAM. In production you need fault tolerance and the minimum number of servers become 3 - a replica set containing 3 servers. If your application takes off you will want horizontal scaling and then the minimum number of servers required is 9 - 2 shards consisting of replica sets of 3 servers and 3 more servers as the config servers.

    Express.js is old (2009) and rooted in the realm of callbacks, it's fine for small-medium projects. Koa.js (2013) was created as the next generation framework for developers who out grew Express.js - it focused on delivering improved performance using the ES6 Generator feature. It's more lightweight and modular than Express. Hapi.js (2011) was originally built on top of Express but was subsequently rewritten to reduce its footprint - it is targeted at larger and more complex applications.

    Angular is not the all-important frontend framework that it once was. React showed people that there was a better way to deliver front end performance. Ember.js and Vue.js and other lesser known frameworks such as Mithril.js and Riot.js deliver a smaller footprint and faster performance than Angular.


  • Registered Users Posts: 403 ✭✭counterpointaud


    If you do decide you want to learn Hapi, I can wholeheartedly recommend this book: https://www.amazon.co.uk/hapi-js-Action-Mr-Matt-Harrison/dp/1633430219/ref=sr_1_1


Advertisement