The AptitudeCMS Guide
Table of Contents
AptitudeCMS in One Sentence
"Make the common things crazy easy so your best talent can focus on the hard stuff."
Introduction
Ok, so you are here wondering what the AptitudeCMS Application Framework is all about. I mean, seriously, does PHP need another Framework? Honestly, yes, we think so. No, it's not a severe case of Not-Invented-Here (NIH)...we are seriously lazy and supporting a framework goes against every lazy, procrastinating bone in our body. To that end, we realize that AptitudeCMS may not be for everybody. In fact, you may not even need it. So instead of trying to convince you why you have to have PHP's flavor-of-the-month framework let's cover some basic things, shall we?
First up is do you even need a framework? We could spend hours on this subject as this discussion can get to be a bit of a religious debate. Some of PHP's who's-who hate them and the overhead they bring with them both in terms of ramp-up and to performance. We can't argue that a framework does do some of that. In fact that is why AptitudeCMS even exists...it is a framework that encourages you to only use what you need and to strip out any of the crap you don't. Novel concept, eh? So before you go off downloading AptitudeCMS and spending the hours and hours it will take to learn all it's ins-and-outs please be sure to read this blog post discussing the PHP framework hype. It will help you decide if AptitudeCMS is even right for you.
How AptitudeCMS Came to Be
Many of you learning of AptitudeCMS believe it is new. Nothing could be further from the truth. In fact, many of the key components of AptitudeCMS have been in production use for nearly five years (older than nearly all existing PHP frameworks). AptitudeCMS's roots are in building web-based applications for state government. The main goal of this application framework is to commoditize the process of building software. Unlike those who feel programming can be a form of art (indeed in can be in some instances) we feel building web-based business application should feel more like a big automobile assembly line. And while many of the key component we'll cover in these pages aren't new, it was only recently that we gave all this a name and turned it into a bonafied open source project.
Another important part of AptitudeCMS's history is it is part of the Geeklog Project. Geeklog itself is a content management system in wide use with a very active community and development team. Why the need for AptitudeCMS then? Geeklog was originally written in PHP4 and while it has some object oriented components it is, for the most part, procedural (some would argue that is a good thing). Because it was written in the mid-1990's, Geeklog didn't have the benefit of using many of the PHP libraries available, access to newer DBMS capabilities features and its basic design has become a bit of a limitation in its ability to keep pace with the demands of the community. Don't read too much into that description as Geeklog is still a vary capable system right now. In fact if you stumbled upon these pages just looking for a system you can use for blogging and building online communities please give it a try!
AptitudeCMS Overview
All right, all right. So you've read about PHP's Framework Hype and you still believe you are in the market for a PHP Framework. Great! AptitudeCMS is different than a number other PHP frameworks or libraries because it was born out of the need to get things done. Sure, that suggests that the others weren't, right? Let's take a classic example to illustrate our point and why we exist. Let's say you have some PHP that outputs some HTML and you'd like to cache that data. Were would you go? PEAR's got Cache_Lite. There's also Zend_Cache. Did we mention ezComponent's Cache? Why in the world would we look to write yet another caching library? That's just it! We don't want to. And that is the motivation of AptitudeCMS. We want to provide an Application Framework not a PHP Framework. The PHP framework nut is being cracked by a number of very smart people. With AptitudeCMS our motivation is to combine some of the best-in-class frameworks components and to stitch them together in a way that make standing up a PHP application very easy, yet, gives you the option to strip out anything so suite your needs. To illustrate our point let's use another example. AptitudeCMS out-of-the-box, support PEAR's Flexy template engine. What if you don't know or don't like Flexy and would like to swap it out with, say, Smarty? Unlike with many PHP frameworks, this would be a bit daunting but with AptitudeCMS you can choose your own library or, though ill advised, even mix them together into a sort of PHP-salad. Again, we simply don't care. So before we move on to cover the out-of-the-box components included in AptitudeCMS let us all say it together "AptitudeCMS is an Application Framework, not a PHP Framework". Good. Moving right along...
The Four S's
Again, our motto: "Make the common things crazy easy so your best talent can focus on the hard stuff." We want you to understand that AptitudeCMS is built with Stability, Security, Speed and Scalability in mind and in that exact order. There can be a lot of arguments about that order but if you recall our motto you'll quickly see that the order is consistent with our vision. First get your application up and running quickly (stability). In doing so make sure it's as secure as possible (security) then you can focus on making it fast (speed) and highly available (scalability)
A Quick Note About Licensing
Open Source licensing is a real pain to deal with. OSS purists believe all software should be freely available. Don't get us wrong, we love OSS; but if you are going to provide an Application Framework and want to encourage its use in any domain you have to support the creation of commercial software. For many of us AptitudeCMS contributors software development is our meal ticket... roof over our heads, shoes for the kids, etc. so to that end we go through great pains to only use those components that allow its use in commercial software. If you disagree philosophically we'd simply refer you to one of the many PHP frameworks out there that might align with your views. There's no ill-will... we just know we can be everything to everybody, nor do we try. That said, we'd like to be completely upfront with all the licenses you will encounter if you decide to use AptitudeCMS by offering up this licensing guide
Component Overview
AptitudeCMS, as an Application Framework, provides a number of libraries to provide any number of features. In this section we'll simply give you a quick overview of those components. Yes, this list seems awfully long but remember that much of the AptitudeCMS Application Framework can be stripped out or simply left in but not used.
Model-View-Controller with MVCnPHP
Object Persistence with Propel
- Propel Builds with AptitudeCMS Generator?
- Binding Propel Objects to Forms
- Converting Forms to Propel Objects
- Use a Data Access Object (DAO)? with support for Named Queries
Templates with Flexy?
- HTML Templates
- Email Templates
- Report Templates
Performance and Scalability?
- Alternative PHP Cache (APC)
- Zend_Cache
- Database Zones
Security?
- Authentication and Authorization
- Combating SQL Injection
- Preventing Cross Site Request Forgeries (CSRF)
- Avoiding Cross Site Scripting (XSS)
- Escaping output with Flexy
- Input Filtering with PHP5
Logging with Zend_Log?
Web Services Support with the SOAP Toolkit?
Ajax Support with YUI?
Internationalization?
Getting Started with AptitudeCMS
Out-of-the box AptitudeCMS is a content management system. You may ask "Hey, I thought you said AptitudeCMS is an Application Framework>". Indeed, it is. A key feature of all web-based applications is the need to manage content. You may also be asking, "Hey, does PHP really need another content management system?" Good question. Obviously we believe so. See, most of the current content management systems only focus on blogging or community building. Our content store is meant to integrate seamlessly with any application you build using AptitudeCMS. To illustrate, let's use the example where someone using AptitudeCMS to build a new store front application needs a form to collect payments electronically. So you layout the form to include standard stuff like the customer's name, address, shipping address, etc. Most forms need to include some sort of introductory text explaining the form, possibly giving tips on how to fill it out. Using nearly all PHP frameworks we are aware of you'd be embedding that text in with your form. Isn't that text just content? Shouldn't you be able to edit that content just as you would a blog entry or news article? Of course you should and AptitudeCMS gives you that power.
Installing AptitudeCMS
Before you can develop applications using AptitudeCMS you'd need become comfortable with a stock installation. See Installing AptitudeCMS? on how to do this.
