cancel
Showing results for 
Search instead for 
Did you mean: 

UI development for my application

shanmmugarajak
Champ in-the-making
Champ in-the-making
Hi,

I am new, using Alfresco, I find this tool awesome. We decided to go with developing our application using Alfresco as the tool itself provides various features we are looking to, like search, uploading, search engine etc.

Is it possible to develop UI (JSP) to use it in Alfresco. If so can anyone walk me through?

Any sample third party application code available, that using Alfresco?

Thanks
17 REPLIES 17

shanmmugarajak
Champ in-the-making
Champ in-the-making
Hi Gavin

I am using JBOSS version. I have modified the login.jsp in the space which I have extracted from internet. How do I go about redeploying it in the JBoss server?

Thanks
Raja

gavinc
Champ in-the-making
Champ in-the-making
You need to go to <alfresco>/common and run the ant script in there as follows:

ant build-jboss

You will also need to setup a JBOSS_HOME environment variable to point to the JBoss area i.e.

JBOSS_HOME=<alfresco>/jboss

This should rebuild everything and re-deploy the WAR file to JBoss. You will also need to restart JBoss.

hsp
Champ in-the-making
Champ in-the-making
Yes, you should be able to use any Java ui toolkit against the Alfresco java API - the API documentation can be found at:

http://www.alfresco.org/mediawiki/index.php/Alfresco_Content_Management_Java_API

In the documentation above, says:
"…
There are three approaches to accessing the interfaces in your own code:

   1. Use standard Spring dependency injection (recommended, if your client code is also Spring based)
   2. Manual access via the Spring getBean() method
   3. Indirectly via Alfresco's ServiceRegistry

Spring provides excellent documentation on how to bind Beans together, so that won't be duplicated here.
…"

In other words, I must make my web application using spring framework, is it right?
May I make my web application using struts framework, and placing the /project/jcr and /project/remote-api files inside my context application?
Which folders have I to insert into my context/WEB-INF/src to do my web application using Alfresco like API….?

Sorry if these questions are too basic for you guys…
Regards
Helio

rdanner
Champ in-the-making
Champ in-the-making
Yes, you should be able to use any Java ui toolkit against the Alfresco java API - the API documentation can be found at:

http://www.alfresco.org/mediawiki/index.php/Alfresco_Content_Management_Java_API

In the documentation above, says:
"…
There are three approaches to accessing the interfaces in your own code:

   1. Use standard Spring dependency injection (recommended, if your client code is also Spring based)
   2. Manual access via the Spring getBean() method
   3. Indirectly via Alfresco's ServiceRegistry

Spring provides excellent documentation on how to bind Beans together, so that won't be duplicated here.
…"

In other words, I must make my web application using spring framework, is it right?
May I make my web application using struts framework, and placing the /project/jcr and /project/remote-api files inside my context application?
Which folders have I to insert into my context/WEB-INF/src to do my web application using Alfresco like API….?

Sorry if these questions are too basic for you guys…
Regards
Helio

If you are going to run the repository locally, then you need to start the spring context that loads it up.  You can use whatever presentation layer you want.  I am sure there is a Struts Spring integration.  I just cant remember what it is called.  But it exists. 

If you run the repository remotely you can attatch to it from the application using the alfresco webservices or some other remoting technology.

Depending on your setup you can also bind the repository to JNDI and have applications look up a reference.

There are a lot of options.  What are you looking to build?  I dont think there is one formula that fits all.

hsp
Champ in-the-making
Champ in-the-making
We have a framework, based on struts/hibernate, where all the web applications we do/have are created using this framework. The security configuration system was also built using this framework. So, I don't know if it is possible to build my web application (for Content Manager) using what Alfresco offers.
My point is like someone already posted in this forum, in struts framework we inform the actions and beans the jsp will call, but there isn't all the file configurations that have in the Alfresco, so I don't know what files of Alfresco (souces and configuration) I will insert into my context to use at least the basics services of CM works. We have to do our soluction based on Alfresco, in this way it will be easier to maintenance in the future by ourself.
Would you realize what I mean?

Regards
Helio

rdanner
Champ in-the-making
Champ in-the-making
We have a framework, based on struts/hibernate, where all the web applications we do/have are created using this framework. The security configuration system was also built using this framework. So, I don't know if it is possible to build my web application (for Content Manager) using what Alfresco offers.
My point is like someone already posted in this forum, in struts framework we inform the actions and beans the jsp will call, but there isn't all the file configurations that have in the Alfresco, so I don't know what files of Alfresco (souces and configuration) I will insert into my context to use at least the basics services of CM works. We have to do our soluction based on Alfresco, in this way it will be easier to maintenance in the future by ourself.
Would you realize what I mean?

Regards
Helio

This link may be useful to you.
If you are going to bundle alfresco under your application you need atleast all of the xml files that ship with the alfresco repository.  If there are "beans" you want to use from the webclient, then you need to bundle those xml files as well.    At the moment it sounds like you are looking to leverage the repository not the UI portion of alfresco under your application.

http://struts.sourceforge.net/struts-spring/

I hope this is helpful to you

hsp
Champ in-the-making
Champ in-the-making
Which API provides all services found in Alfresco UI (or almost, like categorization, forum, versioning, aspects). If I am building my web client with struts, I'll need to place what tree of API into it, what files of Alfresco API depends and are needed to be placed into my application too?
I mean, if I want to do my UI with struts and place the api files into my context folder:
If I want to use the alfresco api which files are needed, or eigther if I want to use the repo api which files…?
Which api will provide the services I found in the Alfresco UI, or almost them?

Thanks in advance
Helio

rdanner
Champ in-the-making
Champ in-the-making
Which API provides all services found in Alfresco UI (or almost, like categorization, forum, versioning, aspects). If I am building my web client with struts, I'll need to place what tree of API into it, what files of Alfresco API depends and are needed to be placed into my application too?
I mean, if I want to do my UI with struts and place the api files into my context folder:
If I want to use the alfresco api which files are needed, or eigther if I want to use the repo api which files…?
Which api will provide the services I found in the Alfresco UI, or almost them?

Thanks in advance
Helio

Hi Helio,


Have you tried to make a simple spring / struts application? I did a little reading and the link I presented in the last post is actually quite stale.  Spring has included support for struts for some time (since version 1.0.1 or in that release space.)  Check the http://www.springframework.org website for information and sample applications.

If you have not made a simple application that proves out for yourself, I would start there.  It will give you the basic mechanics for moving forward with alfresco.


I like to think of the web client as the candy shell on alfresco.  It is heavily spring based underneath.  Once you have a struts application invoking and referencing bean beans from spring you have the foundation.

Next you will look for the API of alfresco.  The web client uses the Local Native alfresco API.  This API is probably the easiest to get started with for one reason….  The web client is a good example of how to use the API.
You can't beat a working example….


The web client will take some digging on your part.  You will need to learn where you are looking at code that addresses JSF concerns and where you are looking at the app.  If you have done JSF this is a non issue and if you have not then… you will figure it out if you put some time to it.  JSF on the consumer side is pretty obvious.


I would bet that you need (at the very least), the files from the core and repository portions of the source base.  This IS the heart of alfresco.

The web client will be your example but only portions of it would probably show up in your application so it doesn't make good sense to include that stuff off the bat.

Pull in the repository.jar.  You will notice all of the X-context.xml files.  Once you have built a spring / struts application you will see how to incorporate these files in to your application.


-R