Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My first company's primary product was a CMS-like system that integrated with some archaic backends for inventory management. The CMS was likewise relatively barebones and inflexible. Most of the pages involved placing a selection of widgets that could query backend data in fixed ways into fixed positions on one of a handful of templates.

We got a client whose brand and web presence was relatively more-modern. I soon found out that the sales and design teams landed the client by promising much more than what the CMS could deliver-- responsive, hand-tooled pages with flexible layouts. The timeline was a few weeks.

I took a walk and despaired. The way that CMS pages were implemented meant that even small changes to page layouts required database changes, which themselves required DBA review (which only happened when the DBAs deigned to descend from the mountaintop). There was no way that we could also support arbitrary layouts with the fixed database columns.

An idea finally came to me and I found one of the only backend devs that was willing to play along. We reused one of the existing templates, a simple one with only one large content area. I wrote a frontend that injected itself into that page and rendered a canvas with slots to place arbitrary widgets. The entire configuration was then JSON-encoded and stuffed into the single text database column, and when the page was loaded from the CMS we hijacked the load to decode the config and render our widgets instead of the CMS field.

The company actually won an award for the system and gave out beer steins at the holiday party with the system's branding on it. Over the next few years, they retooled the entire CMS to actually support the concept as a first-class idea instead of my hack, although I moved on fairly shortly after that moment of triumph.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: