Old Skool Rulez

Filed under: life,opinion,web development — jaydublu @ 4:36 pm

As posted earlier, I’m going back to my roots after 6 years in the relatively comfortable life of an employee of a large agency, and specifically as someone who has had a sabbatical from mainstream development whilst managing a team of developers.

Now I’m back on my own again I’m reviewing my skills and experience, the current state of the industry and best practice, and sorting my tools and techniques out ready to get busy (hopefully).

It’s amazing how much has changed in the intervening years and yet how much is the same. Packing up my desk and hunting down the books I took to Soup, many are well thumbed from regular use despite their age they are still relevant. I’ve also been compiling a wishlist on Amazon of titles bought for the company library that I will want to get copies of, but to be honest there aren’t many essentials – good references for PHP, MySQL, CSS, Apache, JavaScript etc. But even then can be found online – it’s much easier to type http://uk.php.net/explode to remember what order to pass parameters to explode() for instance than to find the book – but I digress.

I’ve been rebuilding a few sites I first built oh-so-many-years-ago – one was even still using Dreamweaver Templates <hangs head in shame> – but they are still doing the business for the owners and all they want is a quick design refresh and a bit of new content. “Oh, and while you’re at it could you just add a news section we can update ourselves?” So the quandary begins – how much do you reuse and how much do you rebuild, and what technologies do you use?

Perhaps unlike many working by themselves on ‘smaller’ sites, my recent background has exposed me to all shapes and sites of web content delivery technologies, from full on Enterprise level Content Management Systems such as Vignette and Stellent, other commercial ones like RedDot, or open source ones like Drupal or Joomla! or in between like Expression Engine, and then of course there’s all the custom applications that get written for specific applications, or reusable frameworks and libraries that can give advantages in rapid deployment / development.

And then there’s the platform to build on – once is was a choice of flat html (with some help from Dreamweaver perhaps) or Perl (or the new kid PHP) or ASP. Now there’s all the Java based technologies, Python based (I still reckon Zope should have become more mainstream) ASP.NET, Ruby on Rails, and of course my old favourite PHP is going from strength to strength. And it doesn’t stop server-side, with the advent of AJAX and frameworks such as jQuery, so much more can be done on the browser.

I understand and buy into Standards Compliance, Accessibility, Search Engine Optimisation, Usability and all the other buzzwords. I’m able to gather requirements, write specifications, manage projects and carry out quality reviews. I’ve been involved in projects that have been great successes, and others that have spectacularly failed, enough to know how to avoid the pitfalls.

But does all that knowledge and experience help in my current situation and perhaps give me an advantage over someone only just starting in the industry? It’s a mixed blessing because although I rarely have to say “I have no idea how to do that or what’s involved”, the opposite is also a problem because I know of perhaps too many possibilities and alternatives, and how things could be done ‘properly’.

As a little aside, I’ve often observed that any sort of development or design or construction or problem solving that is done in a constrained environment is likely to have a much more creative and pleasing outcome than if done with the luxury of infinite possibilities – it makes you focus and think and consider relative merits of alternatives with a clearer vision of the ultimate goal rather than being dazzled or distracted by niceties.

So how have I tackled these rebuilds? Well the Dreamweaver Templates site is hopefully a textbook example of how to use PHP to make a relatively simple brochureware site more maintainable. The templating features of Dreamweaver (ah yes, I remember them well!) have been replaced with PHP includes – so common elements like html <head>, top level page layout, navigation etc. are all shared. A ‘page’ is represented by a PHP file which sets variables such as page title, navigation state, calls the relevant includes for the top of the page, have the body content hard coded, then calls the footer includes. The one dynamic page is the news section which calls content from a MySQL database, with a little utility script allowing the client to manage news stories.

Why didn’t I use my first project as a freelancer again to flex my muscles and show off all my skills? Because the requirements didn’t need it. This application is beautifully simple, very easy to host and maintain, blisteringly fast, and hopefully will go another five or six years before its next rebuild. Any half competent developer could look at the source and figure out how to make any changes within minutes of getting access to the source. And it only took a couple of days to complete – including me trying to come up with some sort of new visual design and I’m no designer!

This approach has been used by me and my team for many years with great success, from small 6 page site to large corporate sites for FTSE100 companies. If it meets all key requirements what’s the advantage of making life more complicated? Admittedly the finer details of how to implement it have changed – using css for layout rather than tables for instance, good clean semantic markup, secure against XSS and SQL Injection (hopefully) and obscuring email addresses from spambots, with a sitemap.xml and Google Analytics tagging, and it’s all under version control …

I’m starting planning a much bigger site that needs more content management, and have reviewed several frameworks and applications to make life easier, but have still settled on the approach above with one small change – using Smarty to separate logic from presentation, and moving more of the content into the database. But it’s still clean, simple, fast and reliable.

KISS – if it’s getting too complex it’s probably wrong.

iPod Touch

Filed under: mobile,review — jaydublu @ 6:31 pm

I finally got my hands on the iPod Touch I got the team for R&D – cheaper than an iPhone – and have spent a bit of time with it myself.

First thing I should say is that dissapointingly I find I really, really like it – it’s a stunning device that’s hard to fault; at least inital impressions are that way.

It’s a perfect size and weight, screen is clear and bright, and as for the ‘touch’ user interface – well what can I say other than ‘wow!‘?

I’ve played a bit with the music and video playing capabilities, and they’re just stunning, but most of my attention has been, unsurprising, on the browser.

Despite my initial shock that the thing won’t accept xhtml-mp markup, so although it is a mobile device you can’t treat it as such (at least not the way I’d like to with a custome xhtml-mp view of a site) I can see a way past that as it makes a pretty fair stab at rendering the full site. With the zooming feature – the double tapping is just genius – and wifi connectivity meaning the bandwidth isn’t much of an issue, it really is feasible to browse most sites in the full fat version without needing a slimmed down markup.

But, if the site hasn’t been sympathetically designed – and the one big irritant is lines of text that are too long to be able to read in one screenfull so you have to keep scrolling backwards and forwards – it’s easy to get less than satisfied. And if you’re on an iPhone with limited (and expensive) bandwidth optimised graphics etc. wuold be a big bonus. And having seen sites specifically designed for the iPhone e.g. iphone.facebook.com – they’re just so much nicer to use than the full one.

I’m working on a concept proving site at the moment from first principles, using tera-wurfl for device detection, and Smarty templates to deliver different styling of the same content to different devices. I’ve not yet settled on my preferred approach but when I do I’ll publish it somewhere.

One thing is for certain – I’m now more comfortable with the idea that you don’t treat iPhone (or iPod Touch) the same as a ‘normal’ phone, but don’t think you should ignore it either and feed it a site designed for big screens.