jsr372-experts@javaserverfaces-spec-public.java.net

[jsr372-experts] Re: 1099-ViewsInDedicatedFolder

From: arjan tijms <arjan.tijms_at_gmail.com>
Date: Wed, 4 Feb 2015 15:30:28 +0100

Hi,

On Wed, Feb 4, 2015 at 2:57 PM, Frank Caputo <frank_at_frankcaputo.de> wrote:
> I don’t like the /views folder, because this forces JSF developers to structure their facelets technically. If the developers work domain driven, they usually structure by the domain. E.g. a folder /account will have all facelets belonging to the domain account including the corresponding views.

I think they can largely still do that, /views just becomes an
alternative root folder, albeit for top level views only.

So

/views
    /account
        order.xhtml
    /admin
        dashboard.xhtml

etc

This will then correspond to the following URL requests (assuming
.xhtml to .xhtml mapping):

localhost:8080/account/order.xhtml
localhost:8080/admin/dashboard.xhtml

It's true that any includes and such that these top level views use
can best be put in a separate folder ,e.g. WEB-INF/includes (not a
standard folder, but something the user can choose freely). This is a
best practice even today, as you don't really want includes being
directly world readable.

At any length developers will never be forced to use this, it's an
optional folder. The regular archive root is still there.

Kind regards,
Arjan Tijms




>
> Ciao Frank
>
>