PDA

View Full Version : Advantages of Java over ASP and PHP (newbie question)



xtiano77
09-18-2008, 01:49 AM
Just by reading the title you guys can tell I am a newbie to Java, so I won't try to sound smart. I would appreciate it if you guys can help me with a few questions I have regarding the three programs above.

I am trying to start a second career (actually it is what I started back in College but got side tracked) and I have some questions. I just purchased a book (Java for beginners) based on the advise of the IT guy in my office who has written programs in C and Java in the past. I already know XHTML, CSS, JavaScript and a some XML, so should I give Java a shot or should I try something perhaps easier like PHP? I know that there are some significant diferences between the three and that is why I am writting here, so hopefully you guys can break it down for me. Thanks in advance for your

Twey
09-18-2008, 08:29 AM
In the context of web development, PHP is common for small sites, while Java tends to be used for big 'enterprise' projects, since its type system and better OO features help make maintaining large projects one heck of a lot easier. As far as I'm aware, the two are about even in popularity, if one factors in the size of the sites with which they're built. It's possible that PHP has a slight lead. Outside web development, however, PHP is virtually unheard-of, while Java is still a major player.

ASP is really ancient and outdated now. There's pretty much no advantage to using it unless you really have to for some reason. ASP.NET, on the other hand, is a pretty powerful interface, and can use anything that runs on .NET, which means that you can use some fairly nice languages with it, like F#. However, it has a pretty big downside: most .NET development tools only run on Windows, and the main ASP.NET implementation will only work on IIS (although there is a cross-platform implementation named 'Mono', it tends to lag quite a way behind Microsoft .NET releases).

Of course, there are always other options. There are a variety of other web frameworks out there, some of the most common of which are Pylons or Django for Python, Rails for Ruby (which I personally despise), or UnCommon Web for Common Lisp, all of which languages can also comfortably be used for non-web development (and are rather superior to Java, in my opinion). There exists also a Haskell web framework, HAppS, but it's pretty hideous, and I recommend steering well clear — although Haskell is a nice enough language that it's tempting to write one's own web framework. :rolleyes:

My recommendations are the Pylons/SQLAlchemy/Genshi combination, which is what I use for web development work right now, or UnCommon Web.

xtiano77
09-22-2008, 01:19 AM
Thanks a lot for your response. I sure appreciate the information you gave me and time time you took to write it. I am going to take a look at some of your suggestions and hopefully they will work for me. Thanks again.