From owner-freebsd-questions@FreeBSD.ORG Tue Oct 26 06:19:53 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1DB916A4CE for ; Tue, 26 Oct 2004 06:19:53 +0000 (GMT) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1295F43D3F for ; Tue, 26 Oct 2004 06:19:53 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b145.otenet.gr [212.205.244.153]) i9Q6Jome017789; Tue, 26 Oct 2004 09:19:51 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i9Q6JmLt002220; Tue, 26 Oct 2004 09:19:48 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i9Q6Jm9e002219; Tue, 26 Oct 2004 09:19:48 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 26 Oct 2004 09:19:48 +0300 From: Giorgos Keramidas To: Gert Cuykens Message-ID: <20041026061948.GB2122@gothmog.gr> References: <20041026150629.6295505a@bofh.spyderweb.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: freebsd-questions@freebsd.org Subject: Re: perl vs php round 1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2004 06:19:53 -0000 On 2004-10-26 08:02, Gert Cuykens wrote: > i want to learn something that is capable to run applications on the > web but is totally separated from the html meaning i HATE doing this > > hello.php > > code > 110101110101010111101010 > code > html > he look at me > html > code > 1010101011010101010101 > code > html > he look at me > html > > i want to do this > > hello.class > code > 10101010101111001110101111111 > code > > hello.html > html > look at me > html > > And i would defenatly want something with classes This can be done just as easily with mod_perl as with php. It all depends on the level of abstraction that you choose to write your HTML pages in. You can write PHP code like this: <?php connect_to_database; grab title; print title; ?> > or use your own templates for the pages you want created, and write one-liners like the ones below: and encapsulate things in larger, logical units within the xxxpage() collection of functions, possibly using classes if you like doing so ;-) It's all a matter of programming style and spending the time necessary to design your sites infrastructure, if you ask me. I've used php for the samples above, but mod_perl can be used too.