PDA

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



xtiano77
09-18-2008, 12: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, 07: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, 12: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.

Duiant
05-22-2018, 03:05 PM
I'm sorry that I resurrect the old topic, but it's just that I myself once encountered this issue, and spent a lot of time to find really useful information.

Benefit? In what context?
They all have their ups and downs. I think you have to choose considering the context in which you're going to use it: what's your goal, the expertise you have, do you need to interact with a lot of external services, etc.

I list what I think, IMHO:

1- Java harder to master than php or asp: on a learning stage, of course.
2- Php/Java: can be installed in any architecture. Asp generally locked in Windows (I know there's some projects out there that are actually changing this).
3- Java: heavily object oriented, Php: OOP is rather new. Asp: don't have a clue
4- Sponsors behind java (sun) and asp (ms) bigger than the one behind php (zend). I think this count: asp is major player because ms is behind it. If you want a developer paid job it'll be easier with java/asp. Corporations tend to consider important the possible support they gonna get and heavy names are important when they're choosing technologies.
5- Documentation support: more support on asp.net / java than php. For me this is important. I tend to look a lot in the languages docs.
I find this article where they comparison this article https://diceus.com/java-vs-php-enterprise-applications-compelling-comparison-two-languages/ two languages between each other.May be it helps somebody in future
Finally, let me state that I love php (actually we sell a product developed with php-pl/sql).

Anastasia Stefanuk
06-18-2018, 02:49 PM
Hi
I would like to add a few things too

1. PHP is still in-demand Open Source language which will be popular for a long time for now - it's a benefit.
2. PHP is easy to learning compared with Java
3. The main points to choose PHP is speed. PHP tends to have fewer issues when using shared hosting.
4. The main pros of PHP you can find in an interview with Senior developer https://mobilunity.com/blog/interview-with-a-dedicated-php-developer/

alexblack
06-22-2018, 10:18 AM
Hi
I would like to add this article https://artjoker.net/blog/how-to-develop-a-website-using-php/