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-01-08 14:02:54
|
--- 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 |
From: Ross K. <ro...@po...> - 2003-01-08 03:34:59
|
Hi all Nice to see some activity here. -- Jason Sweat <jsw...@ya...> wrote: >I disagree with the idea of removing the redirection from the = architecture >because it serves a very useful purpose, one that, IMHO, far outweighs = any >performance considerations. > >The redirection after a POST request forces the user's browser to issue = a GET >request for the view page. This has the effect of correcting a major = problem >with users hitting the refresh button on the next page, forcing the = browser to >re-submit the POST request. =20 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. Cheers Ross |
From: Jason S. <jsw...@ya...> - 2003-01-08 02:39:16
|
I noticed the phrame files are not in the CVS on the sf.net site. Do you intend to host them there? I was curious about the ActionView class and headed there to see if you had checked it in yet. Thanks. Jason __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-08 02:33:35
|
--- Arnold Cano <arn...@ya...> wrote: This > change resulted in a new ActionView class that > contained a display() method. From an Action's > perform() method I would return an ActionView object > to the ActionController. Then in the index.php file I > would get a reference to the ActionView object from > the ActionController and call it's display() method. > This change shouldn't affect Phrame's ability to use > various display technologies such as Smarty, XSLT, > Flash, etc. I am interested in this class. I ended up extending the ActionController class for my application and adding a ::showView() method. This method would internally determine the appropriate view, and the instantiate a Smarty object, assign values based on the view, assign common values, and render the template. This was not an entirely satisfying approach, but it did take the application.php file down to basically: if (action) { $controller->process($mappings, $_REQUEST); } else { $controller->showView() } The though process I was headed down, was to create a ViewManager class, that would instantiate Views as required. The Views would have some sort of a "prepare" method (in which I would assign data appropriate to the view to a single Smarty instance, probably owned by the ViewManager) as well as a "show/perform/display/render/whatever" method that would actually send the output. This was the direction I was headed because the large switch statement I had in my application extended controller class had to much of a "procedural" feel to it. HTH in some way. I am interested in hearing your thoughts. Jason __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-08 02:20:29
|
-- Arnold Cano <arn...@ya...> wrote: > 3. The current design is not as efficient as it could > be because every request into the controller results > in an additional request via HTTP redirect via a call > to the PHP header() method (thanks Ross Keatinge). I > modified a local copy of Phrame to output the view > directly as part of the original HTTP request. This > change resulted in a new ActionView class that > contained a display() method. From an Action's > perform() method I would return an ActionView object > to the ActionController. Then in the index.php file I > would get a reference to the ActionView object from > the ActionController and call it's display() method. > This change shouldn't affect Phrame's ability to use > various display technologies such as Smarty, XSLT, > Flash, etc. I disagree with the idea of removing the redirection from the architecture because it serves a very useful purpose, one that, IMHO, far outweighs any performance considerations. The redirection after a POST request forces the user's browser to issue a GET request for the view page. This has the effect of correcting a major problem with users hitting the refresh button on the next page, forcing the browser to re-submit the POST request. Most users are just hitting refresh to make sure they are seeing the latest data on the view page, and are confused when the browser asks them if they want to re-post the information. Most consider this an application error rather than a user error :) Redirection happily takes care of this situation, the user hitting refresh will submit a GET request for the view page as they most likely intended in the first place. Performance wise, it is not as if you are fetching and rendering the whole page twice, the header is a single packet traveling to the browser asking it to issue a GET request. There is one additional round trip between the server and the browser for this, but it should not be a significant enough problem to eliminate the benefit of redirection described above. Regards, Jason __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-08 02:19:37
|
--- 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 |
From: Arnold C. <arn...@ya...> - 2003-01-07 23:26:56
|
Hi Everyone, I would just like to start by saying thanks to those that have posted ideas and are interested in getting a community formed around Phrame. Phrame started as a solution to the problem of developing/maintaining a large PHP project at work. I would like to start by addressing some things I have come across in reading comments about Phrame on various PHP websites. 1. Phrame was initially "based" on the "design" of Struts but was never intended to be a direct port. PHP and Java are like apples and oranges. 2. I intend for Phrame's evolution to be guided by the Phrame community, not necessarily the Struts community. 3. The Struts "design" was sound and seemed like a good starting place for Phrame's development. Whew... that said, I would like to start a discussion on some ideas I have for the future. These are just ideas at this point meant to spark some conversation for future development. 1. All subsequent versions of Phrame will be released under the LGPL license instead of the GPL (thanks Kaede Rokawa). 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? 3. The current design is not as efficient as it could be because every request into the controller results in an additional request via HTTP redirect via a call to the PHP header() method (thanks Ross Keatinge). I modified a local copy of Phrame to output the view directly as part of the original HTTP request. This change resulted in a new ActionView class that contained a display() method. From an Action's perform() method I would return an ActionView object to the ActionController. Then in the index.php file I would get a reference to the ActionView object from the ActionController and call it's display() method. This change shouldn't affect Phrame's ability to use various display technologies such as Smarty, XSLT, Flash, etc. 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'; ... 5. I would also like to deprecate the Xml::marshal() method in favor of PHP's WDDX serialize/deserialize methods. Well, thats all I can remember for now but I'm sure there is enough to get a conversation started. :) Thanks, Arnold __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-07 22:59:57
|
This message is in reply to Ross Keatinge's message (from 1969 according to sf.net!) I reworked the hello demo to use Smarty instead of xls (the production server here at work is not compiled with xls support). This is what I changed: Altered the mappings.php file to specify templates instead of xls: <?php //build mapping information to pass into controller $mappings = array( _ACTION_FORMS => array( 'form' => array( _TYPE => 'HelloForm' ) ), _ACTION_MAPPINGS => array( 'sayHello' => array( _TYPE => 'HelloAction', _NAME => 'form', _INPUT => 'index.php?view=index.tpl', _VALIDATE => 1, _ACTION_FORWARDS => array( 'hello' => array( _PATH => 'index.php?view=hello.tpl', _REDIRECT => 0 ), 'index' => array( _PATH => 'index.php?view=index.tpl', _REDIRECT => 0 ) ) ) ) ); ?> Created these templates under the view directory: index.tpl: <html> <head> <title>Phrame - Example Application</title> </head> <body> <form action="phrame.php" method="post"> {if $errors|@count gt 0} <ul> {section name=e loop=$errors} <li><b style="color: red">{$errors[e]}</b></li> {/section} </ul> {/if} <p>What is your name?<br/> <input type="text" name="name" value="{$name}"/> <input type="submit" value="OK"/></p> <input type="hidden" name="action" value="sayHello"/><br/> </form> </body> </html> hello.tpl: <html> <head> <title>Phrame - Example Application</title> </head> <body> <p>Hello {$name}</p> <a href="index.php">Back</a></body> </html> And made these changes to the index.php file: <?php include('include/include.php'); require_once('Smarty.class.php'); session_start(); $t = new Smarty; $t->template_dir = 'views'; if ($_SESSION[_ERRORS]) { $t->assign('errors', $_SESSION[_ERRORS]->toArray()); $_SESSION[_ERRORS] = false; } if ($_SESSION[_FORM]) { $t->assign('forms', $_SESSION[_FORM]); } if ($_SESSION['person']) { $t->assign('name', $_SESSION['person']->getName()); } $template = ($_GET[_VIEW]) ? $_GET[_VIEW] : 'index.tpl'; $t->display($template); ?> __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-06 18:13:24
|
Here is a version of the hello example index.php file (modifed to work with Smarty instead of XLS, but the concepts apply). You can check to see if an action was requested, if not, then use you view logic. All posts would need to go to index.php instead of phrame.php to complete these changes. index.php: <?php include('include/include.php'); session_start(); if (is_array($_REQUEST) && array_key_exists(_ACTION,$_REQUEST)) { //add controller to session if not already cached if (!$_SESSION[_CONTROLLER]) { $controller = new ActionController($options); $_SESSION[_CONTROLLER] = $controller; } //release control to controller for further processing $controller = &$_SESSION[_CONTROLLER]; $controller->process($mappings, $_REQUEST); } else { /** * Smarty Template System * * {@link http://smarty.php.net/ smarty.php.net} * {@link http://smarty.incutio.com/ smarty wiki} * {@link http://marc.theaimsgroup.com/?l=smarty-general&r=1&w=2 mail list archive} */ require_once('amp_smarty.php'); $t = new AMP_Smarty; $t->template_dir = 'views'; if ($_SESSION[_ERRORS]) { $t->assign('errors', $_SESSION[_ERRORS]->toArray()); $_SESSION[_ERRORS] = false; } if ($_SESSION['person']) { $t->assign('name', $_SESSION['person']->getName()); } $t->assign('post_script', 'index.php'); $template = ($_GET[_VIEW]) ? $_GET[_VIEW] : 'index'; $t->display($template.'.tpl'); } ?> __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Jason S. <jsw...@ya...> - 2003-01-06 18:04:19
|
Hello Phrame list members, I would like to introduce myself. My name in Jason Sweat. I work for Alcoa doing application development, and I am the web master for our business units Intranet servers. I have been using PHP March of 2001, where I found it as a free (as in beer :) substitute for ASP/IIS for a home business. Since then, I have adopted PHP as our intranet development standard at work. Several articles I wrote were published by the Zend website. In particular, http://www.zend.com/zend/tut/tutsweatpart2.php was an early-procedural code based-site architecture I wrote that vaguely resembles a M-V-C. I was very excited when I stumbled across Phrame. I took a medium sized project we had on the task list at work and implemented it under the "Phrame"work. It is working very well, and in some additional emails, I would like to discuss some of the changes I made to it. Thank you very much for releasing the Phrame source. It is a very nice system, and I am sure it has a bright future ahead of it :) Regards, Jason __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: Ross K. <ro...@po...> - 2002-12-18 15:38:15
|
Hi Arnold and anyone else here. I've been playing with Phrame. I plan to spend more time on it when I'm able to because I really think its on the right track as a general purpose PHP framework. Here is a couple comments for what they're worth. I'm new to this so feel free to take them with a grain of salt but ... 1) It seems a pity to me that every request into the controller results in an additional request via an http redirect. There are speed issues with this for people on slow connections and it obviously increases the server hits. I think we need the option for the controller to simply output a view directly as part of the original http request. I haven't thought through the best and cleanest way of doing that but I think it would make for smoother flow in cases where it makes sense to do so. 2) I think there needs to be a version of the Hello demo that doesn't use XML and XSLT. I like XSLT (although I'm new to it) but I'm afraid we might lose newbies at their first look because of two reasons. People coming from the typical 'throw it together and mix up your PHP and HTML' world but looking for a better way might immediately open index.php and see all this 'funny XML stuff' and decide its not for them. Also I think a lot of low cost hosting doesn't have the Sablotron library compiled into PHP so if they proceed they'll get a function not defined error and at that point it might all seem too difficult. I know its not included the default RedHat 8 install because I spent some of yesterday recompiling my PHP to get it. I can probably modify the existing demo to do something with direct PHP variables. I'll try to look at that in the next few days. My idea of how the Hello demo should work if we addressed my first comment is probably to have only index.php. I don't think phrame.php would be needed. Even the first page goes through the controller, probably getting a default uri, and the controller outputs the correct view by way of some sort of include rather than a redirect. Cheers Ross |