Obsolete Pages{{Obsolete}}
The official documentation is at: http://docs.alfresco.com
NOTE: This document describes features for the Spring Surf project. This is a work-in-progress. For information about Surf in Alfresco 3.2 and prior, please see the Alfresco Surf Platform.
Surf is a scriptable view composition framework for Spring MVC. It enables developers to quickly develop rich web application interfaces using templates and scripting. Surf provides view resolution for Spring MVC applications and integrates nicely with the Spring technology stack including Spring Web Flow, SpringSource Tool Suite and alternative view resolvers technologies.
By late November 2009, Surf will be available as an community extension for Spring. This project will consist of the following:
Please keep an eye on this page for more details as they become available.
Surf provides an descriptive web site object-model enabling developers to quickly create pages from templates, components, themes, chrome and more. Surf extends the principles of Web Scripts so that entire web applications can be scripted on top of content delivery services such as CMIS, ATOM, XML, JSON, RSS and more.
Using Surf, developers can:
Surf was developed by Alfresco Software as a better way to build web applications and web sites. Prior to Surf, Alfresco had resorted to building its applications using heavier, more costly Java-intensive technologies such as JSF or Struts.
Instead, Alfresco's community asked for an easier and more lightweight approach to creating application service and user interface extensions.
The Alfresco Web Scripts framework was developed to provide an easy and scriptable way to build new remote REST interfaces for Alfresco. The Alfresco Surf Web Framework was then developed to provide an easy and scriptable way to do the same thing for entire web applications.
Alfresco Share is an example of a web application that was built using Surf.
Surf is available to the community under the Apache License 2.0. You are welcome to use it in your own projects and we encourage the community to participate in Surf's development.
Installing Surf is as simple as dropping a few JAR files into your web application. The following JAR files are all you need:
alfresco-core-3.3.0-SNAPSHOT.jar
alfresco-jlan-3.3.0-SNAPSHOT.jar
alfresco-web-framework-3.3.0-SNAPSHOT.jar
alfresco-webscript-framework-3.3.0-SNAPSHOT.jar
You just drop these into your web application's WEB-INF/lib
directory. You then need to make sure your Spring MVC application performs the following imports in your web mvc configuration file:
<import resource='classpath*:org/alfresco/web/scripts/*-context.xml' />
<import resource='classpath*:org/alfresco/web/framework/*-context.xml' />
When you restart your application server, Surf will bootstrap and make itself available as a view resolver.
A much better way to use Surf in your Spring projects is to simply adjust your Maven builds to pull Surf in. Surf will soon be available on in the following Maven repositories:
To install Surf into your Maven-powered Spring project, all you need to do is add the following dependency:
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-web-framework</artifactId>
<version>3.3.0-SNAPSHOT</version>
</dependency>
You can then run a mvn install
and your Maven build process will pull down Surf as well as its dependencies.
You will also need to make sure that your Spring MVC application performs the following imports in its web mvc configuration file:
<import resource='classpath*:org/alfresco/web/scripts/*-context.xml' />
<import resource='classpath*:org/alfresco/web/framework/*-context.xml' />
When you restart your application server, Surf will bootstrap and make itself available as a view resolver.
Alfresco would like to encourage participation from the community in the development of Surf.
The source code for Surf is currently part of the Alfresco source tree available via Subversion:
svn://svn.alfresco.com/alfresco/HEAD
For more information on the Alfresco build and setting up your build project, please read about the Alfresco Development Environment.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.