views:

210

answers:

5

Hi,

I'v just started learning different languages in web development and I believe the best way to improve is to think of an idea and develop it. (Feel free to correct me if i'm wrong).

My question is what aspect do I develop first. If I am looking to build a simple script which is styled and comprises of HTML, PHP and CSS, which part of the website do I design first?

I was thinking HTML > PHP > CSS however once I complete the css I would have to edit all the tags to include the css classes/id's. Is that the way it's done?

PS - Also I started off web development by learning the basics as well as a few intermediate aspects of all the three above mentioned languages and now Im looking to design/clone scripts I've come across to get better at them. Is this approach correct?

Thanks.

+1  A: 

HTML and CSS of course.
PHP is just supporting feature.
You can have a perfect site without PHP or any other server-side programming language at all, but you cannot have a site without HTML and CSS as it's part.

Col. Shrapnel
"PHP is just supporting feature." ? Well i would say that reeeeeeaaaaly depends on the Site he wants to make
Hannes
You can totally write a site without CSS. A web page is primarily about information, not presentation. And regarding PHP as a "supporting" feature, the web as we know it would not exist without server-side languages.
svanryckeghem
I can write a site without HTML, there's nothing stopping me from serving up plain text with PHP
Phoshi
@Phoshi oh, you're incredible smart boy. I bet you can ride a bike with no hands too!
Col. Shrapnel
@Col; Ha, I wish. Serving up plain text just requires you to not use any HTML tags - it's less effort, not more. Certainly not bragging about something so trivial :P
Phoshi
@Phoshi Oh thank you. Your comments are so enlightening. I hardly can live without such a wisdom.
Col. Shrapnel
@Col; You're more than welcome, I give away my sage advice free of charge.
Phoshi
@Phoshi Just because your browser can read text files doesn't make a text file a website.
meagar
@meagar; Wikipedia's definition ("A website (also spelled Web site) is a collection of related web pages, images, videos...") doesn't specify HTML is required, nor did any others I could find. It may not be a simple to use website, and you wouldn't have any clickable links, but it's not not a website.
Phoshi
@meagar it's a waste of time to talk with person who wants nothing but tell everyone he is smartass.
Col. Shrapnel
@Phoshi HTML is implied by "web pages", and links are implied by "related". I'm not sure if you're trolling or playing devil's advocate, but you're doing a very poor job of it.
meagar
@meagar; The latter, I never expected this to actually provoke a discussion. I don't see how "web page" implies HTML - is a webpage built entirely in flash (obviously linking to the swf) not a web page? It supplies content over the internet, and doesn't involve HTML. The point I was trying to make was that none of them are more important than the rest (Well, maybe CSS is less important, but it makes things a LOT easier), and if you don't treat them all with respect you're going nowhere.
Phoshi
@Col; I'm sorry you feel that way, I didn't mean to come off as one. I'm sorry I disagreed with you, I'll make sure to not do that in future - internet tough guys certainly scare me!
Phoshi
@Phoshi No, I would argue an application written in Flash is not a webpage. A webpage may have embedded flash apps, but the Flash app itself is not a webpage. Your argument is this silly: *Chrome plays mp3 with a built-in plugin, therefore mp3s are webpages; most browsers display PDFs in-browser, therefore PDFs are webpages; many browser with a quicktime plugin display videos in-browser, therefore videos are webpages.*
meagar
@meagar; I see your point, but mine is that the only difference between an unformatted HTML document and plain text is entirely invisible markup. At least, I think it is, I'm not even sure any more, we should probably stop this whole discussion before anybody notices.
Phoshi
+5  A: 

The order doesn't really matter.

Deal with the data and the UI separately (following the MVC pattern will help you do this), and modify each of them as needed.

You'll probably find that the optimal solution is to work on a feature at a time rather then doing the backend of all features and then the frontend of all features (or vice versa).

Within each feature, start on whichever end you have the strongest vision of and let it inform your development of the other.

David Dorward
I'll be sure to try out working based on feature. Usually, I follow the pattern mentioned by bangbambang, design first and then the processing but maybe this could work too.
luq
@luq it can be combined. You will need 2 kinds of HTML pages - while site common HTML and separate HTML pages for the different site parts.
Col. Shrapnel
+2  A: 

HTML->CSS->PHP. Start by focusing on writing a valid, well-coded HTML page and learn to style it with CSS. After that, you can start to work with script.

Of course this is just my personal approach. Have the skeleton first and then you'll know where to put what

bangbambang
So you design the html, then the css and then edit each html element with the appropriate classes and ID's from the css?
luq
@luq actually I start with a simple drawing with pencil and paper and then make page layout based on it. Later on,add functionality with PHP and/or JS.
bangbambang
@luq No, you don't need to go back to the HTML to add classes and IDs from the CSS, because you should be adding many of the classes and IDs when you're writing the HTML. For example, suppose you start with a simple drawing, as bangbambang suggested. The drawing has a header, a left menu, a main content area, and a footer. You already know you will need to manipulate these with CSS, so when you write the HTML, you put each of them in a div and give that div an ID (id="mainMenu", or whatever). This will also help you keep your HTML organized.
paracaudex
thanks for the comments, I get it now. Also, is knowing PS a necessity to make great templates? Whenever I have one of my websites designed, my programmer first designs an initial preview using PS, and I'm guessing he uses that image as a guide to create the template perfectly. So, should I learn the basics of PS as well or should I start designing websites and learn it if a need arises? Thanks.
luq
@luq Your programmer almost certainly does more than use the static mockup as a "guide"; he likely cuts it up and mingles it with HTML so that it literally becomes the site. You're going to have to use some kind of 2D graphics program to create your mockup. It doesn't have to be Photoshop; The GIMP is a great free alternative. The key is getting proficient with whatever tool you choose.
meagar
A: 

At first you have to learn HTML. Thats what you need to display the content of your website.

If you want to create a better design, you should lern css.

PHP isn't really need, but it's great. Learn it at least.

AndroidChromeOS
+3  A: 

Learning to develop for the web is not a straight path; it’s really more like a cycle.

You will learn things (e.g. HTML and CSS), maybe to the point where you’ll be fairly confident that you master those technologies, then you will learn new things (maybe PHP), then you’ll look back at what you’ve done, and you’ll start realizing that you still don’t know much, because things evolve, and your perspective on those matters evolve as well, as you discover new techniques.

There is no absolute truth. My advice is to give yourself a goal, and try reaching it. Don’t worry about making mistakes. Don’t worry about what language or technology you pick. Just start small, because there is a lot to learn. Focus on understanding how the web works, how technologies interact. Learn about best practices, and always ask yourself how to make things better.

svanryckeghem