X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 91587D1EC3F for ; Tue, 23 Mar 2004 19:05:27 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 35322-02 for ; Tue, 23 Mar 2004 15:05:25 -0400 (AST) Received: from sigurd.incentre.net (unknown [206.75.213.195]) by svr1.postgresql.org (Postfix) with ESMTP id 0ACD9D1EC49 for ; Tue, 23 Mar 2004 15:05:23 -0400 (AST) Received: from incentre.net (sigurd.incentre.net [127.0.0.1]) by sigurd.incentre.net (8.12.10/8.12.10) with ESMTP id i2NJ5Kfu012437; Tue, 23 Mar 2004 12:05:20 -0700 Message-ID: <40608A70.3020507@incentre.net> Date: Tue, 23 Mar 2004 12:05:20 -0700 From: Guy Fraser Organization: The Internet Centre User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: en-ca, en-gb, en-us, en MIME-Version: 1.0 To: lnd@hnit.is Cc: Postgres SQL List Subject: Re: [GENERAL] PHP or JSP? That is the question. References: <0A5B2E3C3A64CA4AB14F76DBCA76DDA44EF9F1@seifur.hnit.is> In-Reply-To: <0A5B2E3C3A64CA4AB14F76DBCA76DDA44EF9F1@seifur.hnit.is> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/238 X-Sequence-Number: 17337 Yes java is compiled, and compilers do catch most syntax and scope errors, as I said, but the java object code is still interpreted. Logical errors and other mistakes still get through compilation, and good regression testing is still required for quality assurance. I think JSP is an excelent solution and is probably the way I will go. We already have Jakarta Tomcat running inhouse, but I havn't touched Java since 1996. I started with PHP about a year ago and after 1 week I had succefully written a radius authentcated session based PostGreSQL reporting application. A couple months ago I wrote a data collection application that stores data in a MySQL database {yik, not my choice} and a PHP front end that generates tables graphs and statistical analysis, and it took one day to build and test thoroughly. I used to use Perl or white my own CGI's in C, but PHP is so, much easier than either. I have been programming since 1981 and have learned many languages on many platforms. I have maintained a few Sun servers but usualy in a mix with other Unix variants. Because of the mixed environments and poor Java support on many platforms I never had a good reason to use java. Most of the applications I have written did not need complicated GUI interfaces, so C and Perl have done fine for a long time, and PHP is adequate for simple DB applications. I am entertaining JSP for the more complicated GUI interface for a project I may need to build in the near future. Management has asked about ASP, but since we have to support many non windows platforms I have strongly advised against it, besides I feel JSP will be much better. Do you have a suggestion for a good resource, in order for me to get up to speed quickly with Java? lnd@hnit.is wrote: >My point is not about method how and how fast the whole thing executes but if >the source code can be compiled assuming that compilation checks for a many >things like data type mismatch or missing and provides many warnings for >potential errors. If PHP has such compilation then fine. >Many people like development with interpreted languages and they build >impressive applications but I think that compilation always helps: the time >spent waiting for compilation to finish pays off many times. >JSP is compiled: I like that. Take Java Script as an example: either you >shake after every change to source code regarding errors like 'Object not >found' or build extensive automated regression tests but then you are going >to spent time for building those test cases which still may fail to detect >errors which are otherwise just easily detected by the compiler. > > >>-----Original Message----- >>From: Guy Fraser [mailto:guy@incentre.net] >>Sent: 23. mars 2004 16:01 >>To: Laimutis Nedzinskas >>Cc: pgsql-general@postgresql.org >>Subject: Re: [GENERAL] PHP or JSP? That is the question. >> >> >>lnd@hnit.is wrote: >> >> >> >>>It may be added to the Mark's points bellow that PHP has >>> >>> >>more libraries >> >> >>>in the out of the box setup (like regular expressions) but PHP is >>>interpreted >>>(right?) while JSP is compiled: when I was making decision I >>> >>> >>have chosen JSP >> >> >>>because of "compiled" criteria: I do like the idea to catch >>> >>> >>as many bugs as >> >> >>>possible at compile time and rather hate "interpreted" development. >>> >>> >>> >>> >>Sorry but your not correct. >> >>Java is a binary 'interpreted' language. Although it is >>binary it is not >>a binary exucutable >>native on almost all platforms. The java executable >>interprets the java >>binary code and >>translates it into native machine executable code. Since the >>binary data >>is tokenized it is >>more efficient and has already had it syntax and scopes >>verified so less >>processing is >>required making it faster once it has been compiled. >> >>One of the bigger advantages of JSP is the two way data flow >>capability. >>With the >>java application running at the client end providing the >>interface, and >>the java servlet >>running at the server end doing the I/O, JSP can make a more fluid >>feeling interface. >>With PHP once the page is rendered it is static. >> ...snip... -- Guy Fraser