JSF vs JavaFX: Pros and Cons

I read a Wikipedia article about JavaFX and several other articles, and I believe . I have a decent understanding of what it is and what it does.

My question is simple: what is the best use of Java EE practice for presentation? Or is it possible to use both of them? In any case, can someone give an example of when it would be advisable to choose one by one, and why?

Thanks for any help with this; I just can't see why anyone will ever want / need to deviate from JSF.

+4
source share
2 answers

JavaFX and JSF are two completely different animals. I think of JavaFX as a version of Adobe Adobe (or Flash?). It runs on the JVM, which means it is a heavier browser client. JSF uses standard HTML controls and interactions.

Running in a virtual machine, such as JavaFX or Flex, means that you donโ€™t have to worry about browser capabilities, such as with standard HTML / Javascript, but it also means that you are in the power of the VM developer to get the platform on the browser XYZ and fix platforms and security errors as they become available. Another consideration is that some corporate environments may not like using plugins such as flash / java in a browser.

Running pure HTML / Javascript will most likely force you to switch to more devices and will be easier than loading the virtual machine into the browser (never thought I'd call JSF โ€œlighter weight.โ€) JQuery and other javascript frameworks reduced worries compatibility with multiple browsers, but not completely.

So the answer is the same as for any other question: "It depends." What are your needs? You make an annoying restaurant website where you feel that the menu (even if it's just an image) should be loaded with a heavy plugin? Perhaps JavaFX will comply with the bill. Are you making a simple CRUD application and want to complicate things using a complex component-based structure? JSF can help you with this.

+13
source

JSF is quite rich in user interface compared to spring or struts, but has jargon for session support and additional jars. But if you use rich interfaces, ibmfaces or primefaces, your life will be much easier. JSF is a specification, and you need to use its implementations, such as graphical or text interfaces.

+3
source

All Articles