Developing a Symphony Application: Part 1
Using XSLT to Develop Portable Applications
Symphony 2 has been developed with scalable application development in mind. Since I discovered the flexibility of Symphony 1.5 while building my portfolio site, I had thought that the Twentyone Degrees development team had built a tool that could go beyond the confines of content management. XSLT provides opportunities to manipulate data on the server side using an XSL processor. As this W3C templating standard can deployed using many popular server-side (and client-side) scripting languages, it would be possible to develop applications that were truly portable.
Symphony 2 is currently in beta and is awaiting the completion of the documentation before the final release. To aid in tracking bugs and to document the process of building an XSLT application with Symphony, I’m going to describe the process step-by-step.
Documenting the Process
First, I will want to take screenshots of the process. I’ve created a desktop picture that includes a grid to measure display pixels and standard window sizes (640 x 480, 800 x 600, 1024 x 768). Then I found a much easier way to save a screenshot of a window in Mac OS X Leopard (works in Tiger as well, but not Panther). Type Apple-Shift-4 and then Space. A camera icon appears and you can choose the window you want to capture. A PNG file will be saved to the desktop, complete with transparent shadow. No Photoshop work required. This should speed things along quite nicely.
Installation
Start by downloading the latest version of the Symphony 2 beta. At the time of publication, the latest version was revision 4. Then, unzip the file and upload the files to the directory on your server on which you will be developing your application. If you want to start with a clean install, that is, an empty database and no default theme, do not include the workspace
directory. I will be creating a clean install in a subdirectory called beta
. Upload the following files and directories:
- extensions
- index.php
- install.php
- symphony
If you navigate to the install directory, you should be greeted with an error page. (For most images in this tutorial, click on the image to view full size. Use the back button to return to this entry.)
Now, navigate to the Install Symphony screen by adding install.php
to the URL and you should see the following form for entering your database and user details.
Before filling out the database and user information for the installation, you should ensure that you have created a new MySQL database and that you have set up the proper permissions for the directories. The default is 755
for directories and 777
for files and directories in the workspace
directory. The root directory of the site and the symphony
directory should also be set to 755
.
The details that you supply for the User Information will become the account of the Owner of the site. An Owner is a user type that is created on installation and has full access to the Symphony admin interface. There can be only one Owner. Administrators also have full access to the admin interface, but there can be multiple Administrators. Authors have limited access to the admin interface, restricted to the Publish menus.
After feeding the Install page the correct details, you should be directed to the login page. This page is found by adding /symphony/
to the address of the root of your site.
With revision 4, however, there is a bug for sites installed in a subdirectory. The subdirectory name is duplicated and I am directed to an error page indicating that this page does not exist.
Once logged in, you will be taken to the Sections page of the Blueprints area. This is where the fun begins.
Note that a clean install includes the name of the default theme Spectrum: Symphony Theme in the header of the page. I may be nitpicking, but I would call this a bug.
Symphony Files
When you have successfully installed Symphony, the first thing to do is to delete the install.php
file. You’ll notice that the installation process has added several files and directories. The root directory of the site should look like this (if you are using Transmit, my FTP client of choice):
The file structure should look something like this (once you have deleted the install.php
file (viewing only two levels deep):
- .htaccess
- extensions
- markdown
- index.php
- install-log.txt
- manifest
- cache
- config.php
- logs
- tmp
- README.txt
- symphony
- .htaccess
- assets
- content
- image.php
- index.php
- lib
- template
- workspace
- data-sources
- events
- pages
- utilities
Note: the .htaccess
files are hidden files. These can be viewed with FTP clients such as Transmit or Cyberduck on the Mac. My knowledge of other operating systems is poor, so you’ll be on your own with issues specific to other platforms.
Part 2: The Symphony Administration
The next installment will provide a brief overview of the back end interface, without getting too deep into the details.
Related Articles
This article is a sequel to the unfinished introduction to Symphony 1.7 I started last year. I never finished it, partly because of a lack of time, partly out of boredom, partly due to the fact that I could see the writing on the wall for version 1.7 and thought that the documentation would be obsolete before I finished it. As it turns out, the wait for version 2.0 has been a little longer than anticipated, but well worth it.