Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Web Programming

Garrett85Garrett85 Posts: 168Member
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.

Comments

  • CodeSuckerCodeSucker Posts: 3Member
    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
  • extokasextokas Posts: 12Member
    This post has been deleted.
  • CodeSuckerCodeSucker Posts: 3Member
    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
  • tmijs789tmijs789 Posts: 6Member
    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..
  • extokasextokas Posts: 12Member
    This post has been deleted.
Sign In or Register to comment.