Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 5:23 PM   #1
Wojtek
 
Wojtek's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default PHP vs. JSP

On Wed, 20 Aug 2003 21:32:19 -0400, "John MacIntyre"
<Please@reply.to.group.thx> wrote:

>Hi,
>
>I am planning to move my web page onto a Linux server and will need to
>rewrite my sites from ASP.
>
>I am at a crossroads on whether I should chose PHP or JSP. Or possibly even
>something else.


>Any input on each technology, or where I could find a non-biased comparison
>would be greatly appreciated. Since, what ever I go with, I will probably
>be sticking with for the next few years.


ASP, PHP, and JSP are all intended to mix code with HTML.

So ASP has HTML and Visual Basic code, JSP has HTML and Java code, and
PHP has HTML and PHP code. All use some form of <% %> to contain the
code.

However, PHP can also be a standalone program with NO HTML, which is
why it can be run from the command line, just like Java and Visual
Basic.

I have coded quite a bit in both PHP and JSP/Java. Both use a C like
syntax.

PHP is always interpreted (you CAN get PHP compilers, but you will
need a special server process to run them). JSP's are compiled, and in
fact become part of the Web application binary code.

PHP is OK for small projects. By small I mean less complex, not fewer
pages. The reason for this is that if you try to create a framework
for your Web application, the amount of time it takes the PHP
interpreter to process the frame work will swamp out the time it take
for a particular page to run. For instance, in one of my trials, it
took over 85% of the loading time of a page just to process the
framework. Remember, PHP code is NOT resident in memory, so EVERY
application service you need must be interpreted for EVERY page hit.

On the other hand, a JSP page is usually run as part of an
application. The application server loads the framework and holds it
in memory. Then as each page request come through, the code for that
page has all the framework resources available to it.

So if you do multi-language sites, PHP must load the langauge specific
text for each page hit (possibly loaded from a database - which
happens for each page hit), while JSP/Java already has it resident in
memory as a resource object (possibly loaded from a database during
application startup - which happens once).

PHP is not object oriented. Yes it has classes, but the implementation
breaks a LOT of OOD concepts. It is more like the OO in Visual Basic.


All that having been said, I prefer PHP for quick Web sites, and
JSP/Java for more complex sites.
------------------------
Wojtek Bok
Solution Developer
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 07-01-2007, 5:24 PM   #2
John MacIntyre
 
John MacIntyre's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default PHP vs. JSP

"Wojtek" <su-news@bossi.com> wrote in message
news:0ud8kvorr1l810a1uqj9q1pvfjsk67bha8@4ax.com...
> On the other hand, a JSP page is usually run as part of an
> application. The application server loads the framework and holds it
> in memory. Then as each page request come through, the code for that
> page has all the framework resources available to it.
>
> So if you do multi-language sites, PHP must load the langauge specific
> text for each page hit (possibly loaded from a database - which
> happens for each page hit), while JSP/Java already has it resident in
> memory as a resource object (possibly loaded from a database during
> application startup - which happens once).
>


Thanks Wojtek,

JSP sounds to me like the way to go, but it sounds like JSP more resource
intensive.

Is JSP a resource hog?

Thanks again,
John MacIntyre



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:24 PM   #3
Roedy Green
 
Roedy Green's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default PHP vs. JSP

On Fri, 22 Aug 2003 21:02:13 GMT, Wojtek <su-news@bossi.com> wrote or
quoted :

>If you change a JSP file, then the server will automatically compile
>it. So the first user to hit that page will suffer a slight delay, but
>all subsequent users will not. Or you can pre-compile the JSP.


The key point to understand is the JSP page is NOT compiled on every
request!

The other point is that you can change the JSP code on the fly without
taking down the server, or can you?



--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 5:24 PM   #4
Randall R Schulz
 
Randall R Schulz's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default PHP vs. JSP

Roedy,

Roedy Green wrote:

> On Fri, 22 Aug 2003 21:02:13 GMT, Wojtek <su-news@bossi.com> wrote
> or quoted :
>
>
>> If you change a JSP file, then the server will automatically
>> compile it. So the first user to hit that page will suffer a
>> slight delay, but all subsequent users will not. Or you can
>> pre-compile the JSP.

>
>
> The key point to understand is the JSP page is NOT compiled on
> every request!
>
> The other point is that you can change the JSP code on the fly
> without taking down the server, or can you?


You can. At least on the reference implementation, Tomcat. I believe
it's commonly supported, if not mandated by the spec, but I'm too lazy
to look it up right now.

Randall Schulz

> Canadian Mind Products, Roedy Green.


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Featured Websites




All times are GMT +1. The time now is 12:09 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98