Posts Tagged ‘Web Development’

A new chapter for D4…

Tuesday, February 16th, 2010
http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/digg_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/reddit_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/dzone_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/delicious_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/technorati_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/google_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/myspace_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/facebook_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/twitter_32.png

merger

D4 has joined forces with DKPM, one of Yorkshire’s most respected brand communications agencies, to offer a broader, more comprehensive and reinvigorated service for our clients.

The new venture combines our extensive web development and new media expertise with the vast experience DKPM has in advertising and branding. Having long respected each other’s work we are delighted now to be formally merging our businesses, enabling us to improve and extend our service offering to all our valued clients.

It’s business as usual, but better…

As of Monday 25 January 2010 the whole D4 team has become part of DKPM, which is great news for our clients. Our philosophy and approach to work will remain unchanged, and we will continue to be based here at The Stock Building so you will enjoy complete continuity of service. What will change is the range of services and expertise we can offer; this will expand dramatically.

Our new colleagues are a fantastic and experienced group of people with a huge range of new and fresh ideas to bring to the table. And greater internal resources will bring exciting new possibilities. DKPM’s impressive portfolio of regional, national and multi-national clients includes Sega, BAFTA, Disney Interactive, moneysupermarket.com, Sony Computer Entertainment, Westfield Health and Servisair.

As Head of Digital I am now part of the DKPM senior management team, and I look forward to introducing you to our new colleagues, including our Managing Director Paul Martin. We will be glad to answer any questions you may have about the changes.

Thanks for your continued support, and I look forward to working with you again in the near future.

Yours sincerely

Paul Herron

Video thrilled the SEO tsar

Friday, December 18th, 2009
http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/digg_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/reddit_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/dzone_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/delicious_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/technorati_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/google_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/myspace_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/facebook_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/twitter_32.png

Okay, it’s a cheap pun but sing it - it really works!

When we made a short video recently as part of a website for Sheffield-based solicitors ASD, it proved to be a great SEO tool as well as a fantastic way of engaging their audience.

We wanted to help ASD define themselves as a local, trustworthy legal firm, different from the rest of the large, faceless corporations. So we wasted no time in persuading partner Chris Chapel to star in his very own video message. And, check him out, he did a great job.

We wrote the script, directed and edited the piece, and used motion graphics to reinforce key messages, but it was Chris who was crucial to its success. He’s local and, because he’s the real deal not an actor, he speaks with genuine authority about his subject. Allowing online visitors to ‘meet’ one of the partners means a personal connection is immediately made.

So in the midst of all this technology it’s worth remembering that the persuasive powers of a human face shouldn’t be underestimated. And including even a simple video like this on a web design can have a big impact on conversion rates.

The whole ASD project has been a great success read all about it… http://www.d4online.com/portfolio/asd-solicitors

SHEFFIELD, MADE

Thursday, November 5th, 2009
http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/digg_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/reddit_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/dzone_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/delicious_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/technorati_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/google_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/myspace_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/facebook_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/twitter_32.png

Without attempting to sound like a host from Family Fortunes, “If you were to ask 100 people from South Yorkshire what made them proud of their region?” I’d happily guess that a majority of them would have an answer based around a strong, industrial heritage (either that or The Full Monty!).

Being a Sheffield based company therefore, we at D4 are no different in sharing this viewpoint and consider it a great opportunity to work on a re-branding project with Sheffield Industrial Museums Trust, who specialise in preserving and promoting this traditional culture.

When considering how to move forward with the brand strategy, we wanted the Trust and museum gems to be more accurately presented online and to make the website a more enjoyable experience to help convey the importance of giving museum’s an overhaul. The starting point for this project though was to give the Trust a whole new ‘brand architecture’ that could be rolled out across all future marketing and promotional material. As the Trust currently manages three industrial museums (Abbeydale Industrial Hamlet; Shepherd Wheel Workshop; Kelham Island Museum), it was important to have a design that was recognisable not only across each sub-sector, but also represented the group as a whole.

With the brand imagery decided upon, the next step was to update and modernise the Trusts website. The main principle of the new website would be to act as a more effective marketing tool attracting new visitors to the museums which we did through colourful image led graphics all powered by impressive backend functionality of a database driven website. Allowing the site to be database driven means the sites content can be managed in-house, allowing for any instant updates on events and collections as and when they happen. With the foundations of the website in place, we also brought it bang up-to-date with social media feeds, a blog and a newsletter link, all great ways to keep young viewers updated.

We didn’t just stop with logo designs and a new web design, we also helped roll out the new brand across a range of promotional literature for various events and an educational campaign to schools in the region.

Sheffield Industrial Museums Trust are very good at modernising history without removing the sense of education and traditional values attached to it….. now they have a website and brand to match…

WEBSITE BEFORE:

simt_before_1

WEBSITE AFTER:

simt-web_11

simt-web_21

BRANDING:

SIMT Logos

EDUCATION LITERATURE:

simt_ed1

simt_ed2

simt_ed3

Branding & Design Project: Überfly Invites

Monday, November 2nd, 2009
http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/digg_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/reddit_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/dzone_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/delicious_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/technorati_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/google_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/myspace_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/facebook_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/twitter_32.png

We’ve been enjoying ourselves with one project inparticular recently after we were handed the challenge of designing a new brand strategy for online social invitations company, Überfly. We were also let loose on designing 10 invites that would be sold on their soon to be launched web-to-print website.

Our first step was to analyse Überfly’s offering, its rivals and discuss how we could make Überfly’s invitations more imaginative and individual. We soon realised that most of their competitors websites were quite dated and as a result, sometimes cheap and tacky looking. We wanted to design a brand, associated images and a website that would establish Überfly as a well priced company with exceptional, contemporary design at its heart.

Having created a series of images that would cover all genres of invitations, ranging from children’s parties through to corporate events, the team decided to get particularly creative on the brands logo. Fonts were tweaked, pictures were stretched and pulled, and plenty of coffee was drunk to ensure the final designs were of the highest standard. Creative thinking produced a logo that resembled the the back of an ‘open’ envelope, and the eagle-eyed amongst you may also notice that the typography in the logo has also been adjusted to match the same two types of curved contours at the top and bottom of the envelope shape. It’s what we pride ourselves on - attention to detail and it is how we believe graphic design should be. We could have just plonked a sans serif font in there and saved a bit of time, but we believe these small tweaks make a big difference. Our client also appreciated the effort we put in and feel ‘chuffed’ that they have a unique brand and their very own font.

logo

logo

While we’re at it, here’s a sneak preview of the website and some of the invites we designed. As I’m sure you’ll agree from the graphics below the designs of the invites look………..Über!!

uber-web

The graphic below will be sold under the ‘Party’ category. Our brief from the client was simply ‘Glamour!’ - now that’s what we call an open brief. So we did some thinking, stared out of the window and then used Angela (graphic design student & D4 tea lady for a fortnight) as our muse. We took a few shots of Angela in the studio and then produced this lovely vector illustration. Client was happy and so were we.

glamorous-party3

Here’s a few more invites for your viewing pleasure…

uberfly_nye

uberfly_heart

uberfly_love

WANTED: Junior PHP Developer

Friday, October 23rd, 2009
http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/digg_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/reddit_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/dzone_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/delicious_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/technorati_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/google_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/myspace_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/facebook_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/twitter_32.png

Greetings, aspiring PHP developers!

It looks as though the credit crunch is finally starting to fade away (at least in our industry anyway), as evidenced by the surge of work that D4 has been getting in these last few weeks. As such, I’ve been tasked with finding a talented Junior PHP Developer to join our web development team. Paul says that ideally the new developer should be a “Mini-Me” (of me, not Paul), so I guess that means you need to be American, addicted to caffeine & nicotine and moan a lot about the weather being too cold (even in the summer).

If you don’t have any of those characteristics, then I suppose your technical skills will have to suffice - so here’s what we’re looking for:

ESSENTIALS

  • PHP 5 / MySQL5 - Knowledge of the differences between PHP4 and PHP5 will get you bonus points, but we’re much more concerned about the magic number 5.
  • OOP / Zend Framework / MVC - You need to have developed an application using Zend Framework - we’re not bothered whether that project was a personal or professional one, as long as it was a Zend Frameowrk (MVC) application
  • IIS6 / Apache 2 - Our development environment is running Apache, but our production environment is running IIS6, so a solid understanding and knowledge of the differences between the two are essential.
  • Windows Server 2003 / Linux (see above)
  • XHTML / CSS2 - The position says “PHP”, but you’ll be getting your hands dirty with the these two guys as well.
  • W3C Standards - All of our code must be W3C-compliant, without exception.
  • JavaScript / jQuery - We’ve ditched YUI and standardised on jQuery as our JavaScript framework of choice, so your jQueryness should be pretty good. It doesn’t have to be exceptional, but you *will* be getting your hands dirty with it, so previous experience with it is crucial.
  • Subversion - You should at least be comfortable with checking stuff out of and committing stuff back to the repository - everything else is bonus points.
  • TRAC - This is our ticketing system of choice, so previous experience is essential. Experience with installing and configuring TRAC would be fantastic.
  • Willingness to learn and contribute - sharing knowledge is a 2-way street after all.
  • Ability to work in a team and independently - You’ll most likely be left to work on your own after the morning meeting, but you’ll also be involved in a bit of pair-programming from time to time.
  • Passion for what you do
  • Hard-working and efficient
  • Willingness to overcome obstacles / problems - Nothing’s worse than someone who’s constantly complaining that Microsoft is rubbish and refuses to resolve a Microsoft-related issue simply because it’s Microsoft. If that sounds like you, this probably isn’t the agency for you. We’re all about providing solutions to problems, not moaning about them.
  • Attention to detail - The development team at D4 strives to produce code that’s of the same high-quality that our creative team puts into their designs, and if you’re familiar with our clients and our work, you’ll know that’s not an easy task - but still, it’s imperative that D4 strives for perfection, and that includes perfect code.
  • Ability to adhere to strict coding standards - This is uber-imperative. We have very strict coding standards here at D4, which you will be expected to adhere to. They’re based on Zend Framework’s coding standards with some slight variations, so if you’re comfortable with ZF’s standards, you should have no problem with ours.

DESIRABLES

  • 2+ years plus of commercial PHP experience - The more the better!!!
  • SEO - We apply best-practice SEO techniques to all of our websites as standard, so a solid understanding of basic SEO would be great.
  • Creative thinker - We’re a design agency after all.
  • Understanding and appreciation of good design
  • ISAPI rewrite / Mod-rewrite - Regular expressions often need a second pair of eyes, so it would be great if we could use yours from time to time.
  • XSLT/XML - We don’t get much exposure to these technologies, but knowledge of one or both would great.
  • AJAX
  • Agile/SCRUM methodologies - We’ve been practising SCRUM for over a year now (without even realizing it was SCRUM until a few weeks ago!), but we’re looking to formalise it in the near future, so anything you can bring to the table in this area will be greatly appreciated.
  • Test driven development - We’re not actually doing this at the moment, but it’s something we’d like to get into.
  • Mac OSX - As developers, we’re either on Linux or Windows (whichever you prefer), but our design team are all on Mac’s, so it would be nice to have another knowledgable Mac person on the team.

MAIN DUTIES & RESPONSIBILITIES

  • You will be developing and maintaining client websites and web applications, using mostly PHP/MySQL, whilst adhering to strict coding standards.
  • You will be assisting the Senior Web Developer (me!) with almost the entire project lifecycle (Analysis, Specification Building, Development, Documentation, Coding, Testing, Maintenance and Updating)

In exchange for everything you bring to the D4 table, here’s what D4 will do for you:

  • Increase your understanding of enterprise-level coding practices
  • Provide you with hands-on experience with a wide variety of the latest web technologies
  • Provide you with hands-on experience with working for a full-service web design agency (design, development, web hosting, email hosting, marketing, PR, etc)
  • Improve your programming skills and give you insight into the creative industry
  • Allow you to work closely with a senior web developer
  • Allow you to work closely with a team of creatives
  • Increase your understanding of the following technologies: PHP 5, MySQL 5, IIS6, Apache 2, HTML, XHTML, CSS, JavaScript, XML, Object-orientated programming (OOP), Windows Server 2003, jQuery, Zend Framework, Mod-rewrite/ISAPI rewrite, SVN, SEO, and just about every other acronym you can imagine!

So… If that sounds appealing, drop us an email with your salary expectations and your CV.

Oh, and you must be able to get yourself to Sheffield for an interview and have the right to work in the UK.

Driving Philford Forward

Thursday, September 10th, 2009
http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/digg_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/reddit_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/dzone_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/delicious_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/technorati_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/google_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/myspace_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/facebook_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/twitter_32.png

philford_web_development

It seems rare these days to find a good, old fashioned, British engineering firm that delivers on the talent and craftsmanship that originally made South Yorkshire the engineering hub of the UK. It’s with great privilege therefore, that D4 have been able to link up again with a true, great British engineering firm in the stature of Philford Design.

Prior to us starting work with them two years ago, Philford’s had no marketing literature for their previous 29 years of existence! They were certainly doing something right though, as they had built up, and still maintain an envious reputation within the mining industry. Commissioned to look at their brand communications, D4 helped roll out their new style of corporate literature, website and promotional materials, to help aide introduction into a wider market.

Having established their brand and reputation within the UK engineering market, and winning new business as a result of the brand strategy we delivered. Philford’s approached us once again to ask if we could help them take the next step into embracing the overseas markets. Happy to help, the first step we looked at for integration into a foreign market was to update and upgrade the existing Philford’s website to be more internationally friendly. This was done by making it database driven (Baffled!? see the following link and all will be explained…….). Updating their website to a database allows Philford’s to content manage all areas of the business with greater ease, as well as enabling language capabilities to help conquer a wide range of international markets such as the Czech Republic and Poland.

With minor copy and translations to finish we expect the ‘new and improved’ website to be up live in the next few weeks!

Database Driven Website Delights

Thursday, September 10th, 2009
http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/digg_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/reddit_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/dzone_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/delicious_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/technorati_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/google_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/myspace_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/facebook_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/twitter_32.png

CMS Websites (i.e. content managed websites) are certainly a hot topic at the moment and something I get asked about a lot. I am, it has to be said often guilty of going into ‘techie talk’, spouting such phrases as ‘you need to upgrade your existing site to become database driven, what you need is a better web design and online strategy’ - (you have to understand techie talk often has no direct translation into English Language). While I am proud of my new found knowledge, I won’t bore you with the technical detail but thought I would take the time to introduce you to the wonderful world of database driven websites, and more importantly the benefits they bring.

When browsing the internet, it is very rare (unless you are a techie that is) that anybody gives a second thought as to where the website they are looking at originated from and ultimately how that website is maintained over time. So I’ll take a moment, put my knowledge hat on and explain a few things about the wonderful world-wide web and how D4 can utilize its potential.

Originally, and still in abundance now, millions of websites have been built using static material. Although quick, cheap and easy to host initially, these websites more often than not become stagnant to the viewer as the information contained on them rarely changes due to the expertise required to aid web development. These static pages also restrict the user’s interaction with the content, often meaning they look elsewhere for more up-to-date, modern material.

What’s that I hear you ask, “Are there any better options apart from these static websites?” Well…… thankfully there is and this comes in the form of dynamic, database driven websites. Clued up and ready to spring into action, the design team here at D4 are able to upgrade existing static websites or build from scratch to become fully database driven, utilising the numerous benefits available from doing so.

When a website has been constructed using dynamic content, it is supported by a database that automatically changes and customises the content contained on the pages every time the page is requested. The main advantages are four fold:

“Scaleability” which allows for expansion and development of the website in the future, which long term will save costs and time for any amends or updates. Using a database ensures that data is never lost as the site grows and changes over time, so should you decide in 5 years that a new site is required, we store all the previous information, meaning any renovation is accessible and easier than a complete overhaul.

“Fresh Content” - Dynamic sites allow us to integrate a content management system (CMS) = a marketing managers dream! This means that all copy, images and links can be all managed and kept fresh in-house. The results of which will mean delighted clients about having access to relevant, up-to-date content, and you don’t have to fork out unnecessary costs for us to make changes to your website.

“Multiple Languages” - Another key reason our clients are biting our hands off for a website upgrade is this allows the site to house translations and display multiple language options. Not only that but translated copy can be entered directly onto the site through the content management system - this opens up sites to international market opportunities, which as we know for many of our clients is a potentially huge growth area at the moment with the pound being so weak.

“SEO” - Lastly, a big advantage and a very important part of business development that can arise from upgrading to a data driven site is better search engine performance (this helps with SEO). As the information contained within the database utilises the very latest programming techniques allowing clients to add in key words, meta descriptions, meta tags with ease, this combined with fresh content can really maximise and improve search engine ranking.

So there you have it, just some of the benefits available to you via an upgrade from static content to a fully database driven website. Like the sound of it? Why not indulge in the database driven delights and contact me (Marianne) to see if we can help.

Captain’s Log(2)

Friday, September 4th, 2009
http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/digg_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/reddit_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/dzone_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/delicious_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/technorati_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/google_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/myspace_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/facebook_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/twitter_32.png

Welcome to the 2nd installment of Captain’s Log()!

Today I’d like to talk about refactoring. Wikipedia defines refactoring as “the process of changing a computer program’s internal structure without modifying its external functional behavior or existing functionality, in order to improve internal quality attributes of the software, for example to improve code readability, to simplify code structure, to change code to adhere to a given programming paradigm, to improve maintainability, to improve performance, or to improve extensibility.”

As web developers, we’re forced to keep up with the latest technologies and best practices, which can extremely difficult because the rate at which these things change is incredibly fast. It changes so fast that as soon as we finish developing a website, a lot of the techniques and best practices that we used have become outdated. In order to keep up with the latest trends, we simply apply the new techniques and best practices to the next project, which seems to work well most of the time.

But what happens when you need to update an old website with the latest technologies and best practices? If the website is only a few weeks old, it’s usually just a case of refactoring a few classes, or modifying the way the application is bootstrapped. However, if the website is months - or god forbid, years - old, then it becomes an insanely difficult task.

Recently, I’ve been tasked with updating an old website to use the latest technologies and best practices. And by “old”, I mean 4 years old. That’s right, 4 years. As you can imagine, that’s a lot of refactoring to do! Luckily, I’m not the only one who works on this website, so I wrote an email to my friend and asked him to help me with the refactoring process.

Here’s the email in its entirety:

Ok, this email is quite lengthy, and it might look overwhelmingly complicated, but trust me, it’s not. Just read this entire email from start to finish before you start doing anything, and you’ll see that it’s not complicated (just time-consuming).

INTRODUCTION

In 2.0, instead of executing raw SQL statements, we’re using an ORM framework to handle the query execution. There are several benefits to this approach which I won’t go over here, but let’s just say that the benefits are significant enough that they warrant a total re-write of the way we’re executing our queries.

The ORM framework we’ve chosen for 2.0 is called Doctrine (http://www.doctrine-project.org/). This is the thing I was telling you about that generated all of our database models for us based on the new 2.0 database that you created, which is one of the main reasons we chose it over other ORM frameworks. The other reason is that it integrates seamlessly into Zend Framework, which is the PHP framework that 2.0 will be built on top of. There are bits of Zend Framework sprinkled over the current version of the game, but this time around we’re going all in so that we can harness all of the power that Zend Framework has to offer.

But more about that later.

CONVERSION PLAN FOR 2.0

The key to our success lies in the order in which we convert the various sections of the game. Here’s a brief outline of that order:

  1. Convert SQL queries
  2. Football Server
  3. Registration/Login
  4. Join/Create League
  5. Auction
  6. League Screens
  7. Everything else

The first thing we need to do is convert the queries, so for this assignment, you don’t have to think about anything other than converting queries. Don’t think about game logic or how we can improve the game while we’re converting the queries. Just think about converting the queries. Treat them as isolated entities. You’ll see what I mean in a minute.

The attached ZIP file contains all the files you’ll need for this assignment. If you haven’t already, go ahead and unzip the file and familiarize yourself with the files.

The “private” folder contains all of the files that you should be familiar with from the current game - with the only notable exception being that the Football Server class has been renamed and extracted to the root.

The “doctrine-models” folder contains all of the new models that we’ll be using in 2.0. Inside this folder is another folder called “generated” which contains all of the models that Doctrine created for us using the 2.0 database. You don’t actually have to worry about the “generated” folder - I just included it so you could have a look - in fact, you should probably delete it before you start the assignment.

THE ASSIGNMENT

There are 4 different types of queries: SELECT, INSERT, UPDATE, and DELETE. I’ve already converted most of the UPDATE queries. Your assignment is to convert the INSERT and DELETE queries. (After I’ve converted the last of the UDPATE queries, I’ll start converting the SELECT queries, and hopefully I’ll have them finished around the same time as you finish the INSERT and DELETE queries.)

DELETE QUERIES

You should start with the DELETE queries because they’re the easiest to convert, and they’ll help you get familiar with DQL (Doctrine Query Language), which is what we’ll be using to create the new queries.

I’ve already converted a couple DELETE queries so you can use them as an example:

Open up “FootballServer.php” and scoll all the way down to the bottom of the class and you’ll see one of the DELETE queries I converted. The old query has been commented out (when you’re converting the queries, you should delete the old query. I just commented this one out so you could see what’s been replaced with what.)

Immediately below the old query is a call to a static function, which contains the new query. Open up “doctrine-models/

TblAuctiontemp.php” so you can see the new query.

First of all, the new query is located in a static function within the model of the database table it’s referencing. In this case, since we’re deleting from “tbl_auctiontemp”, the static function is placed inside “TblAuctiontemp.php”. If we were deleting from “tbl_leagues”, then we would’ve created a static function inside “TblLeagues.php”. (Try to name the static functions according to what the individual query is actually doing. And be as verbose as you need to be - we can always re-factor the names later on.)

If you look inside the deleteLeagueAuctionTempValues() function, you’ll see the new query, and as you can see, the new query looks pretty straight-forward. Yeah, the syntax is new, but if you look at it, you can see what it’s doing:

//Setup query.
$objQuery = Doctrine_Query::create();

This creates an instance of the Doctrine query object. (All of your DELETE queries should start like this.)

$objQuery->delete(’Auctiontemp’);

Here, we’re telling Doctrine which table to delete from. Notice that we’re not passing it the exact name of the table. The table name we’re deleting from is “tbl_auctiontemp”, but Doctrine doesn’t use the table names directly. We pass it “Auctiontemp” instead because that’s the name of the “component” that Doctrine has mapped to the table. Don’t worry too much about that - just remember to remove the “tbl_” bit from the table name and capitalize the first letter (and only the first letter) of the component.

$objQuery->where(’intLeagueId = ?’, $intLeagueId);

We use the where() method to tell Doctrine which records to delete. Notice the question mark. Instead of using fnAddSlashes(), we use the question mark, and then Doctrine replaces the question mark with the value of $intLeagueId.

$objQuery->limit(1);

We can also use the limit() method to tell Doctrine to stop executing the query after it’s deleted the record. Be careful when you’re doing your queries… if the old query doesn’t have a LIMIT clause, then make sure you don’t use the limit() method in the new query. And vice versa… if the old query does have a LIMIT clause, then don’t forget to use the limit() method.

//Execute query.
$objQuery->execute();

And finally, we tell Doctrine to execute the query we’ve just built.

So that’s what the new query looks like. Now if you go back to “FootballServer.php”, you can see what we’ve done. Basically, we moved the old query into a static function, and now instead of executing that query in FootballServer.php, we’re just calling the static function, making sure to pass in any variables that the new query might need (in this case, $intLeagueId). Be careful when passing parameters… sometimes it’s a regular variable like $intLeagueId, and other times it’s a member variable, like $this->intLeagueId. Other times, you might want to pass an array to the function instead of multiple paramters. I’ll show you an example of this approach in the INSERT QUERIES section.

I’ve done another example to illustrate how you add multiple where() methods. Open up “private\views\viewPlayPercentages.php” and scroll down to line 766. You should see the old query which has been commented out. Notice that it contains references to two variables. Now look right below the old query and see how we’re passing two variables to the static function.

Now if you open “doctrine-models\TblDefensiveplaypercentages.php”, you can see what we’ve done here. Firstly, we’re passing it two variables instead of one, and then we’re also using two where() methods in the new query. Notice the second where() method. It’s actually called “andWhere()”.

(There’s also another method called “orWhere()” which should be pretty self-explanatory when it’s used.)

If you encounter a query which references a “dynamic” table (you can see an example of a dynamic table in “private\views\viewFormationPercentages.php” around line 866. Notice how the table name is actually a variable? Well, don’t worry about converting those unless you think you can maintain all the logic involved. If you’re unsure, just leave it and I’ll convert it later.

Also, here’s a link to the reference manual for DELETE queries:

http://www.doctrine-project.org/documentation/manual/1_1/en/dql-doctrine-query-language#delete-queries

INSERT QUERIES

INSERT queries are a bit different. Instead of building a “query”, you’re creating an object/record and then “saving” it to the database. I’ve also done an INSERT example to show you how it’s done:

First, open up “FootballServer.php” and scroll down to line 4483 to see the old query. Immediately below the old query is the familiar call to the static function. But notice how we’re passing an array to this one instead multiple variables? You’ll see why we do it that way in a minute.

Now open up “doctrine-models\TblLeaguefixtures.php” and take a look at the first static function. It only takes one array as a parameter to avoid having a shit-load of parameters. Then, inside the static function we use the values of the array to create the query/object/record thingy:

//Setup query.
$objQuery = new TblLeaguefixtures();

Create a new instance of “tbl_leaguefixtures”. Notice how we’re using the full camel-cased name of the Doctrine component.

$objQuery['intLeagueId'] = $arrData['intLeagueId'];
$objQuery['intSeason'] = $arrData['intSeason'];
$objQuery['intWeek'] = $arrData['intWeek'];
$objQuery['intHomeUserId'] = $arrData['intHomeUserId'];
$objQuery['intAwayUserId'] = $arrData['intAwayUserId'];
$objQuery['datSimulationDate'] = $arrData['datSimulationDate'];
$objQuery['booSimulated'] = $arrData['booSimulated'];
$objQuery['booRegularSeason'] = $arrData['booRegularSeason'];

Use the values of the array to tell Doctrine what values to insert into each column.

//Execute query.
$objQuery->save();

And finally, we execute the query (a little differently than how we executed the INSERT query, but more or less the same sort of syntax.)

If you come across any INSERT queries that look too complicated, again, don’t worry about them. I’ll sort those out later. If you want to give the harder ones a go though, feel free - I’ll be quickly skimming over everything you’ve done to make sure everything’s alright, so don’t worry about messing anything up.

To help you with the INSERT queries, take a look at the following link for reference:

http://www.doctrine-project.org/documentation/manual/1_1/en/working-with-models#dealing-with-relations

CONCLUSION

So that’s your assignment. I hope it makes sense. I know it’s quite different to the way you’re used to seeing the queries, but hopefully the examples I’ve shown you and the links to the reference manual will get you on the right track.

The best thing to do is create a project in Komodo (or whatever IDE you’re using) and do a global search for “DELETE FROM” for the DELETE queries and a global search for “INSERT I” for the INSERT queries. Then go through each of them one-by-one.

If you have any questions about anything, just drop me an email or find me online.

I’ll have the rest of the UPDATE queries done this weekend, and hopefully a good chunk of the SELECT queries as well. Once all the queries have been converted, it’ll be so easy to get the server up and running so we can start generating leagues and simulating games. And that’s a HUGE step forward to launching 2.0 - everything after this is cake. :)

Thanks man - and good luck!!!

Jeremy

Boo to templates

Tuesday, June 30th, 2009
http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/digg_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/reddit_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/dzone_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/delicious_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/technorati_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/google_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/myspace_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/facebook_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/twitter_32.png

layout_pad

When it comes to websites one size does NOT fit all!

Sorry about that. It’s just that we’re a bit fed-up with seeing bland, uninspiring sites made on the cheap using a standard template. You know the kind we mean – the ones you land on and think, ‘hmmm this is dull.’

Anyway, at D4 we’re big believers in creating bespoke websites with real visual impact, websites that communicate a whole range of information about an organisation even before you’ve started reading the content.

This sketch (above) is typical of the kind of planning we go through as part of the creative process when we’re designing a site for our clients. Yes, it looks a bit scatty, but it’s organised chaos.

And the end results will say more about the company it represents in one glance than spending all day on one of those off-the-peg monstrosities!


The Crisp and The Keyboard

Wednesday, May 27th, 2009
http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/digg_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/reddit_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/dzone_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/delicious_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/technorati_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/google_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/myspace_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/facebook_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/yahoobuzz_32.png http://www.d4online.com/blog/wp-content/plugins/sociofluid/images/twitter_32.png

Mr Crisp is an unusual addition to our team and we would like to give him a very warm welcome to the team. Frighteningly clever with web based technical stuff, we have brought him in due to the large amount of web work we are currently doing. That’s not the unusual part though. His obvious talents with the online languages were actually his hobby, his other forte lies in classical music and composition!

In fact he has a blog called ‘musicalmidget’ which gives a  little insight into his world. We are particularly interested in his keyboard as he uses it to alleviate computer related stress in ten minute breaks from his coding adventures. I think we’d all quite like being serenaded a couple of times a day, helping to provide tranquility and clear our heads.

Alan is also a grade 6 on the tenor saxophone which has sparked the idea that maybe we should run our own Britain’s Got Talent in-house. I myself am very handy with a kazoo and a couple of people have got some fierce dance moves. Any other agencies out there up for the challenge?