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: Tony B. <to...@to...> - 2003-02-28 22:10:46
|
I have some time this weekeend that I'd really like to dig into Phrame. If possible, I'd like to get access to the latest CVS code. I tried your sf.net site and it appears that nothing is in that repository yet. Anonymous access is all I need for now. Also if there is a running checklist on waht you are working on in the next release please send that along so I can avoid digging into something you are already planning on fixing. I hope you take this request seriously, I don't plan on wasting your time and I'm more than happy to contribute back. If you can please address this ASAP...it's not every weekend the wife and kid are gone ;-) -- 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-02-21 19:53:37
|
Well, having been exposed to Phrame about a week or so ago I have involuntarily been advocating Phrame to be in PEAR. To give you some history, I am a fairly new PEAR developer (AUTH_Enterprise and two other packages being developed, one for language translation and the other for sendmail interfaces into PHP apps). By day I am a software development manager for a team of Java developers in a state government. I was reading back on PEAR-DEV posts and ran across some talking about design patterns. The gist was that someone recommended adding design patterns to PEAR. Rightfully so, many PEAR developers said "how do you make a package out of abstract patterns?". Of course for most patterns it does not make any sense. However, I do think you could with MVC. Familiar with struts, I was glad to see a fairly well developed PHP implementation of MVC in Phrame. I have one major issue with the package, namely all actions currently get loaded into memory even though only one may be needed. Despite this problem (which is easily fixable), I think Phrame is on the right track. Now the battle with the PEAR-DEV folks is some are not familiar with MVC and, therefore, can't see how this framework could be packaged up and used quickly by other PEAR packages or stand-alone applications. I think they are starting to see the light but I think they will need a working sample to go off of. With that said, I am emailing this list to let you all know that I may be needing a bit of help and to inform you that I'd be happy to contribute back to Phrame if you'll have me ;-) I think having Phrame in PEAR will be great exposure for you all and it will raise the bar in PHP code quality if it gets decent adoption by others. -- 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: Arnold C. <arn...@ya...> - 2003-02-12 20:56:00
|
I appreciate everyones patience for the new beta release of Phrame that fixes quite a few outstanding design issues. 1. Redesigned uses of include() to require_once() on demand 2. Refactored core classes 3. Utilized references throughout 4. Separated the utils classes from the core classes 5. Added support for dispatch actions through the 'parameter' attribute 6. Added support for per action error handlers 7. Added a pure php example to the Phrame examples ... Unfortunately, my current workload does not leave with me with much time to develop Phrame as much as I'd like. I will be adding the stable and beta release mentioned above to the sourceforge cvs as soon as I can. Any ideas on the layout of the cvs structure would be appreciated. Thanks, Arnold --- Jason Sweat <jsw...@ya...> wrote: > I am getting ready to write another MVC application. > I have noticed there is > still no development version in CVS on the > sourceforge site. I would like to > take a look at your new code, and possibly use it so > I can start sending in > comments regarding the restructured phrame code. Do > you have an anticipated > time for doing the CVS import? > > Thanks. > > Jason > > > --- Arnold Cano <arn...@ya...> wrote on Fri > Jan 17 13:44:12 2003: > > My development version of Phrame does utilize > > references throughout. Speaking of the > development > > version, I haven't had much time this week to get > it > > cleaned up to add to the sourceforge cvs. I will > > hopefully get it ready some time next week. > > > > Arnold > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up > now. > http://mailplus.yahoo.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = > Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-02-10 18:53:31
|
I am getting ready to write another MVC application. I have noticed there is still no development version in CVS on the sourceforge site. I would like to take a look at your new code, and possibly use it so I can start sending in comments regarding the restructured phrame code. Do you have an anticipated time for doing the CVS import? Thanks. Jason --- Arnold Cano <arn...@ya...> wrote on Fri Jan 17 13:44:12 2003: > My development version of Phrame does utilize > references throughout. Speaking of the development > version, I haven't had much time this week to get it > cleaned up to add to the sourceforge cvs. I will > hopefully get it ready some time next week. > > Arnold __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-23 15:51:43
|
Any word on the cvs import yet? Have you ever given any consideration to optimizing the inclusion of the action classes? i.e. only requrire the class when you know it will be used, but not otherwise? Same for form classes (an views on mine ;) ) Jason --- Arnold Cano <arn...@ya...> wrote: > My development version of Phrame does utilize > references throughout. Speaking of the development > version, I haven't had much time this week to get it > cleaned up to add to the sourceforge cvs. I will > hopefully get it ready some time next week. > > Arnold __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: J.Accino <ac...@um...> - 2003-01-19 18:58:12
|
Hello, I'm thinking on giving a try to Phrame. I've already donwloaded the 2.0 tarball but from past messages on the list archives it seems that there would be some updated files on a CVS. However, the Phrame CVS directory on Sourceforge seems empty. Is there any other CVS server available for getting that stuff? Thanks in advance, Jos=E9 A. |
From: Arnold C. <arn...@ya...> - 2003-01-17 21:44:12
|
The current version of Phrame does not utilize reference passing as it should. Passing by reference: ... function passObject(&$object) ( $this->object = $object; ) ... Returning by reference: ... function &returnObject() ( return $this->object; ) ... If you have any more questions on references let me know. My development version of Phrame does utilize references throughout. Speaking of the development version, I haven't had much time this week to get it cleaned up to add to the sourceforge cvs. I will hopefully get it ready some time next week. Arnold --- Jason Sweat <jsw...@ya...> wrote: > Just an additional correction on this subject > > Also, where a method returns an object, should it > be: > > > > return &$object; > > really should be > function &ReturnObj() > { > return $this->_Obj; > } > with the & on the function declaration line, not in > the return line. > > Jason > > --- Jason Sweat <jsw...@ya...> wrote: > > Phrame list members, > > > > I have not used PHP's OO extensively. As I > understand, PHP is different than > > most other languages in that objects assignments > are copies of the object > > rather than references to the object by default, > which contrasts with most > > other OO languages (and I believe PHP5 is changing > this behavior). > > > > If this behavior is correct, should most of the > functions in phrame be > > explicitly defined as by reference? > > > > For example, in the Action class, should we: > > > > class Action extends Object > > { > > function perform(&$actionMapping, &$actionForm) > {} > > } > > > > Also, where a method returns an object, should it > be: > > > > return &$object; > > ?? > > > > Does anyone have knowledge in this regard? > > > > Thanks, > > > > Jason > > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up > now. > http://mailplus.yahoo.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: Thawte.com > Understand how to protect your customers personal > information by implementing > SSL on your Apache Web Server. Click here to get our > FREE Thawte Apache > Guide: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-16 17:47:35
|
Just an additional correction on this subject > Also, where a method returns an object, should it be: > > return &$object; really should be function &ReturnObj() { return $this->_Obj; } with the & on the function declaration line, not in the return line. Jason --- Jason Sweat <jsw...@ya...> wrote: > Phrame list members, > > I have not used PHP's OO extensively. As I understand, PHP is different than > most other languages in that objects assignments are copies of the object > rather than references to the object by default, which contrasts with most > other OO languages (and I believe PHP5 is changing this behavior). > > If this behavior is correct, should most of the functions in phrame be > explicitly defined as by reference? > > For example, in the Action class, should we: > > class Action extends Object > { > function perform(&$actionMapping, &$actionForm) {} > } > > Also, where a method returns an object, should it be: > > return &$object; > ?? > > Does anyone have knowledge in this regard? > > Thanks, > > Jason > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-15 17:18:22
|
Phrame list members, I have not used PHP's OO extensively. As I understand, PHP is different than most other languages in that objects assignments are copies of the object rather than references to the object by default, which contrasts with most other OO languages (and I believe PHP5 is changing this behavior). If this behavior is correct, should most of the functions in phrame be explicitly defined as by reference? For example, in the Action class, should we: class Action extends Object { function perform(&$actionMapping, &$actionForm) {} } Also, where a method returns an object, should it be: return &$object; ?? Does anyone have knowledge in this regard? Thanks, Jason __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-14 12:31:37
|
Hello, Here is a link to the message I posted regarding converting the hello demo to work with Smarty instead of XLS. http://sourceforge.net/mailarchive/message.php?msg_id=2908536 HTH Jason --- bs...@co... wrote: > hi. > i asked if i can get a php version of example > at forum(http://sourceforge.net/forum/?group_id=66668) > and nice Arnold Cano told me that there is one already > floating around!!!! so i joined the mailing list looking for it. > > i also looked at archive and it seems the new version > is already on the way. :) But not php version of example. > does anyone still has it? if so, would you email it to me? > (to bs...@co...) it will be very helpful. > > TIA. > > > > > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: <bs...@co...> - 2003-01-14 06:40:37
|
hi. i asked if i can get a php version of example at forum(http://sourceforge.net/forum/?group_id=66668) and nice Arnold Cano told me that there is one already floating around!!!! so i joined the mailing list looking for it. i also looked at archive and it seems the new version is already on the way. :) But not php version of example. does anyone still has it? if so, would you email it to me? (to bs...@co...) it will be very helpful. TIA. |
From: Jason S. <jsw...@ya...> - 2003-01-13 20:48:32
|
Regarding the issue of "forwarding" vs. "redirect", I think the essence of the problem is the "view" creation is outside the scope of the current implementation of Phrame. In the hello example, index.php was essenitally procedural code. I think the next step for Phrame is to bring the generation of the views into the OO framework. Either the ActionController class should be extended, or a new ViewManager class should be created. Your main application file would be: A) if (action) { $controller->process() } else { $viewmanager->display() } or B) if (action) { $controller->process() } $viewmanager->display() this kind of a structure would let you do the forward processing for the action by: under A) creating a viewmanager and calling the appropriate view to display or under B) setting the proper information to allow the viewmanager to display the correct view when it falls our of the controller processing If you went with B, you will want to add the exit statement after the header('Location: ...') line so that your default view will not be processed in the background while your clients browser is directed to the new location. I know this kind of extension will work for rendering obecause(beextended extened the ActionController class to do just this in my current phramapplicationpliation) but I have not thought it out sufficiently to handle multiple output methods (HTML, WAP, XLS, ...). The main sticking point I have is between common data (user identity, navigation) and view specific data. There might need to be some sort of a common $viewmanager->prepare() method, followed by $view->display(); where the $view object would be an application specific version of a generic view class, and one class for each view. Thoughts? Jason --- Ross Keatinge <te...@ya...> wrote: > Hi Arnold > > Sorry I haven't had time to contribute much here. > > --- Arnold Cano <arn...@ya...> wrote: > > Ross is correct that in Struts the REDIRECT flag > > determines whether the system uses the forward() or > > sendRedirect() method. However, since PHP does not > > have an equivalent to the forward() method, Phrame > > uses the header() method in both cases. The only > > difference being that when the REDIRECT flag is in > > place the session information is destroyed before the > > header(). > > I don't recall exactly how forward works in JSP but I think the closest > thing we have in PHP is 'include'. I know it sounds different but I > think the end result is more or less the same. > > Perhaps the ActionView class does something something like: > > include "$path_to_views/$required_view" . '.php'; > > Maybe JSP's forward does something tidy in terms of variable scope. I > don't know. > > > Does anyone know if there is a way to "forward" to > > another page on the server (server side) without using > > the header() method? I may be wrong but my > > understanding is that the header('Location: '.$path) > > method asks the browser to fetch the $page (client > > side). > > Your understanding is correct. > > Ross __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-13 17:49:50
|
As I was composing this email I figured it out!!! I added an exit; after if (!$redirect) { header("Location: $path&redir=$s"); } else { $_SESSION = array(); session_destroy(); header("Location: $path"); } exit; in ActionController::_processForward. Not sure what was happening afterwards, but nothing will happen after the redirect now :) Jason >>> This is definitly not the issue, primarity becuase the output I was showing happens prior to the rest of the script, and secondarily, because I have replaced those secitons of the code with: //initialize error handler if (!array_key_exists(_ERRORS, $_SESSION)) { $go_errors = new Stack(); $_SESSION[_ERRORS] = $go_errors; } Jason --- Arnold Cano <arn...@ya...> wrote: > The original hello example application would set the > $_SESSION[_ERRORS] = NULL in the index.php file. > > The only other thing it might be is that currently > Phrame only stores the errors from the last view > processed. My development version of Phrame has > support for multiple sets of errors indexed by > property. > > I will also be adding my development version of Phrame > into the sourceforge cvs. Does anyone have any ideas > on a structure for the cvs tree? I am by no means a > cvs guru so any input would be appreciated. > > Arnold > > > --- Jason Sweat <jsw...@ya...> wrote: > > I am having a problem with the applicaiton I coded > > using phrame. I was working > > fine, with 4 model classes, 4 form classes, 7 > > actions and 5 view. I am in the > > process of: > > a) adding two new views and assosiated actions and > > b) changing over to our PHP coding conventions (for > > my applicaiton, not for the > > libraries - but it does involve changing things like > > the names of global > > variables in my application like the $mappings > > array). > > > > Suddenly, the application started clearing the > > _ERRORS session object. It was > > not undefined or missing, but rather a Stack object > > with 0 items in the > > _elements array. > > > > During debugging, I put the following code into the > > ActionController::_processForward method: > > > > $redirect = $actionForward->getRedirect(); > > $path = $actionForward->getPath(); > > //debug code starts here > > $err = &$_SESSION[_ERRORS]; > > $s=urlencode($err->Peek()); > > $err->Push('this is a test from inside > > ActionController::_processForward'); > > $_SESSION['errors2'] = &$err; > > if (!$redirect) { > > header("Location: $path&redir=$s"); > > ... > > > > the redirect ends up going to a url that looks like: > > > admaint.php?view=usr&redir=Please+add+a+comment+to+at+least+one+user. > > > > Note the redir parameter indicated there was > > something to Peek at in the $err > > to begin with, even prior to adding the additional > > item. > > > > I placed the following code at the top of the > > redirected script, before > > anything is even included in the script: > > if (array_key_exists('redir',$_GET)) { > > //include enough classes to make the error object > > valid in the session > > require_once('../phrame/util/Object.php'); > > require_once('../phrame/util/ArrayList.php'); > > require_once('../phrame/util/Stack.php'); > > session_start(); > > print "<pre>appl errors:\n"; > > var_dump($_SESSION['_errors']); > > print "copied errors:\n"; > > var_dump($_SESSION['errors2']); > > print"</pre>"; > > } > > > > The resulting output from this script is: > > appl errors: > > object(stack)(1) { > > ["_elements"]=> > > array(0) { > > } > > } > > copied errors: > > object(stack)(1) { > > ["_elements"]=> > > array(2) { > > [0]=> > > string(42) "Please add a comment to at least one > > user." > > [1]=> > > string(60) "this is a test from inside > > ActionController::_processForward" > > } > > } > > > > > > How can the original application errors vanish from > > the session during the > > redirect?!? > > > > Any insight would be much appreciated. > > > > Thanks. > > > > Jason > > > > > > > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Mail Plus - Powerful. Affordable. Sign up > > now. > > http://mailplus.yahoo.com > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: > > SourceForge Enterprise Edition + IBM + LinuxWorld = > > Something 2 See! > > http://www.vasoftware.com > > _______________________________________________ > > Phrame-devel mailing list > > Phr...@li... > > > https://lists.sourceforge.net/lists/listinfo/phrame-devel > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Arnold C. <arn...@ya...> - 2003-01-13 17:28:28
|
I will certainly take a look at your class this afternoon. Thanks for sharing it with the list. I know it's a pain in the a$$ right now without CVS but that will change in the next few days when I'll have something worthy for the list to take a look at. I know I must sound like a broken record here but in my development version of Phrame I have completely rearchitected the way mappings are handled. I will put this in CVS in next day or two... I promise. :) My changes regarding the include() and require_once() were pertaining to the way Phrame currently includes the files it needs, not the global arrays (although I am sure that can be improved as well). require_once() is certainly a more efficient way of including the Phrame and application classes. Arnold --- Jason Sweat <jsw...@ya...> wrote: > I think the class detailed in my earlier email (More > OO way to specify > mappings) is a much better alternative to the global > arrays. Take a look and > see what you think. > > Jason > > > --- Arnold Cano <arn...@ya...> wrote: > > I'm happy to see an alternative to the current > include > > file method in place (which in my opinion is > > horrible). My development version uses a process > very > > similar to your idea above using require_once(). > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up > now. > http://mailplus.yahoo.com __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-13 17:23:58
|
I was thinking one cvs import for phrame, that would include the util directory. It sounds like you have almost decider to remove the xml class, which is the only thing in the ext directory, so you might not want to add that initially. I guess by the same line of logic, you were considering removing the util classes (although I am fine with them) you might not want to import them. If you still feel there is a reasonable chance of removing this entire directory, separate imports is probably the way to go. Jason --- Arnold Cano <arn...@ya...> wrote: > Do you mean having a separate "cvs import" for each of > the folders? Or did you mean one "cvs import" that > contained the directory hierarchy? I would almost > prefer the separate approach in case directory changes > are required or in case we want to bundle in other > open source software for use with Phrame. > > Arnold > > --- Jason Sweat <jsw...@ya...> wrote: > > --- Arnold Cano <arn...@ya...> wrote: > > > I will also be adding my development version of > > Phrame > > > into the sourceforge cvs. Does anyone have any > > ideas > > > on a structure for the cvs tree? I am by no means > > a > > > cvs guru so any input would be appreciated. > > > > I would think: > > /phrame > > /phrame/util > > /phrame/ext > > > > basically as you have it now in the tar ball. > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Mail Plus - Powerful. Affordable. Sign up > > now. > > http://mailplus.yahoo.com > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: FREE SSL Guide > > from Thawte > > are you planning your Web Server Security? Click > > here to get a FREE > > Thawte SSL guide and find the answers to all your > > SSL security issues. > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > > _______________________________________________ > > Phrame-devel mailing list > > Phr...@li... > > > https://lists.sourceforge.net/lists/listinfo/phrame-devel > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Arnold C. <arn...@ya...> - 2003-01-13 17:17:48
|
Do you mean having a separate "cvs import" for each of the folders? Or did you mean one "cvs import" that contained the directory hierarchy? I would almost prefer the separate approach in case directory changes are required or in case we want to bundle in other open source software for use with Phrame. Arnold --- Jason Sweat <jsw...@ya...> wrote: > --- Arnold Cano <arn...@ya...> wrote: > > I will also be adding my development version of > Phrame > > into the sourceforge cvs. Does anyone have any > ideas > > on a structure for the cvs tree? I am by no means > a > > cvs guru so any input would be appreciated. > > I would think: > /phrame > /phrame/util > /phrame/ext > > basically as you have it now in the tar ball. > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up > now. > http://mailplus.yahoo.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide > from Thawte > are you planning your Web Server Security? Click > here to get a FREE > Thawte SSL guide and find the answers to all your > SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Arnold C. <arn...@ya...> - 2003-01-13 17:08:42
|
I'm happy to see an alternative to the current include file method in place (which in my opinion is horrible). My development version uses a process very similar to your idea above using require_once(). The Xml.php file was originally to aid in development of Phrame applications that used XSLT. However, being that the serializing (and deserializing) can be handled by WDDX, I don't see a need for keeping the Xml.php class. Arnold > --- Jason Sweat <jsw...@ya...> wrote: > > --- Arnold Cano <arn...@ya...> wrote: > > > 4. I also wanted to point out an easier way of > > > handling the mappings array. The current > example > > uses > > > the following structure: > > > > > > ... > > > _ACTION_FORMS => array( > > > 'form' => array( > > > _TYPE => 'HelloForm' > > > ) > > > ), > > > ... > > > > > > This could be simplified into the following > > > structurally equivalent syntax: > > > > > > ... > > > $mappings[_ACTION_FORMS]['form'][_TYPE] = > > 'HelloForm'; > > > ... > > > > easy enough either way. One thing I did was > > eliminate the entire include > > directory by incorporating all four files into a > > single application_setup.php > > file. It was basically structured as: > > all the includes > > $mappings definition > > $options definition > > handleError functin definition > > > > I also wrote a function called "require_dir" that > > takes a directory as an > > argument and performs require_once on each *.php > in > > the directory to > > accommodate the models, forms, and actions > > directories (which rapidly filled > > with files that I always wanted included in the > > application anyway). > > > > > > > > 5. I would also like to deprecate the > > Xml::marshal() > > > method in favor of PHP's WDDX > > serialize/deserialize > > > methods. > > > > > > > I just commented the > > include('ext/Xml.php'); > > line out of the phrame/include.php file and never > > used it. I view this as a > > portion of the hello XLS example, not as part of > the > > phrame architecture. > > > > Regards, > > > > Jason > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Mail Plus - Powerful. Affordable. Sign up > > now. > > http://mailplus.yahoo.com > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: > > SourceForge Enterprise Edition + IBM + LinuxWorld > = > > Something 2 See! > > http://www.vasoftware.com > > _______________________________________________ > > Phrame-devel mailing list > > Phr...@li... > > > https://lists.sourceforge.net/lists/listinfo/phrame-devel > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up > now. > http://mailplus.yahoo.com > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-13 16:58:19
|
Perhaps if the "Phrame"work were altered to have a ShowView() method for the controller, you could just do $this->ShowView($forward_view); and the script would continue processing that view (which would have to be a part of your phrame application view, not any arbitrary page). I suppose you could do a hack with something like a fopen to the page and burp the results back with a print ;-p Jason --- Arnold Cano <arn...@ya...> wrote: > Ross is correct that in Struts the REDIRECT flag > determines whether the system uses the forward() or > sendRedirect() method. However, since PHP does not > have an equivalent to the forward() method, Phrame > uses the header() method in both cases. The only > difference being that when the REDIRECT flag is in > place the session information is destroyed before the > header(). > > Does anyone know if there is a way to "forward" to > another page on the server (server side) without using > the header() method? I may be wrong but my > understanding is that the header('Location: '.$path) > method asks the browser to fetch the $page (client > side). > > Arnold > > --- Jason Sweat <jsw...@ya...> wrote: > > --- Ross Keatinge <ro...@po...> wrote: > > > I think there is a need for both. Isn't that what > > the 'forward' or > > > 'redirect' choice in the mapping does in Struts? > > Certainly if your > > > initial request is a GET then I don't see why it > > should always come > > > back with a redirect. Maybe that is what you mean, > > only force it to > > > happen with a POST. > > > > I would agree with that. I think this could be > > accomplished by using setting > > the _REDIRECT setting for each _ACTION_FORWARD array > > to true or false. The > > ActionController would then either: > > if (_REDIRECT) { > > header('Location: '._PATH); > > } else { > > $_GET[_VIEW] = [view portion of _PATH] > > } > > > > the application.php would look like: > > > > if (!array_key_exists(_CONTROLLER, $_SESSION)) { > > $controller = new ActionController($options); > > $_SESSION[_CONTROLLER] = $controller; > > } > > $controller = &$_SESSION[_CONTROLLER]; > > if (array_key_exists(_ACTION, $_REQUEST)) { > > //release control to controller for further > > processing > > $controller->process($mappings, $_REQUEST); > > } > > $controller->showView(); > > > > That way, if there is an action specified, process > > it. If it redirects, you > > are done, else you always try to display a view > > (either action did not > > redirect, or there was no action specified to begin > > with). > > > > Regards, > > > > Jason > > > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Mail Plus - Powerful. Affordable. Sign up > > now. > > http://mailplus.yahoo.com > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: > > SourceForge Enterprise Edition + IBM + LinuxWorld = > > Something 2 See! > > http://www.vasoftware.com > > _______________________________________________ > > Phrame-devel mailing list > > Phr...@li... > > > https://lists.sourceforge.net/lists/listinfo/phrame-devel > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Ross K. <te...@ya...> - 2003-01-13 16:58:15
|
Hi Arnold Sorry I haven't had time to contribute much here. --- Arnold Cano <arn...@ya...> wrote: > Ross is correct that in Struts the REDIRECT flag > determines whether the system uses the forward() or > sendRedirect() method. However, since PHP does not > have an equivalent to the forward() method, Phrame > uses the header() method in both cases. The only > difference being that when the REDIRECT flag is in > place the session information is destroyed before the > header(). I don't recall exactly how forward works in JSP but I think the closest thing we have in PHP is 'include'. I know it sounds different but I think the end result is more or less the same. Perhaps the ActionView class does something something like: include "$path_to_views/$required_view" . '.php'; Maybe JSP's forward does something tidy in terms of variable scope. I don't know. > Does anyone know if there is a way to "forward" to > another page on the server (server side) without using > the header() method? I may be wrong but my > understanding is that the header('Location: '.$path) > method asks the browser to fetch the $page (client > side). Your understanding is correct. Ross __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-13 16:48:23
|
I did not like specifying the options and mappings as global arrays. I put together this class that could be included as part of the phrame distribtion. You would extend this class for each of your applications to generate the appropriate mappings. It has the advantage of looking a little more compact when defining the mappings, and has some validation regarding the actual structure of the arrays. A example extention and usage is shown below: MappingManager.php: <?php /** * class to create Phrame Mapping arrays * * @author Jason E. Sweat * @since 2003-01-13 */ class MappingManager extends Object { /** * @var array */ var $_aaMap = array( _ACTION_FORMS => array() ,_ACTION_MAPPINGS => array() ); /** * @var array */ var $_aaOptions = array(); /** * constructor * * @return void */ function MappingManager() { trigger_error("MappingManager is a virtual class, please extend for your application"); return false; } /** * add a form to the mapping * * "protected" function to be used by the constructor function of a derived class * @return boolean sucess */ function _AddForm($psIdent, $psType) { if (!is_string($psIdent) || 0 == strlen($psIdent)) { trigger_error("invalid form identifier '$psIdent'"); return false; } if (!is_string($psType) || 0 == strlen($psType)) { trigger_error("invalid form type '$psType'"); return false; } $a_new_form = array(_TYPE => $psType); $this->_aaMap[_ACTION_FORMS][$psIdent] = $a_new_form; } /** * add a map to the mapping * * "protected" function to be used by the constructor function of a derived class * @return boolean sucess */ function _AddMapping($psIdent, $psType, $psInput, $psForm='_DEFAULT_', $piValidate=0) { if (!is_string($psIdent) || 0 == strlen($psIdent)) { trigger_error("invalid mapping identifier '$psIdent'"); return false; } if (!is_string($psType) || 0 == strlen($psType)) { trigger_error("invalid mapping type '$psType'"); return false; } if ('_DEFAULT_' == $psForm) { $psForm = $psIdent; if (!array_key_exists($psForm, $this->_aaMap[_ACTION_FORMS])) { trigger_error("no form mapping to '$psForm' has been established"); return false; } } if (1 != $piValidate) { $piValidate = 0; } $a_new_map = array( _TYPE => $psType ,_NAME => $psForm ,_INPUT => $psInput ,_VALIDATE => $piValidate ,_ACTION_FORWARDS => array() ); $this->_aaMap[_ACTION_MAPPINGS][$psIdent] = $a_new_map; return true; } /** * add a forward to an existing mapping * * "protected" function to be used by the constructor function of a derived class * @return boolean sucess */ function _AddForward($psMapIdent, $psFwdIdent, $psPath='_DEFAULT_', $piRedir=0) { if (!array_key_exists($psMapIdent, $this->_aaMap[_ACTION_MAPPINGS])) { trigger_error("invalid mapping identifier '$psMapIdent'"); return false; } if (!is_string($psFwdIdent) || 0 == strlen($psFwdIdent)) { trigger_error("invalid mapping forward identifier '$psFwdIdent'"); return false; } if (!is_string($psPath) || 0 == strlen($psPath)) { trigger_error("invalid mapping forward path '$psPath'"); return false; } elseif ('_DEFAULT_' == $psPath) { $psPath = $this->_aaMap[_ACTION_MAPPINGS][$psMapIdent][_INPUT]; } if (1 != $piRedir) { $piRedir = 0; } $a_new_fwd = array ( _PATH => $psPath ,_REDIRECT => $piRedir ); $this->_aaMap[_ACTION_MAPPINGS][$psMapIdent][_ACTION_FORWARDS][$psFwdIdent] = $a_new_fwd; return true; } /** * * @return void */ function _SetOptions($psErrorHandler='handle_error' ,$piCache=0 ,$piErrorReporting=-1 ) { if (!1 == $piCache) { $piCache = 0; } if (-1 == $piErrorReporting) { $piErrorReporting = E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE; } $this->_aaOptions = array( _CACHE => $piCache ,_ERROR_REPORTING => $piErrorReporting ,_ERROR_HANDLER => $psErrorHandler ); } /** * retrieve mappings * * @return array */ function GetMappings() { return $this->_aaMap; } /** * retrieve option * * @return array */ function GetOptions() { return $this->_aaOptions; } } ?> An example application extended version of the class is: class AdMaintMap extends MappingManager { /** * * @return */ function AdMaintMap() { $this->_SetOptions(); $this->_AddForm('gidIns', 'GidForm'); $this->_AddForm('empUpd', 'CrmEmpForm'); $this->_AddForm('usrUpd', 'OtherForm'); $this->_AddForm('urlUpd', 'UrlForm'); $this->_AddMapping('gidIns', 'GidInsAction', APPL_BASE.'gid'); $this->_AddForward('gidIns', 'gid'); $this->_AddMapping('gidDepotIns', 'GidDepotInsAction', APPL_BASE.'dpg', 'gidIns'); $this->_AddForward('gidDepotIns', 'dpg'); $this->_AddMapping('gidUpd', 'GidUpdAction', APPL_BASE.'gids', 'gidIns'); $this->_AddForward('gidUpd', 'gids'); $this->_AddMapping('gidDepotUpd', 'GidDepotUpdAction', APPL_BASE.'dpgs', 'gidIns'); $this->_AddForward('gidDepotUpd', 'dpgs'); $this->_AddMapping('empUpd', 'CrmEmpUpdAction', APPL_BASE.'emp'); $this->_AddForward('empUpd', 'emp'); $this->_AddMapping('empIns', 'CrmEmpInsAction', APPL_BASE.'emp', 'empUpd'); $this->_AddForward('empIns', 'emp'); $this->_AddMapping('usrUpd', 'OtherUpdAction', APPL_BASE.'usr'); $this->_AddForward('usrUpd', 'usr'); $this->_AddMapping('usrIns', 'OtherInsAction', APPL_BASE.'usr', 'usrUpd'); $this->_AddForward('usrIns', 'usr'); $this->_AddMapping('urlUpd', 'UrlUpdAction', APPL_BASE.'url'); $this->_AddForward('urlUpd', 'url'); } } You could then use it in your application like this: $map = new AdMaintMap; if (!$_SESSION[_CONTROLLER]) { $controller = new ActionController($map->GetOptions); $_SESSION[_CONTROLLER] = $controller; } $controller->process($map->GetMappings(), $_REQUEST); __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Arnold C. <arn...@ya...> - 2003-01-13 16:40:52
|
Ross is correct that in Struts the REDIRECT flag determines whether the system uses the forward() or sendRedirect() method. However, since PHP does not have an equivalent to the forward() method, Phrame uses the header() method in both cases. The only difference being that when the REDIRECT flag is in place the session information is destroyed before the header(). Does anyone know if there is a way to "forward" to another page on the server (server side) without using the header() method? I may be wrong but my understanding is that the header('Location: '.$path) method asks the browser to fetch the $page (client side). Arnold --- Jason Sweat <jsw...@ya...> wrote: > --- Ross Keatinge <ro...@po...> wrote: > > I think there is a need for both. Isn't that what > the 'forward' or > > 'redirect' choice in the mapping does in Struts? > Certainly if your > > initial request is a GET then I don't see why it > should always come > > back with a redirect. Maybe that is what you mean, > only force it to > > happen with a POST. > > I would agree with that. I think this could be > accomplished by using setting > the _REDIRECT setting for each _ACTION_FORWARD array > to true or false. The > ActionController would then either: > if (_REDIRECT) { > header('Location: '._PATH); > } else { > $_GET[_VIEW] = [view portion of _PATH] > } > > the application.php would look like: > > if (!array_key_exists(_CONTROLLER, $_SESSION)) { > $controller = new ActionController($options); > $_SESSION[_CONTROLLER] = $controller; > } > $controller = &$_SESSION[_CONTROLLER]; > if (array_key_exists(_ACTION, $_REQUEST)) { > //release control to controller for further > processing > $controller->process($mappings, $_REQUEST); > } > $controller->showView(); > > That way, if there is an action specified, process > it. If it redirects, you > are done, else you always try to display a view > (either action did not > redirect, or there was no action specified to begin > with). > > Regards, > > Jason > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up > now. > http://mailplus.yahoo.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = > Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-13 16:37:34
|
--- Arnold Cano <arn...@ya...> wrote: > I will also be adding my development version of Phrame > into the sourceforge cvs. Does anyone have any ideas > on a structure for the cvs tree? I am by no means a > cvs guru so any input would be appreciated. I would think: /phrame /phrame/util /phrame/ext basically as you have it now in the tar ball. __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Arnold C. <arn...@ya...> - 2003-01-13 16:06:16
|
The original hello example application would set the $_SESSION[_ERRORS] = NULL in the index.php file. The only other thing it might be is that currently Phrame only stores the errors from the last view processed. My development version of Phrame has support for multiple sets of errors indexed by property. I will also be adding my development version of Phrame into the sourceforge cvs. Does anyone have any ideas on a structure for the cvs tree? I am by no means a cvs guru so any input would be appreciated. Arnold --- Jason Sweat <jsw...@ya...> wrote: > I am having a problem with the applicaiton I coded > using phrame. I was working > fine, with 4 model classes, 4 form classes, 7 > actions and 5 view. I am in the > process of: > a) adding two new views and assosiated actions and > b) changing over to our PHP coding conventions (for > my applicaiton, not for the > libraries - but it does involve changing things like > the names of global > variables in my application like the $mappings > array). > > Suddenly, the application started clearing the > _ERRORS session object. It was > not undefined or missing, but rather a Stack object > with 0 items in the > _elements array. > > During debugging, I put the following code into the > ActionController::_processForward method: > > $redirect = $actionForward->getRedirect(); > $path = $actionForward->getPath(); > //debug code starts here > $err = &$_SESSION[_ERRORS]; > $s=urlencode($err->Peek()); > $err->Push('this is a test from inside > ActionController::_processForward'); > $_SESSION['errors2'] = &$err; > if (!$redirect) { > header("Location: $path&redir=$s"); > ... > > the redirect ends up going to a url that looks like: > admaint.php?view=usr&redir=Please+add+a+comment+to+at+least+one+user. > > Note the redir parameter indicated there was > something to Peek at in the $err > to begin with, even prior to adding the additional > item. > > I placed the following code at the top of the > redirected script, before > anything is even included in the script: > if (array_key_exists('redir',$_GET)) { > //include enough classes to make the error object > valid in the session > require_once('../phrame/util/Object.php'); > require_once('../phrame/util/ArrayList.php'); > require_once('../phrame/util/Stack.php'); > session_start(); > print "<pre>appl errors:\n"; > var_dump($_SESSION['_errors']); > print "copied errors:\n"; > var_dump($_SESSION['errors2']); > print"</pre>"; > } > > The resulting output from this script is: > appl errors: > object(stack)(1) { > ["_elements"]=> > array(0) { > } > } > copied errors: > object(stack)(1) { > ["_elements"]=> > array(2) { > [0]=> > string(42) "Please add a comment to at least one > user." > [1]=> > string(60) "this is a test from inside > ActionController::_processForward" > } > } > > > How can the original application errors vanish from > the session during the > redirect?!? > > Any insight would be much appreciated. > > Thanks. > > Jason > > > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up > now. > http://mailplus.yahoo.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = > Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-13 04:43:39
|
I am having a problem with the applicaiton I coded using phrame. I was working fine, with 4 model classes, 4 form classes, 7 actions and 5 view. I am in the process of: a) adding two new views and assosiated actions and b) changing over to our PHP coding conventions (for my applicaiton, not for the libraries - but it does involve changing things like the names of global variables in my application like the $mappings array). Suddenly, the application started clearing the _ERRORS session object. It was not undefined or missing, but rather a Stack object with 0 items in the _elements array. During debugging, I put the following code into the ActionController::_processForward method: $redirect = $actionForward->getRedirect(); $path = $actionForward->getPath(); //debug code starts here $err = &$_SESSION[_ERRORS]; $s=urlencode($err->Peek()); $err->Push('this is a test from inside ActionController::_processForward'); $_SESSION['errors2'] = &$err; if (!$redirect) { header("Location: $path&redir=$s"); ... the redirect ends up going to a url that looks like: admaint.php?view=usr&redir=Please+add+a+comment+to+at+least+one+user. Note the redir parameter indicated there was something to Peek at in the $err to begin with, even prior to adding the additional item. I placed the following code at the top of the redirected script, before anything is even included in the script: if (array_key_exists('redir',$_GET)) { //include enough classes to make the error object valid in the session require_once('../phrame/util/Object.php'); require_once('../phrame/util/ArrayList.php'); require_once('../phrame/util/Stack.php'); session_start(); print "<pre>appl errors:\n"; var_dump($_SESSION['_errors']); print "copied errors:\n"; var_dump($_SESSION['errors2']); print"</pre>"; } The resulting output from this script is: appl errors: object(stack)(1) { ["_elements"]=> array(0) { } } copied errors: object(stack)(1) { ["_elements"]=> array(2) { [0]=> string(42) "Please add a comment to at least one user." [1]=> string(60) "this is a test from inside ActionController::_processForward" } } How can the original application errors vanish from the session during the redirect?!? Any insight would be much appreciated. Thanks. Jason __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-09 04:50:50
|
--- Arnold Cano <arn...@ya...> wrote: > 2. I am not sure I want to keep the "utils" classes. > They are very Java-ish and I don't intend on trying to > recreate the Java Class Library. Perhaps utilizing an > existing class library such as Eclipse > (http://www.students.cs.uu.nl/people/voostind/eclipse/) > would be a better idea? I ran across some posts by the author of these classes earlier this summer. I was impressed enough by his passion for doing OO PHP right (expressed in the posts) to download the class library, but I never got around to implementing them in any of my work. It seems like very few of the classes would be used by Phrame (perhaps just Iterator and ArrayIterator?), and it seems the majority of the classes in the library are associated with his DB abstraction layer (I have settled on ADOdb and do not see a reason to change at the moment). The util classes look reasonable to me, I am not sure they warrant the effort to replace them with something else. My $0.02 Jason __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |