views:

102

answers:

3

Hi, obviously I'll need to learn HTML to even begin to get into the scripts or whatever, but which language is overall the better to code a webpage in for my brother. The two choices I think I've narrowed it down to are: Javascript or PHP. I would like to know which one is the more productive one to learn and please keep in mind that I only have 1 year of experience with Java and about 6 months worth with J. Thank You.

+2  A: 

Many people would say that JavaScript and PHP is two different things, and they are right of course. But I think I understand what your question really is about, and I would say that you should go with a good PHP tutorial.

First, as you say yourself, you must take a look at HTML. You will get into it quite quickly. Perhaps that is enough for your brother's site, but you probably need to extend it with some server side code. There, PHP would be my choice. Easy to get into with only HTML as previous knowledge.

Johan
A: 

Javascript, all the way.

See Nodejs.org, javascript does just fine serverside as well.

unomi
Node.js is a bit too raw for a beginner me thinks. Its built in HTTP server does nothing but send and receive text. You have to write your own code to serve html/css/javascript/image files. Modules exist for this but Node.js is so new that nothing is really standardized and documentation is lacking. Also, it is fairly unlikely that most $2 a month hosting services provide it or even SSH access. One day perhaps, but not today!
MooGoo
1. http://eberfreitas.virb.com/blog/text/12619617
unomi
2. http://no.de
unomi
+1  A: 

It depends on the type of site you want to do for your brother.

But you could go with a content management engine like wordpress

It is rather flexible, there are plenty of themes and plugins available to ease your work(compilation, SEO, navigation,...)

And finally a very important point I think is the maintenance.
Once the site is built, your brother after a short training will be able to update the site himself.

With all the time you would save, as commented in another answer, learn node.js and client side scripting to make killer web apps with a single language: Javascript.

Mic