I'm planning to build a eCommerce web application(similar to http://zovi.com/) using JSF 1.2 and node.js. All front end components will be jsf components binding to backing bean. I want to achieve real time functionality ( such as displaying Today's hot sellers ,Customers who viewed this item also viewed such patterns) using node.js. And all data retrievals from database(MySQL)should be accomplished using node and display in JSF components. I'm confused in how to bind data that i get from node to corresponding managed bean property(since i bound it to corresponding JSF component).

For example on load I've to retrieve data using node.js and populate datatable component and also i should update backing bean. Is it possible with out using any web services like REST Hope you understand this context. Please suggest some solutions.

And I heard performance of Node.js is efficient only for small web applications not for Enterprise level. Is my approach correct??

  • Sharing your research helps everyone. Tell us what you've tried and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Also see How to Ask
    – gnat
    Commented May 17, 2013 at 10:53

1 Answer 1


To understand this approach is to be familiar with the goals and advantages that each of these very different frameworks take.

Node.js is a server side solution for efficient middle tier development of a web application. Some advantages of this are that client and server code can be written in the same language allowing the domain model to exist, without translation, between client and server.

JSF is a component based web framework that allows for MVC development, and allows for a server side event model that can occur on user interaction with the client.

If you had to integrate them then ask yourself why you would need to? JSF will allow you to define your client view and server side controller simultaneously so why would you have need for a second controller in Node.js? If you decided to go with the Node.js approach then while your server side needs are met, your view still needs to be addressed which coincidentally allows you more control over the presentation of your web application than JSF typically allows.

Assuming you need to do this, the best way is to have Node.js provide business logic and data access to your separate JSF application through the use of REST based web services. I would implement a wrapper around the Node.js web services and make these wrapper calls within my JSF Managed Beans.

The only reason I see for this approach is

  • If there exists a compelling business reason, like if data can only be accessed through a third party REST based web service that happens to be implemented in Node.js, or if you need to integrate with a component that a separate development group is responsible for.

  • If you wish to learn both technologies and do not have enough time to learn them each separately.

  • I'm new to node.js. I'm familiar with JSF. I've to use node.js just because customer demanding to use. Is it possible to build whole enterprise level complex website using node.js?? Which one is efficient Building whole website using JSF-Hibernate framework or node.js??
    – user91303
    Commented May 17, 2013 at 11:46
  • 1
    @user91303 They are both efficient in different ways. One is not objectively better than the other. People have different opinions about this. If your customer demands Node.js then you should just use Node.js and not use JSF. Incorporating JSF will require a Java web application server and the customer may not wish to host this.
    – maple_shaft
    Commented May 17, 2013 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.