23 December 2007

Thoughts on ExpressionEngine 1.6.1

I spent the week after finals putting together a support site for a friend's company. His company chose ExpressionEngine version 1.6.1 as the underpinnings of the support site. I'd never used it before, and here are my thoughts on the system having stared at it for a week straight:

ExpressionEngine Pros

ExpressionEngine had a lot of good things to offer, and I can't imagine having completed as much of the support site as quickly as I did without it:

Simplicity of the Templating System
From looking at the shipped, default templates it was straightforward to learn ExpressionEngine's template syntax. Tags come in {single} instances and in {pairs}{/pairs}. Compared to all the JSP line noise I've used in the past (e.g. <%jspTag%>) it was nice to have a bracket just require a bracket.
Flexible URL Parsing
Within any template, it's possible to extract URL segments to dice your incoming URL into manageable pieces. In the knowledge base we had URLs like knowledge_base/category/category_id and we pulled them apart with ExpressionEngine's {segment_#} construct. That was the only place where surgery was required. The rest of the time the URL parsing just worked and I didn't have to think about it. Within the bug tracker pages, I could request a single bug using URLs like bugs/bug/bug_id or bugs/bug/bug_title. I could see all the current bugs using bugs/bug/ with no trailing identifier. The underlying page to do both was identical, and ExpressionEngine handles the URL details automagically within it's underlying Weblog Entries and Comment handling tags.
Search Capabilities
ExpressionEngine has a great Search Module that makes it simple to search across all the content on the site. I doctored the example Simple Search Form provided in the documentation to automatically search across all entry text and titles (default is just titles I believe) and to provide AND semantics for multiple keywords. The advanced search form was also easy to tweak to get good defaults set. After configuring the Excerpt setting I could get a snippet of each search result using {excerpt}. I needed {exp:word_limit total="25"}{excerpt}{/exp:word_limit} to keep the results page from getting too lengthy.
Flexible Entry Categorization
Though the system allows hierarchical categories (e.g. category Sub-A is underneath category A) any entry could be filed under multiple categories simultaneously and subsequently accessed from any of them. For the knowledge base this let us put answers to questions in multiple places, and gave us a navigable ontology for people to use.
Funky Characters and Escaping
While entering fake articles for testing, I got bored with regular lorem ipsum greeking and decided to use some actual greek characters. The system handled it without a hiccup.
Great Public Support Site
The ExpressionEngine Support Site is top notch. Be sure to search both the forums and the knowledge base when you're digging for information.

ExpressionEngine Cons

With the caveat that these issues are likely fixable but just difficult for the uninitiated, these were my gripes about using ExpressionEngine:

Lack of Formality in the Templating System
I ran into odd problems when I tried to use nested conditionals, and I never could find what I'd call a "language reference" that'd give me a definitive answer for what works and what doesn't. Basic control structures were hard to read about because they've been given wacky names, e.g. this {if something}{/if} is an if statement not a conditional global variable. The ExpressionEngine template documentation lies somewhere between an extended example and a thin, wordy book sorely in need of a good index. There is a quick reference but it looks like you'd expect for a PHP-based system— lots of variable/tokens in a laundry list with little semantic/syntactic context. I prefer working from dense, highly structured references like O'Reilly Media's Nutshell Series and Visibone's Reference Products.
Breadcrumb Navigation and/or Advanced Category Functionality
Within our knowledge base, we wanted to provide a breadcrumb trail for how the user navigated into the given article. That would let the user back up by category if he or she got too far in. Unfortunately the ExpressionEngine documentation and knowledge bases keep mum while the forums are littered with poor information on creating breadcrumbs. The consensus there is that a one-size-fits-all breadcrumb mechanism doesn't work, and that everyone generally needs to roll his own. Okay. But, the existing category support tag doesn't answer questions like what-is-the-parent-category-of-the-current-subcategory? (or, if it can, the documentation isn't giving up its secrets lightly) and so we had to roll our solution by querying directly against the underlying database tables.
No External Member Registry
Since we were creating a support site for an existing user base, we wanted to use login information from our application to provide user accounts for the ExpressionEngine-based site. No dice. There are import mechanisms, but they run the risk of drift/synchronization issues over time. External user registries are apparently possible but wholly unsupported. The hacks the friend put in place are working but temporary to say the least.

I've got some other minor nits, but they are of the I-didn't-expect-it-to-work-that-way variety and wouldn't matter if I spent a second week using the product.


ExpressionEngine is a good product, and I'd choose it if I ever have to roll another site.

Random Tips

When alternating CSS classes in an HTML table, don't look for a modulus operator to write something like {if count%2}{/if} to use in conditional statements. It doesn't exist. Instead, use the {switch} variable.

Put your templates on the filesystem otherwise you're going to edit everything from within an HTML <textarea>. That's painful, especially if you want to want to use external source control and/or you've invested time in becoming proficient with a text editor. If that's not an option, the Firefox It's All Text! extension will help dull the pain.

When you create a new weblog, be sure to associate the "Default Status Group" with it right away (i.e. EE Control Panel > Admin tab > Weblog Administration > Weblog Management > Edit Groups). If you don't trying to use a Stand-Alone Entry Form will mysteriously cause all new non-SuperAdmin user posts to have "Closed" status no matter how you fight with it. After two hours of muttering under my breath, I gave up and read the source code only to find// if there is no status group assigned, only Super Admins can create 'open' entries. Not assigning a status group causes your weblog to have "Open" and "Closed" status available, which is identical in behavior to having the "Default Status Group" assigned save this nasty catch.

15 December 2007

A Taste of Haskell by Simon Peyton-Jones

Now that my semester is over, I've gotten the chance to catch up on my backlog of things to read and watch... At OSCON 2007, Simon Peyton-Jones gave a really nice 3 hour introduction to Haskell (original post). The video has two parts along with PDF slides:

  1. Part 1
  2. Part 2
  3. Slides
Definitely lengthy, but worthwhile. Simon's apparently an animated presenter and the audience asks interesting questions. I've futzed a bit with Haskell since I read about Haskell Curry every time I passed the McAllister building on Penn State's campus. The Penn State math library had a pretty good Haskell intro which I enjoyed, but I've never gotten the chance to do anything "useful" with the language besides learn from it. In Java, most of the immutable type and functor-like patterns I use are taken from concepts I learned from Haskell. A side-effect-less style (where possible) combined with short methods and good entry/exit tracing makes it easy to debug server side code from a single trace log.

02 December 2007

The Farnsworth Parabox

While procrastinating yesterday, I read about the resignation of the Texas Director of Science Curriculum, saw a comment about the Tiktaalik, and then read up a bit on the tetrapod Tiktaalik and the related Coelacanth.

That's when the procrastination became less than educational. The popular culture portion of the Coelacanth article mentioned them appearing in a Futurama episode called The Farnsworth Parabox. The synopsis was too much to resist, and YouTube made the episode very easy to find:

The Farnsworth Parabox Part 1

The Farnsworth Parabox Part 2

The Farnsworth Parabox Part 3

Mathematical Refactoring

My functional analysis course has included work by guys like Lebesgue and Hausdorff. Much of the motivation for their work seems to be a desire to clean up existing ideas, to repair/simplify/unify concepts, to formalize abstractions, and then to extend capabilities in new directions taking advantage of their much improved frameworks. According to Professor Demkowicz's in-class historical anecdotes, these software refactoring-like activities were all the rage in the late 19th and early 20th century mathematics. Call it mathematical refactoring.

I wish I could claim the phrase mathematical refactoring as my own, but Arnold deVos coined it five years ago. Well done sir.

As of now, Google only shows "mathematical" and "refactoring" appearing adjacent to each other four times in all of the Internet:

1. A Framework for Automated Software Design Optimization (PDF) by Dr. John Murphy (2002)
In this way each transformation will be "mathematical", refactoring being a very well defined code-level transformation.
2. A forum posting on Test-Driven Development by Arnold deVos (4 Dec 2002)
Imagine a case where a refactoring affects just two collaborators A and B. A "mathematical" refactoring can be performed quickly and reliably. But if there are tests on A and on B and associated test cases there is a lot more work to do.
3. A listserv posting by Mathieu Bouchard (15 Sept 2006)
AFAIK, String Theory is still baffling itself; it's more of a mathematical refactoring of previous theories, than a scientific theory, due to the lack of experiments to test the theory.
4. An IBM Global Services presentation on Electronic Batch Records (PDF) (December 2006)
Use a mathematical Refactoring Model to determine the optimal sequence of actions to mitigate this risk for these products, technologies, and sites over the pre-set horizon and within the constraints.

Neither Murphy nor the IBM presentation used mathematical refactoring as a compound phrase in the sense that I am, but both deVos and Bouchard both did. deVos easily predates Bouchard.

Subscribe Subscribe to The Return of Agent Zlerich