Feeds:
Posts
Comments

Archive for the ‘CMS’ Category

I just read about Sachin’s blog on Maven and just thought of writing this one i.e. integrating SURF into your web application using Maven.

Just to let you know if you were not using Maven and you needed to install SURF in to your web application all you need to do is just drop the below mentioned jars into your WEB-INF/lib directory of your project. The jars to be included are:

  1. alfresco-core-3.3.0-SNAPSHOT.jar
  2. alfresco-jlan-3.3.0-SNAPSHOT.jar
  3. alfresco-web-framework-3.3.0-SNAPSHOT.jar
  4. alfresco-webscript-framework-3.3.0-SNAPSHOT.jar

Now make sure that your application has the following imports in your web mvc application as :

<import resource=”classpath*:org/alfresco/web/scripts/*-context.xml” />
<import resource=”classpath*:org/alfresco/web/framework/*-context.xml” />

Once you are done with the above steps you just need to restart your application server and SURF will get bootstrapped and available as view resolver.

Now to achieve the same in MAVEN all you need to do is have the below mentioned dependency into your Maven powered web application:

<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-web-framework</artifactId>
<version>3.3.0-SNAPSHOT</version>
</dependency>

and the above mentioned import statements.

Now run mvn install and the build process will get all the dependencies related to SURF.

Happy SURFing until next time!!!

Advertisements

Read Full Post »

It’s something interesting that we encountered today with Alfresco…..

We were working with GROUPS in Alfresco Web Client through “Admin Console” i.e. Trying to create new groups and add an existing group with in this new group and Alfresco complained about it with  the message –

A group ID with the same name already exists, group identifiers must be unique.

Now if you try to do the same thing through the “Admin Console” in Share what Alfresco does is that if you have any already existing group (say GROUP_A) and you create a new group (say GROUP_B) and if you try to create a sub-group under GROUP_B (say GROUP_A already created above) then Alfresco will move the already existing GROUP_A under GROUP_B.

Read more  here.

Read Full Post »

SURF helps you to build user interfaces for your Web Applications using server-side scripts and templates.

Alfresco Share is the best example for its implementation and the other one is Activison’s DAM (Digital Asset Management) system.It’s the first application to be developed on SURF at the Enterprise level and I feel really proud to work on with it. I would like to thank Timothy Bergeron and Jeremy Osterloh at Activision for all their support and help in making me learn SURF.

The best thing I like about SURF is no JAVA coding(yes really no java coding….), no recompilation and no server restarts. You just need a text editor and there you are ready to make changes to live site. It provides features such as Scripts & Templates, Reusability,Spring Web MVC, Content Management, 2-tier mashup architecture.

As a developer you need to look into SprinRoo a light weight developer tool released by SpringSource community.

You may read more information @ http://wiki.alfresco.com/wiki/Spring_Surf

Content
It is the dynamic information that the web application looks to at runtime to inform its decision about what to render or how to render.
A Spring Surf Web Application may have two kinds of dynamic content – Semantic Content & Presentation Content. These both together inform SURF of what to render as well as how to render .

Semantic Content It consists of documents or files that may describe business-generated content. Such content are authored, approved and published. e.g. A Contact Detail content to be displayed on the home page.
Semantic Content can be thought of as information that describes what should be rendered. It contains the approved messaged but it doesn’t contain any formatting information. The data may be in pure data format such as JSON or XML. Consider my contact details in JSON format as
below:
{
“contact_name”    :    “Sujay Pillai”,
“contact_number”:    “8008882182”,
“designation”    :    “Software Engineer”,
“organization”    :    “Zensar Technologies Ltd.”
}

Presentation ContentIt consists of documents and files that descibe presentation configuration for a Web Site. It contains all the configurations that informs the SURF rendering engine how the Web page or page component should look and feel.

It contains answers to questions from Semantic Content such as –
1) Which theme should be used to render the Web site’s home page?
2) How many contacts should I display on the front page?
3) For a current user which advertisement should be displayed?

It answers the question of how things should be rendered.

Consider the following XML configuration that is responsible for rendering the Global header in “Alfresco Share” –
<component>
<scope>global</scope>
<region-id>header</region-id>
<source-id>global</source-id>
<url>/components/header</url>
</component>

Consider the scenario when you hit the login button on Alfresco Share –
1. The browser request arrives to Spring Surf.
2. Surf asks the content delivery services for the presentation content that describes what is being requested.
3. The presentation content is handed back as XML.
4. Surf determines the Web Script to execute and does so using the configuration specified by the XML.
5. The Web script calls over to the content delivery services and asks for header data.
6. The header is returned as HTML.

Read Full Post »

This blog entry will provide you an example how to create a simple jsp portlet in liferay.

Following are the simple steps for creating customize portlet in liferay.

I am assuming that you have set up an ext environment properly under you IDE if not please go liferay throuh wiki or just leave comment

configuration files required for creating jsp portlet are ..

1. portlet-ext.xml
2. liferay-portlet-ext.xml
3. liferay-display.xml

the above file are present under directory

“ext/ext-web/docroot/WEB-INF”.

write following snippet of code under portlet-ext.xml

<portlet>
<portlet-name>EXT_1</portlet-name>
<display-name>FirstJspPortlet</display-name>
<portlet-class>com.liferay.util.bridges.jsp.JSPPortlet</portlet-class>
<init-param>
<name>view-jsp</name>
<value>/html/portlet/ext/jsp_portlet/view.jsp</value>
</init-param>

<supports>
<mime-type>text/html</mime-type>
</supports>
<resource-bundle>com.liferay.portlet.StrutsResourceBundle</resource-bundle>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>

your liferay-portlet-ext.xml should be as..

<portlet>
<portlet-name>EXT_1</portlet-name>
</portlet>

3} under liferay-display.xml

<category name=”category.firstJSP”>
<portlet id=”EXT_1″ />
</category>

Dat’s hit for configuration files now for front end create a file view.jsp under  directory structure

“ext/ext-web/docroot/html/portlet/ext/jsp_portlet”

with simple gretings

<h1>Hello Liferay World</h1>

now go the file structure

ext/ext-impl/src/content

and add this new entries in file

javax.portlet.title.EXT_1=JSP Portlet

category.firstJSP=First Portlet

and dats hit for creating a simple jsp portlet

After this steps do “ant deploy”  from  “ext”.

You will be getting the message “BUILD SUCCESSFUL”.  // if this is done you will bw delighted

Now start your server and login as admin (test user by default),

go to the navigation dock->Add Aplication-> First Portlet->JSP Portlet.

cheers……..
Nishikant Sapkal.
opensource Team,
Zensar Technologies,
Pune.

Read Full Post »

Drupal provides module for integrating alfresco with drupal.
Name of the Drupal module is “CMIS & CMIS ALFRESCO.”

Please follow below steps for successful integration of Alfresco with Drupal:-

1.Install clean Drupal setup on your system.
2.Set up Alfresco installation(default phpmyadmin will install,but install it in different port).
3.Download and Install the Alfresco FSR (File System Receiver).
4.Start the Java library apache-xmlrpc in to Alfresco.(Set the class paths for .jar files)
5.Download and Install Alfresco_deployment module into Drupal directory.
6.Login to Drupal administrator Panel.Go to Content Management–>Alfresco Content ->It will give the option to upload content from Alfresco repository and the data will be stored in the Drupal Database as a nodes.

Read Full Post »