Re: return(bless $rant, $class) || Fwd: PHP vs Perl
--- drieux [EMAIL PROTECTED] wrote: Ovid, I love the smell of 'primate-ism' It could be merely the way that you are presenting the problem - and a desire to defend an anachronistic model of MVC, based upon the underlying 'primate-ism', and the scary thought of 'recursion' in conceptual models that might mean sticking the primate in a chair, and leaving the heavy lifting to sentient life forms. [snip] Hi drieux, Clearly I need to read my email more frequently. It looks like there was a bit of a miscommunication and in rereading what I originally wrote, I think the problem lies in my assuming too much background information and, as a result, not explaining as much as I should have. I've been bitten by that before and I can only apologize and offer the following clarification: The only point that I was intending to make was that the MVC model that people discuss had it's roots in the MVC model as described by the GoF (Gang of Four -- the Design Patterns authors) and if people are learning about MVC from the discussion on this list, it is probably a good thing that they know a bit of the history of said pattern rather than assume that it was coughed up from the void fully formed in the way that it's being discussed on this list. I am not saying that the GoF presented the only correct view of how MVC should work (in fact, I object to a common interpretation that DP can only be used for OO languages). However, the original point of Design Patterns (the architectural ones preceeding the programmatic ones) was to give people a common vocabulary so they can discuss a situation and know what each other is talking about. I'm sure plenty of us have had conversations where we say foo, the other person says foo, but the conversation goes nowhere. That's quite often due to each person having a different conceptual idea of what foo is. If the people on this list are handed a version of MVC for the Web and have no idea of the history and origins of said pattern, then someone who only knows it from the GoF description is going to have a very confused conversation with someone who doesn't know the GoF description. No either description is necessarily good or bad, but they have significantly different implementations and that's an important difference. Considering that another name for the MVC pattern is the Observer and that the term Observer doesn't make much sense when using the Web, I think that's important to know. In other words, if everyone starts using similar terms, they should have similar meanings or at least know where their definitions differ. That's all I meant. Sorry for the confusion. Cheers, Ovid = Silence is Evilhttp://users.easystreet.com/ovid/philosophy/indexdecency.htm Ovid http://www.perlmonks.org/index.pl?node_id=17000 Web Programming with Perl http://users.easystreet.com/ovid/cgi_course/ __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: return(bless $rant, $class) || Fwd: PHP vs Perl
On Sunday, Jul 27, 2003, at 20:03 US/Pacific, Todd W. wrote: Drieux [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [..] But First off - COOL RANT! I was hoping that _some_ day I could string a few sentences together as well as you do =0) [..] flattery will get you out of some problems, but practice and perceverance is a better strategy [..] I agree, as long as you agree that the more one understands the CS theory, the less voodoo there is in the implementation. IF and only IF 'understanding the technical stuff' from comp-sci really is useful for the 'implementation phase'. May I recommend Real Genius (1984) as an alternative study in the problems of 'science v. technology'. Given that basically most of the current 'academic work' in computer science is running anywhere up to a decade back of there the 'technology' is in industry - the New Guy on the block may be better served to 'get a gig' and hang with the BigGeek, Buy the Books, read them, rather than eat them, and do their own 'experimentation'. Given some of the stuff that we have seen come out of the academic discussions about this, that and the next thing, I am also not at all sure that some of the 'implementation' is really worth the candel. One might argue that the Java adoption of 'templates', which they call 'generics' in the hope that most folks are not going to notice the absorption of the C++ effort to work around the problems and unpleasantries of the 'multi-pel klass inheritence' model that was suppose to be fixed in 'java' with it's extends and implements, efforts to keep Java out of the FoxWorthy set of jokes about 'family trees with more than one loop in them' Uh, well, establishes that some academic debates, when they get to the implementation phase, do not always add 'value' in the way that everyone was hoping they could/should/would In like manner, the fact that one CAN make PHP stand alone 'scripts' that are not specifically used to create HTML web-pages, would establish that... one SHOULD implement things that way? Or would it be simpler to restore the kinder, gentler, more simpler 'strongly typed v. weakly typed' computer language academic debates in this space and decide that we should always follow the Ivory Tower [..] I think that most languages are supportive of MVC as a design pattern, [..] as well as many other techno-babble-phrases... would it be impolite of me to raise the scary support for the phrase 'refactoring' rather than 'recoding' since the former sounds less threatening to both other coders and mangelment. while they are, mostly, dealing with the reality of needing to 'recode' Either because they did not start with any design pattern save 'the big ball of mud' I had this glob of code, and I globulate more code on it or as a part of the naturual selection, they have come back to the code and gone YEE, that so smells, if my professional peers were to peek at that, they would make rude noises in my direction and ask me if my mommy dresses me funny drieux to UnterStumpenFumbler c. 2003, all rights reserved { yes, you will have to formally cite that with full legal attribution, since, well, yes, I am the author of it, and I plan to defend my IP, even if my mommy does dress me funny... } But as I believe it was Ovid noted, there are 'meme drifts' where a 'token' started out actually exporting meaningful content and simply decays into the 'KultBuzzPhraseDuJure' So you will forgive me if I do not opt to jump onto the new band wagon that 'all developers' should wax their surfBoards, because foo is the Next Big Wave that will solve all problems end to end, as I will counter, your counter to my counter below... { not that I am being merely contrarian... } [..] p4: given that hacking in perl does not require MVC as a design pattern, but one can learn the hard way to support it We have AxKit, but I wouldnt like to call it the canonical perl I so love the fact that slowly but surely the One True Perl Orthodoxy is finally being able to create the canonical perl yourPhraseHere. insertThingiePooHere MVC pattern. Most familiar with it probably would though. ASP.NET has MVC with its code behind concept. Im not aware of any other MVC based platforms right off. You will forgive me the comedy of giggling at you, nothing personal you understand, but we have watched UML - universal modelling language evolve from the academic discussions about the need to have a common 'tokenization system' to the supposed automation of 'write it in UML, turn the crank and out comes code' Without always pausing to answer the question, Ok, so this idea can be discussed in an 'OO' manner, does that mean that it MUST be implemented in insertIdeologicallyKorrektThingiePooHere and
Re: return(bless $rant, $class) || Fwd: PHP vs Perl
Drieux [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] So you will forgive me if I do not opt to jump onto the new band wagon that 'all developers' should wax their surfBoards, because foo is the Next Big Wave that will solve all problems end to end, as I will counter, your counter to my counter below... Remember, I am of the this AND that philosophy, so you can walk, run, dirt bike, or staddle two bandwagons at the same time if you like, and, as long as you get where you are going, I will agree that it was done correctly. { not that I am being merely contrarian... } you? nah!!! =0) [..] p4: given that hacking in perl does not require MVC as a design pattern, but one can learn the hard way to support it We have AxKit, but I wouldnt like to call it the canonical perl I so love the fact that slowly but surely the One True Perl Orthodoxy is finally being able to create the canonical perl yourPhraseHere. insertThingiePooHere I meant canonical as in the ususal way one accomplishes something rather than the perl god's doctrine on how to accomplish something As we perlers know, when we ask the gods how to do something, they start uttering, as if in tounges, timtoady!, something we perl diciples understand as, theres more than one way to do it. Also, I hope youre reading, as qoted that, I WOULDN'T like to call it the canonical perl MVC pattern... MVC pattern. Most familiar with it probably would though. ASP.NET has MVC with its code behind concept. Im not aware of any other MVC based platforms right off. Todd W -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: return(bless $rant, $class) || Fwd: PHP vs Perl
Drieux [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Todd either Paused for more MountainDew or had a Moment: [..] Those last two paragraphs were total rant, and I probably have no idea what I'm talking about, but they are getting posted anyway ;0) [..] I would like be so totally opposed to your position if it were not for most of the dark horror of where I so totally agree with you But First off - COOL RANT! I was hoping that _some_ day I could string a few sentences together as well as you do =0) Unfortunately, I dont think I have accomplished it yet!!! p0: let us not confused science, technology and VOODOO. Computer Science is wonderful for providing a theoretical intellectual underpinning to hashing algorithms, while a specific instance of that as a technology of course is perl's 'hash' data structure, the actual 'coolness' of course lies in using it in strange and arcane ways that border on Voodoo. bless this ref... I agree, as long as you agree that the more one understands the CS theory, the less voodoo there is in the implementation. p2: I am very nervous that folks are noticing that at present PHP is not supportive of MVC as a design pattern - and that may be a limiting factor - but as you have also noted, given the gaggelation of globulated together 'stuff' - eg: ASP+HTML+SQL - this means that there are still great employment opportunities refactoring that stuff into maintainable code. So we should support the spread of PHP without MVC as a basis for more work refactoring the code??? return unless defined( $ref ); I think that most languages are supportive of MVC as a design pattern, but each language's advocates and tutorial designers are not. All intro tutorials are rightfully simple and stratightforward example usages of a technology. But as we have been discussing, most developers, it seems, take this as the end-all be-all of app development technology, declare themselves proficient, and consider the tutorial reason enough to add to the expert column on one's resume. This leads right to the next comment: p4: given that hacking in perl does not require MVC as a design pattern, but one can learn the hard way to support it We have AxKit, but I wouldnt like to call it the canonical perl MVC pattern. Most familiar with it probably would though. ASP.NET has MVC with its code behind concept. Im not aware of any other MVC based platforms right off. Todd W. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: return(bless $rant, $class) || Fwd: PHP vs Perl
On Thursday, Jul 24, 2003, at 21:46 US/Pacific, Camilo Gonzalez wrote: [..] Okay, this is a beginner's list. What the hell is MVC? How do you hash an algorithm? Great Questions! MVC - Model,View,Controller it is a design pattern, a way of 'looking at' the problem and understanding which parts belong where. http://www.google.com/search?hl=enie=ISO-8859- 1q=Model%2CView%2CControllerbtnG=Google+Search specifically you might start with http://st-www.cs.uiuc.edu/users/smarch/st-docs/mvc.html Which while a discussion dating back to the original copyrighted date of 1987, and specifically aimed at the 'smalltalk-80' - SHOULD be reviewed in any case in which you have a 'presentation layer' - the view, that deals with the graphical stuff, a controller that deals with 'input' from the 'mouse,keyboard,etc' and a 'model' that is 'changed' in in it's behavior and/or content by the controller. In theory 'HTML' was suppose to give us this 'common' presentation layer, and 'cgi code' would give us a common approach as to how we do the 'controller' foo but all too often we all collectively zone out on 'what exactly is the Model' that we are mangalating. Too many of us have victimized ourselves by trying to wedgie it all into one thing, rather than respecting the 'differences' and so come back to the 'original solution' and find it hard to clean up what we messed up in the first place in the race to 'get the product out the door'. So a core part of why we keep bringing it back up in groups like this is to point people in the general direction of that 'solution' - and to remind them to step back and review the basics from time to time. As for hashing and algorithms, the idea is to remind folks that there IS more than one 'hashing algorithm', and all of that cool 'comp sci' stuff - about how to handle things like 'hashing collision' - but that while that 'intellectually coool stuff' is 'cool' at a purely pedantic level, in the cold of the middle of the night, it remains simpler to just get ANY hashing algorithm into play - and perl has done a reasonably good enough solution for most cases... One of my pet FAVORITE tricks to use is a 'callForm' key - where I hide the next in sequence value as a 'hidden input' and then use that in the code to know which function/method to call: if( defined($request) $request =~ m/^POST|GET|HEAD$/) { my $queryString = ($request eq 'POST' )? STDIN : $ENV{'QUERY_STRING'}; my $qs = unpack_qstring_w_dupes($queryString); my $formAction = { stop= \doDaemon, start = \doDaemon, showOptions = \showOptions, hqConfigd = \showOptions }; my $callForm = $qs-{callForm} || ''; $page = ( $callForm defined($formAction-{$callForm}) ) ? $formAction-{$callForm}-($qs) : BogusBody( $qs, HqConfigd_Horror, You Should Not See This ); } being a basic form of the solution. the kicker trick is that $formAction, which is a hash of functions references that I will ultimately call with $formAction-{$callForm}-($qs) Think of it as a mini 'OO' trick without the constructor. Remember that in perl an OO thingie is merely a blessed reference, that returns a reference to a stack of methods and perchance some internal data stuff. Most folks use 'hashes' solely as 'associative arrays' unlike the usual 'array' where one 'indexes' into it with an 'integer value' - a hash allows one to 'index' into the 'associative array' with a 'key value' which need not be an 'integer value' - and one leaves it up to the 'hashing algorithm' to sort out where the 'value' is for the 'key'. In this case rather than having say a 'string', we return a reference that is the 'address' of some 'function/method'... Where this can get 'totally psycho' is out at the edge where it is faster, cheaper, and simpler to it in the form: if( defined($request) $request =~ m/^POST|GET|HEAD$/) { my $queryString = ($request eq 'POST' )?STDIN:$ENV{'QUERY_STRING'}; my $query = unpack_query_string($queryString); my $action = Wetware::Hq::URL_DB::db_get_actions(); $page = ( defined($query-{verb}) exists( $action-{$query-{verb}})) ? $action-{$query-{verb}}-($query) : Wetware::Hq::URL_DB::Maint::check_maintenance($query); } In this case, rather than implement the 'traditional' model of a 'perl blessed object' - as if it were 'OO' i just expressly call out a function that returns a hash of references to functions, check first to see if the one I want is
Re: return(bless $rant, $class) || Fwd: PHP vs Perl
Please tell me what MVC means. Thanks. Teddy - Original Message - From: Camilo Gonzalez [EMAIL PROTECTED] To: drieux [EMAIL PROTECTED] Cc: cgi cgi-list [EMAIL PROTECTED] Sent: Friday, July 25, 2003 7:46 AM Subject: Re: return(bless $rant, $class) || Fwd: PHP vs Perl drieux wrote: Todd either Paused for more MountainDew or had a Moment: [..] Those last two paragraphs were total rant, and I probably have no idea what I'm talking about, but they are getting posted anyway ;0) [..] I would like be so totally opposed to your position if it were not for most of the dark horror of where I so totally agree with you But First off - COOL RANT! p0: let us not confused science, technology and VOODOO. Computer Science is wonderful for providing a theoretical intellectual underpinning to hashing algorithms, while a specific instance of that as a technology of course is perl's 'hash' data structure, the actual 'coolness' of course lies in using it in strange and arcane ways that border on Voodoo. bless this ref... p1: Your complaint, amusement, at the gooder and badder of Perl's OO modality, and it's usefulness with providing 'name space management' is phrase_here. return $ref_to_hash_of_function_refs ; p2: I am very nervous that folks are noticing that at present PHP is not supportive of MVC as a design pattern - and that may be a limiting factor - but as you have also noted, given the gaggelation of globulated together 'stuff' - eg: ASP+HTML+SQL - this means that there are still great employment opportunities refactoring that stuff into maintainable code. So we should support the spread of PHP without MVC as a basis for more work refactoring the code??? return unless defined( $ref ); p3: When folks go back and review when HTTP 1.1 came out, and when further work on HTML 4.0 ceased in favor of XHTML and the quest for tokens with X in it, a part of the problem was a complete lack of any unifying standard and/or any real idea what the core technologies are/were/willbe... die undefined token unless $web_service-reality_check(@cosmic_void); p4: given that hacking in perl does not require MVC as a design pattern, but one can learn the hard way to support it ciao drieux --- Okay, this is a beginner's list. What the hell is MVC? How do you hash an algorithm? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]