cancel
Showing results for 
Search instead for 
Did you mean: 

Confusion over web client...

jeffbannister
Champ in-the-making
Champ in-the-making
Hi,

I am currently evaluating Alfresco for implementation at my company which is involved in the online gambling business. I have gone through the examples especially the FirstJCRClient example. However I see quite often in the accompanying text things like 'to see the content created simply use the web client'. I am left a little confused by this because AFAIK the web client is not available when running the examples as they run the Alfresco repository etc in embedded mode. I have tried running the Alfresco web client by deploying the community WAR file alongside the FirstJCRSample client. I had to modify one the ports JMX-RMI I think as there was a clash. However even after configuring the 'data.dir' and database properties I cannot get this WAR to view/administrate the same content as that created by the FirstJCRClient.

I think I maybe misunderstanding the purpose of this web client.

My questions are this…

1) How do I run the webclient to see the content created by the FirstJCRClient?
2) What is the purpose of the webclient? Is this mean't to be used as a standalone administration console for another sites content?

I am very keen to get some help with this because from what I've seen for far I like the product and it fits our chosen technologies stack nicely. However I think I'm missing some conceptual understanding of the product. Especially when it comes to using a web client for content contributors etc.

Thanks,

Jeff.
5 REPLIES 5

pmonks
Star Contributor
Star Contributor
1) How do I run the webclient to see the content created by the FirstJCRClient?
The easiest way to do this is to install the full web client (eg. using the Tomcat bundle for your OS) then configure it to use the same database and content store (the directory pointed to by the "dir.root" property) as the FirstJCRClient.  It would probably be a good idea to reconfigure the FirstJCRClient to use a content store located in a shared location - from memory the default configuration is to use a subdirectory of the FirstJCRClient directory itself, which (while technically fine) is a bit confusing when it's shared.

Note that you can't (in the default configuration) run both the full web client and the various embedded examples against the same repository (database and content store) at the same time - technically this configuration is a cluster with two nodes (the web client is one node and the embedded example the other node), but the default configurations for the web client and embedded examples aren't setup as a cluster so running both at the same time won't work properly.

2) What is the purpose of the webclient? Is this mean't to be used as a standalone administration console for another sites content?
The web client is Alfresco's user interface, and is primarily an end user tool - it includes an administration console as well, although that's a minor part of the system.  If you've used the content community site (http://www.alfresco.com/community/register/) or customer / partner portal (http://customers.alfresco.com/) you've seen the web client - both of those sites are vanilla Alfresco installations.

Cheers,
Peter

jeffbannister
Champ in-the-making
Champ in-the-making
Thanks Peter for taking the time to reply.

I would just like to clarify a couple of things based on your last reply.

I had done pretty much what you have suggested before I posted i.e. Installed the full web client and changed it's configuration to use ta MySQL database and shared 'data.dir'. I then modified the FirstJCRSample to use the same MySQL database and shared directory. When I run the second client i.e. FirstJCRExample is complains with an obscure message about the 'data.dir' not pointing to a valid location etc. The one I did NOT do however was configure an Alresco cluster.

So my question is this to have the deployment I desire i.e. Two separate processes 1) The web client and 2) My web site with CMS/JCR I need to configure a cluster? I am looking for a simple y/n here as I will look into this again tomorrow and need to know I'm on the right track.

Thanks once again.

pmonks
Star Contributor
Star Contributor
When I run the second client i.e. FirstJCRExample is complains with an obscure message about the 'data.dir' not pointing to a valid location etc.
It's probably complaining about "dir.root", which indicates that the FirstJCRClient is not configured with the same database or content store (filesystem directory) as the web client installation.  Alfresco performs a series of integrity checks on startup, to ensure that the database and content store it's been configured with are in sync.  If they're not in sync, you'll get the kinds of errors you describe.

For the FirstJCRClient, open up the source/alfresco/extension/custom-repository.properties file and ensure that the database coordinates and dir.root setting are pointing to *exactly* the same database and content store as configured in the main Alfresco installation.  You should avoid relative directories at all costs - they are a common source of problems (since they can refer to different directories on disk, depending on where you start the Alfresco server or run the FirstJCRClient).

So my question is this to have the deployment I desire i.e. Two separate processes 1) The web client and 2) My web site with CMS/JCR I need to configure a cluster?
The short answer is yes - if you have two separate processes (JVMs) that interact with the same repository (database + content store) then they need to be configured as a cluster if you ever expect to run both of them concurrently.  If you intend to only run one of them at a time, then they do not need to be configured as a cluster however.

The long answer is really a question :wink: - why design things this way?  If you've embedded Alfresco in your own web app and your users will be manipulating content via that app, then a second content management UI (ie. the web client) is redundant.  If your intent is to use the web client as a troubleshooting tool, then I'd suggest either designing your web app to interact with the repository remotely (more detail below), or build troubleshooting / browse tools into your own web app.  Both of these options will be less work and (more importantly) less intrusive than trying to configure a cluster simply to support troubleshooting activities.

For programmatically interacting with a remote Alfresco repository (eg. the web client), there are a number of options, including:
Of these, Web Scripts are recommended for a variety of reasons, including:
  • They're extensible (you can roll your own APIs)

  • They're technology agnostic

  • They're lighter weight
Cheers,
Peter

jeffbannister
Champ in-the-making
Champ in-the-making
I'm not sure I explained myself clearly in the previous question. I have several online web applications i.e. 10. Each one has content within it which needs to be managed by marketing types. I do not want to re-invent the wheel with regards to CMS as I have little time and these problems have already been solved countless times before.

I do not want to write a content management console for these marketing types because I feel it would be quicker to simply customize an existing one e.g. The Alfresco web client. So each of the online apps just needs to read content from the repository. For this I plan to use the JCR API to prevent vendor lock in. So my current thinking is this…

1) Create online web app which gets content from repository from via JCR API. e.g. mysite.com
2) Customize the existing web client for marketing types to manage content for the online web app. e.g. admin.mysite.com

The only other approach I could take would be to add the web client features and code into my online web application e.g. mysite.com/admin. This approach seems ugly as I would have to add a whole bunch of JSF features etc into the online web app which uses different presentation frameworks to the web client e.g. Tapestry.

In a single content driven site scenario. Do customers create a new content management UI (for content editors) that is deployed within the site being managed. Or do they use a customized version of the web client deployable separately?

pmonks
Star Contributor
Star Contributor
Ok the extra detail really helps.  In that case I'd suggest installing a single standalone Alfresco instance and have the marketing types use the Web Client UI for management, then design your 10 web apps to read content out of that repository via one of the remote APIs mentioned earlier (JCR-RMI for example, if JCR is your preference).

You can use ACLs etc. within the repository to "firewall" the content between the different marketing groups, if need be.

Cheers,
Peter