Click to See Complete Forum and Search --> : Why Java or JSP Pages
jcrowe
03-22-2001, 01:07 PM
Can any of you come up with a few resources as to why java (jsp/servlets/beans) would be better than php or ASP? I have noticed that all the job openings are usually wanting someone to write this as opposed to php or asp (the one's i know). I would like to learn java but would like to be able to tell my employeers how it's better, so I can get paid to learn :D
Thanks alot,
jcrowe
I changed the title, I didn't know that would happen. :confused:
[ 22 March 2001: Message edited by: jcrowe ]
Dru Lee Parsec
03-22-2001, 03:23 PM
Re: php, I don't know. I don't code in php
Re: Asp, it's Micro$oft specific so it won't run on anything that's not running M$.
Jsp/ Servlets/ Beans
1) It's cross platform, At Union Bank we had people developing on Windows NT. But the actual code was running on big IBM mainframes runing AIX unix. Can't to that with ASP.
2) Java servlets have access to anything that Java has access to, specifically, JDBC (Java Database Connectivity) which is a cross platform method of accessing databases.
3) Java Beans: A great way for holding data See #5
4) Java Server Pages, A great way to do your presentation layer.
5) OO design. The Java bean is your model (data) the JSP is your presentation layer (the view of your data) , the servlets is your controller ( model-view-controller). Plus you can easily use JSP with Javascript to do browser side confirmation of data (did you fill in the zip code etc)
6) Security. It's quite easy using using JSP and Servlets to junp in and out of https secure mode. It's also quite easy to write code in yoru JSP and Servlets that make sure that a hacker cannot "bookmark" behind a login screen.
7) It's written in Java. So you have all the standard niceness about using Java. You have a robust, easy to use language that works across platforms.
8) Scalability, At the bank and also at my current company we're building servers that will serve up thousands of pages a day. At the bank we load tested with 400 simultainious users making the same request via the same jsp and servlet. We were still getting page response times at around 5 to 7 seconds. With less than 100 simultainious users we would get response times of less than 2 seconds.
9) Adaptability. I've run Jsp's and Servlets using Webshpere on NT, Websphere on Aix, and also using apache and Tomcat on Linux. It also runs on WebLogic. Yet another benefit of using a Java based architecture.
So, if you get this job do you need a telecommuting consultant Java Guru? I work cheap, $100 / hour :)
BTW, the best resource for servlets is the O'Reily book "Java Servlet Programming". I havn't found a really good JSP book yet, but O'Reilly probably has one that's decent as well. The Wrox press "Java Server Programming" was more expensive and not quite as good. In fact, I've found very few Wrox press books to be worth the money.
[ 22 March 2001: Message edited by: Dru Lee Parsec ]
nanode
03-22-2001, 05:00 PM
I have minimal experience with servlets, but I've coded a lot of client-side java.
I really like php for presentation layer things, like dynamically generating HTML. PHP is also platform neutral. I have it with apache on linux at home and win2k w/ IIS at work. You can either embed PHP snippets into your HTML page, or have complex PHP objects (it can be OOP pretty easily) output HTML.
If you want an extremely clean and simple DB enabled language, PHP is very easy to get started with. It gets along very well with apache and mysql. Servlets are more difficult to implement and get the environment ready, but as Dru Lee said, it offers almost anything the Java language does.
I've yet to do any professional "server-side" java web stuff, so I can't be objective on performance comparisons.
I do know from personal observation, that PHP (as an apache module) will blow away CGI's when DB connections scale up. I presume servlets would behave similarly.