Re: [PHP] what's all the about then?
tedd schrieb: At 4:34 PM +0200 8/30/06, Jochem Maas wrote: tedd wrote: At 2:19 PM +0200 8/30/06, Paul Scott wrote: Read up on MVC (Model View Controller) and the front end controller design pattern. Interesting that someone finally put a name to something we've been doing for decades. We used to just call it input, process, and display, which to me seems simpler. In addition, if one used IPD, it's acronym would at least be in the right order. seems whenever I write something that resembles a FrontController I end up with a process() and a display() method ... small world. No, it's just that these organizational problems have been around since the days of rock programming -- that's what Design Patterns are, namely trying to identify, organize, and reuse code. That's something else we've been doing for decades that has a brand new name. Design patterns arn't new at all! In fact the big book of Design Patterns is was written twelve years ago! Well, 12 years ago is new to me and there are new books being published today. And, what I said above about Design Patterns, is what you said below. see: http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29 There's a surprisingly number of old techniques that have been given a new coat of paint and sold as the latest model. The key is to recognize them, perhaps I should coin a new name for that, maybe Concept Evolution, Process Inheritance, or Legacy Identification -- but, to really get it accepted, it has to be complicated enough to impress. :-) Thats what Design Patterns are about. Describe abstract solutions for object-oriented problems which dozens of programmers had already to solve and present them in a way each programmer understands and give them a name which everyone can understand. Its not to impress people with complicated ideas but to simplify the communication between programmers and give them hints how a problem could be solved. No, you missed my point -- many books written to simplify, don't. That's the reason some books are better than others for different audiences. Some books appear to have been written to impress peers rather than to teach. If you think different, that's OK, but that doesn't make my statement less true. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what's all the about then?
Ross wrote: There is a site which has interesting behaviour. http://myurl.co.uk/index.php?p=latest when I click the links the variable and the end changes changing the page. http://myurl.co.uk/index.php?p=news Can someone tell me (i) how is this achived index.php --- ?php if ($_GET['p'] === 'news') { include 'news.inc.php'; } else if ($_GET['p'] === 'latest') { include 'latest.inc.php'; } some how I doubt that this is the actual code they use. (ii) what is the technique called search for terms like 'front controller', 'request dispatcher' (iii) does it have any real benefits apprt from looking a bit nifty sometimes a modular cms (for example) can be extended and automatically generate useful URLs by using a URL scheme such as this. Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what's all the about then?
On Wed, 2006-08-30 at 13:10 +0100, Ross wrote: (ii) what is the technique called Read up on MVC (Model View Controller) and the front end controller design pattern. Wikipedia is a good start. --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what's all the about then?
[snip] There is a site which has interesting behaviour. http://myurl.co.uk/index.php?p=latest when I click the links the variable and the end changes changing the page. http://myurl.co.uk/index.php?p=news Can someone tell me (i) how is this achived (ii) what is the technique called (iii) does it have any real benefits apprt from looking a bit nifty [/snip] Unfortunately there are no links to click, there is a temporarily parked message. What you are describing is using the GET method of posting data. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what's all the about then?
Do this. 1. Create a script called hello.php with the following content: ?php echo $_GET['string']; ? 2. Enter http://yoururl/hello.php?string=Hello 3. The page will say Hello The content after the ? will be treated as GET variables in the http request to the server. You can use this to change behavior of a script depending on what the GET variables values are. /Peter -Original Message- From: Ross [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 7:10 PM To: php-general@lists.php.net Subject: [PHP] what's all the about then? There is a site which has interesting behaviour. http://myurl.co.uk/index.php?p=latest when I click the links the variable and the end changes changing the page. http://myurl.co.uk/index.php?p=news Can someone tell me (i) how is this achived (ii) what is the technique called (iii) does it have any real benefits apprt from looking a bit nifty Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what's all the about then?
At 2:19 PM +0200 8/30/06, Paul Scott wrote: On Wed, 2006-08-30 at 13:10 +0100, Ross wrote: (ii) what is the technique called Read up on MVC (Model View Controller) and the front end controller design pattern. Wikipedia is a good start. --Paul Interesting that someone finally put a name to something we've been doing for decades. We used to just call it input, process, and display, which to me seems simpler. In addition, if one used IPD, it's acronym would at least be in the right order. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what's all the about then?
tedd wrote: At 2:19 PM +0200 8/30/06, Paul Scott wrote: On Wed, 2006-08-30 at 13:10 +0100, Ross wrote: (ii) what is the technique called Read up on MVC (Model View Controller) and the front end controller design pattern. Wikipedia is a good start. --Paul Interesting that someone finally put a name to something we've been doing for decades. We used to just call it input, process, and display, which to me seems simpler. In addition, if one used IPD, it's acronym would at least be in the right order. seems whenever I write something that resembles a FrontController I end up with a process() and a display() method ... small world. tedd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what's all the about then?
At 4:34 PM +0200 8/30/06, Jochem Maas wrote: tedd wrote: At 2:19 PM +0200 8/30/06, Paul Scott wrote: On Wed, 2006-08-30 at 13:10 +0100, Ross wrote: (ii) what is the technique called Read up on MVC (Model View Controller) and the front end controller design pattern. Wikipedia is a good start. --Paul Interesting that someone finally put a name to something we've been doing for decades. We used to just call it input, process, and display, which to me seems simpler. In addition, if one used IPD, it's acronym would at least be in the right order. seems whenever I write something that resembles a FrontController I end up with a process() and a display() method ... small world. No, it's just that these organizational problems have been around since the days of rock programming -- that's what Design Patterns are, namely trying to identify, organize, and reuse code. That's something else we've been doing for decades that has a brand new name. There's a surprisingly number of old techniques that have been given a new coat of paint and sold as the latest model. The key is to recognize them, perhaps I should coin a new name for that, maybe Concept Evolution, Process Inheritance, or Legacy Identification -- but, to really get it accepted, it has to be complicated enough to impress. :-) tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php