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

  • JavaScript
  • Thread starter ShayanJ
  • Start date
In summary: If a bug surfaces in a framework then what options do you have? This is a question that programmers don't want to face.There are a couple of things you can do when faced with this situation:1. Report the bug to the framework's developer.2. Use a different framework.3. Use a different combination of frameworks.
  • #1
ShayanJ
Insights Author
Gold Member
2,810
604
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
 
Technology news on Phys.org
  • #2
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 ShayanJ
  • #3
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 ShayanJ and jedishrfu
  • #4
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 jim mcnamara and QuantumQuest
  • #5
There's a couple of YouTube video tutorials on the MEAN stack



And



And a talk on Elm by the creator Evan Czaplicki

 
  • #6
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.
 
  • #7
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 QuantumQuest and ShayanJ

1. What is Nodejs and how is it used in web development?

Nodejs is a JavaScript runtime environment that allows developers to run JavaScript code on the server-side. It is used in web development to build fast, scalable, and efficient web applications.

2. What is hapi and how does it relate to Nodejs?

hapi is an open-source web framework for Nodejs that simplifies the process of building APIs and web applications. It provides a robust set of features and plugins for handling common web development tasks, making it a popular choice for developers using Nodejs.

3. What are the benefits of using Nodejs and hapi together?

By combining Nodejs and hapi, developers can take advantage of JavaScript's powerful features and the speed and scalability of Nodejs to build high-performance web applications. hapi also provides a structured and modular approach to building APIs, making it easier to maintain and update code.

4. Are there any limitations to using Nodejs and hapi?

While Nodejs and hapi offer many benefits, there are some limitations to consider. Nodejs is single-threaded, which means it may not be the best choice for CPU-intensive tasks. hapi also has a steep learning curve for beginners, so it may not be the best option for those new to web development.

5. Is Nodejs and hapi the best choice for all web development projects?

No, Nodejs and hapi may not be the best choice for all web development projects. It is essential to consider the specific requirements of a project and the strengths of different technologies before deciding on the best approach. Other options, such as PHP or ASP.NET, may be a better fit for certain projects.

Similar threads

  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
13
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
18
Views
4K
Replies
2
Views
877
Back
Top