I have made two folders in my webcontent folder named, “open” and “secure”. The pages in secure are of course secure and the pages in “open” are those which users will interact with. I have made a backing bean for things such as displaying a question, some simple statistic about the questions and so on. They are equal both on secure and open webpage.
However should I make two backingbeans anyway? And should I name the package myCompany.app.secure and the other myCompany.app.open and another one named myCompany.app.common to make it easier to find classes?
If there’s no reason to have two backing beans I’d say just use one. Additionally, if the pages don’t differ between the open and secure parts I’d just use the open one (users of the secure part have access to the open part as well, don’t they?).
As for the package names: you might do that. Basically you should use a package naming scheme that is as intuitive as possible, allows for quick overviews (no crowded packages), provide a good grouping of the contained classes and subpackages and most importantly are convenient for all involved developers (if you’re the only developer then it’s just you 🙂 ).