Search

Symphony 2 brings a total rewrite to the core framework. As a result, the API for developers is more cohesive and powerful. This short article will highlight some of the key changes in Symphony 2.

1. Extensions

Extension are the replacement for Campfire Services. There is a paradigm shift to cater for the new direction Symphony is going, specifically open source. The API has been revamped to make creating and maintaining an Extension easier, whilst also giving you, the developer, more access to Symphony's core engine.

In 1.7, each CS was a distinct class, instantiated from outside the main Symphony engine scope. This meant lots of tricky pointers to objects and such. Well, extensions are now generate from right within the core and have direct access to everything that is already instantiated within it. For many of you, whom have not really spent a great deal in the 1.7 CS API, this will not mean a great deal, but know that the ground work laid out in 1.7 has paved the way to a much more comprehensive and intuitive API.

Some other nifty features include the ability to have complete control over where your links appear in the navigation, by way of overloaded helper functions, or directly manipulating the navigation data prior to rendering. Symphony 2 has more integrated error handling, logging and performance tracking giving you better debugging control.

1.1 Ajax

In Symphony 2 we have introduced a new system of delivering page content. This has enabled us to abstract core actions into distinct context sensitive classes. Specifically, creating AJAX interfaces for your JS is now as simple as extending a single class. Everything necessary is automatically instantiated for you, and everything unnecessary is left out. This kind of feature means as an Extension developer you can release JS only based Extensions easily, such as new toolbar widgets.

2. Data Sources

Symphony 2 brings with it a brand new DS editor and a greatly enchanted filtering system. Developers will be provided hooks into the DS editor to manipulate things like 'Included Elements', and DS's themselves will have complementary hooks to allow for custom DS logic without having to break compatibility with the DS editor.

An example would be email-hash. This element has been removed for Symphony 2, however the idea is that an Extension can be created to specifically target the Author DS type on the DS editor, adding in an additional field for email-hash. On the resultant Author DS, hooks allow the extension to inject its own fields and logic.

3. Fields

Custom Fields as we know them in 1.7 are no more. The replacement? An API for creating your own. Fields are the core building blocks for all data in Symphony. Each field is its own entity, and handles data in its own way. Symphony 2 ships with all the fields you know and love, as core fields.

The new API, releasing shortly after the beta, that can allow you to create a new field in a matter of 20 lines of code, and become as complex as you like simply by overloading the Symphony core Field functions. The API provides hooks into the Publish, Sections and DS Editor so you can create totally custom interfaces for your new Field.

4. Translation and Transliteration tables

As already mentioned in another thread, Symphony 2 will offer internationalisation features. For a developer this means access to custom translation and transliteration dictionary tables of Symphony's core interface.

The ability to work from translation tables is inherent throughout Symphony 2, meaning as a developer, not only can you easily offer your own complete translations for the Symphony interface, but also have access to the core functions that do the work, offering internationalisation features to even your Extensions.

5. Compatibility with Symphony 1.7

The Symphony 2 API, whist similar in some areas, is not compatible with the Symphony 1.7 API. This has allowed us to push the boundaries without being constrained to legacy code. None of the above would be possible if we hung onto the existing API. So, developers will need to rewrite their extensions for Symphony 2. The good news is that many of the coding conventions and overriding paradigms do remain the same, so most of what you will be learning is some slightly newer syntax, and API layout.

5.1. But, can I still write for 1.7?

Of course! Although, you will no longer be able to submit your CS via the Symphony account area. You will need to submit the code to us via email. We will take a look, and update the legacy downloads page to include it.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details