Re: separating C from V in MVC

2002-06-18 Thread Tony Bowden
[sorry for the broken References - I've just joined the list and am replying to a post in the archives] On Sat, 15 Jun 2002, Perrin Harkins said: An Object-Relational mapper takes objects and stores them in a relational database, as transparently as possible. I think the most pure example of

Re: separating C from V in MVC

2002-06-18 Thread Perrin Harkins
Tony Bowden wrote: I'd have to disagree. Maybe Mike had something different in mind when he created Class::DBI, but as the current active developer on it, I'm definitely pushing it in the R-O direction. Like Dave, I always start by thinking of my database schema and then Class::DBI provides a

Re: [OT] WebObjects [Was: Re: separating C from V in MVC]

2002-06-15 Thread Perrin Harkins
WO is amazing, no two ways about it. Once you use it, everything else sucks. There are no exceptions. That's kind of a rude statement to make on this list, where all of these people are offering free software and support to you. It's been a few years since I last evaluated WebObjects, but

Re: separating C from V in MVC

2002-06-15 Thread Perrin Harkins
My general motto is tiers eq tears ... I've never seen a really comfortable OO/SQL bridge. So who's talking about an OO/SQL bridge? Not me. At least not an automatic one. I write the SQL by hand. Group bys, order bys, multi-table selects, locking, SQL query plans and index optimisation

Re: separating C from V in MVC

2002-06-15 Thread Perrin Harkins
This approach works for some things, but I think it falls down when it comes to doing complex database searches, particularly searches generated ad-hoc on multiple columns in multiple tables. In general, the user interface you provide for a search will be much higher-level than the SQL that

Re: separating C from V in MVC

2002-06-15 Thread Perrin Harkins
An Object-Relational mapper takes objects and stores them in a relational database, as transparently as possible. I think the most pure example of this I've seen in the Perl world is Tangram (www.tangram-persistence.org). SPOPS is also an O-R mapper (actually, its a generic Object

Re: [OT] WebObjects [Was: Re: separating C from V in MVC]

2002-06-15 Thread Kyle Dawkins
Perrin al Once you use it, everything else sucks. There are no exceptions. That's kind of a rude statement to make on this list, where all of these people are offering free software and support to you. Ah, you're right; I actually never meant that as a slight against things mod_perl; I

Re: [OT] WebObjects [Was: Re: separating C from V in MVC]

2002-06-15 Thread Perrin Harkins
Not quite sure what you mean here. The general WO request-response loop is 1 Process request 2 Perform action 3 Return response Step 3 is entirely dependent on the previous two, just like any mod_perl/CGI/php app. The introductory documentation makes it look each URL is tied to a

Re: separating C from V in MVC

2002-06-14 Thread Nigel Hamilton
A) a ridiculously flexible interface that looks sort of like SQL, except where it is SQL, except where it's only sort of like SQL, etc. B) a ridiculous profusion of classes, methods, or both. SQL has its place, and Alzabo merely provides a thin layer on top of it. Trying to jam a thick

Re: separating C from V in MVC

2002-06-14 Thread Matt Sergeant
On Fri, 14 Jun 2002, Nigel Hamilton wrote: A) a ridiculously flexible interface that looks sort of like SQL, except where it is SQL, except where it's only sort of like SQL, etc. B) a ridiculous profusion of classes, methods, or both. SQL has its place, and Alzabo merely provides a

Re: separating C from V in MVC

2002-06-14 Thread Mark Fowler
On Fri, 14 Jun 2002, Nigel Hamilton wrote: Generally I try to minimise the layers/tiers/abstraction between the front-end and the database - for me OO/SQL abstraction is something akin to 'GOTO considered harmful'. I think there's room for middle ground here between mapping OO directly

Re: separating C from V in MVC

2002-06-14 Thread F . Xavier Noria
On Fri, 14 Jun 2002 10:34:47 +0100 (BST) Mark Fowler [EMAIL PROTECTED] wrote: : On Fri, 14 Jun 2002, Nigel Hamilton wrote: : : Generally I try to minimise the layers/tiers/abstraction between : the front-end and the database - for me OO/SQL abstraction is something : akin to 'GOTO

Re: separating C from V in MVC

2002-06-14 Thread Nigel Hamilton
Generally I try to minimise the layers/tiers/abstraction between the front-end and the database - for me OO/SQL abstraction is something akin to 'GOTO considered harmful'. HI Mark, I'm not sure about a monolithic SQL factory module like the one you describe. Generally, each

O-R mapping vs. R-O mapping (was Re: separating C from V in MVC)

2002-06-14 Thread Ray Zimmerman
At 12:22 AM -0500 6/14/02, Dave Rolsky wrote: An Object-Relational mapper takes objects and stores them in a relational database, as transparently as possible. I think the most pure example of this I've seen in the Perl world is Tangram (www.tangram-persistence.org). SPOPS is also an O-R mapper

Re: separating C from V in MVC

2002-06-14 Thread kyle dawkins
The Pet Shop has a grand total of 13 tables. How well does this approach work with 90 tables? How does it handle arbitrary queries that may join 1-6 tables, with conditionals and sorting of arbitrary complexity? Where I work we have over 90 tables and it works fine. We don't run a

[OT] WebObjects [Was: Re: separating C from V in MVC]

2002-06-14 Thread Drew Taylor
At 10:59 AM 6/14/02 -0400, kyle dawkins wrote: As for people claiming never to have seen an OR system that works, I suggest you check out EOF from NeXT/Apple. For those of you (like me) who didn't know what EOF is, it stands for Enterprise Object Framework and is part of Apple's WebObjects app

Re: [OT] WebObjects [Was: Re: separating C from V in MVC]

2002-06-14 Thread kyle dawkins
Drew is correct, EOF stands for Enterprise Object Framework. However, it's not part of the WebObjects app server... it predates WO by a long time (I think it's about 9 or 10 years old) happens to come with WO but is completely separate from it. On Friday 14 June 2002 11:27, Drew Taylor

Re: separating C from V in MVC

2002-06-14 Thread Dave Rolsky
On Fri, 14 Jun 2002, kyle dawkins wrote: bigger system, but I would also caution people to say that if you find yourself doing joins across up to 6 tables, you're almost certainly doing something wrong from the start and, basically, you're fooked because of shitty design, and O/R or R/O

Re: separating C from V in MVC

2002-06-14 Thread Drew Taylor
Fran, I think the key here is taking care of the 80% easily. This has been mentioned in this thread several times, and in previous threads. No, I don't think there will ever be an (efficient) wrapper that can handle ALL the cases and ALL the possible SQL queries. But if you can handle the

Re: XML vs Perl (Re: separating C from V in MVC)

2002-06-13 Thread Matt Sergeant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday 13 June 2002 6:20 am, Rob Nagler wrote: Matt Sergeant writes: This assumes you need XML in the first place. No, it does not. The rest of my post spoke about XML as a data format and set of tools, not as a syntax. Please stop

RE: separating C from V in MVC

2002-06-13 Thread Jeff AA
-Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED]] Sent: 13 June 2002 03:43 To: Fran Fabrizio; [EMAIL PROTECTED] Subject: Re: separating C from V in MVC 2. Does the first part of my code above even remotely resemble a Controller? Sort of. It does choose

RE: separating C from V in MVC

2002-06-13 Thread Fran Fabrizio
Ok so Collections was the missing piece in my puzzle. Very interesting (and intuitive now that you present it to me). Controller: --- my $Stale = Model::WatchCollection-new( status = 'stale' ); Controller: --- my $WC= Model::WatchCollection-new(); Out of these two, I

Re: separating C from V in MVC

2002-06-13 Thread Jon Robison
I just wanted to comment on Number 3, here. Scroll down ;-) kyle dawkins wrote: Fran (et al) I've stayed out of the MVC chitchat for a long time (very interesting thread) because it's such a deep topic. But seeing as how Fran has some concrete questions... 3. How do you prevent a

Re: separating C from V in MVC

2002-06-13 Thread kyle dawkins
Fran Out of these two, I would think that the first one is actually better. What if you have 300,000 watches and only 25 are stale, for example (numbers that are not all that far from the truth, in my case)? That'd be a lot of data I'd be slinging around in the 2nd example. Which is

RE: separating C from V in MVC

2002-06-13 Thread Jeff AA
-Original Message- From: Fran Fabrizio [mailto:[EMAIL PROTECTED]] Sent: 13 June 2002 13:23 To: Jeff AA Cc: [EMAIL PROTECTED] Subject: RE: separating C from V in MVC Controller: --- my $Stale = Model::WatchCollection-new( status = 'stale' ); Controller

Re: separating C from V in MVC

2002-06-13 Thread Perrin Harkins
Fran Fabrizio wrote: Now, how do you represent in the model a complex query that joins across 5 of the nouns? Others have already commented on this, but I want to point out that this is a general OO modelling question, not an MVC one, and there are many resources available to help you learn

Re: separating C from V in MVC

2002-06-13 Thread John Siracusa
On 6/13/02 1:29 PM, Perrin Harkins wrote: Just be careful that you don't end up making this into something that mirrors the SQL exactly. There might be 4 tables involved in finding out what kind of credit card the user had, but that gets hidden behind this API. If you find yourself writing

Re: separating C from V in MVC

2002-06-13 Thread Dave Rolsky
On Thu, 13 Jun 2002, Perrin Harkins wrote: As you can see it gets messy fast, and I didn't even cover the Mastercard part. It would probably have terruble performance too. This is why people usually just write this kind of report as a big SQL query instead. You can make a model object

Re: separating C from V in MVC

2002-06-13 Thread Rob Nagler
Dave Rolsky writes: Trying to jam a thick layer of OO-goodness over relational data is asking for a mess. Most OLTP applications share a lot in common. The user inputs data in forms. The fields they edit often correspond one-to-one with database fields, and certainly their types. The user

Re: separating C from V in MVC

2002-06-13 Thread Dave Rolsky
On Thu, 13 Jun 2002, Rob Nagler wrote: Most OLTP applications share a lot in common. The user inputs data in forms. The fields they edit often correspond one-to-one with database fields, and certainly their types. The user wants reports which are usually closely mapped to a

Re: separating C from V in MVC

2002-06-13 Thread Gunther Birznieks
At 12:58 PM 6/14/2002, Dave Rolsky wrote: On Thu, 13 Jun 2002, Rob Nagler wrote: I'm not a big fan of O/R. I prefer R/O. But to each their own. Would one of you mind providing a 1 paragraph definition of each? I am afraid that I am starting to get lost in the semantic differences of

Re: separating C from V in MVC

2002-06-13 Thread Dave Rolsky
On Fri, 14 Jun 2002, Gunther Birznieks wrote: Would one of you mind providing a 1 paragraph definition of each? I am afraid that I am starting to get lost in the semantic differences of controllers and actions and O/R, R/O? Well, here's my take on it. An Object-Relational mapper takes

Re: separating C from V in MVC

2002-06-13 Thread Fran Fabrizio
Shop demostrates how you can build a simple application with only a couple of custom SQL queries. The rest are simple joins and CRUD. If you need more complex queries, there are escapes. You still probably end up with a list of tuples for your reports. The key we have found is

Re: separating C from V in MVC

2002-06-13 Thread Rob Nagler
Dave Rolsky writes: The Pet Shop has a grand total of 13 tables. How well does this approach work with 90 tables? Works fine with bivio.com, which has 50 tables. How does it handle arbitrary queries that may join 1-6 tables, with conditionals and sorting of arbitrary complexity? The

Re: separating C from V in MVC

2002-06-13 Thread Dave Rolsky
On Fri, 14 Jun 2002, Fran Fabrizio wrote: How well does this approach work with 90 tables? How does it handle arbitrary queries that may join 1-6 tables, with conditionals and sorting of arbitrary complexity? I'd have to agree, most of the real-world scenarios I have run across do not

Re: separating C from V in MVC

2002-06-12 Thread Matt Sergeant
On Wednesday 12 June 2002 4:09 am, Rob Nagler wrote: Matt Sergeant writes: There's quite a few things that are a lot harder to do with XML in plain perl (especially in SAX) than they are in XSLT. This assumes you need XML in the first place. No, it does not. The rest of my post spoke

Re: separating C from V in MVC

2002-06-12 Thread Fran Fabrizio
Ok, thanks to you all and this great discussion I want to try to make our current project into an MVC-style app, so what now? This MVC discussion could not have come at a better time - our little app is all grown up now and needs a real architecture. I have read the MVC threads in depth

RE: separating C from V in MVC

2002-06-12 Thread Jeff
From: Fran Fabrizio [mailto:[EMAIL PROTECTED]] Sent: 12 June 2002 21:48 Nothing indepth, just a quick response, but it looks like your huge if statement can be replaced using a hash. Maybe something like: # just an eg, this data is static and can be required from # your startup.pl so that

RE: separating C from V in MVC

2002-06-12 Thread Jim Martinez
On Jun 12 Jeff wrote: From: Fran Fabrizio [mailto:[EMAIL PROTECTED]] Sent: 12 June 2002 21:48 Nothing indepth, just a quick response ... I too am using mod_perl just for Apache::Registry, and would also like to look for alternatives. Answers the questions posed by Fran would also

Re: separating C from V in MVC

2002-06-12 Thread kyle dawkins
Fran (et al) I've stayed out of the MVC chitchat for a long time (very interesting thread) because it's such a deep topic. But seeing as how Fran has some concrete questions... 3. How do you prevent a Controller from just becoming another big if statement, or is this their purpose in

Re: separating C from V in MVC

2002-06-12 Thread Perrin Harkins
Wow, this is a long one. As usual, everyone has slightly different ideas about how to do MVC, so keep a grain of salt handy. This basic pattern repeated ad infinitum. It's grown way out of control, is a pain to work with, and just feels wrong, very wrong. :-) We've all been there. 1. Is

Re: separating C from V in MVC

2002-06-11 Thread Matt Sergeant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday 10 June 2002 11:23 pm, Vuillemot, Ward W wrote: : Really interesting, xml : appears to be : the final destination for most of us, even if now i : prefer objects. : : Ciao, Valerio That is my big question. Is

RE: separating C from V in MVC

2002-06-11 Thread Jeff AA
From: Rob Nagler [mailto:[EMAIL PROTECTED]] Sent: 10 June 2002 20:41 ... a Facade is the front face of the web site which includes colors, text, URLs, etc. All the other MVC components talk to the currently selected Facade when they need these values. The controller calls

Re: separating C from V in MVC

2002-06-11 Thread Chris Winters
On Mon, 2002-06-10 at 13:29, Ray Zimmerman wrote: So how is everybody else handling URL mapping? Do others group this kind of data together with fonts, colors, etc? And where do you define it? As Perrin mentioned, OpenInteract does this by allowing individual packages (distributable

Re: separating C from V in MVC

2002-06-11 Thread James A Duncan
On Tuesday, June 11, 2002, at 01:37 PM, Chris Winters wrote: On Mon, 2002-06-10 at 13:29, Ray Zimmerman wrote: So how is everybody else handling URL mapping? Do others group this kind of data together with fonts, colors, etc? And where do you define it? A single mod_perl handler catches

Re: separating C from V in MVC

2002-06-11 Thread Ward Vuillemot
I know we are straying WOT, but I would love to get a better feel for XML, XSLT and AxKit. There are a lot of different systems out there. . .and part of me wants to just do it my way (in large part to learn), but I also realize that I really want to get to the business of also being

Re: separating C from V in MVC

2002-06-11 Thread Matt Sergeant
On Tue, 11 Jun 2002, Ward Vuillemot wrote: I know we are straying WOT, but I would love to get a better feel for XML, XSLT and AxKit. There are a lot of different systems out there. . .and part of me wants to just do it my way (in large part to learn), but I also realize that I really want

Re: separating C from V in MVC

2002-06-11 Thread Perrin Harkins
Ward Vuillemot wrote: I know we are straying WOT, but I would love to get a better feel for XML, XSLT and AxKit. Barrie Slaymaker has written a couple of articles on perl.com that serve as a good intro to AxKit. - Perrin

Re: separating C from V in MVC

2002-06-11 Thread Perrin Harkins
John Hurst wrote: Still, I don't think that replacing this: Location /search SetHandler perl-script PerlHandler Controller::Search /Location with this: [% Ctrl.Search() %] makes Controller::Search any less a controller. You're right. It just looks kind of odd to me,

Re: separating C from V in MVC

2002-06-11 Thread John Siracusa
On 6/11/02 12:46 PM, Perrin Harkins wrote: John Hurst wrote: Still, I don't think that replacing this: Location /search SetHandler perl-script PerlHandler Controller::Search /Location with this: [% Ctrl.Search() %] makes Controller::Search any less a controller. You're

Re: separating C from V in MVC

2002-06-11 Thread Valerio_Valdez Paolini
On Tue, 11 Jun 2002, John Siracusa wrote: You're right. It just looks kind of odd to me, invoking a template for something that is not a display-related task. It looks like the way people typically do MVC in Mason or Embperl, with a first template that doesn't do anything but invoke a

Re: separating C from V in MVC

2002-06-11 Thread Ron Pero
At 01:01 PM 06/11/02 -0400, John Siracusa wrote: On 6/11/02 12:46 PM, Perrin Harkins wrote: John Hurst wrote: Still, I don't think that replacing this: Location /search SetHandler perl-script PerlHandler Controller::Search /Location with this: [% Ctrl.Search() %] makes

Re: separating C from V in MVC

2002-06-11 Thread Gerald Richter
[% Ctrl.Search() %] makes Controller::Search any less a controller. You're right. It just looks kind of odd to me, invoking a template for something that is not a display-related task. It looks like the way people typically do MVC in Mason or Embperl, with a first template that

2 New Books Needed (was MVC soup, separating C from V in MVC)

2002-06-11 Thread Ron Pero
Two good books could be written on these subjects: * Mastering Design Patterns with Perl (I understand that Mastering Algorithms with Perl sells quite well) * Rapid Web Application Development with Perl The second one would describe the various application frameworks available, and related

Re: separating C from V in MVC

2002-06-11 Thread Perrin Harkins
Gerald Richter wrote: Embperl 2.0 can invoke such a controller (it's called application object there) after it has setup it's request parameters (GET/POST data, session data, etc.) and before any templates are get a chance to run. That sounds like a good addition to Embperl. Can you give a

Re: separating C from V in MVC

2002-06-11 Thread Rob Nagler
Matt Sergeant writes: There's quite a few things that are a lot harder to do with XML in plain perl (especially in SAX) than they are in XSLT. This assumes you need XML in the first place. It's trivial to manipulate Perl data structures in Perl. It's also easy to manipulate XML in Perl.

Re: separating C from V in MVC

2002-06-11 Thread Gerald Richter
Gerald Richter wrote: Embperl 2.0 can invoke such a controller (it's called application object there) after it has setup it's request parameters (GET/POST data, session data, etc.) and before any templates are get a chance to run. That sounds like a good addition to Embperl. Can you

RE: [OT] MVC soup (was: separating C from V in MVC)

2002-06-10 Thread Vuillemot, Ward W
PROTECTED]] : Sent: Friday, June 07, 2002 4:49 PM : To: Bill Moseley : Cc: [EMAIL PROTECTED] : Subject: Re: [OT] MVC soup (was: separating C from V in MVC) : : : Quoting Bill Moseley ([EMAIL PROTECTED]): : I, like many, find these discussion really interesting

Re: separating C from V in MVC

2002-06-10 Thread Ray Zimmerman
At 12:02 AM -0600 6/6/02, Rob Nagler wrote: To solve this problem, we added a letter. bOP is MVCF, where F stands for Facade. A Facade allows you to control icons, files, colors, fonts, text, and tasks. You can add other components, but we usually use text as a catch all, e.g. numeric formats.

Re: separating C from V in MVC

2002-06-10 Thread Perrin Harkins
Ray Zimmerman wrote: So how is everybody else handling URL mapping? In httpd.conf: Location /search SetHandler perl-script PerlHandler Controller::Search /Location Location /cart SetHandler perl-script PerlHandler Controller::ShoppingCart /Location Most applications only have a

Re: separating C from V in MVC

2002-06-10 Thread John Hurst
Ray Zimmerman wrote: So how is everybody else handling URL mapping? In the filesystem. Directly requested .tt files are all sent to a default template handler: Location /tt_engine SetHandler perl-script PerlHandler UAL::TTEngine /Location AddType text/tt .tt Action text/tt /tt_engine The

Re: separating C from V in MVC

2002-06-10 Thread Valerio_Valdez Paolini
Ray Zimmerman wrote: So how is everybody else handling URL mapping? On Mon, 10 Jun 2002, John Hurst wrote: In the filesystem. Directly requested .tt files are all sent to a default template handler: [...] % cat admin/proj-edit.tt [% Ctrl.DBEdit.run(ObjectType = 'Project') %] I used html

Re: separating C from V in MVC

2002-06-10 Thread Perrin Harkins
Valerio_Valdez Paolini wrote: On Mon, 10 Jun 2002, John Hurst wrote: In the filesystem. Directly requested .tt files are all sent to a default template handler: ... I used html pages with augmented tags parsed by a standard handler: Those are both interesting and may be the most

Re: separating C from V in MVC

2002-06-10 Thread James G Smith
Valerio_Valdez Paolini [EMAIL PROTECTED] wrote: Ray Zimmerman wrote: So how is everybody else handling URL mapping? On Mon, 10 Jun 2002, John Hurst wrote: In the filesystem. Directly requested .tt files are all sent to a default template handler: [...] % cat admin/proj-edit.tt [%

Re: separating C from V in MVC

2002-06-10 Thread Valerio_Valdez Paolini
On Mon, 10 Jun 2002, Perrin Harkins wrote: Those are both interesting and may be the most appropriate solution for the problems you're working on, but I wouldn't call either of them MVC. You are going straight to a view (template) and letting it drive all the decisions. In an MVC

Re: separating C from V in MVC

2002-06-10 Thread Valerio_Valdez Paolini
On Mon, 10 Jun 2002, James G Smith wrote: I'm working on a framework that will use the Mason component as the controller, Perl modules as the model, and either Mason components or TT templates called from the controller as the view. The view would output XML that would then be put through

Re: separating C from V in MVC

2002-06-10 Thread Matt Sergeant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Monday 10 June 2002 11:09 pm, Valerio_Valdez Paolini wrote: On Mon, 10 Jun 2002, James G Smith wrote: I'm working on a framework that will use the Mason component as the controller, Perl modules as the model, and either Mason components or

RE: separating C from V in MVC

2002-06-10 Thread Vuillemot, Ward W
: Really interesting, xml : appears to be : the final destination for most of us, even if now i : prefer objects. : : Ciao, Valerio That is my big question. Is XML/XSLT really the right solution? Using SAX along with having tags call handlers seems like a pretty

Re: separating C from V in MVC

2002-06-10 Thread Valerio_Valdez Paolini
On Mon, 10 Jun 2002, Matt Sergeant wrote: It seems perfect for mod_perl2. Really interesting, xml appears to be the final destination for most of us, even if now i prefer objects. There's no conflict between using XML and using Objects if you're using AxKit. Especially thanks to Simon

Re: separating C from V in MVC

2002-06-10 Thread John Hurst
Perrin Harkins wrote: On Mon, 10 Jun 2002, I wrote: In the filesystem. Directly requested .tt files are all sent to a default template handler: Those are both interesting and may be the most appropriate solution for the problems you're working on, but I wouldn't call either of them MVC.

2 New Books Needed (was MVC soup, separating C from V in MVC)

2002-06-09 Thread Ron Pero
Two good books could be written on these subjects: * Mastering Design Patterns with Perl (I understand that Mastering Algorithms with Perl sells quite well) * Rapid Web Application Development with Perl The second one would describe the various application frameworks available, and related

Re: [OT] MVC soup (was: separating C from V in MVC)

2002-06-09 Thread Perrin Harkins
What I didn't like about this is I then had to adjust the so-called controller code that decoded the user input for my request object to include these new features. But really that data was of only interest to the model. So a change in the model forced a change in the controller. No, a

Re: [Templates] Re: Separating Aspects (Re: separating C from V in MVC)

2002-06-08 Thread Tony Bowden
On Sat, Jun 08, 2002 at 08:51:48AM +0800, Gunther Birznieks wrote: I'm a huge fan of passing Date::Simple objects, which can then take a strftime format string: [% date.format(%d %b %y) %] [% date.format(%Y-%m-%d) %] And the latter does not require a programmer? Of course not. It just

RE: [OT] MVC soup (was: separating C from V in MVC)

2002-06-08 Thread Bill Moseley
At 12:13 PM 06/08/02 +0100, Jeff wrote: The responsibility of the Controller is to take all the supplied user input, translate it into the correct format, and pass it to the Model, and watch what happens. The Model will decide if the instruction can be realised, or if the system should explode.

RE: [OT] MVC soup (was: separating C from V in MVC)

2002-06-08 Thread Jeff
From: Bill Moseley [mailto:[EMAIL PROTECTED]] Sent: 08 June 2002 20:48 I've gone full circle on handling user input. I used to try to abstract CGI input data into some type of request object that was then passed onto the models. But then the code to create the request object ended up

Re: separating C from V in MVC

2002-06-07 Thread Ilya Martynov
On Thu, 6 Jun 2002 20:15:24 -0600, Rob Nagler [EMAIL PROTECTED] said: (http://sourceforge.net/projects/poop/). RN Great, another mailing list. :-) Thanks. It is not just mailing list. Don't miss http://poop.sourceforge.net/. It has nice review of most Perl OO persistence modules. -- Ilya

Re: separating C from V in MVC

2002-06-07 Thread Matt Sergeant
On Fri, 2002-06-07 at 03:15, Rob Nagler wrote: Agreed. Perl is good at text manipulation. It is imiho superior to XSLT in all spaces which XSLT claims to solve. Once you have an XML parse tree in Perl, it's trivial to write a translator to any format more correctly than XSLT. My favorite

RE: [OT] MVC soup (was: separating C from V in MVC)

2002-06-07 Thread Ged Haywood
Hi all, On Fri, 7 Jun 2002, Valerio_Valdez Paolini wrote: On Thu, 6 Jun 2002, Jeff wrote: We can take the discussion off-line if the list feels it will be too OT. No, please :) Yes, please. 73, Ged.

Re: separating C from V in MVC

2002-06-07 Thread Andy Wardley
On Thu, Jun 06, 2002 at 08:15:24PM -0600, Rob Nagler wrote: The issue here is not whether TT is a bad approach, but rather why the syntax is not Perl. One reason is that I like to have minimal syntax in the templates. One argument often used is that non-programmer find it easier to say

Re: [OT] MVC soup (was: separating C from V in MVC)

2002-06-07 Thread Perrin Harkins
Bill Moseley wrote: My MVC efforts often fall apart in the C an M separation. My M parts end up knowing too much about each other -- typically because of error conditions e.g. data that's passed to an M that does not validate. And I don't want to validate too much data in the C as the C

Re: [OT] MVC soup (was: separating C from V in MVC)

2002-06-07 Thread John Siracusa
On 6/7/02 1:04 PM, Perrin Harkins wrote: For example, if you have a form for registering as a user which has multiple fields, you want to be able to tell them everything that was wrong with their input (zip code invalid, phone number invalid, etc.), not just the first thing you encountered.

RE: [OT] MVC soup (was: separating C from V in MVC)

2002-06-07 Thread Jesse Erlbaum
Hey Perrin Bill -- You could also just punt and push this out to the controller. (Not very pure but simple to implement.) This is exactly what I had in mind. (Perhaps you can explain what you mean by not very pure.) The methods in any model module I would write would have expectations

Re: separating C from V in MVC

2002-06-07 Thread Chris
::really hesitates to step into this ... but like a train wreck ... he simply can't resist:: It's like asking why XML has different syntax and semantics from Perl. Well, if you read the XSLT spec and then look at an XSLT program, you'll see a lot of verbosity and a lot of general purpose

Re: [Templates] Re: Separating Aspects (Re: separating C from V in MVC)

2002-06-07 Thread Tony Bowden
On Thu, Jun 06, 2002 at 05:08:56PM -0400, Sam Tregar wrote: Suppose you have a model object for a concert which includes a date. On one page, the designers want to dipslay the date in a verbose way with the month spelled out, but on another they want it abbreviated and fixed length so

Re: separating C from V in MVC

2002-06-07 Thread Chris
::realizes this may be going a bit futher a field ... but tries to maintain topicality:: Chris writes: Perl handels Regex's better than C, this is one of the reasons people use Perl. I disagree. Perl's Regex processor is written in C. The difference is that it has outgrown Henry

Re: [Templates] Re: Separating Aspects (Re: separating C from V in MVC)

2002-06-07 Thread Ed
On Fri, Jun 07, 2002 at 09:14:25AM +0100, Tony Bowden wrote: On Thu, Jun 06, 2002 at 05:08:56PM -0400, Sam Tregar wrote: Suppose you have a model object for a concert which includes a date. On one page, the designers want to dipslay the date in a verbose way with the month spelled out,

Re: separating C from V in MVC

2002-06-06 Thread Andy Wardley
On Thu, Jun 06, 2002 at 12:02:47AM -0600, Rob Nagler wrote: These are the reserve words of TT: [...] Looks an awful lot like the same keywords in any general-purpose programming language. Yep, I agree. You can use it like a programming language and it gives you more than enough rope to hang

Re: Separating Aspects (Re: separating C from V in MVC)

2002-06-06 Thread wsheldah
Wardley [EMAIL PROTECTED] cc: modperl List [EMAIL PROTECTED], Template Toolkit List [EMAIL PROTECTED] (bcc: Wesley Sheldahl/Lex/Lexmark) Subject: Re: Separating Aspects (Re: separating C from V in MVC) Here's my theory: the best usage of most templating systems are virtually

Re: Separating Aspects (Re: separating C from V in MVC)

2002-06-06 Thread Perrin Harkins
Sam Tregar wrote: Now, I don't use HTML::Template::Expr. I think it's generally not such a good idea. But it's there if you want it... For posterity, and possible inclusion in the next rev of the templating tutorial, how would you recommend people handle this sort of situation without

[OT] MVC soup (was: separating C from V in MVC)

2002-06-06 Thread Bill Moseley
I, like many, find these discussion really interesting. I always wish there was some write up for the mod_perl site when all was said and done. But I guess one of the reasons it's so interesting is that there's more than one correct point of view. My MVC efforts often fall apart in the C an M

Re: [OT] MVC soup (was: separating C from V in MVC)

2002-06-06 Thread Rafiq Ismail (ADMIN)
On Thu, 6 Jun 2002, Bill Moseley wrote: Anyone have links to examples of MVC Perl code (mostly controller code) that does a good job of M and C separation, and good ways to propagate errors back to the C? http://pagekit.org,; might be interesting. Fiq

RE: [OT] MVC soup (was: separating C from V in MVC)

2002-06-06 Thread Jesse Erlbaum
Hi Bill -- I, like many, find these discussion really interesting. I always wish there was some write up for the mod_perl site when all was said and done. But I guess one of the reasons it's so interesting is that there's more than one correct point of view. I expect to complete an

Re: [OT] MVC soup (was: separating C from V in MVC)

2002-06-06 Thread Rafiq Ismail (ADMIN)
On Thu, 6 Jun 2002, Bill Moseley wrote: Anyone have links to examples of MVC Perl code (mostly controller code) that does a good job of M and C separation, and good ways to propagate errors back to the C? I'm working on my own impelmentation at the moment and am planning to have a

RE: [OT] MVC soup (was: separating C from V in MVC)

2002-06-06 Thread Jeff
From: Jesse Erlbaum [mailto:[EMAIL PROTECTED]] Sent: 06 June 2002 19:34 To: 'Bill Moseley'; [EMAIL PROTECTED] First off, it is less of an MVC crime to combine your Model and Controller than it is to combine your Controller and View. I disagree - coupling Controller and Model

Re: Separating Aspects (Re: separating C from V in MVC)

2002-06-06 Thread Sam Tregar
On Thu, 6 Jun 2002, Perrin Harkins wrote: For posterity, and possible inclusion in the next rev of the templating tutorial, how would you recommend people handle this sort of situation without using HTML::Template::Expr? Suppose you have a model object for a concert which includes a date.

RE: [OT] MVC soup (was: separating C from V in MVC)

2002-06-06 Thread Jeff
From: Bill Moseley [mailto:[EMAIL PROTECTED]] Sent: 06 June 2002 19:06 To: [EMAIL PROTECTED] My MVC efforts often fall apart in the C an M separation. My M parts end up knowing too much about each other -- typically because of error conditions e.g. data that's passed to an M that

Re: [OT] MVC soup (was: separating C from V in MVC)

2002-06-06 Thread Rob Nagler
Bill Moseley writes: Anyone have links to examples of MVC Perl code (mostly controller code) that does a good job of M and C separation, and good ways to propagate errors back to the C? I humbly (do believe that ;-) submit http://petshop.bivio.biz Every page contains the control logic which

Separating Aspects (Re: separating C from V in MVC)

2002-06-05 Thread Andy Wardley
Continuing from the thread on the modperl mailing list: On Sun, Jun 02, 2002 at 05:04:01PM -0400, Sam Tregar wrote: I don't think the standard HTML::Template has support for formatting numbers, dates, etc. And thank the sweet lord it doesn't! HTML::Template is a do one thing and do it

Re: separating C from V in MVC

2002-06-05 Thread Andy Wardley
On Thu, May 30, 2002 at 05:42:23PM -0400, Jesse Erlbaum wrote: It has been my experience that applying a design pattern such as MVC is not a panacea. [...] My point: My code isn't good because I apply some pattern to it. It may be good, and it may resemble a pattern -- but those two things

Re: separating C from V in MVC

2002-06-05 Thread Andy Wardley
On Fri, May 31, 2002 at 12:21:45PM -0400, Jesse Erlbaum wrote: It's the addition tricks which bug me out. With those two words you establish the mother of all slippery slopes to architecture oblivion. True. And in your Perl code you can also write all sorts of dangerous code that totally

  1   2   >