Web Programming

What's better for web programming, Java or PHP? Which one is easier to learn? I know Java is supposedly multy platform so the programs would work with Windows, MAC, and Linux.


  • I'm a proud supporter of PHP and think it's easier to pick up than all that JSP and Servlet nonsense. Start at w3schools.org - you should already be proficient with HTML, if not, learn that too.

    I bet you are probably going to want to store information and stuff as well, take a look at MySQL databases in your readings
  • This post has been deleted.
  • hi ext - actually I don't suggest starting with a CMS, this is how alot of people try to learn.. counterintuitively, programming is easier when starting from scratch - it takes more thought and experience to edit existing code then writing new code.

    however, if you choose to start with a CMS please start with Joomla as I think it's the best written so far and easiest to mess with. Stay the hell away from Dolphin :P

    Hope this helps someone
  • PHP is definitely the simpler language to learn. Your interfaces will usually be web based and done in html/css. PHP is cross platform but not platform independent. Meaning you can run PHP on any OS that a php interpreter is written for however when you get down to coding file management scripts you have to code these specific to the operating system you're running on. Usually this comes down to silly little things like whether you're using forward slashes or back slashes in paths, what characters are allowed in file names, and so on. Java might (don't know for sure) have functions that hide these differences from you but that do extra work behind the scenes.

    PHP is a lot simpler, and it's quite portable. Despite what I wrote above most code you write for a web app using mysql to store your data (that's the norm) 9 times out of 10 what you write will run the same on a Linux server running PHP as it will on a Windows server running PHP.

    A CMS is an overwhelming dose of code for a newcomer to understand. They're worth looking at but it's hard to know where to make your modifications in such a big system as a beginner and know exactly what the effects will be.

    It's true that you will likely learn more faster starting from scratch. Even though this may seem harder in the end you'll end up banging your head against the wall much less.

    Joomla is well written but quite complicated and a touch bloated (still great). Wordpress is much simpler as a CMS although I'm not sure how well it's coded. Probably not great as it was a nightmare for having security holes in the past but they've since cleaned up their act it seems.

    Aside from w3schools try Tizag. They've got elegantly simple tutorials perfect for an absolute beginner. One of the biggest pains you'll find as a beginner is how to put variables in strings since it's different when you use single quotes vs double quotes - each has it's advantages. That and there's also old school ways of doing this with sprintf (old c++ style functions) - stay away from that IMO and do some reading on google after searching for "php variables in strings". There are extra caveats to this when you're putting arrays into strings for the first time :) but don't worry - everything you need to know is out there on google already, you just need to know enough to know what topics you'll need to learn.

    Good luck..
  • This post has been deleted.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!