![]() |
|
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. |
| |||||||
| 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. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| 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 | |||
| Advertisements |
| | #2 | ||
| "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 | |||
| | #3 | ||
| 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. | |||
| | #4 | ||
| 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. | |||
| Featured Websites | ||||
|
![]() |
| Tags: jsp, php |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| Featured Websites | ||||
|