8 Things I Wish I Had Known When I Started Developing Websites

By Marc Plotz

I have been pretty much through all of the rungs of development in the years that I have been developing web applications. However, there are times--and I still get them sometimes--when I slap my palm to my face and shout in disgust: why didn't anyone bother to mention this before? To save you from going through the same anguish, I thought that I would share these eight tips with you. Let's begin.

Learn At Last One Server-Side Scripting Language

There is no real way around this one: in order to be able to pull of wonderful things like Ajax, E-Commerce and more, you will need to know at least one server side scripting language. The obvious option is PHP, which is used by over 200 million websites around the net. Coupled with simple syntax, ease of hosting on shared servers - most shared servers are setup for it by default - and very simple database integration specially with MySQL, PHP is the best and simplest server side scripting language that makes it very easy to get a powerful website running securely. So do yourself a favor and get yourself learning a server side scripting language: figure out the syntax, get the low down on the loops, ifs and DB skills - you'll be building Facebook-like applications in no time.

Learn At Least One JavaScript Framework

No one can deny that frameworks such as jQuery or Prototype make amazing JavaScript effects as simple as taking a lazy Sunday walk. Having that extra interface between you and the Javascript - the one that removes the need to write thousands of lines and lets you focus on the presentation, is amazing. I am not a JavaScript hero. But jQuery makes me look like one because it does all the work for me, all I have to do is remember a few simple syntax rules and I can write JavaScript that is not only functional and powerful, but cool and fun. Find one that works for you, learn how to use it, and get it into everything you do. jQuery is perhaps the most popular, while prototype is increasing in popularity due to its default inclusion in the Ruby On Rails framework. It does not matter what you use, as long as you figure out what you like and make sure you know how it works and how to customize it.

Figure Out How To Use An Image Editing Tool

It doesn't matter what you use, but sooner or later you need to be able to slice up a PSD or PNG or add a gradient to a background. No matter what you decide to use to do this - except Microsoft Paint - you need to get a tool and figure it out. Most of the time you will not have a graphic designer on standby to bail you out, so you will need something good to give you quality images fast. I use either Photoshop or Fireworks, but it doesn't matter what you actually use, just get to know it.

HTML Is More Important Than Anything Else

It amuses me how many developers are not even aware of the most basic rules of HTML, XHTML and HTML5. Let me tell you now: not knowing the latest version of HTML is like a banker who does not know how to count. HTML5 is the latest standard that is taking over the web, and is the most important thing you can know right now. If your code does not validate, you will look like a fool who does not know what he is doing. Also, the chances are that if your code does not validate, your application will also not be cross browser compatible (see the next point).

Validate your HTML, sort out the issues and figure out how to use HTML5 as soon as possible, before you are left out in the cold.

Cross Browser Compatibility is Important

Ok, so your application looks awesome in Google Chrome, but what about the other browsers? Internet Explorer? Yes, you do have to check this, and I will explain why.

I work for a relatively large web development company, and we handle close on 30 to 40 projects per month. What we find is that although yes, more users use IE7 and IE8 than any other browser, at least 40% of all our client's user-base use IE6 because they work for large corporations and are restricted from upgrading their software without permission. So, yes, you can argue that IE6 is 10 years old (almost) and the internet stats say only 3% of internet users ever use it. Yes. But you still need to check that your website is compliant on all browsers and on all operating systems. Did you know that Firefox on a Mac renders differently than Firefox on a PC? Then try checking Firefox on Ubuntu. These things are important, because you want every user who gets to your application to be amazed at how cool it is, not how many bugs they find.

Never Use Tables For Layout - But Use Tables For Tabulation

Ok, we all know that using tables for layout is BAD. It is unprofessional, it is lazy, and it is utterly and completely bad for cross-browser compatibility as well as scalability. However, there is one thing that can be said about tables - they are good for tabulation. Tables were originally designed for very simple tabulation of data. Now we all know that tables eventually were overused as layout weapons by lazy HTML bandits since the birth of HTML until present day. However, that does not mean that you have to do the same. Professional developers use the right tool for the right job. For layout, the right tools are divs, for tabulation the right tools are tables. Don't do things the other way around - I implore you. Remember that you can be a gung-ho developer intent on never using a table, and tabulating data in a myriad of multiple divs instead, with 300 lines of CSS doing what a few simple lines of table layout can do. Used properly, tables work well, just like any other web development tool out there.

CSS Outshines Inline Styles

CSS is there for a reason - to cascade through your entire project. The biggest mistake you can ever make (and believe me, I have done it more than once) is to add inline style into even one file. Think about it. You add a simple font-color inline declaration to an h1 tag, something like <h1 style='color: #cccccc'>heading</h1>, and you eventually do this throughout your project, either due to laziness or inconsistency. At some point or another, you are going to run into a predicament when your client asks you to make the headings throughout the site bright pink! (It happens!) Anyway, what you could have done by editing a single line in a stylesheet now becomes a chore of running through every page in your project to update the color of the headings. Then, your client says: "Oh no, pink doesn't work. Let's try red?"

I can promise you will be very irritable by the end of that day.

Don't Use External Plugins

Yes, I know it is so easy and so simple to just include Yahoo or Google external API's and you have amazing JavaScript capabilities on your site. But have you thought about how long it takes to actually fetch that feed on every pageload? I prefer to quickly copy the contents of those files into one big JavaScript file and then simply include that in my header of my page, which brings me to another point: link to and source as few files as possible. When I started development I thought it was very impressive to have a single CSS file for every little part of my project. I would also like to have 5 or 6 JavaScript files sourced in the header of the HTML files. What I didn't realize at the time was that each of these files in the head tag, CSS and JavaScript, used a large amount of resources to include on every pageload. By keeping all the JavaScript code in one file, it means that you only load one file, instead of 5 or 6, and you speed up pageload by the same amount. The same goes for CSS files. The fewer, the better.

In Conclusion

There are always things that you need to learn by experience, as a developer. What no one ever really teaches you, though, is that the really little things, are the really important things that make a difference. It takes 10 minutes to make your first for-loop work in PHP. It takes an hour to figure out how to connect to a database. It takes a lifetime to learn good habits that make your projects utterly amazing. What I hope is that one thing in this article makes you think about how you do things, and perhaps helps you in the long run.

Make a Comment

Loading Comments...

  • Web Development Newsletter Signup

    Invalid email
    You have successfuly registered to our newsletter.
  •  
  •  
  •  
Thanks for your registration, follow us on our social networks to keep up-to-date