Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [starter-dev] JSF for Starter UI

Hi Bazlur,

Since we're going to have a way to host a Java web app, it now certainly makes sense to build the UI using Faces. In fact, the MicroProfile Starter app is also based on Faces: https://github.com/eclipse/microprofile-starter/blob/master/src/main/webapp/index.xhtml

I just want raise a little warning - since this is public facing app, we should avoid using state in Facelets. State is useful when a session is created for logged in users, but it causes unnecessary issues/exceptions when session isn't needed. I saw such issues in the MicroProfile starter, for example getting a ViewExpiredException after some time of inactivity. The MicroProfile starter always creates a session (you can see the JSESSIONID cookie set when you load the page).

Have a look at https://balusc.omnifaces.org/2013/02/stateless-jsf.html how to create stateless Facelets. More info is in Arjan's blog here: https://arjan-tijms.omnifaces.org/p/jsf-22.html and in the spec github issue here: https://github.com/jakartaee/faces/issues/1055.

Although stateless facelets are in a way more complicated to write (no Session or View scoped beans should be used), they provide a better user experience for public-facing pages that don't require a user session.

Once you create a PR, we can ask Arjan to review it. I'll ask Arjan to have a look at it and also to follow this mailing list.

Ondro

On Mon, Nov 28, 2022 at 8:18 AM A N M Bazlur Rahman <bazlur@xxxxxxxxx> wrote:

Hello everyone,

I have been following Ondro and Ivo's progress closely. Superb effort.  We have an endpoint that can flush zipped files, which is great progress in making.


I was wondering if we could go ahead and do the frontend with JSF. I have started working on a prototype with primefaces. As soon as I reach a satisfactory level of development, I will raise a PR.


We could also request a makeover from the design team at the Eclipse Foundation.


Unlike _javascript_, JSF is simple and relatively trouble-free, so I decided to give it a try.  I haven't touched JSC for ages, so making the page and putting everything in place took a while. I'm still working on it; if anyone here is a JSF expert, I might reach out to you to ask a few things. 

I've attached a screenshot for now.



Please let me know what you think.



Thank you,

-Bazlur 




.

_______________________________________________
starter-dev mailing list
starter-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/starter-dev

Back to the top