Sunday, August 14, 2011

Improvement in Roller Mobile Design

You may be sometimes wonder why i was silent for couple of weeks without posting.It was some hard brainstorming and sleepless nights that i had to spent to come up with a solution for a blocker i had while implementing.

At the start of this blog we have been discussing and chose the path of theme based rendering.In another words we agreed to have two different themes to for two types we have at the moment (Which are type standard and mobile.)There was some friction as progressed but i was able to tackle all the hurdles up to the  point of implementing "theme customization".We had separate types of templates bunched to different types of Themes.

The actual problem is when someone starts customizing a theme then he creates a wrapper Theme which is attributed as "custom" and it gets all the templates from the them importing.Since we have two types of Shared themes initially, once you start customizing this leads to a major problem.There are 4 possible states such as {Shared.Standard ,} ,{Shared.Mobile ,Custom.standard} ,{Shared.Standard,} and {Custom.standard,} Which complicates the existing architecture of Roller.

Therefore after discussing with Dave i started to redesign and came up with a better solution which has less impact on the roller core as well as elegant to have in the system.This time we decided not to attribute types to Themes or Templates but to maintain WeblogTemplateCode objects which will keep the different types of codes to render when it identifies the correct request.

I have committed the code and implemented the changes, reverted some of the codes from previous design.One of the things i noticed while implementing this new design is the less friction to implement.That is because ,it is more aligned with the existing Roller architecture. Even though i had to spent extra hours on this. I am really happy that i could produce some better code and design than previous so it is an important improvement for the future of Roller Mobile platform as well as coming new types.I really appreciate and thank Dave who is my mentor for offering his helping hand whenever needed.

Await for coming post to experience on how easy to add and customize new templates.

No comments:

Post a Comment