You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(31) |
Feb
(4) |
Mar
(39) |
Apr
(4) |
May
(36) |
Jun
(6) |
Jul
(11) |
Aug
(6) |
Sep
(9) |
Oct
(8) |
Nov
(4) |
Dec
(1) |
2004 |
Jan
(11) |
Feb
|
Mar
(1) |
Apr
(8) |
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Jason S. <jsw...@ya...> - 2003-05-05 02:41:17
|
I altered include.php to use require_once instead of include. Also, require_once is a PHP directive rather than a function, so the parenthesis are optional and I have left them off. Lastly, the ext/Xml.php is not required for Phrame itself, but rather only for some of the Phrame examples that use xml. Since this is the case, I think it would be more appropriate to have those applications using that file perform the include explicitly. $ diff include.php include.jes.php 2,13c2,13 < include('util/Object.php'); < include('util/ArrayList.php'); < include('util/HashMap.php'); < include('util/Stack.php'); < include('util/ListIterator.php'); < include('ext/Xml.php'); < include('Constants.php'); < include('Action.php'); < include('ActionController.php'); < include('ActionForm.php'); < include('ActionForward.php'); < include('ActionMapping.php'); --- > require_once 'util/Object.php'; > require_once 'util/ArrayList.php'; > require_once 'util/HashMap.php'; > require_once 'util/Stack.php'; > require_once 'util/ListIterator.php'; > //require_once 'ext/Xml.php'; > require_once 'Constants.jes.php'; > require_once 'Action.php'; > require_once 'ActionController.jes.php'; > require_once 'ActionForm.php'; > require_once 'ActionForward.php'; > require_once 'ActionMapping.php'; __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-05-05 02:36:53
|
I modified constants.php to allow for no errors with error_reporting(E_ALL); in the actual define statement, the constant name needs to be a string in order to not receive a notification. Constants.php: <?php //request contant(s) define('_ACTION', 'action'); define('_VIEW', 'view'); //session constant(s) define('_CONTROLLER', '_controller'); define('_ERRORS', '_errors'); define('_FORM', '_form'); //mappings constant(s) define('_ACTION_FORMS', '_actionForms'); define('_ACTION_MAPPINGS', '_actionMappings'); define('_TYPE', '_type'); define('_NAME', '_name'); define('_INPUT', '_input'); define('_VALIDATE', '_validate'); define('_ACTION_FORWARDS', '_actionForwards'); define('_PATH', '_path'); define('_REDIRECT', '_redirect'); //options constant(s) define('_CACHE', '_cache'); define('_ERROR_REPORTING', '_errorReporting'); define('_ERROR_HANDLER', '_errorHandler'); ?> __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-05-05 02:34:33
|
Hello Phrame List, I have recently received several requests off list for "development" versions of Phrame. Arnold owns the Phrame project, so it is up to him to decide what to commit to CVS on sourceforce. In the spirit of open source, I would like to share with everyone changes I have felt were needed to Phrame in my experience using it as a platform for the development of several intranet applications. I have also written an article for php|architect (http://www.phparch.com) which includes some of these "bare minimum" modifications. I will follow up this message with separate posts, one for each file I have modified or added. Jason __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com |
From: Paul W. <wol...@sf...> - 2003-05-01 22:55:23
|
On Thursday, May 1, 2003, at 01:32 PM, Jason Sweat wrote: > --- Paul Wolstenholme <wol...@sf...> wrote: >> I noticed that the CVS repository hasn't been touched for about 4 >> weeks >> and activity on the list has died down a bit. Is the project still >> active? > > And that source code is the same as the tarball released last November. > >> I was also wondering if anyone has designed any sites that are under a >> high load. How does it handle the load? > > I would not qualify any of my implementation as "high load" (they are > all > basically intranet applications with moderate usage, I was more > interested in > flexibility and long term maintainability for the code). > > I would recommend using some kind of a php accelerator no matter where > you > deploy. I agree. At recent Vancouver PHP users group meeting, a simple benchmark test indicated that APC2 appeared a bit quicker than IonCube. Both were over a 100 requests/sec quicker than no accelerator. APC2 is free and open-source. > >> "I have one major issue with the package, namely all actions currently >> get loaded into >> memory even though only one may be needed." > > I did modify to only load the models/views/actions/forms as required. > Subsequently I read a php tuning article that recommended nearly the > opposite: > load all of your classes at once, even if you do not intent to use > them, > because your apache process already has enough ram allocated to PHP to > hold > them and disk access is expensive. I have not seriously bench marked > them to > know where to go for sure. Sometimes performance tuning activities seem counter intuitive. For example, I heard Rasmus recommend setting Apaches Max clients to around 25. I've always set mine to 75-100. Setting it too high, divides CPU time too much thereby degrading performance. At his talk he also pointed out two handy tools that you may be interested in checking out. http_load for load testing and the PEAR:Pecl for application profiling. > > An article I wrote regarding MVC and Phrame will appear in the May > issue of > PHP|Architect (http://www.phparch.com/). I included the bare minimum > changes > that I made to make Phrame "livable" in a real environment (i.e. no > errors > reported with E_ALL, and exit php after header() ). I would like to > see Arnold > commit some of these changes, or post his new "development" version, > but he > appears to be busy and I have not seen much from him in this regard. > > I have just completed a more robust example application using Phrame > for MVC, > Postgres for the models business logic (accessed using ADOdb), and > Smarty for > views. I intended to write up this application into an article that > would > appear in the July edition of php|a. This version uses my more heavily > modified version of Phrame with only loading required class files, > using a > default action, and the ability to disable the error handler (very > handy for > debugging). I belive all my change are backwards compatible, and I > would be > happy to share them if you are interested. I look forward to reading your article. I would also be interested in checking out your example. I'm one of those thick people who learn best by example. I've never used ADOdb. Are there any reasons to use it over the PEAR::DB class? Smarty is cool. I have used it on a few projects. Lately, I have been trying the ween myself off template parsing engines after hearing a talk by Rasmus Lerdorf. His rational against them seemed to make sense: a) PHP is a template parser b) you end up putting the same functions in the PHP parser that exist in PHP (if statements, for loops, etc). Using PHP for views requires a bit more descipline. It is easy to cheat in the same way when using JSP in Struts. But, I think as long as you restrict yourself in only using PHP in your views that directly relate to representation activities (e.g. no database calls ), the application should perform a bit better. > > Regards, > > Jason > > __________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo. > http://search.yahoo.com > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel |
From: Jason S. <jsw...@ya...> - 2003-05-01 20:32:55
|
--- Paul Wolstenholme <wol...@sf...> wrote: > I noticed that the CVS repository hasn't been touched for about 4 weeks > and activity on the list has died down a bit. Is the project still > active? And that source code is the same as the tarball released last November. > I was also wondering if anyone has designed any sites that are under a > high load. How does it handle the load? I would not qualify any of my implementation as "high load" (they are all basically intranet applications with moderate usage, I was more interested in flexibility and long term maintainability for the code). I would recommend using some kind of a php accelerator no matter where you deploy. > "I have one major issue with the package, namely all actions currently > get loaded into > memory even though only one may be needed." I did modify to only load the models/views/actions/forms as required. Subsequently I read a php tuning article that recommended nearly the opposite: load all of your classes at once, even if you do not intent to use them, because your apache process already has enough ram allocated to PHP to hold them and disk access is expensive. I have not seriously bench marked them to know where to go for sure. An article I wrote regarding MVC and Phrame will appear in the May issue of PHP|Architect (http://www.phparch.com/). I included the bare minimum changes that I made to make Phrame "livable" in a real environment (i.e. no errors reported with E_ALL, and exit php after header() ). I would like to see Arnold commit some of these changes, or post his new "development" version, but he appears to be busy and I have not seen much from him in this regard. I have just completed a more robust example application using Phrame for MVC, Postgres for the models business logic (accessed using ADOdb), and Smarty for views. I intended to write up this application into an article that would appear in the July edition of php|a. This version uses my more heavily modified version of Phrame with only loading required class files, using a default action, and the ability to disable the error handler (very handy for debugging). I belive all my change are backwards compatible, and I would be happy to share them if you are interested. Regards, Jason __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com |
From: Tony B. <to...@to...> - 2003-05-01 20:12:35
|
Paul, I've fallen off the list a bit as I had a deadline to meet so I ran with a off-shoot of Phrame. Regarding your specific question, I do believe Jason has modified the code to only load the actions needed to process the current request. I would give Phrame a try, particularly if you are interested in a Struts-style MVC implementation. If you don't mind a bit of a departure from the struts design, drop me a note and I can share what I have with you. --Tony On Thu, 1 May 2003, Paul Wolstenholme wrote: > Hi, > > I'm beginning a new PHP/Postgres project and discovered phrame as one > of the couple existing MVC design frameworks for PHP. I haven't played > with the code yet but I had a couple questions. > > I noticed that the CVS repository hasn't been touched for about 4 weeks > and activity on the list has died down a bit. Is the project still > active? > > I was also wondering if anyone has designed any sites that are under a > high load. How does it handle the load? > > I noticed that there was quite a an discussion which seemed to be > initiated by Tony Bipps. I was wondering if any the ideas have made it > into CVS. For example, > > "I have one major issue with the package, namely all actions currently > get loaded into > memory even though only one may be needed." > > Has anyone on the list any experience using PAAS for authentication > (a PHP implementation of JAAS a Java implementation of PAM) developed > by another MVC PHP crew at http://amb.sourceforge.net/ > > Cheers, > Paul > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel > -- Tony Bibbs "I guess you have to remember that those who don't to...@to... hunt or fish often see those of us who do as harmlessly strange and sort of amusing. When you think about it, that might be a fair assessment." --Unknown |
From: Paul W. <wol...@sf...> - 2003-05-01 19:59:28
|
Hi, I'm beginning a new PHP/Postgres project and discovered phrame as one of the couple existing MVC design frameworks for PHP. I haven't played with the code yet but I had a couple questions. I noticed that the CVS repository hasn't been touched for about 4 weeks and activity on the list has died down a bit. Is the project still active? I was also wondering if anyone has designed any sites that are under a high load. How does it handle the load? I noticed that there was quite a an discussion which seemed to be initiated by Tony Bipps. I was wondering if any the ideas have made it into CVS. For example, "I have one major issue with the package, namely all actions currently get loaded into memory even though only one may be needed." Has anyone on the list any experience using PAAS for authentication (a PHP implementation of JAAS a Java implementation of PAM) developed by another MVC PHP crew at http://amb.sourceforge.net/ Cheers, Paul |
From: Mike C. <mi...@bu...> - 2003-04-30 16:52:39
|
Hi Jason, Good stuff. I'm just in the progress of getting my boss at work to pay for a subscription to php|a after reading the free issue. Thanks for the tip-off ;-) Bye, Mike C. > -----Original Message----- > From: phr...@li... > [mailto:phr...@li...] On Behalf > Of Jason Sweat > Sent: 30 April 2003 04:22 > To: mi...@bu...; phr...@li... > Subject: Re: [Phrame-devel] New to MVC/phrame concept > > > Hi Mike, > > I have just completed writing an article that is an > introduction to MVC and contains an example of implementing > Phrame with Smarty for views. It will be published in the > May issue of PHP|Architect (http://www.phparch.com). Not a > good answer for today, but should help in a week or so :) > > Regards, > > Jason > > > --- Mike Carter <mi...@bu...> wrote: > > Hi people, > > > > I think my question(s) would be more suited to the "user" list of > > Phrame but judging from the activity there appears to be > nobody there? > > ...or nobody using that mailing list. > > > > From the Phrame website the project sounds great, just what I would > > like to use for starting my web applications off. However, after > > printing out and reading the documentation on the website I > am non the > > wiser about where to actually start when building a new app on the > > Phrame framework?!! > > > > The XML helloworld example doesn't seem to work on my > install either > > (I get no errors, just a blank page) XSL etc is installed > and running > > fine. > > > > I've read through a few of the recent emails to the > development list > > and progress sounds interesting in the evolvment of Phrame. > > > > However where can I learn more on how to use this framework > properly? > > Such as a getting started tutorial maybe? A manual is all well and > > good for reference but it doesn't really mention what files > go where, > > how and what the $mappings array content is about. Or have > I missed > > something? > > > > I have no previous experience with MVC/Struts/JSP ... Previously I > > have been using the phpShop 'Core' framework for my web > applications. > > > > Hope somebody could spare a moment to help get me started using > > Phrame. > > > > Kind regards, > > > > > > _________________________________________ > > Mike Carter > > ICQ#: 29173597 > > More ways to contact me: http://wwp.icq.com/29173597 > > _________________________________________ > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Phrame-devel mailing list > > Phr...@li... > > https://lists.sourceforge.net/lists/listinfo/phrame-devel > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel > > |
From: Jason S. <jsw...@ya...> - 2003-04-30 03:22:03
|
Hi Mike, I have just completed writing an article that is an introduction to MVC and contains an example of implementing Phrame with Smarty for views. It will be published in the May issue of PHP|Architect (http://www.phparch.com). Not a good answer for today, but should help in a week or so :) Regards, Jason --- Mike Carter <mi...@bu...> wrote: > Hi people, > > I think my question(s) would be more suited to the "user" list of Phrame > but judging from the activity there appears to be nobody there? ...or > nobody using that mailing list. > > From the Phrame website the project sounds great, just what I would like > to use for starting my web applications off. However, after printing > out and reading the documentation on the website I am non the wiser > about where to actually start when building a new app on the Phrame > framework?!! > > The XML helloworld example doesn't seem to work on my install either (I > get no errors, just a blank page) XSL etc is installed and running fine. > > I've read through a few of the recent emails to the development list and > progress sounds interesting in the evolvment of Phrame. > > However where can I learn more on how to use this framework properly? > Such as a getting started tutorial maybe? A manual is all well and good > for reference but it doesn't really mention what files go where, how and > what the $mappings array content is about. Or have I missed something? > > I have no previous experience with MVC/Struts/JSP ... Previously I have > been using the phpShop 'Core' framework for my web applications. > > Hope somebody could spare a moment to help get me started using Phrame. > > Kind regards, > > > _________________________________________ > Mike Carter > ICQ#: 29173597 > More ways to contact me: http://wwp.icq.com/29173597 > _________________________________________ > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com |
From: Mike C. <mi...@bu...> - 2003-04-29 23:55:07
|
Hi people, I think my question(s) would be more suited to the "user" list of Phrame but judging from the activity there appears to be nobody there? ...or nobody using that mailing list. From the Phrame website the project sounds great, just what I would like to use for starting my web applications off. However, after printing out and reading the documentation on the website I am non the wiser about where to actually start when building a new app on the Phrame framework?!! The XML helloworld example doesn't seem to work on my install either (I get no errors, just a blank page) XSL etc is installed and running fine. I've read through a few of the recent emails to the development list and progress sounds interesting in the evolvment of Phrame. However where can I learn more on how to use this framework properly? Such as a getting started tutorial maybe? A manual is all well and good for reference but it doesn't really mention what files go where, how and what the $mappings array content is about. Or have I missed something? I have no previous experience with MVC/Struts/JSP ... Previously I have been using the phpShop 'Core' framework for my web applications. Hope somebody could spare a moment to help get me started using Phrame. Kind regards, _________________________________________ Mike Carter ICQ#: 29173597 More ways to contact me: http://wwp.icq.com/29173597 _________________________________________ |
From: Tony B. <to...@to...> - 2003-04-03 16:08:32
|
Ok, I have moved the concept of a form class into my code base. I have also implemented support for an XML config file which, at least for me, seems much more readable and easier to write documentation against. I have done some research and I now appreciate the difference between the original ActionForm (ala struts) and what I have implemented. Having a validate method in the form is valuable but, IMHO, doesn't encapsulate that logic properly for best reuse. In the code I have been working on, validation logic is no different than any other business logic. Thus it is quite trivial to have a validation command that can be applied to one or more views which, I feel personally, makes reuse more plausible. Also, I have done more philosophical thinking and I can appreciate the desire by some to adhere strictly to Struts. I have reserved myself to being Ok if the code i have developed is considered 'struts-ish'. Anyway, this code, in my best estimation can be considered more of an RC1. I'm going to generate the phpDoc documentation, create a tarball and let you all take another look. -- Tony Bibbs "I guess you have to remember that those who don't to...@to... hunt or fish often see those of us who do as harmlessly strange and sort of amusing. When you think about it, that might be a fair assessment." --Unknown |
From: Jason S. <jsw...@ya...> - 2003-03-30 13:47:22
|
--- Arnold Cano <arn...@ya...> wrote: > > Also, have you thought about modifying the actions > > so it separates post > > requests form get requests? I ask because it is > > quite feasible that an > > app would not want to process an get requests and in > > both packages there > > is no distinction since the $_REQUEST superglobal is > > used. > > I can see where not being able to determine the > difference between get/post could be a problem. Perhaps the ActionForm class fould be altered to contain 4 HashMaps, you could continue to initialize it with the $_REQUEST variable, had have the Get() method return from that HashMap. You could add an Init() method, that the ActionController would alway call after creating the form instance, that would initialize several other HashMap vars with $_GET, $_POST and $_COOKIE. These might be accessed with ActionForm::GetG(), ::GetP() and GetC(). BTW, one feature I added to the HashMap was the ability to pass a default value if no corresponding value was found: function get($key, $default='__PHRAME_DEFAULT__') { if ($this->containsKey($key)) { return $this->_values[$key]; } if ($default != '__PHRAME_DEFAULT__') { return $default; } } __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-03-30 13:30:33
|
Hi Arnold, That appears to be a checkin of the Phrame 2.0 code. Is that the case? Were you going to post the changes you had been making (the newer development code you had refered to in some earlier emails)? Would you like diff files for any of the changes I had made to the 2.0 source? Jason --- Arnold Cano <arn...@ya...> wrote: > Hi Jason, > > I've finally got the cvs working. I made a mistake > that I hope sf support will help clear up. I > accidentally cvs imported phrame_examples as phrame. > phrame is checked in it only has a few extra empty > folders for the time being until sf support can remove > the mistake from the cvs attic. > > Thanks for your patience, > > Arnold > > --- Jason Sweat <jsw...@ya...> wrote: > > Hi Arnold, > > > > I needed to use a stack today and tried to used the > > one from the Phrame utils. > > In order to get it to work correctly I had to make > > the following tweaks: > > > > In ArrayList.php, toArray needed to be declared to > > return by reference: > > function &toArray() > > { > > return $this->_elements; > > } > > and in Stack.php, peek() needs to end, not reset: > > function peek() > > { > > return end($this->toArray()); > > } > > > > > > Did you have any further thoughts about checking > > Phrame into the sf.net cvs? > > > > Jason > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Platinum - Watch CBS' NCAA March Madness, > > live on your desktop! > > http://platinum.yahoo.com > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: > > The Definitive IT and Networking Event. Be There! > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > _______________________________________________ > > Phrame-devel mailing list > > Phr...@li... > > https://lists.sourceforge.net/lists/listinfo/phrame-devel > > __________________________________________________ > Do you Yahoo!? > Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! > http://platinum.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |
From: Arnold C. <arn...@ya...> - 2003-03-30 00:56:18
|
--- Tony Bibbs <to...@to...> wrote: > I am going back and rethinking what was said about > actions and I have a > few questions. In my scenario, actions (views or > commands), work > independent of the controller. In fact the > controller marshalls the > creation and execution. So why in Phrame does the > action have a reference > to the controller? To me that breaks the basic OO > rule of encapsulation. The intial intent of holding a reference to the controller was so that planning could begin on management and configuration objects that could manipulate mapping information on the fly. These services would have been something like "priviledged" actions. I never really got too far into this so removing the circular dependency is probably a good idea seeing as the current php implementations don't handle circular references well. > Now for the forms. Why is validation done at a > 'form' level? My problem > with this is say you have a 'article' object. > Articles can be submitted > by normal users and also by administrators but the > access they have to > specific properties may differ. Thus you may have > two different forms, > one for the user view, one for the admin view. In > the Phrame model, you > would have to code similar validation logic into > both forms, right? In > the code I built validation is just another command > which is completely > reusable. The forms were designed to be containers for form data. Therefore, permissions and such could either be handled in the validate() method of each form or in the action. In either case, the validation could be abstracted and shared if more than one object needed to perform certain types of validation (similar to the validator plugin for struts). > You know, the more I think about it, the more I see > remakable similarities > in the two code bases and while you guys where > questioning > fundamental differences in the designs, the more I > think about it I don't > see how they differ that other than in the names of > some of the classes > (i.e. semantics). I agree that the designs are similar, however, I don't consider big changes such as these semantics. There will be a bit of work porting existing phrame applications to this new phramework. I think we should minimize api changes if possible and make the required changes worth the work (and I think they will). > Don't read into this too much, I'm still committed > to reworkign some of > the code per your suggestions but the action object > in particular is one I > don't see a huge value in as that is covered by my > command object (similar > methods). > > Also, have you thought about modifying the actions > so it separates post > requests form get requests? I ask because it is > quite feasible that an > app would not want to process an get requests and in > both packages there > is no distinction since the $_REQUEST superglobal is > used. I can see where not being able to determine the difference between get/post could be a problem. > > -- > Tony Bibbs "I guess you have to remember > that those who don't > to...@to... hunt or fish often see those of > us who do as > harmlessly strange and sort of > amusing. When you > think about it, that might be a > fair assessment." > --Unknown > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |
From: Arnold C. <arn...@ya...> - 2003-03-30 00:39:27
|
Hi Jason, I've finally got the cvs working. I made a mistake that I hope sf support will help clear up. I accidentally cvs imported phrame_examples as phrame. phrame is checked in it only has a few extra empty folders for the time being until sf support can remove the mistake from the cvs attic. Thanks for your patience, Arnold --- Jason Sweat <jsw...@ya...> wrote: > Hi Arnold, > > I needed to use a stack today and tried to used the > one from the Phrame utils. > In order to get it to work correctly I had to make > the following tweaks: > > In ArrayList.php, toArray needed to be declared to > return by reference: > function &toArray() > { > return $this->_elements; > } > and in Stack.php, peek() needs to end, not reset: > function peek() > { > return end($this->toArray()); > } > > > Did you have any further thoughts about checking > Phrame into the sf.net cvs? > > Jason > > __________________________________________________ > Do you Yahoo!? > Yahoo! Platinum - Watch CBS' NCAA March Madness, > live on your desktop! > http://platinum.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |
From: Tony B. <to...@to...> - 2003-03-27 19:00:23
|
I am going back and rethinking what was said about actions and I have a few questions. In my scenario, actions (views or commands), work independent of the controller. In fact the controller marshalls the creation and execution. So why in Phrame does the action have a reference to the controller? To me that breaks the basic OO rule of encapsulation. Now for the forms. Why is validation done at a 'form' level? My problem with this is say you have a 'article' object. Articles can be submitted by normal users and also by administrators but the access they have to specific properties may differ. Thus you may have two different forms, one for the user view, one for the admin view. In the Phrame model, you would have to code similar validation logic into both forms, right? In the code I built validation is just another command which is completely reusable. You know, the more I think about it, the more I see remakable similarities in the two code bases and while you guys where questioning fundamental differences in the designs, the more I think about it I don't see how they differ that other than in the names of some of the classes (i.e. semantics). Don't read into this too much, I'm still committed to reworkign some of the code per your suggestions but the action object in particular is one I don't see a huge value in as that is covered by my command object (similar methods). Also, have you thought about modifying the actions so it separates post requests form get requests? I ask because it is quite feasible that an app would not want to process an get requests and in both packages there is no distinction since the $_REQUEST superglobal is used. -- Tony Bibbs "I guess you have to remember that those who don't to...@to... hunt or fish often see those of us who do as harmlessly strange and sort of amusing. When you think about it, that might be a fair assessment." --Unknown |
From: Tony B. <to...@to...> - 2003-03-27 13:47:28
|
I was referring to the Mappings and Forwards classes. They were collections of mappings and forwards respectively. Loading them all into memory is a waste. Only load what you want when you need it. Just my two cents. --Tony On Wed, 26 Mar 2003, Jason Sweat wrote: > --- Tony Bibbs <to...@to...> wrote: > > Again, a problem I had with Phrame is all mappings and forwards were > > loaded even though a very small subset was needed to process the current > > request. > > I am not sure how much overhead loading an array really constitutes. As an > alternative, these could simply be hard coded into the action. > > Instead of implementing: > $actionForward = $actionMapping->get('index'); > return $actionForward; > > You could instead do: > $actionForward = new ActionForward('foo', APPL_URL.'?view=suchandsuch'); > return $actionForward; > > This essentially hardcodes the values into the actions and eliminates some of > the "loose coupling" benefits of Struts, but I do not think too much is lost > since you are coding for one or more of the forwards anyway. > > Another $0.02 :) > > Jason > > __________________________________________________ > Do you Yahoo!? > Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! > http://platinum.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel > -- Tony Bibbs "I guess you have to remember that those who don't to...@to... hunt or fish often see those of us who do as harmlessly strange and sort of amusing. When you think about it, that might be a fair assessment." --Unknown |
From: Jason S. <jsw...@ya...> - 2003-03-27 02:58:38
|
--- Tony Bibbs <to...@to...> wrote: > Again, a problem I had with Phrame is all mappings and forwards were > loaded even though a very small subset was needed to process the current > request. I am not sure how much overhead loading an array really constitutes. As an alternative, these could simply be hard coded into the action. Instead of implementing: $actionForward = $actionMapping->get('index'); return $actionForward; You could instead do: $actionForward = new ActionForward('foo', APPL_URL.'?view=suchandsuch'); return $actionForward; This essentially hardcodes the values into the actions and eliminates some of the "loose coupling" benefits of Struts, but I do not think too much is lost since you are coding for one or more of the forwards anyway. Another $0.02 :) Jason __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-03-27 02:49:02
|
--- Arnold Cano <arn...@ya...> wrote: > I have reservations about removing forwards, forms, > and actions. They provided extension points for > specialization if required. Using primitives removes > this important feature. > > My understanding from studying Tony's code is that > commands are a simpler version of the original > actions. This mechanism is basically just a command > pattern with the exception that actions utilized the > mappings and form objects. I have thought in the past that it might be nice to specify another kind of "Action" that was actually just a method of model that accepted the same two parameters as the Action::Process() method. This might allow for some of the thiner Action classes to just be included as model class methods rather than distinct Action classes. For more significant actions where the class make sense, it should still be supported. Perhaps, borrowing from Tony, "Commands" could be the name of these kind of mappings. You might need: Command Name Model Base Class Method Name Input Page Source Validate Form and you would still need associated forwards. Jason __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |
From: Tony B. <to...@to...> - 2003-03-27 00:09:43
|
Well, as I said, I will work the forms back in. As for forwards, this is trivial and can be added as well and I don't mind signing up for that. As for actions, this may be a place where I have some disagreement. I have no problem with actions (my commands) using form objects. However, I don't agree with actions needing to know anything about mappings. They only need to do their work and return processing back to the controller. The controller should worry about the mappings being that is the key means for continuation of execution (please note I already have a mapping class implemented). Again, a problem I had with Phrame is all mappings and forwards were loaded even though a very small subset was needed to process the current request. Once I get this last bit of code polished I'll look for more suggestions on tweaks from you two. I think after this next cycle we'll be at a point where I will feel fine with using the code in a production environment (which, I remind, is my big driving factor). At some point we need to talk about the resulting code base. The final state will look more like Phrame per both your recent suggestions which is good but will it be good enough for your actual approval. Again my hopes is that the resulting code is a best-of-both-worlds to warrant this new code to be release under the Phrame name. --Tony Arnold Cano wrote: > The analogy to verbs, nouns, and adjectives is exactly > how I described phrame to developers as well. > > I have reservations about removing forwards, forms, > and actions. They provided extension points for > specialization if required. Using primitives removes > this important feature. > > My understanding from studying Tony's code is that > commands are a simpler version of the original > actions. This mechanism is basically just a command > pattern with the exception that actions utilized the > mappings and form objects. > > Arnold -- +-------------------+--------------------------------------------------+ |Tony Bibbs |[R]egardless of what you may think of our penal | |to...@to... |system, the fact is that every man in jail is one | | |less potential fisherman to clutter up your | | |favorite pool or pond. --Ed Zern | +-------------------+--------------------------------------------------+ |
From: Jason S. <jsw...@ya...> - 2003-03-26 23:37:48
|
Hi Arnold, I needed to use a stack today and tried to used the one from the Phrame utils. In order to get it to work correctly I had to make the following tweaks: In ArrayList.php, toArray needed to be declared to return by reference: function &toArray() { return $this->_elements; } and in Stack.php, peek() needs to end, not reset: function peek() { return end($this->toArray()); } Did you have any further thoughts about checking Phrame into the sf.net cvs? Jason __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |
From: Arnold C. <arn...@ya...> - 2003-03-26 22:42:33
|
The analogy to verbs, nouns, and adjectives is exactly how I described phrame to developers as well. I have reservations about removing forwards, forms, and actions. They provided extension points for specialization if required. Using primitives removes this important feature. My understanding from studying Tony's code is that commands are a simpler version of the original actions. This mechanism is basically just a command pattern with the exception that actions utilized the mappings and form objects. Arnold --- Jason Sweat <jsw...@ya...> wrote: > Regarding the forms, I saw them as a nice method of > accessing the superglobals. > Most of my application had a single unmodified > ActionForm, and then perhaps > one or two classes with a custom way of accessing > the. In most cases these > were when I wanted to do "table at a time" rather > than "row at a time" updates. > I would have a series of key_1, val1_1 val2_2, > key_2, val1_2, val2_2... posted > to the form, which would then loop over the posted > inputs and assemble them > into an array for processing the updates in a loop, > calling (in the update > action) the Model::Update() once of each of the > key_* processed. > > The thing I believe I would miss the most was > Actions. In describing Phrame to > my developers, I used the analogy that each web > request is a sentence. The > Action is the verb, the Model is the noun. Views > were a bit of a stretch in > this analogy, but I said they were "adjectives" > because they described the > "Nouns" (models). An action with a "forward" was > just writing a paragraph > instead of a sentence. > > So, you might have: > "UpdateContact" (verb-action) affecting "Contact" > (noun-model) forwards to > ViewContactList. > "ShowView" (verb-action) affecting "Contact" > (noun-model) displays the > "ContactListView" (adjective-view describing > Contact-model). > > This has helped my developers. They are not very > web savvy, but are good SQL > programmers. > > If I am interpreting your MVC example correctly, I > would have to tell them the > controller will "forward" to models, which either > are the date (query the list) > or manipulate the data ("updateContact"). This > feels like a big conceptual > shift from the original Phrame design. > > Am I missing something? > > Jason > > > --- Tony Bibbs <to...@to...> wrote: > > The form class probably needs to be added back in. > I will work on that. > > > > The forward could be though looking at the class > definition and doing some > > 'what-ifs' in my head I don't know how I'd ever > want to extend that. > > That's not to say that one wouldn't , I jsut can > think of a good example > > which is why I went with the KISS model and left > it as an array for now. > > > > In my implementation a forward has only two > attributes, the type and the > > name. The paths are not necessary because those > are managed by the > > controller. Right now the types can be 'redirect', > 'view' or 'model' but > > looking at your code I will probably modify the > config field so that > > instead of [MVC_TYPE] you have [MVC_REDIRECT] and > pass it a boolean which > > your forward class does (and it makes more sense). > IF it isn't a redirect > > you can assume the [MVC_NAME] will be the name of > the next view or command > > otherwise it will be a URL relative to the > controller base URL property. > > > > What I said probably doesn't make much sense so > let me make a few minor > > changes per your feedback and send you all the > resulting code. > > > > --Tony > > > > On Wed, 26 Mar 2003, Arnold Cano wrote: > > > > > I've taken a look at the code and example > application. > > > Good stuff! I have a question however... why > were > > > the forward and form objects discarded? They > provided > > > a useful abstraction that could be extended (if > > > required) as opposed to passing primitives. It > seems > > > as though we've taken a few steps back in some > areas > > > and leaps forward in others. > > > > > > Looking forward to hearing your ideas. > > > > > > Arnold > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Platinum - Watch CBS' NCAA March Madness, > live on your desktop! > http://platinum.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |
From: Tony B. <to...@to...> - 2003-03-26 22:30:57
|
On Wed, 26 Mar 2003, Jason Sweat wrote: > Regarding the forms, I saw them as a nice method of accessing the superglobals. > Most of my application had a single unmodified ActionForm, and then perhaps > one or two classes with a custom way of accessing the. In most cases these > were when I wanted to do "table at a time" rather than "row at a time" updates. > I would have a series of key_1, val1_1 val2_2, key_2, val1_2, val2_2... posted > to the form, which would then loop over the posted inputs and assemble them > into an array for processing the updates in a loop, calling (in the update > action) the Model::Update() once of each of the key_* processed. You guys are right, the form class is pretty clean and I'll be adding that back into the design. > If I am interpreting your MVC example correctly, I would have to tell them the > controller will "forward" to models, which either are the date (query the list) > or manipulate the data ("updateContact"). This feels like a big conceptual > shift from the original Phrame design. Yeah this is part of the semantics discussion I was getting in to before (not to mention a departure from the basic struts design). In my eyes, a form or command can be fully aware of the commands or other views it my have to interact with. Thus when they are done executing they let the controller know which one of the set of views/commands it can interact with to forward processing to. The controller dumbly accepts it and hands off the baton to the next view/command. This is a departure from the original Phrame design. Whether it makes sense or not is up for discussion. -- Tony Bibbs "I guess you have to remember that those who don't to...@to... hunt or fish often see those of us who do as harmlessly strange and sort of amusing. When you think about it, that might be a fair assessment." --Unknown |
From: Jason S. <jsw...@ya...> - 2003-03-26 22:07:22
|
Regarding the forms, I saw them as a nice method of accessing the superglobals. Most of my application had a single unmodified ActionForm, and then perhaps one or two classes with a custom way of accessing the. In most cases these were when I wanted to do "table at a time" rather than "row at a time" updates. I would have a series of key_1, val1_1 val2_2, key_2, val1_2, val2_2... posted to the form, which would then loop over the posted inputs and assemble them into an array for processing the updates in a loop, calling (in the update action) the Model::Update() once of each of the key_* processed. The thing I believe I would miss the most was Actions. In describing Phrame to my developers, I used the analogy that each web request is a sentence. The Action is the verb, the Model is the noun. Views were a bit of a stretch in this analogy, but I said they were "adjectives" because they described the "Nouns" (models). An action with a "forward" was just writing a paragraph instead of a sentence. So, you might have: "UpdateContact" (verb-action) affecting "Contact" (noun-model) forwards to ViewContactList. "ShowView" (verb-action) affecting "Contact" (noun-model) displays the "ContactListView" (adjective-view describing Contact-model). This has helped my developers. They are not very web savvy, but are good SQL programmers. If I am interpreting your MVC example correctly, I would have to tell them the controller will "forward" to models, which either are the date (query the list) or manipulate the data ("updateContact"). This feels like a big conceptual shift from the original Phrame design. Am I missing something? Jason --- Tony Bibbs <to...@to...> wrote: > The form class probably needs to be added back in. I will work on that. > > The forward could be though looking at the class definition and doing some > 'what-ifs' in my head I don't know how I'd ever want to extend that. > That's not to say that one wouldn't , I jsut can think of a good example > which is why I went with the KISS model and left it as an array for now. > > In my implementation a forward has only two attributes, the type and the > name. The paths are not necessary because those are managed by the > controller. Right now the types can be 'redirect', 'view' or 'model' but > looking at your code I will probably modify the config field so that > instead of [MVC_TYPE] you have [MVC_REDIRECT] and pass it a boolean which > your forward class does (and it makes more sense). IF it isn't a redirect > you can assume the [MVC_NAME] will be the name of the next view or command > otherwise it will be a URL relative to the controller base URL property. > > What I said probably doesn't make much sense so let me make a few minor > changes per your feedback and send you all the resulting code. > > --Tony > > On Wed, 26 Mar 2003, Arnold Cano wrote: > > > I've taken a look at the code and example application. > > Good stuff! I have a question however... why were > > the forward and form objects discarded? They provided > > a useful abstraction that could be extended (if > > required) as opposed to passing primitives. It seems > > as though we've taken a few steps back in some areas > > and leaps forward in others. > > > > Looking forward to hearing your ideas. > > > > Arnold __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |
From: Tony B. <to...@to...> - 2003-03-26 21:50:28
|
The form class probably needs to be added back in. I will work on that. The forward could be though looking at the class definition and doing some 'what-ifs' in my head I don't know how I'd ever want to extend that. That's not to say that one wouldn't , I jsut can think of a good example which is why I went with the KISS model and left it as an array for now. In my implementation a forward has only two attributes, the type and the name. The paths are not necessary because those are managed by the controller. Right now the types can be 'redirect', 'view' or 'model' but looking at your code I will probably modify the config field so that instead of [MVC_TYPE] you have [MVC_REDIRECT] and pass it a boolean which your forward class does (and it makes more sense). IF it isn't a redirect you can assume the [MVC_NAME] will be the name of the next view or command otherwise it will be a URL relative to the controller base URL property. What I said probably doesn't make much sense so let me make a few minor changes per your feedback and send you all the resulting code. --Tony On Wed, 26 Mar 2003, Arnold Cano wrote: > I've taken a look at the code and example application. > Good stuff! I have a question however... why were > the forward and form objects discarded? They provided > a useful abstraction that could be extended (if > required) as opposed to passing primitives. It seems > as though we've taken a few steps back in some areas > and leaps forward in others. > > Looking forward to hearing your ideas. > > Arnold > > --- Tony Bibbs <to...@to...> wrote: > > On Sat, 22 Mar 2003, Jason Sweat wrote: > > > require_once('config.php'); > > > require is a directive, not a function, so > > > require_once 'config.php'; > > > is better form, mentioned in the PEAR coding > > conventions as acceptable either > > > way, but I have been dinged in professional > > writing elsewhere for including the > > > parens. > > > > I made this change, thanks for pointing it out. > > > > > > > > $_CONF is a bad name for a variable. It looks > > like a superglobal, but clearly > > > is note. It also ad-hears to the PEAR coding > > conventions definititions of a > > > define, not a global variable. > > > > Actually PEAR says globals should start with > > underscore, followed by > > package name followed by variable name. Since the > > use of $_CONF was not > > specific to the MVC package, rather, for use in the > > app itself, I renamed > > it to $gConf for now. > > > > > > > > If you have these constants defined: > > > // General configuration settings > > > define('_BASE_URL', 'baseurl'); > > > define('_MVC_BASE', 'dirbase'); > > > > Per PEAR coding standards all _<varname> constants > > are now named > > MVC_<varname> > > > > > in Controller::Controller() > > > $_SESSION['MVC_message'] = ''; > > > Should 'MVC_message' also be a define? I tend to > > like to use defines for all > > > "magic" indexes, that way there is less risk of me > > mis-typing an assignment > > > index. > > > > Good point, I have added MVC_MESSAGE and MVC_ERRORS > > as constants > > > > > > > > I would move the $configData initialization into > > the config.php script. This > > > makes the "bootstrap" (index.php) file more > > understandable, and it is after > > > all, configuration, which seems like it belongs in > > the "config" script. > > > > Ok, what I have done is I have moved all the config > > data to mvcconfig.php. > > In preparation for XML support I have also created a > > mvcconfig.xml. > > Individual apps can name these file what ever they > > want. Point here is > > you are right, the config data should be pulled. I > > also refactored a few > > things so that the ArrayLoader and XMLLoader work > > the same. The way I had > > before required unique logic in the LoaderFactory > > which , obviously, > > doesn't make much sense. > > > > > The discussion of the $var[foo][bar] vs $var = > > array('foo'=>array('bar'=>...)); > > > came up on the Phrame list earlier. I said I was > > ambivilent then, but looking > > > at it: > > > > I too am ambivilent. I think in the end the XML > > configuration will be the > > default as it is easier to read and easier for > > developers to learn. > > > > I will repost the updated code here as soon as the > > XML configuration is > > working. > > > > -- > > Tony Bibbs "I guess you have to remember > > that those who don't > > to...@to... hunt or fish often see those of > > us who do as > > harmlessly strange and sort of > > amusing. When you > > think about it, that might be a > > fair assessment." > > --Unknown > > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: > > The Definitive IT and Networking Event. Be There! > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > _______________________________________________ > > Phrame-devel mailing list > > Phr...@li... > > > https://lists.sourceforge.net/lists/listinfo/phrame-devel > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! > http://platinum.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel > -- Tony Bibbs "I guess you have to remember that those who don't to...@to... hunt or fish often see those of us who do as harmlessly strange and sort of amusing. When you think about it, that might be a fair assessment." --Unknown |