Thursday, January 15, 2009

My view on CMS - the backend, part 1

CMS is a complex topic, everybody is talking about this and everybody has a different approach. I don't want to give my own concept here (should I have one ;-) but simply have a practical approach based on a project we have to do for one of our customer (largest casino in the world...). We did the first version of its CMS based on a typical Symfony 1.0/Propel/MySQL5.

We are now in the process to re-write the all application to make it useful for further projects and customers and optimize things based on our small experience. We decided to make the "big sf jump": symfony 1.2/Doctrine! It is not an easy choice since we did not have yet any experience neither with symfony 1.2 nor doctrine but we believed it was worth to make the jump specially due to the new admin generator and the form framework, not mentioning all the goodies from doctrine itself.

When you build a CMS, it is quite common to think first about the backend that will allow your customer to manage its content in an more-or-less easy to use interface. This interface is a key for a CMS success (along with its flexibility and extensibility). On my course to draw the backend interface I've tried to pick the best patterns (at least to me) from SPIP (a french CMS), Joomla and Wordpress. Thanks to Balsamic, I quickly draw what would be our CMS backend, at least for page management (the central part of the cms). See below for mockups.

List of pages

The list of pages should use symfony admin generator to keep its flexibility, therefore there is a lot of work on css and javascript fronts. A few things will become ajax (I will publish later my 2 cents jquery plugin to ajaxified a symfony admin generator list): pagination and the new live search.

For the list of filters, I wanted to make them less obstrusive, with some ideas from Google Docs search options (show and hide them) as well as Apple iTunes smartlist configuration. The latest will be a little bit more tricky to do...probably not for version 1!

For the need of a CMS we add the following elements to the default admin generator:
  • Live search will "ajaxly" filter the list according to a search on title and content of the page.
  • New batch actions such as "copy" and "move" pages.
  • A left sidebar to navigate in a tree way (based on nested set). This navigation will filter the table in the same way as live search (ajax as well).
As we use Doctrine, we will use of lot of out-of-the-box behaviors: Nested set, versioning, i18n and of course Timestampable.

Next step we will look at the page edition view...see you there!

Tuesday, January 13, 2009

Finally, bats can use Firefox ;-)

Mozilla Labs is a team of guys building the future of the web. They are doing a lot of amazing work (most of it only alpha or beta for time being) and open doors for radically new ways for our future interactions with the web. They have been working on Weave, Ubiquity or Prism. I really like those projects and want to use them in the future.

Here is a video to show how to make Firefox accessible for bats.


Ubiquity Tutorial: Turn a page upside-down from Aza Raskin on Vimeo.

Of course, it is useless for humans (except...Batman ;-) but it shows the power of this kind of technology.

Monday, January 12, 2009

New Apple product: I don't want it!

It's really fun and well done. Enjoy!

Tuesday, January 6, 2009

Invoicr (former CS-4U), what's new?

Long time I have not talk about my project that I used to name "CS-4U". As you might know, this web-based billing system for utilities, developed with my favorite PHP5 framework (should I mentioned it..symfony 1.0 at that time), is actually in use for about 3 years already in East-Timor for the electricity company.
I recently went back there to make an upgrade and add a lot of new features, this is what I want to share in this post.
This application was my very first project with symfony and when I dived again in the code for all those new features I realized how much I learned in the past years... There are lot of things that I would do differently today (and I am not even considering here the use of symfony 1.2)!

Here is a quick list of what has been added in version 1.1:
  • PDF support with Zend_Pdf. This allow to generate invoices and reports in PDF (mainly using templates). Zend_Pdf is stable and easy to integrate in symfony, the drawback of these kind of solution is their limitation and the cost of maintenance: you must draw everything per line and position each line on the page. I created some simple methods to right align or draw a simple table over several pages but it is really a pain! It seems some guys are working on improving Zend_Pdf (they actually released an alpha framework RE) to add to it some more advanced functions such as multiline content, table and so on. I hope it can come out soon...
  • A new receipt system. Basically the new receipt system will split a payment into sub-receipts over several invoices if necessary and still keep track of the "physical" payment main receipt. With this we clearly identify where is the money, there are no more "floating" money in the contract balance. All supplementary payments are made against the oldest debt of the contract and the system cannot accept payment over the total balance.
  • Some new modules: Fines & Products module to add one-shot cost in upcoming invoice for a customer. Some admin generated modules to easily modify some of the data (status, districts, categories...)
  • Barcode support. You can now add a barcode in the invoice pdf file to ease payment and avoid human errors. This is not yet use in Timor because they do not have yet barcode reader but they seems very interested by this solution.
  • Javascript switch: from Prototype to jQuery. To ease some development I simply switch to jQuery library instead of Prototype and we use a little bit more ajax call in the app when it make sens. I still want to add more in the future...probably when I start to migrate to sf1.2...not for tomorrow though...
  • New UI design. Not big changes but still an improvement compare to before. It is still very "light web style" since I am not yet convince to go to a more rich UI. I am kind of fan of "Google style".
  • More actions to give more flexibility to users to correct mistakes mainly: change tariffs, modify meter-contract relation information, re-calculate invoice...
  • Bugs, bugs, bugs.
What will come next (no particular order):
Business side:
  • new tariff system to allow more complex tariff calculation.
  • Dashboard. At login, user will see its own dashboard according to its authorization level. It will show some KPI and latest info/actions.
  • Reporting. Change the reporting into a more user-controlled solution where the user can define the report she/he wants and get it in pdf (no idea yet on this ;-) or OpenDocument format.
Technology side:
  • use of admin generator instead of manual dev for most of "master data" modules with a lot of ajax (more on this later as I am working on a new admin generator theme for this).
  • Messaging Service. To ease communication between users or from system to users with memo, task assignment or system message. This is a symfony plugin I want to do for quite sometime already (including an event/calendar system too).
  • Reporting. I want to make the reporting much easier and flexible for user to get the report he wants (not only pre-coded report). I also want to switch from the existing flash graph library to canvas based charts and/or open flash chart.
  • Migrate to sf1.2 and write unit and functional test.