Input/Output

Search DesignLuv
7 Aug 2010

A style guide for PHP developers

Thumbnail for A style guide for PHP developers

By Jon Bergan (@jonbergan)

Editors note: Just a heads up for anyone reading this! My goal for this article was to produce a style guide for new developers or developers who were keen on refining their style. This is definitely not the only way you can style your code. There are many other fine examples produced by some well recognised groups, however with all style guides, there must be specific guidelines to follow. These are mine. Enjoy!

When it comes to writing PHP code, readability is important. There is a lot of ugly code floating around out there on the web and most of it would give me a migraine that even a solid dose of Panadeine Forte couldn’t fix.

If you’re a new developer and are trying to hone in on your coding style, maybe try giving the following a go. These are simply some conventional formatting methods that are generally appreciated and supported by PHP developers and will improve the overall readability of your code.

73 comments on this post
16 Mar 2010

Beginners guide to a beautiful jQuery Form Pt. 2/2

Thumbnail for Beginners guide to a beautiful jQuery Form Pt. 2/2

By Jon Bergan (@jonbergan)

Welcome back! Did you miss me? Probably not, but that’s still cool. Where were we? Oh yes, in Part 1 of A Beginners Guide to a Beautiful jQuery Form, we stepped through the process of creating a simple web-based form, styling that form with some fairly basic CSS rules and adding some funky jQuery effects to make the form a little fancy.

This post will focus on the other half of the form – data validation and server-side scripting. We need data validation to ensure that the data being submitted by the user is valid and we need server-side scripting to send us an email once the form has been successfully submitted. Yes, yes, I know … it sounds daunting, but trust me – you’ll breeze through this if you got through the last one unscathed!

8 comments on this post
8 Mar 2010

Beginners guide to a beautiful jQuery Form Pt. 1/2

Thumbnail for Beginners guide to a beautiful jQuery Form Pt. 1/2

By Jon Bergan (@jonbergan)

Ahh, the Internet. It’s a massive jungle of web sites that are crammed tight with links, navigation bars, images, tables, animations and forms. In fact, if we have a good think about it, web forms are really one of the most important elements to a web page as they start a conversation between the site visitor and the site owner – which is the goal of most websites. If they’re so damn important, then why don’t we spend more time focusing on them and getting them right?

4 comments on this post