Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

JavaScript Nodejs, hapi, and what?

  1. May 27, 2017 #1

    ShayanJ

    User Avatar
    Gold Member

    I'm trying to learn web development. At first I was going to learn Java but then nodejs really seduced me and so its been a while I'm learning Javascript and nodejs.
    But now I have a problem with frameworks. hapi seems nice and I want to use it but I also need a framework to build the view of the website with. For that, quasar or Vuetify seem really nice because they both have so many cool components ready to use and are also easier to learn than react. But I really don't know how to use one of those amongside hapi. Can anyone help?
    Thanks
     
  2. jcsd
  3. May 27, 2017 #2

    jedishrfu

    Staff: Mentor

    Have you looked at angularjs?

    https://stackoverflow.com/questions/29650364/nodejs-hapijs-with-angular-js

    and a connection wirh react:

    https://github.com/jedireza/hapi-react-views

    In general, I've read that React holds up better than AngularJS if you have a lot of connected data items on a page something 2000 or more.

    Search on "hapi react nodejs" to see more packages related to hapi and nodejs

    Another thing to checkout is youtube for videos on the MEAN stack which is MongoDB+Express+AngularJS+Nodejs which is a common strategy for building web apps with some folks replacing angular with react.
     
  4. May 27, 2017 #3

    QuantumQuest

    User Avatar
    Gold Member

    If you want to learn web development as a hobby, I would recommend taking a look at a site like this for some general things about js frameworks and also try to learn the basics of web development (web server, client, protocols and basic models) - if you haven't already done so. Knowing basics (even simply how the whole thing works), will help you even if it is just a hobby. If on the other hand your goal is to do any kind of professional work (even in the future), beyond these, try to learn at least HTML5 and JavaScript itself. This will help you in many things like choosing the appropriate tools / frameworks and do some code "hacks", where the need arises (it always does).

    Java is not used so much for web development anymore for anything beyond enterprise realm. Now, Node.js is extremely popular and a very flexible and efficient framework but it is not the "one-cure-for-all" solution as no framework is ever a such thing. You can mix and match various tools / frameworks, depending on your experience and what kind and size of application you need to develop. For what you specifically ask I'll second jedishrfu to take a look at Angular.js that can be very well used for the combination of frameworks you refer to. Angular 2 is improved and the whole thing about the choice between Angular 2 and React boils down to whether you like some tech choices and don't have problem with the additional boilerplate stuff or you need something not as heavy and prescriptive. So the project at hand will determine the choice. My advice is to take a look at the specs of other frameworks as well and see if you can find fit for the application you want to develop. Also, Node.js is a very good choice for all-in-one client and server development with not much pain but if you want to learn web development you must learn some other web server coding languages too, in order to serve your needs better.
     
  5. May 27, 2017 #4

    jedishrfu

    Staff: Mentor

    For front end development you can completely forego frameworks and consider Elm which is a functional programming language that compiles to JavaScript but ensures a better app with fewer bugs.

    Www.elm-Lang.org
     
  6. May 27, 2017 #5

    jedishrfu

    Staff: Mentor

    There's a couple of YouTube video tutorials on the MEAN stack



    And



    And a talk on Elm by the creator Evan Czaplicki

     
  7. May 27, 2017 #6

    ShayanJ

    User Avatar
    Gold Member

    But frameworks provide so many ready to use components where as with Elm, you still have to reinvent the wheel.
     
  8. May 28, 2017 #7

    jedishrfu

    Staff: Mentor

    Much as you'd like to believe in open source code reuse, reinventing the wheel is a way of life for most programmers.

    We try to use frameworks but often come to the realization that for my project they just won't do. If a bug surfaces in a framework then what options do you have? This is a question that programmers don't want to face.

    One is to report it so the framework developers can fix it and wait until they do while your boss is on your case for a fix now.

    Two you can dig into the framework and try to fix it, passing your fix back to the developers as part of your community service but realize it may well get rejected while you begin to own the framework (it becomes a part of your code base) with all of your nonstandard fixes.

    Three learn from the framework and design a solution that is similar in concept but doesn't bring extra unneeded baggage.

    Basically, we adopt well proven frameworks but look at newer ones with some trepidation and only utilize them if pressed for time or the feature is way too cool not to have but is beyond our skill to develop.
     
    Last edited: May 28, 2017
  9. May 28, 2017 #8

    jedishrfu

    Staff: Mentor

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Nodejs, hapi, and what?
  1. What is AI? (Replies: 6)

  2. What code is this? (Replies: 6)

  3. What is a DST? (Replies: 1)

Loading...