Extending FirstSpirit with modules

feddersen
Community Manager
Community Manager
3 3 1,233

You can extend FirstSpirit by developing a custom module, which is great if you need functionality that isn't offered by FirstSpirit out of the box.

So what can you do with a FirstSpirit module? Common use-cases are:

  • Create a new input component (form element), which is a good way to integrate a third-party document management system or media asset management.
  • Use it as a simple container to load java libraries that you need within a FirstSpirit script
  • Create a service that communicates with a third-party webservice to exchange information
  • Create a webapplication to easily deploy your JSP/Taglibs to different environments (preview/staging/production)

A module can consist of one or multiple components. Here's a quick overview of the available component types:

Library

A library can contain one or multiple jar files. All containing classes will be loaded and are available on the server, the java client, in scripts and modules. A typical use-case is would be to load a third-party library that you want to use in another component of your module. If you're developing a module that talks to a webservice, you might want to load something like Apache CXF as a library.

Editor

You can create your own input component (form element) by implementing an editor. So this is a very powerful component, that can be used to integrate content from third-party applications. Creating an input component that allows an editor to reference document from a third-party document management system is just one example.

Service

A service is a server-side component that provides a public interface which can be accessed from editors, scripts or project-applications. If you need to talk to external application within your module, you'll probably want to implement it as a service.

Project-Application

As you might have guessed, the scope of a project-application is limited to a single project. You want to implement a project-app if your module requires a per project configuration.

Web-Application

You want to create a FirstSpirit web-application-component if you want to use JSP, servlets or any other kind of java based web technology (JSF, Spring etc.). You might already have worked with Firstspirit web-applications you've used one of our FirstSpirit Integration, FirstSpirit Personalisation or FirstSpirit Security. These modules ship with web-applications as well. You can configure them per project and for each environment (preview/staging/production). So if you've ever wondered how to add your custom Taglibrary into the FirstSpirit preview, creating a web-application-component is the way to go.

We offer a dedicated documentation, called FirstSpirit Manual for Developers (Components). Unfortunately, it's not available in English yet, but it's a recommended read for all German speaking developers. In addition, you can grab some code examples, to get you started. These examples contain the Developer-API as well. You might notice that we don't have an example for a web-application yet, but I'll cover that topic in my next blog posting.

Tags (3)
3 Comments