O'Reilly logo

Professional Alfresco: Practical Solutions for Enterprise Content Management by Kevin Roast, Michael G. Uzquiano, Michael Farman, John Newton, David Caruana

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. Surf Platform API Reference

When building new presentation templates or Web components, developers may choose to use Alfresco's FreeMarker and JavaScript technologies. These are the default and preferred way to build high-performance and lightweight Web parts. They are easy to build, and require no server restarts.

The availability of these APIs speeds the time it takes to develop new functionality. Most Surf platform features are available as root scope JavaScript and FreeMarker objects. Developers are able to work with the full range of objects available in the Surf platform. Objects represent entities such as component bindings, pages, templates, the request context, users, remote connections, and credential management.

The FreeMarker Template API and the JavaScript API use a common object model. This means that the objects available to the JavaScript API are very similar (in most cases, identical) to those made available by the FreeMarker API. It is highly recommended that the standard development pattern of the logic work being performed in JavaScript and presentation work being performed in FreeMarker should be followed where possible.

The Surf platform FreeMarker template processor provides capabilities similar to those provided by the Alfresco-repository FreeMarker engine. It does not, however, provide direct access to Alfresco repository concepts, such as nodes, properties, or aspects that developers of repository-tier Web scripts will be familiar with.

The Surf ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required