Why still using richfaces/primefaces with jsf 2.0? [duplicate] - jsf-2

This question already has answers here:
JSF implementations and component libraries [closed]
(2 answers)
Closed 7 years ago.
During an interview, i had this question :
why still using richfaces or primefaces with jsf 2.0? jsf 2.0 has the ajax capabilities, so what is the advantage of those frameworks vs jsf 2.x ?

Primefaces is a framework on top of JSF-2, and provides components with functionality that would take a big effort to implement in "raw" jsf-2. Look for example at lazy-loading functionality of
p:dataTable
As with any framework, as long as your application can be adapted to the functionality/components provided, you will gain speed in the development.
The drawbacks is of course you have to learn the framework and if the components available doesn't fit your use case, you have to fallback to "raw"-jsf or perhaps even servlets.
JSF is a framework on top of Servlets technology.

Related

Website development - Which tools and languages? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
for a project I will need to develop a website. The problem is: This is the first time for me.
I am currently planning and drawing the outlines and also trying to find out which technique will suit the project best and how to approach this task.
The website should retrieve data from an API by using RESTful HTTP-Commands and present the results to the registered user.
My programming experience so far is mainly C++ and some C#/.NET which I used for the creating the API.
So, which language and script do you think would suit best? I have looked into ASP.NET MVC a bit because of my previous experience with .NET. Is that a proper choice?
Apart from
that, I would prefer a graphical designer for the HTML-coding. What tools would you use? I looked into Google Web Designer, but I was not quite persuaded. What would you recommend?
Thanks in advance!
Eteokles
I agree with Sami, if you have basic knowledge in CSharp/.Net it is not a bad idea to use ASP.NET MVC/API to setup your project. But you should bear platform dependence in mind if you are not using .NET Core, which is actually in Version 1.0.0 RC 2. So if you use ASP.NET 4 you will have to use a Microsoft Server to deploy your application. If that is no problem for you, then I would recommend to have a look at Microsoft Virtual Academy. Developing ASP.NET applications with Visual Studio is a pleasure, you have great debugging tools and you can create Unit Tests to test your application.
Unfortunately there is nothing like a graphical designer for your HTML frontend in Visual Studio. But if you are using Bootstrap you can reach your design goals really fast. Also Bootstrap is "mobile first" which means, that even if a user accesses your Website over a mobile device (Tablet, Smartphone) the site will look great. The basic ASP.NET 4 MVC template comes with a Bootstrap layout, you could build upon.
If you want to enable users of your application to create user accounts you can choose the ASP.NET MVC template with "individual user account" ASP.NET Identity
In conclusion I want to provide you another link where ASP.NET is compared to another very popular and easy to learn language for developing websites PHP vs. ASP.NET. I would recommend ASP.NET after using PHP for years, because thinks like asynchronous programming and using Entity-Framework to handle your database needs.
I would also recommend you to do further reading on the pros and cons of different tools and languages and after you have a general overview over the available solutions you should compare which language and which tools match your application needs most. Happy coding.
Based on your experience/knowledge, ASP.Net, MVC and API seems a good to go option. You might need to understand Javascript/jQuery and JSON to communicate with API. It's pretty simple like:
$.getJSON("http://localhost/api/products", function(result){
$.each(result, function(i, field){
$("div").append(field + " ");
});
})
For UI, Bootstrap is always a good choice and easily get your layout at
Layoutit
For Web API, a good tutorial found at Web API in ASP.Net MVC
Hope this helps!

For asp.net mvc which js best either AngularJs or BackboneJs or KnockOutJs? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am working in Asp.net MVC for last 1 year but I have never used AngularJs , BackboneJs or KnockoutJs . Now I want to use it in my project but I am little bit confuse that for MVC which is one is Best . Somewhere I read that AngularJs has best perfomance but mostly used with MVVM framework so kindly provide me proper guidance that with Asp.net MVC which js is best either AngularJs or BackboneJs or KnockoutJs ?
Thanks in Advance.
If you are building single page application you need a SPA framework. It should include two-way data-binding, client-side routing, page composition, navigation, screen state management, module system, bundling. You can choose between Angular and Durandal. They both provide very similar functionality, but in my opinion, Durandal is the most complete SPA framework, which is very easy to use. Both Durandal and Angular can be used with Breezejs to build data centric applications.
check Durandal, Durandal Auth and HotTowel Angular
If you are building ASP.NET MVC application, then all you need on the client side is two-way data binding to reduce DOM manipulations. In my opionion, it's an overkill to use angular just for data-binding. Backbone or Knockout are good choices, but Angular can be used as well.
It depends on the nature of your application. And since you did not
describe it in great detail, it is an impossible question to answer. I
find Backbone to be the easiest, but I work in Angular all day.
Performance is more up to the coder than the framework, in my opinion.
Are you doing heavy DOM manipulation? I would use jquery and backbone
Very data driven app? Angular with it's nice data binding
Game programming? none, direct to canvas, maybe a game engine - Source
Also, take a look at https://stackoverflow.com/questions/5112899/knockout-js-vs-backbone-js
You can check the following source. It's really complete:
http://www.infoq.com/research/top-javascript-mvc-frameworks
Personally, I'd go for Angular just because of its performance, but there are plenty of reasons...
I'm using Knockout with ASP.NET MVC/Web API at work, but I have played with Angular at home and honestly prefer that. Bear in mind though that Knockout solves a much smaller problem than does Angular, the latter being a complete SPA framework (with services, HTML directives etc). To compare apples to apples, you should consider Knockout in tandem with Durandal, as this is a full-blown SPA framework like Angular.
From practical experience I suspect that memory leaks are easier to avoid with Angular than Knockout, since Knockout produces references implicitly as you subscribe to observables (typically via ko.computed) and we had a very hard time trying to track down such memory leaks due to undiciplined taking of Knockout subscriptions without cleaning up. With Angular I couldn't see that you have the same problem, as you don't subscribe directly to mutating variables ("observables"). Instead, the framework is in full control of applying model changes, which might be harder to grasp initially, but ultimately leads to better maintainability.
I have not tried knockout or backbone. With Angular I have worked with ASP.NET MVC. I personally did not like using MVC views. As Angular requires POJO (Plain Old JavaScript Objects) , So, I changed to Web Api and Angular. To be honest I am very satisfied with Angular because of following reasons:
DOM maniuplations are done where they belong.
Two way binding
Designed with unit testing
Services are where they belong
Designed with HTML5 in mind
Ability to create HTML markup to suit business needs (directives) and many more.

Is angularJS an alternative to JSF?

I was looking for a webframework to use in an application for a call center. 3 important requirements would probably be
an ability for a quick, localized refresh of the screen
a need to collect information from 3-4 disparate systems
the roadmap/longevity of the framework itself
Was looking at JSF & AngularJS (I have worked on neither). Am I right in considering them as alternatives or are they meant for very different things. How do these measure against the 3 considerations above.
No, angular is clearly not an alternative to JSF. JSF is a server side java application framework (with some ajax features). Angular is a client side javascript framework. It's a bit like comparing JQuery and JSPs.

what is process and update and how it works in primefaces [duplicate]

This question already has answers here:
Understanding PrimeFaces process/update and JSF f:ajax execute/render attributes
(5 answers)
Closed 6 years ago.
Can you differentiate process and update.Since am new to JSF am little confused where to use.unnecessary use causing issue in my Application.
process in primefaces equals to execute in JSF
process : Determines id’s of components to be processed(sent/submitted
to server).
update in primefaces equals to render in JSF
update : Determines id’s of components to be updated (refreshed with
updated values from server).
If you want to learn about those two tags (and more) you should read this blog post :
Learning JSF2: Ajax in JSF – using f:ajax tag
After that you should know that primefaces process and update can also use a more powerful selectors, read more here
jQuery Selector API meets JSF
and
PrimeFaces Selectors - #(selector)

Difference between WebApi controllers and WCF WebAPI [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
What's the difference between WCF Web API and ASP.NET Web API
I've started looking at the new features of MVC 4. One of the notable new features is ApiControllers.
I still cannot understand why to use this rather than WCF WebAPI? Is that because Microsoft's trying to fadeout WCF WebAPI, or gather all tool sets in a single place which is an MVC 4 project?
Please take a look at this.

Resources