cancel
Showing results for 
Search instead for 
Did you mean: 

Website development overview - pointers to right places

huima
Champ in-the-making
Champ in-the-making
Hi,

I would like to get confirmation and/or pointers to right places to look, to understand how WCM works and how it could be used, or how it is intended to be used, and or how to create applications that leverage Alfresco repository and services.

I've searched a lot in the wiki and forum, looked at SDK samples - but feel a little uneasy on what are the directions that one can and should take.

Please correct me if my assumptions are wrong, or if I make false claims.

When creating websites with WCM, there are two options:

  1) create sites that can be deployed as static sites to filesystem

  2) create dynamic sites that also use dynamic features to query runtime enviroment

Type one is simple, and can be deplyed to filesystem receiver or via mounted CIFS-drive.

Type two requires either to server webapps through virtualized server, or through deployment to filesystem - then packaged to a webapp and deployed to a app server.

If i serve the site from virtualized server, then access to AVM is available easily, as expressed numerous examples, including Rivet Logic example ( http://www.rivetlogic.com/content/view/34/59/ ) given here. In those cases Alfresco runtime serves content merrily and development resembles any other development enviroment.

However if we deploy to a non Alfresco/Virtual-server, we need to access dynamic content from the repository in some other way. As far as I know, there are following ways to do it.

1) Create own JCR-repository connection, like in SDK samples

2) Use Web Scripts to serve content ( as examples in Wiki )

3) Use webservice examples, like in SDK examples

4) Get remote connection ( RMI ? ) to repository and use AVRemote interface

Relating to these posts:
http://forums.alfresco.com/viewtopic.php?t=8769&highlight=jndipath
http://forums.alfresco.com/viewtopic.php?t=5486&highlight=jndipath
http://forums.alfresco.com/viewtopic.php?t=5377&highlight=remote
http://forums.alfresco.com/viewtopic.php?t=5540&highlight=remote

.. it seems that it is not so straight forward thing to do.

Are there any (complete) examples on how to use AVRemote -interface on remote webapp to get connection to AVM repository on Alfresco runtime?

Let's say that I have an enviroment where I have:

   1) Alfresco development server
   2) Alfresco virtual server for previews
   3) Glassfish for an application that wants to get content from Alfresco

How can I get AVRemote connection to my Alfresco development server? And where can I find code example of that, so that I could test it quickly?

Where is - for example source code for the virtualization server? Could that be helpfull place to look at how virtual server connects to the repository?

Thanks to anyone who can point me to right direction 😄
2 REPLIES 2

rdanner
Champ in-the-making
Champ in-the-making
Hi,

I would like to get confirmation and/or pointers to right places to look, to understand how WCM works and how it could be used, or how it is intended to be used, and or how to create applications that leverage Alfresco repository and services.

I've searched a lot in the wiki and forum, looked at SDK samples - but feel a little uneasy on what are the directions that one can and should take.

Please correct me if my assumptions are wrong, or if I make false claims.

When creating websites with WCM, there are two options:

  1) create sites that can be deployed as static sites to filesystem

  2) create dynamic sites that also use dynamic features to query runtime enviroment

Type one is simple, and can be deplyed to filesystem receiver or via mounted CIFS-drive.

Type two requires either to server webapps through virtualized server, or through deployment to filesystem - then packaged to a webapp and deployed to a app server.

If i serve the site from virtualized server, then access to AVM is available easily, as expressed numerous examples, including Rivet Logic example ( http://www.rivetlogic.com/content/view/34/59/ ) given here. In those cases Alfresco runtime serves content merrily and development resembles any other development enviroment.

However if we deploy to a non Alfresco/Virtual-server, we need to access dynamic content from the repository in some other way. As far as I know, there are following ways to do it.

1) Create own JCR-repository connection, like in SDK samples

2) Use Web Scripts to serve content ( as examples in Wiki )

3) Use webservice examples, like in SDK examples

4) Get remote connection ( RMI ? ) to repository and use AVRemote interface

Relating to these posts:
http://forums.alfresco.com/viewtopic.php?t=8769&highlight=jndipath
http://forums.alfresco.com/viewtopic.php?t=5486&highlight=jndipath
http://forums.alfresco.com/viewtopic.php?t=5377&highlight=remote
http://forums.alfresco.com/viewtopic.php?t=5540&highlight=remote

.. it seems that it is not so straight forward thing to do.

Are there any (complete) examples on how to use AVRemote -interface on remote webapp to get connection to AVM repository on Alfresco runtime?

Let's say that I have an enviroment where I have:

   1) Alfresco development server
   2) Alfresco virtual server for previews
   3) Glassfish for an application that wants to get content from Alfresco

How can I get AVRemote connection to my Alfresco development server? And where can I find code example of that, so that I could test it quickly?

Where is - for example source code for the virtualization server? Could that be helpfull place to look at how virtual server connects to the repository?

Thanks to anyone who can point me to right direction 😄

I am almost certain Kevin C. is typing his reply at this very moment.  He loves these questions and he'll provide you with the best answers Smiley Happy

My sense is that you are in spirit dead on.  There may be a few details here and there that are off – but you have the a correct sense of the world as I know it.

Virtualization server is not meant to serve as a production platform – absolutely correct.  Alfresco provides a number of remote APIs like Webscripts and Web Services that dynamic applications can take advantage of. 

Webscripts seems to be the way to go these days – Alfresco is investing a lot of development in that direction. And with WScripts you can define your own specialized apis or use existing ones if they meet your needs.  To date JCR (industry wide) doesn't seem to have the traction that many of us hoped for two years ago – that is to say – industry wide CM standards don't appear to have the traction one would have hoped for at this point.  A custom API under good design practices is as good as any half baked, half adopted standard from where I stand.  I want to shield my domain code from JCR just as much as I want to shield it from alfresco.

I know many folks who have used the web services and webscripts apis and are in production today with these technologies.  I know folks who are using JCR-RMI (thread bound patch) on top of alfresco who are in production today.  How you get to the repository depends on what you are looking for and what you need is IMO. 

KVC will likely fill you in on the details but you have the gist from what I can see.  I can point you in the direction of a few folks who are working on interesting remoting for alfresco if your interested – send me a message.

Good job on the homework Smiley Wink

kvc
Champ in-the-making
Champ in-the-making
Russ - you beat me to it.

The analysis is dead-on.  Well done. 

For an example to follow, you are correct and can indeed look to the Virtualization Server.  The relevant code to review includes:

*  alfresco-virtserver-context.xml
*  AVMHost.java

This last file shows an example of how your app can authenticate to your remote Alfresco repo (one of the two targets of your deployment, the remote repo(s)), set your auth ticket, and then makes calls via AVMRemote.  This first file showcases best practices, which is to wrapper your AVMRemote calls via Spring so that intermittant time-outs due to network latency require you to do extra work to test whether you have a valid ticket and constantly need re-authenticating.  Spring can take care of this for you, and so that example above is a good one to follow.

Excellent questions.  Of course, if you are using JSP and Web Scripts, you can import standard JSTL tags into your web project and simply use the <c:import> tag to source data from alfresco via a Web Script URL.

Try both, and see which works best for you.


Kevin