What Framework Should I Use with Nodejs and Hapi for Web Development?

  • Context: JavaScript 
  • Thread starter Thread starter ShayanJ
  • Start date Start date
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 2K views
Messages
2,802
Reaction score
605
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
 
on Phys.org
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.
 
  • Like
Likes   Reactions: ShayanJ
ShayanJ said:
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

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.
 
  • Like
Likes   Reactions: ShayanJ and jedishrfu
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
 
  • Like
Likes   Reactions: jim mcnamara and QuantumQuest
jedishrfu said:
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
But frameworks provide so many ready to use components where as with Elm, you still have to reinvent the wheel.
 
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:
  • Like
Likes   Reactions: QuantumQuest and ShayanJ