Re: Why JSP is better than PHP >>
| From: | Brian T. Allen | Date: | Mon, 13 Nov 2000 17:15:12 +0000 |
| Subject: | Re: Why JSP is better than PHP >> | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24984@lists.php.net to get a copy of this message | ||
All things in life are indeed a matter of preference and background, but
this has been my experience:
1. Everything I need to do or foresee needing to do I can do with PHP, and
there is no way in hell I am moving to an NT platform (I haven't used JSP
and don't know if it runs under Linux).
2. I use an enormous amount of non-PHP libraries in my PHP programming:
LibSWF for dynamic flash content, JPEG for images, GD for images, SSL for
security, Mcrypt for encryption, etc, etc, etc, etc, etc, etc...
3. I think in large measure clean code is a function of the programmer and
not the language, but I find my PHP code very easy to read, debug, and
maintain. I have never had a page ignore my objects and just use a
variable.
4. I really like the language and syntax of PHP. I haven't seen JSP, but
PHP is my preferred language above any other I program in (PERL, C++,
Delphi...).
5. Of course Java programmers are going to prefer JSP. And people with a
Unix/Linux background are going to prefer PHP.
6. That's funny, PHP uses an amazing new technology called an include. If
my code gets too big, I stick it in its own file somewhere else (which
doesn't have to be in web space, accecible by the browser) and access it
that way, in functions usually. And I can execute the code from within HTML
space, from the command line, remotely over the Internet, or secure remotely
using SSH. I feel liberated in this manner, not restricted.
7. Once thing I despise in Micro$oft solutions (and the like) is their
attempt to "automatically do the right thing". I want control, not
baby-sitting. If that means 1 more line of code, fine. Granted PHP session
management and cookies may take an afternoon to learn (for anyone that can
read and use a search engine), but once you have mastered it (by the
following morning) it works fine after that.
As a programmer and business owner I would be stupid not to look into JSP,
particulary where it integrates with Apache. But it would have to have a
lot to offer to get me to forsake PHP. PHP has been very good to me, and
has changed the way I do business.
HTH,
Brian
> Forgive me for a rehashed topic but the following has
> been thrust into my face by a guy who was born with
> Java skills and is still using the bloatware -
>
> -----------------
> Here is a list of reasons why JSP is better than PHP:
>
> 1. Anything you can do with PHP, you can do with JSP;
> the reverse is not true
>
> 2. JSP is much more powerful, since it has access to
> all the Java libraries. PHP only has access to PHP
> libraries
>
> 3. JSP is Object-Oriented, so leads to cleaner code
> that's easier to debug, maintain, and improve. (PHP
> also allows objects, but the object model is more
> primitive, and most scripted pages ignore PHP objects
> and just use normal variables.)
>
> 4. The equivalent syntax in JSP is just as simple to
> learn, so you can get up and running just as quickly
> -- that is, there's no extra startup cost in using
> Java, at least not a significant one
>
> 5. Java programmers (as opposed to 15-year-old hackers
> or HTML monkeys) appreciate the importance of a clean
> language with complex OO data structures and strong
> typing
>
> 6. With JSP, if the code inside a page gets too big,
> or if you want to use it elsewhere, you can cut it
> out, make it into a Java class, and invoke it from
> anywhere in your application (even not from a page).
> With PHP, you're stuck inside the HTML box.
>
> 7. JSP's concept of state management and persistence
> is more explicit and powerful than PHP's. With JSP,
> you can specify whether a variable persists for the
> page, the request, the session, or the application (or
> if it's just local to the function). The JSP engine
> automatically does the right thing with cookies so you
> have access to the variable on later requests. With
> PHP, you just have "global" and "not global", you
> don't have automatic session management, and have to
> do your state thing manually with cookies or hidden
> variables.
>
> -----------
>
>
> Please help! How can I talk back? I would appreciate
> any guidelines and advice.
>
> Cheers/erick
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Calendar - Get organized for the holidays!
> http://calendar.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net