Natalia F. wrote:I would make those user defined attributes a List or Map if I were you, so you can stay out of the realm of dynamic objects. Compiled languages like Java are not the tool for the job when you want to introduce dynamic code, things are meant to be static at runtime. If you want dynamic objects, you make your life quite difficult. Seeing as you're new to it all, that is not something I'd consider attempting if I were you.
<li type="a">semi-dynamic data/record types -- think of POJOs with some pre-defined regular attributes and 0..* dynamic (user-defined) attributes.</li>
Natalia F. wrote:I'm certainly an expert at having an opinion about everything.
Determining you as one of the experts in this forum, please, could I ask you how you'd solve this kind of web apps in JSF2 (one of the requirements stated at the beginning of this thread):
Having a "page-manager.xhtml" JSF2 UI at "/page-manager" context that lets registered member X define a website (=a set of .jsf/.xhtml pages) in a new context "/websiteX" (where "websiteX" is freely chosen and associated with dedicated webspace to store the pages in the filesystem):I only see mention of xhtml files - that is the easy part. But XHTML files don't actually do anything at all. What about classes like JSF managed beans? jar libraries? database connections and ORM/JPA support which also adds the complexity of having to deal with all the configuration descriptor files? Even if you can automatically deploy all that, replacing existing classes and reloading them is a whole different matter.
How to store these dynamically created website pages from within the PageManagerServlet?
<ol><li type="a">Could I create a new exploded WAR structure in the filesystem (or elsewhere) when a new context is defined, and then store new .jsf/.xhtml files therein when a new page is defined, all this with usual file operations? -- Would this be enough, or...</li>
<li type="a">...after storing a new page, would I need to explicitly tell the container to deploy the page (or re-deploy the WAR(?)) so that I can instantly test/run the page when it is new/modified, or will it be compiled automatically when pointing a browser to it???
I guess both is possible, but for performance reasons, a pre-compile would be better. How can I achieve this?</li>
Thank you a million for your help, Natalia.
I only see mention of xhtml files - that is the easy part. But XHTML files don't actually do anything at all. What about classes like JSF managed beans? jar libraries? database connections and ORM/JPA support which also adds the complexity of having to deal with all the configuration descriptor files? Even if you can automatically deploy all that, replacing existing classes and reloading them is a whole different matter.O.K., that's a good point. In respect and just to clarify, I thought the 1st web app (new-contexts installer app) would be in charge of installing "the framework" -- basically, the editor to create the new pages (carrier documents) as well as a pre-defined set of widgets to populate the pages, each widget having its own pre-defined JSF ManagedBeans as well as connections to the business tier of the member X context (at least to the pre-defined JPA PersistenceContext accessing the backend db of member X context).
My "expert" opinion: this cannot be done with JSF. In fact the only Java web framework which I can think of that has any chance of making something like this possible is Play framework. I'd really take the road that EJP took: make the content dynamic, not the webapp.So, the plan is not possible in JSF2 ???
Natalia F. wrote:Both seem to work as CMS systems and are likely built on top of either Ruby or PHP - scripting languages which are interpreted at runtime. The CMS part can surely be done with any programming language (but using some platforms will cost a whole lot more time, money and effort than others; there is a reason why there are a million of them built in PHP and there are almost none built in Java), but that's not what you're asking.
If this would be true, than, in consequence, the whole bunch of neat Web 2.0 Website creation sites like "Squarespace.com" or "Weebly.com" could NOT be realized in JSF2, could they??? Actually, I really cannot believe that!
Are you contemplating user-contributed beans? or are you just trying to give the same facility without the beans?If I got it right, you're asking if the app will handle custom-defined data types (custom entities), right?
Natalia F. wrote:Flexive, but its JEE5 / JSF 1.2:
Btw., could you please tell me which of the JSF-based CMSs found in your investigations (mentioned in one of your previous posts) you found promising? -- Preferably among the JSF *2* ones.