debuggable

 
Contact Us
 

Wildflower, a CakePHP CMS

Posted on 22/9/08 by Felix Geisendörfer

This is a guest post by Róbert "klevo" Starší, developer of the open source CakePHP CMS wildflower. I came across the project a few weeks ago and really liked what I saw. So I contacted Róbert to see if he was interested in writing a little post about it. He said yes, and here is what I think will be an excellent read for anybody working on CMS systems in CakePHP.

-- Felix Geisendörfer aka the_undefined

Wildflower, a CakePHP CMS

There are hundreds of PHP Content Management Systems. Why would a decently earning freelancer, hacking Wordpress to fit any clients need decide to write one from scratch? The reason is CakePHP. When I picked up CakePHP it was a little revolution. The quality of my apps got better, I growed a lot as a coder thanks to it and I did stuff faster. But when the time to build a relative simple client site came, I always resorted to Wordpress. You know the classic requirements: content managed pages, some news section. Every client also throws something specific into the mix, like a booking form, availability calendar a page pulling RSS from somewhere... I always had a hard time coming back from happy baking to plugin fixing and hacking together procedural PHP. Don't get me wrong, Wordpress is great and it has and will have it's huge user base. But we Cakers know better, don't we?

So what does a programmer do when he's not comfortable with the tool he uses? He programs a new one. It's slightly more than a year that I started a project called Wildflower. The tag line is A CakePHP CMS.

What's in the box?

The currently released version is 1.2 Beta. It has many similarities to the status of CakePHP 1.2 branch. It's not finished, but I use it in production and with success. Stuff gets fixed along the way, depending on the real world requirements. You get the classic components that you would expect in a CMS:

  • Content managed pages
  • Blog (or posts) with categories and comments
  • Contact form with messages archive
  • File manager
  • User accounts

Under the hood runs CakePHP 1.2 and I permanently update it with the latest revision. A picture is worth a thousand words:

Wildflower page edit

Wildflower posts list

The user interface

I think the user interface is the most important part from your clients perspective. You don't want to explain how to post a page. I actually prefer zero explanation. So it must be very intuitive. When designing it my inspiration was the stuff from Apple and 37signals. So far, I've got very positive reactions. We'll see as the user base grows. As everything, it will constantly get better based on the input.

The developer experience

Since I was building this tool for myself, I wanted it to help me with my work as much as possible. So I baked in a few things to help with some less exciting aspects of developing.

When you move your site from the development machine to a real domain or from a folder to a sub-folder, etc., there's zero work involved. No running trough a SQL dump and replacing localhost with mysite.com. This is also true for the database config. You can define all the configurations for all the machines the app runs on and they are switched automatically based on the current domain name. By uncommenting one line in the root .htaccess file you switch your site to 'offline' mode, so you can safely deploy a new version.

These are details. But together they can save time.

jQuery Light MVC [JLM]

If you check the install-dir/wildflower/jlm directory, you'll notice a familiar directory structure there. Inside is a bunch of JavaScript files to be found. This is my approach to the problem of JavaScript code separation and organization.

JLM is in it's core a standalone jQuery plugin, providing binding of your JS code to Cake actions. It provides a set of helper functions too. Combined with the assets_controller, it allows a very comfortable JavaScript templating, based on the Trimpath library. Browse the install-dir/wildflower/jlm/views to get a picture. JLM is used excusively in the admin interface for all the fancy JavaScript stuff.

Another feature of the assets_controller is the ability to use Cakes internalization function __() in your JavaScript files. Any string you want to be parsed by this function you enclose in a <l18n> tag. This works globaly for all the JLM files.

If this sound a little crazy to you, don't be afraid. You're not locked into this. You can do your JS on your Wildflower powered sites the way you want.

The bad news is there is zero documentatio for this at the moment. With the exception of code documentation, which I try to write as much as possible in the whole project.

Roadmap

The current goal is to polish the 1.2 version and make a great stable release. This includes the move to a CakePHP plugin architecture. Currently I am using the Cake's additional MVC paths feature, defined in bootstrap.php. This approach makes it a little trickier to merge Wildflower with an existing CakePHP application.

Internalization could or could not make it to the final 1.2 release. There is one company working on this with me, but I haven't seen any code from them yet. The documentation also needs to be looked at as soon as possible.

Who's responsible

My name is Róbert "klevo" Starší and I am freelance web developer from a small European country - Slovakia. I do this for a few years and I really enjoy the ride. Along the way I've touched the dark side of ASP.NET, been riding Rails and deployed a million Wordpress sites. Currently I am exploring (thanks to this project) the often forgotten database alternative - PostgreSQL and I am really starting to wonder why we use MySQL all the time.

Get involved

Help is welcome. Critique is welcome too. The easiest way to help this project is to try the CMS for yourself and report any bugs or enhancements you find along the way. You can also join the core team, which currently consist of me. But first make your homework and submit some great patches. Then I'll gladly give you the SVN access. The point is however, to keep the code quality at least at the current level. Another important thing is to follow the projects coding style.

Links

Thanks to Felix for making this guest post happen.

 
&nsbp;

You can skip to the end and add a comment.

Matsimtisu said on Sep 22, 2008:

Thank you for creating this great CMS!
I've used it for a customer and he's really happy about it.

Daniel Watson  said on Sep 22, 2008:

We have been debating between using wildflower on our next site upgrade or integrating Wordpress somehow as a plugin. I'm leaning towards wildflower. Thanks for such a great app.

Khaled  said on Sep 22, 2008:

I'm looking for such a project for a while, sure I'll try it very soon. BTW, Felix is "drake" still alive?

JadB said on Sep 22, 2008:

Nice looking CMS! I quickly hit the download to check how the code is, one thing that directly struck me was your choice of not using the AuthComponent for the authentication/authorization but instead your own simplistic model method. There is nothing wrong with going simple but if you are aiming at having CakePHP devels to be using it with their current apps, don't you think it should embrace the general way of doing things?

Marc Grabanski said on Sep 23, 2008:

It would be great to someday have a stable, elegant CMS system built on CakePHP that competes with Wordpress. Nice work.

paulus  said on Sep 23, 2008:

Great to see wildflower getting some space on debuggable. I have been watching wildflower for a while, as I have too been striving to create a good little cms plugin package in cake. One day i mite actually get to finish it!

Anyway, good job on wildflower, some interesting work!!!

klevo said on Sep 23, 2008:

@JadB: The AuthComponent will be integrated soon. I totally agree with you.

b-rye said on Sep 23, 2008:

Thanks a million, Felix (and Klevo),

I have to say over the last year or so I've really benefited from your work. I definitely can attest that you're succeeding with your motto: We want to help people. We want to make them more productive, knowledgeable and enjoy the work they do a lot more than they do now.

(So if you need a testimonial for a TV commercial I'll be happy to do it for free :) )

Please, please keep up the excellent (and very generous) work!

sams  said on Sep 24, 2008:

Wildfower is filed with benefical features; Its a great use of cake blended together with other wholesome ingredients. Its a nutritious and tasty!

Stoyan Kyosev said on Sep 24, 2008:

I looked at the source code. It appears to be well-arranged and clean. But from the code-design point of view I did't like the fact that there is no clean separation between admin and front. Both share the same controllers and the same view folders. From my personal experience it is very important to separate the backend and the frontend as different modules as the complexity of their logic grows with the growth of the application itself. Also it happens often that one developer works on the backend, another on the front end.

Alan Blount said on Sep 24, 2008:

I love seeing good quality, open source, cakephp applications... very useful for developers to see other developer's work.

srganesan said on Sep 26, 2008:

Great job Felix its very use ful for developers :)

Felix Geisendörfer said on Sep 26, 2008:

srganesan: This is Roberts work, not mine ; )

Steve said on Sep 26, 2008:

This looks awesome. I'll be trying it out tonight.

Linked  said on Sep 29, 2008:

Downloaded and tried this before and I have learned a lot of cake 'best practice' from examining its code. This has been a big help for me for my first major cake project.

Is multi site capability part of the future release? I need a CMS capability for my app and I'm currently integrating my cakeapp to wordpress mu.

By the way, thank Robert for sharing this project, and Felix for supporting it. :)

Heden said on Oct 01, 2008:

big thanks

Dumitru  said on Oct 02, 2008:

Great job, dude! It's the best thing running on CakePHP I ever found! Keep developing it! Maybe someday it will became better then Wordpress and Drupal...

Alit Atmaja  said on Oct 05, 2008:

Hey Robert,

Thanks for the idea and the work.
I haven't try it yet. But This will help a lot (I think so).

Already download the beta version.

WF rocks!!!

Cheers,
ketut

Eye  said on Jan 10, 2009:

Hi !

Thanks for the work.
Could you tell us if a new version will be released ?

Bye !

Jonathan said on Feb 16, 2009:

I'm currently using it right now on my site and personally I love it. Its extremely well written and easy to extend.

Paul McClean said on Feb 19, 2009:

Hey Felix, looks impressive from the screenshots. I like the style of the backend. Keep up the great work.

Paul McClean said on Feb 19, 2009:

Sorry, I meant Robert :)

(Don't worry Felix, you're awesome too)

Gray Loon said on May 04, 2009:

I downloaded Wildflower and installed it, but my install doesn't look anything like the screenshots above. Where did I screw up?

awh  said on Aug 14, 2009:

did u enable mod_rewrite (rewrite module) on ur apache server?

This post is too old. We do not allow comments here anymore in order to fight spam. If you have real feedback or questions for the post, please contact us.