Tshirtcompany.ie Project

2014-02-12 17:39:19 | Post by: Yuri
Blog entry cover image.

Tshirtcompany.ie is an excellent example how a design full of character may go well together with the business idea to form an excellent memorable website. The outstanding design was done by Octopus New Media, one of the leaders of the Irish market in the area of branding and graphic design. It is streamlined, functional, as well as easy to use, it has a definite feel and a coherent style that is not reminiscent of anything else currently existing on the market.

The website itself has been in production for quite some time now, being released in mid 2012 and was built on a known, yet somewhat esotheric combination of Django web framework and a Mezzanine CMS app built on top of it. Python based frameworks like Django are not extremely uncommon today, yet somewhat under-represented on the web development market, which is hugely dominated by PHP and its CMS offshoots.

Majority of the dynamically generated websites on the Internet are based on PHP which is a robust and reliable platform that is comparably easy to learn, yet that might be not flexible enough at times and development in it may be somewhat slower than one would want it to be. That is where Django comes in, which provides a great deal of flexibility and development time decrease, at the cost of a relatively steep learning curve.

The tshirtcompany.ie project had been running in an autopilot mode for almost two years after being developed and, being quite dynamic and rich in content, it started suffering from software obsolence. A number of bugs cropped up over the months, some functionality was missing badly (like custom blog post excerpts) that led the managers of the project to a decision to undertake an urgently needed upgrade.

That is when Disclosure got contacted for an initial assessment of the state of the application. Apparently the bugs were rather deeply rooted in the obsolent code that required an update, along with the new desired features that could not be implemented in the versions of Django and Mezzanine that were used at the time, so the most straight forward decision to be taken was an overall upgrade of the platform.

Unfortunately that turned out to be more complicated. The former developer and hoster of the project did not want to assist us in our work and did not provide us with the root access to the server necessary for administration of a Django installation. All we could do was only to copy the template files from the server where it was hosted through an FTP access and try to rebuild the system from scratch on a brand new server installation.

That turned out to be a lot more complicated than was expected. Without a root access to the old server we had no way to find out the exact versions of the apps the original environment was built on and that largely ruled out automated upgrade of the application. The old code would not run on the most recent installation of Django/Mezzanine so it had to be reviewed and manually updated in order to resolve code and DB descrepancies in it. This was the most difficult part of the project, finding which part of the programming code would conflict with the new environment and fixing it by hand.

After many hours this job was complete and another peculiar detail surfaced: due to a somewhat quirky layout of the page it turned out to be unexpectedly difficult to translate it to an HTML template without some unpleasant work-arounds:

Quirky layout of the base template.

The area in a red rectangle above was the cause of a trouble. Without going into too much detail, attempts of the previous developer to implement it in a way that would be most browser compatible using regular <div> boxes led to a huge size of the background images. First we tried using HTML tables, which provided a lot more compact size of the graphics, but it is not the W3C recommended way to build layouts, plus it gave troubles when displaying in Internet Explorer.

The solution was in using flex displays — a rather new way to position elements on a page, allowing them to arrange automatically in an intuitive way. This way of building HTML template is novel but we expect some great proliferation of usage of this new technique in live web projects soon. Its flexibility and ease of construction will greatly facilitate the task of automated positioning of HTML elements that has been rather daunting so far.

With this final touch we ended up with a website that was not only up to date with the current web frameworks but also stylish, as well as compact in layout and the size of the graphics used. This was a project that showed greatly that with persistence in work and readiness to try and test new technologies we can provide our clients with solutions of any level of complexity.