Re: my little comments on jsp and php



My overall thought after reading your article is that, are you
comparing JSP and PHP?
Why do you talk about struts and hibernate when talking about JSP,
they are frameworks and specifications other than JSP. You can really
only use JSP to develop your website.

On May 25, 4:01 am, cmk...@xxxxxxxxxxx wrote:
Hi
I learned jsp for about 5 years, and learned php for about 4
months. I feel php is more easy to learn, and it can do almost java
can do. So i suggest people to use php for do web. Here is my little
opinions:

1) People said struts/spring is not hard to learn. YES, just for the
API itself. To learn them right, i need to learn how to setup the J2EE
server, how to deploy my war, how to compress my code to war, and i
need to learn how to use the IDE too. All of them composite an complex
environment and make the learning curve very high. Don't tell me you
are using a notepad to write struts, then you will spend a big amount
of time for writing the makefile, and everytime you add more source
file to your project, you need to rewrite the makefile again. For PHP,
open a dreamweaver , save your code and then work. For me, i need 0
second to learn Dreamweaver, because it is WYSIWYG.


You need to know how to setup Apache server with PHP module as well.
You need not pack war, you can put the files to the correct location
as usual as PHP.
You can use Dreamweaver to develop JSP as well.

2) Java is too large now, it spited into too many layers :
presentation layer (JSP), logic layer (struts), data layer(hibernate).
For almost project, do we necessary to do that? Some people said
splited as many layer as we can, will make the project more readable,
and other people is more easy the trace. I totally disagree with that.
Because i need *SERVERAL* skills to trace a bug in the project that
with serveral layers. For example, I need to use jbuilder to trace the
struts part, and i need to use eclipse to trace hibernate. It is hell.
(my point of view)

As I mentioned, you can use JSP only and need not worry about how to
setup multiple layers.
When I do JAVA webapp project, I just use one IDE and can finish all
the tasks.


3) Just too many .xml properties file. The beginner is hard to learn.
The struts have its own properties file, hibernate has it own too, and
the server also has it own. Too annoying (my point of view)

4) The IDE is not really as good as visual studio. I know how to use
jbuilder and eclipse, both of them cannot set the breakpoint in any
line of code, i meant i cannot set the breakpoint in some of my code.
Without a good IDE, debug my struts program is hard.


I have not much experience on PHP, but I didn't try a tool on easily
tracing PHP codes as well.
So I wonder are you comparing JSP and PHP, or JAVA and .NET framework.
The reason that I like JAVA, is due to the tracing functinos provided
by IDE.
I used Eclipse to develop web application, I can set breakpoint in any
line of JAVA and JSP code, and also debug hot code when the
application is running on Tomcat.

5) The build process is not united. For example, Liferay is a java
portal, when you open its ant file, over 30 options, i don't know how
to build it. For asp.net, whatever your project is, press the build
button, it will build, press the run button, it will run.


Netbeans provide the ability by just clicking the run button, it will
automatically create the package and deploy to server.

All of the above points is not exist in PHP world. For a big
development team, i will suggest java, as i said java split the
project in more layer then PHP, it will have better division of labor.
But for a team with less than 100 developers, i suggest php.

Please correct me if i am wrong !!!

thanks
from Peter (cmk...@xxxxxxxxxxx)

The advantages of PHP is fast development and relatively fast in
seeing the running result. Also, many web hosting companies support it
by default.
But I think JSP itself also have most of the advantages.

.



Relevant Pages

  • Re: Discussion: PHP versus JSP
    ... We used MySQL, Tomcat, and JSP. ... > re-doing the app using PHP. ... JSP is an attempt from the Java camp to achieve an ASP/PHP like programming ...
    (comp.lang.java)
  • Re: Using PHP language in Java/JSP files.
    ... > Java. ... > it) I am wanting to make additions in php (as I know php, ... The Java app (at least all the jsp files) are in the ...
    (comp.lang.java.programmer)
  • Re: [Discussion] PHP =?ISO-8859-15?Q?f=FCr_die_View-Schicht=3F?= =?ISO-8859-15?Q
    ... Java kritisch gegenüber. ... das in PHP zu lassen? ... Statt komplizierte XML-Schnittstellen ... Ob auf JSP, JSF oder ein anderes Template-System müsste ...
    (de.comp.lang.java)
  • Re: JSP Web-Development [newbie]
    ... beginner in JSP so maybe some of my problems aren't really problems;) ... Personally, I prefer JSTL over straight JSP, to reduce jumping back and forth between HTML and Java syntax. ... done a lot in PHP, so the main idea of website engineering is quite ... display, which should display menu items regarding to the module ...
    (comp.lang.java.programmer)
  • Re: HTML "scrape" causes loss of query string in URL
    ... >> in PHP with several PHP scripts interacting with one Java servlet, ... >> which interacted with several Java classes. ... > process to go from PHP to JSP. ...
    (comp.lang.java.help)