Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

stevearm

macrumors 6502a
Original poster
Nov 15, 2007
992
91
Hi all,

I first learned HTML years and years ago, but since then I've sort of got to the point where I'm happy using dreamweaver and HTML tables to design websites...

I'd like to learn more about proper development and coding standards. Where's the best place to start?

I already have a CSS book so I intend to learn that in full. What would be useful to know next?

Javascript? PHP? AJAX?

Many thanks for any suggestions
 
Learning CSS and extensible HTML/XHTML is vital with the way things are now, so you're off to a good start. At the very least, you'll need to be familiar with some Javascript... fortunately once you get a handle on Javascript PHP will come easy (they share many similarities, at least in basic use). If you want to use AJAX - which isn't necessary despite what AJAX-Eggheads tell you - learn your way around MooTools and save yourself the headache of doing it on your own.

To get a good grasp on how they go together and some theory behind why you use them this way, read Zeldman's book. Also, read ALA. The book presents some solid arguments for web standards and accessibility. You'll never look at Flash the same way again..
 
As an Amazon Associate, MacRumors earns a commission from qualifying purchases made through links in this post.
Learning CSS and extensible HTML/XHTML is vital with the way things are now, so you're off to a good start. At the very least, you'll need to be familiar with some Javascript... fortunately once you get a handle on Javascript PHP will come easy (they share many similarities, at least in basic use). If you want to use AJAX - which isn't necessary despite what AJAX-Eggheads tell you - learn your way around MooTools and save yourself the headache of doing it on your own.

To get a good grasp on how they go together and some theory behind why you use them this way, read Zeldman's book. Also, read ALA. The book presents some solid arguments for web standards and accessibility. You'll never look at Flash the same way again..

Thanks for the tips, so you'd suggest starting off learning CSS? And then move onto other things? I bought a CSS book a couple of years ago, I hope the principles are still the same!

I'm just looking to create good looking websites with a few dynamic features like... (for instance), pop up boxes whenever you roll over something... (would that be Javascript?) or Flash-like animations (which aren't actually flash). I also see a lot of sites where the domain name is:

something[dot]com/somethingelse.php

I've always created websites using .html files and linked them all together that way. I take it using PHP is better?

Is there a difference between Javascript and JScript? What about ASP? Is AJAX actually useful?

Sorry to ask so many stupid questions, I just thought this would be a good place to get some hands on advice from people.
 
As an Amazon Associate, MacRumors earns a commission from qualifying purchases made through links in this post.
PHP is a Programming Language, as a designer you do not need to know it, although having some basal knowledge may be helpful when it comes to getting a job, particularly in regards to templating.
 
PHP is a Programming Language, as a designer you do not need to know it, although having some basal knowledge may be helpful when it comes to getting a job, particularly in regards to templating.

But I'm not only interested in designing a website, but building and hosting it.
 
Thanks for the tips, so you'd suggest starting off learning CSS? And then move onto other things? I bought a CSS book a couple of years ago, I hope the principles are still the same!

The principles are the same, CSS has simply progressed, so whatever you knew before is still applicable.

I'm just looking to create good looking websites with a few dynamic features like... (for instance), pop up boxes whenever you roll over something... (would that be Javascript?) or Flash-like animations (which aren't actually flash).

Depends on the specifics. CSS can do some neat mouse over effects, but more animated style stuff will require JavaScript.

I've always created websites using .html files and linked them all together that way. I take it using PHP is better?

Not necessarily. I use PHP for all my pages, but that's partly because it has some CMS (content management system) properties and the PHP loads in all the common page elements such as header, navigation, and footer including links to CSS, that way my web page files can concentrate on the content rather than layout or making sure I have the same navigation on each page. So it partly depends on how big your site will be. You can also include common web page elements using SSI (server side includes) if your web server has that turned on, and would potentially (depending on the setup) to continue using html extension.

Is there a difference between Javascript and JScript? What about ASP? Is AJAX actually useful?

JScript is Microsoft's 'broken' implementation of JavaScript. I wouldn't bother with any tutorials that mention JScript. The usefulness of AJAX all depends on what you want to do. It allows you to make server side calls without needing to do a page refresh. Don't use AJAX just because everyone seems to be doing so, unless you're just wanting the practice. I use a tad bit of AJAX, but generally I don't need it. ASP is another Microsoft proprietary language, so forget about it unless you're on Windows and using a Windows web server.
 
The usefulness of AJAX all depends on what you want to do. It allows you to make server side calls without needing to do a page refresh. Don't use AJAX just because everyone seems to be doing so, unless you're just wanting the practice. I use a tad bit of AJAX, but generally I don't need it. ASP is another Microsoft proprietary language, so forget about it unless you're on Windows and using a Windows web server.

AJAX is handy, but I don't think it's really hit the mainstream for the type of sites you'll be building right off - you won't consistently use it from project to project. And there's issues with accessibility (if that's your thing, that is). I use it sparingly, but that's just me. I knew a guy who loved Javascript and in-depth AJAX stuff and he used it right and left, most of the time when there was no need for it at all (I guess when all you've got is a hammer, everything looks like a nail...)

stevearm said:
But I'm not only interested in designing a website, but building and hosting it.
You don't need to know PHP in order to set up hosting, or even to build a site. There are times, though, that even basic PHP will be either necessary (eg, form submission) or very very handy (Aea mentioned templates). You won't regret it at all if you familiarize yourself with the basics at the very least.

Make the core of your learning well-formed CSS and semantic XHTML (At this point, there's really no need to learn HTML 4) - just get to know the differences between XHTML Transitional & Strict, which will accommodate anything you want to do anyway. Using these strictly doesn't at all mean a site will be bland and formulaic - CSS Zen Garden illustrates what can be done with just these two.

As far as CSS and XHTML go, make sure you keep it clean and accurate. This will save all manner of headaches down the road in the differences in how browsers interpret certain stuff.
 
I'll definitely take your advice and learn all about XHTML. I thought HTML4 was obsolete though I have to say! I've noticed that there seems to be different variations of CSS. Some use CSS 1, some CSS 2, and some 3.

I see a lot of sites that don't seem to have their URL ending in a ".html" file, and rather it's a ".php" or just a "/xxxxxx" and I was just wondering if having .html based sites was quite old-fashioned and amateurish these days. From what you say creating .html files is still ok though in my case.

Thanks again for all your advice, I really appreciate this.
 
In the end, everything boils down to HTML code. The difference is that there are different ways to get there. If the file ends in "html" then it is a plain text file, with HTML tags, and you're already familiar with that. If the file ends in "php" then it could be an HTML file augmented with some PHP tricks, or it could be a complex computer program written in PHP code which generates some HTML when you run it. The code it generates is what is sent to your browser.

For example, say you want a webpage to say "Today is Monday" (and insert the actual day of the week). This obviously can't be done with plain HTML. You could insert some Javascript, but then you're relying on the user having Javascript turned on. So you turn to PHP, and you write this combined PHP/HTML code:

<h1>What day is it?</h1>
<p>Well, <?php echo "today is " . date("l"); ?> . </p>

When your browser requests the code (which you have to call, say, index.php), your webserver sees by the .php extension that it's not simply HTML code, so it runs through the file looking for PHP code, runs any PHP code it sees, which generates HTML code which is sent back to you. When you "View Source", you'll see:

<h1>What day is it?</h1>
<p>Well, today is Monday.</p>

You (and your browser) never see that the word "Monday" was generated by a server-side program.
 
So to answer your original question, what do you learn first?

Start with CSS. It's very important (and very handy). I'm like you, when I started making websites in 1995, I got used to a certain way of thinking. If I wanted a page with a sidebar on the left, I would create the page as one big HTML table with two columns. Nowadays you define a <div> with the appropriate properties including width and anchor points and margins and colors. Back then if I wanted words to show up in red, I would say <font color="red">blah blah</font>. Nowadays you define a red text style with CSS tags.

Sometimes it's a huge pain. It's admittedly a lot quicker to type <font color="red"> than to figure out how to create a CSS class and define it properly and deal with glitches and browser incompatibilities. But CSS is ultimately the better solution.

As you begin to develop more complex sites you will start to see uses for PHP code. For example, if you are building a bunch of HTML files and they each contain the exact same list of links on top (e.g. a site menu). You start by copy/pasting the same code into each file. But then when you want to change the menu... you have to open every one of those files, make the change, and hope you didn't make a typo or forget to change one of them.

Wouldn't it be nice if you could just write the code for that menu once, save it into ONE file, and have every other page just include its contents? Then you could just change that one file, and every page on your site gets updated.

And this is where you begin to appreciate the PHP "include" command...
 
Sometimes it's a huge pain. It's admittedly a lot quicker to type <font color="red"> than to figure out how to create a CSS class and define it properly and deal with glitches and browser incompatibilities.

It's actually much easier in a stylesheet:

If you want your <h1> tag to be big, bold, and red, you simply add this to your CSS:

Code:
h1 {font:bold 24px arial,sans-serif;color:#f00;}

and all your h1 tags are now styled appropriately. Saves a lot of space from typing
Code:
<font color="red" size="5" face="arial"><b>...</b></font>
Over and and over and over again whenever you want to duplicate that style. Just had to make the point. I learned font tags as well, and was elated when I found out you could simplify it so much with CSS.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.