tags:

views:

22

answers:

1

Does any expert here have any particular preference for a JSF 2's project structure. Currently, I have the following:

root
  Java Resources: src
     dao.au.com.xyz
     model.au.com.xyz
  ant
  WebContent
     META-INF
     resources
        css
        javascript
        images
     WEB-INF
     sections (for common sections like: menu, header, footers)
     templates (common templates)
     views (xhtml pages)
     index.html (redirect to index.xhtml under views folder)

Is this structure reasonable/valid for a JSF 2 (Facelets) project structure? I couldn't find anything in the JSF specification close to what I want.

A: 

That's subjective and personal and more dependent on the Servlet API specification. As long as the exported WAR conforms the directory structure as specified in the servlet specification and it is in your/team's opinion the best useable and maintainable, then it's fine.

I would however prefer the standard Java conventions with regard to package names. Go from big to small, not the other way round or even mixed. E.g. com.example.model and so on instead of model.com.example.

BalusC
Thanks, BalusC. Much appreciated.
@Balusc: Also, I find your website very useful.