A content management system your clients and developers will both be happy with. Open source, built on the Symfony MVC framework. Slides from Symfony Live 2011 in San Francisco
4. On the shoulders of giants...
PHP
Symfony 1.4
Doctrine
MySQL
... and ideas from sfSimpleCMSPlugin
5. Goals of Apostrophe
Easy for clients to update without specialized training
Hard for clients to screw up by accident!
Extensible by any Symfony developer
6. Making it easy
"When you log in, it just gets awesomer"
Do things in context
When you can't do things in context, keep it simple
Don't require a degree in Drupal-ogy!
Check it out: demo.apostrophenow.com
7. ... OK, but how do you extend it?
Relax! It's Still Symfony (RISS)
Apostrophe embraces Symfony idioms
Slot = Doctrine inheritance + Engine = Symfony module +
Edit view component + aRoute & aDoctrineRoute +
Normal view component + Apostrophe page as a "host"
Edit action +
Edit form
9. Feed Slot: edit view component
class BaseaFeedSlotComponents extends aSlotComponents
{
public function executeEditView()
{
$this->setup();
// If this is the first validation pass make the form
if (!isset($this->form))
{
$this->form = new aFeedForm($this->id, $this->slot-
>getArrayValue());
}
}
...
}
10. Feed Slot: normal view component
...
public function executeNormalView()
{
$this->setup();
$this->values = $this->slot->getArrayValue();
if (!empty($this->values['url']))
{
$this->feed = aFeed::fetchCachedFeed(
$this->url, ...);
...
}
}
11. Feed Slot: edit view partial
<?php use_helper('a') ?>
<ul class="a-slot-info a-feed-info">
<li><?php echo a_
('Paste an RSS feed URL, a Twitter @name (with the @),
' .
'or the URL of a page that offers a feed. Most blogs do.'
) ?></li>
</ul>
<?php echo $form ?>
16. Engines: multiple-page experiences
A Symfony module...
"Grafted" into the page tree
Multiple instances allowed
Easy to distinguish with categorized content
Examples: Bob's blog, Jane's blog, public photo gallery
17. Media engine: actions class (simplified)
class BaseaMediaActions extends aEngineActions
{
public function executeIndex(sfWebRequest $request)
{
$this->items = Doctrine::getTable('aMediaItem')-
>findAll();
}
public function executeShow(sfWebRequest $request)
{
$this->item = Doctrine::getTable('aMediaItem')
->findOneBySlug($request->getParameter('slug'));
}
}