studs-devel Mailing List for Studs MVC Framework+
Status: Beta
Brought to you by:
mojavelinux
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(5) |
Jul
(4) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Dan A. <dan...@gm...> - 2006-03-24 08:09:47
|
SSBoYXZlIHB1dCBpbiBhIHJlcXVlc3QgdG8gc3dpdGNoIHRvIHN1YnZlcnNpb24uICBJIGFtIGhv cGluZyB0aGF0CndpbGwgZWFzeSBzb21lIG9mIG91ciB3b2VzLgoKL2RhbgoKLS0KRGFuaWVsIEFs bGVuClJlZ2lzdGVyZWQgTGludXggVXNlciAjMjMxNTk3CgpNb2phdmVsaW51eC5jb206IE9wZW4g U291cmNlIEFkdm9jYWN5Cmh0dHA6Ly93d3cubW9qYXZlbGludXguY29tCgpXaGlsZSBJIG1ha2Ug YSBzdHJvbmcgZWZmb3J0IHRvIGtlZXAgdXAgd2l0aCBteSBlbWFpbCBvbiBhIGRhaWx5IGJhc2lz LApsaWZlIGFuZCB3b3JrIGNvbWUgZmlyc3QgYW5kLCBhdCB0aW1lcywga2VlcCBtZSBhd2F5IGZy b20gbXkgbWFpbCBmb3IgYQp3aGlsZS4gSWYgeW91IGNvbnRhY3QgbWUgYW5kIHRoZW4gZG9uJ3Qg aGVhciBiYWNrIGZvciBtb3JlIHRoYW4gYSB3ZWVrLAppdCBpcyB2ZXJ5IGxpa2VseSB0aGF0IEkg YW0gZXhjZXNzaXZlbHkgYmFja2xvZ2dlZCBvciB0aGUgbWVzc2FnZSB3YXMKY2F1Z2h0I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BQbGVhc2UgZG9uJ3QgaGVzaXRhdGUgdG8gcmVzZW5kIGEg bWVzc2FnZSBpZgp5b3UgZmVlbCB0aGF0IGl0IGRpZCBub3QgcmVhY2ggbXkgYXR0ZW50aW9uLgo= |
|
From: Dan A. <dan...@gm...> - 2005-09-05 15:50:58
|
It should be availble now, under the tag STUDS_0_9_7. I know that sourceforge was updating its servers over the last couple of days, so there might have been some strange behavior with the cvs server. I just checked the cvsweb and the cvs server and both are giving me 0.9.7 and newer files. /dan On 9/5/05, Timur Vafin <ti...@e-...> wrote: > Hello, >=20 > It seems in cvs the old version lays? I can receive only 0.9.6. >=20 > -- > Send plain text only to timurv at e-kazan dot ru > PGP key: http://wwwkeys.us.pgp.net:11371/pks/lookup?op=3Dget&search=3D0x= 425B9F0F > -- > Timur Vafin >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practic= es > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & Q= A > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > studs-devel mailing list > stu...@li... > https://lists.sourceforge.net/lists/listinfo/studs-devel >=20 --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Timur V. <ti...@e-...> - 2005-09-05 12:09:49
|
Hello,=20 It seems in cvs the old version lays? I can receive only 0.9.6. -- Send plain text only to timurv at e-kazan dot ru PGP key: http://wwwkeys.us.pgp.net:11371/pks/lookup?op=3Dget&search=3D0x42= 5B9F0F -- Timur Vafin |
|
From: Ryan G. <ry...@me...> - 2005-09-04 21:57:46
|
Hello All,
I think I have traced the most frequent most frustrating critical error I
experience during development. Often when using DTO and ActionForm objects,
I encounter corrupted values that then crash my application and shred the
response from the server so that nothing displays in my browser.
The problem seems to be rooted in the way PHP handles pass by reference when
it comes to scalar values. Obviously pass by reference is integral to the
success of studs. And thus, pass by reference is embedded everywhere.
My example will use the BeanUtils class. I often use the BeanUtils class to
copy properties from a DTO object returned from a service to a Form object
defined in my action. The properties usually map 1:1 between the DTO and
Form objects. My DTO and Form objects typically have getters that return
scalar values such as integers. As you know, the BeanUtils::copyProperty
method describes the $orig object, performs a series of gets on the $orig
object and stores them in a temporary array by reference...
[BeanUtils] Line 110: $properties[$name] =&
PropertyUtils::getSimpleProperty($bean, $name);
After the describe method, it then calls the populate method with loops
through the temporary array and invokes the BeanUtils::setProperty method
for each property, this method passes the value of $properties[$name] by
reference.
In setProperty, the value of $properties[$name], now $value is passed into
the MethodUtils::invokeMethod method via an array wrapper...
[BeanUtils] Line 245: MethodUtils::invokeMethod($target, $writeMethod,
array(&$value));
At this point the $value becomes corrupt and tends to cause a crash...
eventually.
I've seen this primarily affect integers. I was wondering if you have
experience similar behavior. I am running PHP 4.3.10-15 on a debian
installation.
If there is no way to avoid this issue, would it be appropriate to introduce
an Integer or Number object to the project? Pass by reference on objects
doesn't seem to have this problem.
Ok, please pardon the long over explanatory post. I have attached sample
code below my signature that will reproduce this behavior on my machine.
Regards,
Ryan
=========================================
class DTO {
var $integer;
function getInteger() {
return $this->integer;
}
function setInteger($int) {
$this->integer = $int;
}
}
$dto = new DTO();
$dto->setInteger(1);
$value =& $dto->getInteger();
var_dump(array(&$value));
echo " <---- note the integral sign, should say 'int'";
echo "<hr />";
echo "<hr />";
$dto = new DTO();
$dto->setInteger(1);
$value =& $dto->getInteger();
var_dump($dto);
echo " <---- note the integral sign, should say 'int'";
echo "<hr />";
echo "<hr />";
class DTO2 {
var $integer;
function getInteger() {
//call (int) cast function to return strings and integers.
return (int) $this->integer;
}
function setInteger($int) {
$this->integer = $int;
}
}
$dto = new DTO2();
$dto->setInteger(1);
$value =& $dto->getInteger();
var_dump($dto);
echo " <---- note 'int' not corrupted.";
echo "<hr />";
echo "<hr />";
$dto = new DTO2();
$dto->setInteger(1);
$value =& $dto->getInteger();
var_dump(array(&$value));
echo " <---- note integral sign again... back to same problem.";
echo "<hr />";
|
|
From: Dan A. <dan...@gm...> - 2005-09-03 13:53:55
|
> I seem to be experiencing the same problem in the HttpSession class. Aft= er > three reloads of a session bean enabled form, I get garbage. Your > &getAttribute method in HttpSession was using the same ? : logic. Yep, you are correct. However, I am one step ahead in that I made the fix just a few weeks ago in CVS. It will be part of the 0.9.8 release. Thanks for the report, and if you see any other uses of that syntax to return a reference, please do speak up. I will add this information to the wiki so that anyone creating new code want run into this problem. /dan --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Ryan G. <ry...@me...> - 2005-09-03 04:09:31
|
Hi Dan,
I seem to be experiencing the same problem in the HttpSession class. After
three reloads of a session bean enabled form, I get garbage. Your
&getAttribute method in HttpSession was using the same ? : logic.
function &getAttribute($name)
{
if(isset($this->attributes[$name])) {
return $this->attributes[$name];
}
else {
return null;
}
}
Seems to do the trick.
Regards,
Ryan
Ryan Green
Media Greenhouse
aolim ryang8880
http://www.mediagreenhouse.com
|
|
From: Dan A. <dan...@gm...> - 2005-07-11 00:29:00
|
I think that going forward with servlet filters is probably the best way. I still would like to have a Principal implementation so that we can adhere to the JavaEE spec in some regards, but I agree that doing the entire auth-constraint would not be worth it at this point. /dan On 6/30/05, Timur Vafin <ti...@e-...> wrote: > Hello, >=20 > Now I prepare for the project actively using studs. > There was enough of abstract classes model, action and service which si= mply enough extend for comfortable work. >=20 > Shortly I shall try to bring them for discussion as an example of > the application. >=20 > As it would be desirable to mention a question of authorization and ses= sions in discussion. > What correct way? >=20 > -- > Send plain text only to timurv at e-kazan dot ru > PGP key: http://wwwkeys.us.pgp.net:11371/pks/lookup?op=3Dget&search=3D0x= 425B9F0F > -- > Timur Vafin >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick > _______________________________________________ > studs-devel mailing list > stu...@li... > https://lists.sourceforge.net/lists/listinfo/studs-devel >=20 --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Dan A. <dan...@gm...> - 2005-07-10 04:45:44
|
merged
On 6/30/05, Dan Allen <dan...@gm...> wrote:
> Beautiful suggestion. Although data access in tag libraries is one of
> debate (possibly breaking MVC), I feel that a framework should not
> restrict the user from choosing to do things a certain way.
> Therefore, I will offer this method as an option, similar to Struts.
>=20
> Additionally, I would really like to see the sql tag library ported to
> Studs so that it is easy to throw together some SQL statements using
> standard tag libraries. Anyone want to give it a go?
>=20
> /dan
>=20
> On 6/30/05, Timur Vafin <ti...@e-...> wrote:
> > Hello.
> >
> > Let's assume, that it is required to create tag carrying out specific t=
hings in the project.
> > Tag should take data from from DB by interaction with a class Manager
> > which it is returned DataSource object reference.
> >
> >
> > Let's name ours tag HtmlAreaTag, which detching data by the key.
> >
> > class HtmlAreaTag extends TagSupport
> > {
> > ....
> >
> > function getBlock()
> > {
> > $manager =3D& new HtmlAreaManager(TagUtils::getD=
ataSource($this->pageContext));
> > $block =3D& $manager->getRowByAlias($this->get=
Alias());
> >
> > return is_null($block) ? '' : $block->getHtml();
> > }
> >
> > }
> >
> > For this purpose in TagUtils I suggest to add function
> >
> >
> > /**
> > * Return the default data source for the current module.
> > *
> > * @param request The HttpServletRequest we are processing
> > * @return DataSource
> > * @throws ServletException If the datasource with the specifie=
d key could not be found
> > */
> > function &getDataSource(&$pageContext, $key =3D null)
> > {
> > if (is_null($key))
> > {
> > $key =3D c('StudsConstants::DATA_SOURCE_KEY');
> > }
> >
> > // identify the current module
> > $request =3D& $pageContext->getRequest()=
;
> > $servletContext =3D& $pageContext->getServletContext();
> > $moduleConfig =3D& ModuleUtils::getModuleConfig($requ=
est, $servletContext);
> >
> > // return the requested data source instance
> > $ds =3D& $servletContext->getAttribute($key . $moduleCo=
nfig->getPrefix());
> > if ($ds =3D=3D null)
> > {
> > throw_exception(new ServletException('The datas=
ource with the requested key \'' . $key . '\' has not been configured'));
> > return;
> > }
> >
> > return $ds;
> > }
> >
> >
> >
> >
> >
> > --
> > Send plain text only to timurv at e-kazan dot ru
> > PGP key: http://wwwkeys.us.pgp.net:11371/pks/lookup?op=3Dget&search=3D=
0x425B9F0F
> > --
> > Timur Vafin
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> > from IBM. Find simple to follow Roadmaps, straightforward articles,
> > informative Webcasts and more! Get everything you need to get up to
> > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick
> > _______________________________________________
> > studs-devel mailing list
> > stu...@li...
> > https://lists.sourceforge.net/lists/listinfo/studs-devel
> >
>=20
>=20
> --
> Open Source Advocacy
> http://www.mojavelinux.com
>=20
--=20
Open Source Advocacy
http://www.mojavelinux.com
|
|
From: Timur V. <ti...@e-...> - 2005-07-05 08:43:51
|
Hello,=20 I suggest to discuss about realization of authorization model in Studs. I think to realize "security-constraint" logic it would be not expedient within the limits of the project on php. More correct way it to finish servlets processing. May be we can to complete filter chains which will allow us to wrap our requests? I tried to find free-source auth taglibrary, but unsuccessfully. What can you recommend, that I port to php? -- Send plain text only to timurv at e-kazan dot ru PGP key: http://wwwkeys.us.pgp.net:11371/pks/lookup?op=3Dget&search=3D0x42= 5B9F0F -- Timur Vafin |
|
From: Dan A. <dan...@gm...> - 2005-07-01 01:23:34
|
Beautiful suggestion. Although data access in tag libraries is one of
debate (possibly breaking MVC), I feel that a framework should not
restrict the user from choosing to do things a certain way.=20
Therefore, I will offer this method as an option, similar to Struts.
Additionally, I would really like to see the sql tag library ported to
Studs so that it is easy to throw together some SQL statements using
standard tag libraries. Anyone want to give it a go?
/dan
On 6/30/05, Timur Vafin <ti...@e-...> wrote:
> Hello.
>=20
> Let's assume, that it is required to create tag carrying out specific thi=
ngs in the project.
> Tag should take data from from DB by interaction with a class Manager
> which it is returned DataSource object reference.
>=20
>=20
> Let's name ours tag HtmlAreaTag, which detching data by the key.
>=20
> class HtmlAreaTag extends TagSupport
> {
> ....
>=20
> function getBlock()
> {
> $manager =3D& new HtmlAreaManager(TagUtils::getDat=
aSource($this->pageContext));
> $block =3D& $manager->getRowByAlias($this->getAl=
ias());
>=20
> return is_null($block) ? '' : $block->getHtml();
> }
>=20
> }
>=20
> For this purpose in TagUtils I suggest to add function
>=20
>=20
> /**
> * Return the default data source for the current module.
> *
> * @param request The HttpServletRequest we are processing
> * @return DataSource
> * @throws ServletException If the datasource with the specified =
key could not be found
> */
> function &getDataSource(&$pageContext, $key =3D null)
> {
> if (is_null($key))
> {
> $key =3D c('StudsConstants::DATA_SOURCE_KEY');
> }
>=20
> // identify the current module
> $request =3D& $pageContext->getRequest();
> $servletContext =3D& $pageContext->getServletContext();
> $moduleConfig =3D& ModuleUtils::getModuleConfig($reques=
t, $servletContext);
>=20
> // return the requested data source instance
> $ds =3D& $servletContext->getAttribute($key . $moduleConf=
ig->getPrefix());
> if ($ds =3D=3D null)
> {
> throw_exception(new ServletException('The datasou=
rce with the requested key \'' . $key . '\' has not been configured'));
> return;
> }
>=20
> return $ds;
> }
>=20
>=20
>=20
>=20
>=20
> --
> Send plain text only to timurv at e-kazan dot ru
> PGP key: http://wwwkeys.us.pgp.net:11371/pks/lookup?op=3Dget&search=3D0x=
425B9F0F
> --
> Timur Vafin
>=20
>=20
>=20
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick
> _______________________________________________
> studs-devel mailing list
> stu...@li...
> https://lists.sourceforge.net/lists/listinfo/studs-devel
>=20
--=20
Open Source Advocacy
http://www.mojavelinux.com
|
|
From: Timur V. <ti...@e-...> - 2005-06-30 08:59:16
|
Hello,=20 Now I prepare for the project actively using studs. There was enough of abstract classes model, action and service which simp= ly enough extend for comfortable work. Shortly I shall try to bring them for discussion as an example of the application. As it would be desirable to mention a question of authorization and sessi= ons in discussion. What correct way? -- Send plain text only to timurv at e-kazan dot ru PGP key: http://wwwkeys.us.pgp.net:11371/pks/lookup?op=3Dget&search=3D0x42= 5B9F0F -- Timur Vafin |
|
From: Timur V. <ti...@e-...> - 2005-06-30 08:48:42
|
Hello.
Let's assume, that it is required to create tag carrying out specific thing=
s in the project.
Tag should take data from from DB by interaction with a class Manager
which it is returned DataSource object reference.
Let's name ours tag HtmlAreaTag, which detching data by the key.
class HtmlAreaTag extends TagSupport
{
....
function getBlock()
{
$manager =3D& new HtmlAreaManager(TagUtils::getDataS=
ource($this->pageContext));
$block =3D& $manager->getRowByAlias($this->getAlia=
s());
=20
return is_null($block) ? '' : $block->getHtml();
}
}
For this purpose in TagUtils I suggest to add function
/**
* Return the default data source for the current module.
*
* @param request The HttpServletRequest we are processing
* @return DataSource
* @throws ServletException If the datasource with the specified ke=
y could not be found
*/
function &getDataSource(&$pageContext, $key =3D null)
{
if (is_null($key))
{
$key =3D c('StudsConstants::DATA_SOURCE_KEY');
}
// identify the current module
$request =3D& $pageContext->getRequest();
$servletContext =3D& $pageContext->getServletContext();
$moduleConfig =3D& ModuleUtils::getModuleConfig($request,=
$servletContext);
// return the requested data source instance
$ds =3D& $servletContext->getAttribute($key . $moduleConfig=
->getPrefix());
if ($ds =3D=3D null)
{
throw_exception(new ServletException('The datasourc=
e with the requested key \'' . $key . '\' has not been configured'));
return;
}
return $ds;
}
=20
--
Send plain text only to timurv at e-kazan dot ru
PGP key: http://wwwkeys.us.pgp.net:11371/pks/lookup?op=3Dget&search=3D0x42=
5B9F0F
--
Timur Vafin
|
|
From: Dan A. <dan...@gm...> - 2005-06-28 20:45:07
|
I think that perhaps you forgot to attach the file to the tracker. /dan On 6/28/05, Timur Vafin <ti...@e-...> wrote: > Hello, >=20 > I submit ActionForm generator. > Let's try it, it may be helpful ;) >=20 > -- > Send plain text only to timurv at e-kazan dot ru > PGP key: http://wwwkeys.us.pgp.net:11371/pks/lookup?op=3Dget&search=3D0x= 425B9F0F > -- > Timur Vafin >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick > _______________________________________________ > studs-devel mailing list > stu...@li... > https://lists.sourceforge.net/lists/listinfo/studs-devel >=20 --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Timur V. <ti...@e-...> - 2005-06-28 12:34:58
|
Hello,=20
I submit ActionForm generator.
Let's try it, it may be helpful ;)
--
Send plain text only to timurv at e-kazan dot ru
PGP key: http://wwwkeys.us.pgp.net:11371/pks/lookup?op=3Dget&search=3D0x42=
5B9F0F
--
Timur Vafin
|
|
From: Dan A. <dan...@gm...> - 2005-06-23 20:07:13
|
Much work has been done to bring Studs up to speed with PHP5. Please note that support for PHP5 at this time will not exclude the use of Studs with PHP4. The goal is to get Studs working with both versions, and then look to a PHP5 specific version that can leverage the new features of that language. At this point there are still some small bugs dealing with tag libraries, but most of the tests are passing in the other parts of the code and a few more tweaks should make it available to those of you using PHP5. You will be hearing from me about a release as soon as I verify that it all works. /dan On 4/4/05, Dan Allen <dan...@mo...> wrote: > Doug, >=20 > Yes, I do plan on implementing Studs in PHP5, though first I want to > make sure it is working properly in PHP4. I have a major release coming > (0.9.5) that is going to fix some critical problems with Studs. In this > release are some fixes for PHP5 compatibility. However, what I really > want to do is take advantage of PHP5s exception handling and for that I > will most likely need to branch Studs in CVS. I am not sure when that > is going to happen, but eventually curiousity will torture me enough ;) >=20 > I strongly believe that Studs running under PHP5 could be a major player > against lightweight Java implementations like Tomcat. PHP is fast to > develop and with the improvement in the PHP5 engine, it just might solve > some of the major shortcomings of Studs under PHP4. However, to make > that possible I will be looking for a bigger Studs team (hint, hint). >=20 > Later! >=20 > /dan >=20 > do...@gc... wrote: > > Submitted by: Douglas Gontijo <do...@gc...> on Monday, March 7t= h, 2005 @ 8:11:03 pm (-0800) > > > > Online Form Fields > > ------------------ > > > > Url: > > www.gcoders.net > > > > Message: > > Hello Dan, > > Do you plan to release Studs framework in PHP5? > > > > Cheers > > > > Client Variables > > ---------------- > > > > HTTP_USER_AGENT: > > Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050203 Fire= fox/1.0 > > > > >=20 >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick > _______________________________________________ > studs-devel mailing list > stu...@li... > https://lists.sourceforge.net/lists/listinfo/studs-devel >=20 --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Dan A. <dan...@mo...> - 2005-04-04 10:35:12
|
Doug, Yes, I do plan on implementing Studs in PHP5, though first I want to make sure it is working properly in PHP4. I have a major release coming (0.9.5) that is going to fix some critical problems with Studs. In this release are some fixes for PHP5 compatibility. However, what I really want to do is take advantage of PHP5s exception handling and for that I will most likely need to branch Studs in CVS. I am not sure when that is going to happen, but eventually curiousity will torture me enough ;) I strongly believe that Studs running under PHP5 could be a major player against lightweight Java implementations like Tomcat. PHP is fast to develop and with the improvement in the PHP5 engine, it just might solve some of the major shortcomings of Studs under PHP4. However, to make that possible I will be looking for a bigger Studs team (hint, hint). Later! /dan do...@gc... wrote: > Submitted by: Douglas Gontijo <do...@gc...> on Monday, March 7th, 2005 @ 8:11:03 pm (-0800) > > Online Form Fields > ------------------ > > Url: > www.gcoders.net > > Message: > Hello Dan, > Do you plan to release Studs framework in PHP5? > > Cheers > > Client Variables > ---------------- > > HTTP_USER_AGENT: > Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050203 Firefox/1.0 > > |
|
From: Dan A. <dan...@gm...> - 2004-09-15 15:40:28
|
Yikes! I was a little harsh on existing frameworks. I didn't mean ALL frameworks, I meant that there are alot. I don't mean to discredit quality work that has been done. However, the fact still remains, there is no standard base. No standard way to import classes or define a hierachy. Dan On Wed, 15 Sep 2004 11:37:19 -0400, Dan Allen <dan...@gm...> wrote: > Well, let me answer some of those questions because I feel that I have > good answers. Oh, and don't worry about offending me. I am a > programmer and thus have extremely thick skin ;) > > Why a Struts port in PHP? Several reasons. When I first got into MVC > and read about Struts I thought to myself, that would be nice, if I > had access to a servlet container, but I didn't (for deployment > purposes, not for development). I thought to myself, if I had this > for PHP, I could make my website using it today. Then, one day, when > I do have access to a servlet container, all my ideas will translate. > The transition would have been very smooth. The PHP version is like > the training wheels. Now, I realize it is possible to get java > hosting, but it would still require an ISP change. Later on, I found > even more reason since working with java servlets on a shared web > hosts is a HUGE pain. I already loved PHP, and I wanted to stick with > it. > > Okay, so I start working on the port, and it is hard. There was a lot > of work to go into it. Why didn't I quit? Several reasons again. I > had never taken a project from start to finish and made it a top-level > sourceforge project. This was my chance. I needed it and it seemed > interesting. As I was working along, I found TONS of bugs in Tomcat > and Struts, which I contributed back to the community. I was reading > all through the Tomcat code and it was amazing to see how it all > worked. The challenge was translating that to another language, which > required a whole other level of understanding. Today, I know the > servlet container almost as well as the people who developed it. > Ditto for Struts. That understanding is without value. > > Okay, that makes sense, but what benefit is it to PHP? Look, PHP > frameworks are shit. Most of the code out there is shit. Now, that > is not to say that the programs around good in respect to what they > are trying to accomplish. phpBB code is horrid. Why does this > happen? Well, even with all the frameworks in Java, at least they all > share something in common. They all run in a standard container > environment, handling sessions the same, importing classes the same, > do error handling the same. Point is, there is a standard base. PHP > has no standard base. PEAR is not it. My hopes are to strike up > something to this effect. Studs is a prototype. There are so many > libraries that can be used as standalone, it probably makes up 75% of > what you download. > > Was it worth it? You bet. If only from the standpoint of a learning > experience, it was invaluable. I learned how to look at a project, > swallow it, and make it happen. The whole lifecycle. I'm proud of my > work. I will use it. Others can choose as they may, that is why it > is open sourced. Rails could EASILY be made using Studs MVC > Framework+. Just implement HttpServlet and go from there. Maybe I > will look into it. Struts is not the end all solution to MVC, but it > is a damn good starting point. > > One last point. You mentioned that it would be better to not have a > configuration file and just use some sort of reflection on the action > to get the class, etc. I actually started that way with Studs and it > is in the early code. I went back and implemented struts-config.xml > support because my goal was to create a stepping stone for PHP > developers moving to Java. I could easily make a framework which > extends Studs and cuts out this configuration file dependency. > > Oh, sorry, another last point. Every PSP page is just a PHP page on > drugs. With no taglibs or JSTL syntax, it just compiles as itself. > So in all reality, one could use Studs either was Model 1 or Model 2. > You don't HAVE to create an Action, etc. > > Dan > > > > > On Wed, 15 Sep 2004 11:48:15 +0200, Balazs Fejes <fb...@gm...> wrote: > > Hi, > > > > thanks for going through my points. > > Can I ask you what you see as the benefits of this framework? > > I think if you want to do it the "cleanly architected" way, you might > > as well use Struts and JSTL. > > I thought the benefit of PHP would be exactly the opposite - > > simplicity (even at the expense of the architecture). > > What are your thoughts on the more radical approach of Rails? You must > > look at it when thinking about MVC frameworks. Maybe this would be a > > worthwhile project to clone in PHP rather than Struts :-) > > > > I went through my post and it came off very agressive. Sorry about > > that, but I felt like someone is putting in an incredible effort into > > something that is not worth it. > > > > Best regards, > > Balazs > > > > > > > > > > On Tue, 14 Sep 2004 11:37:45 -0400, Dan Allen <dan...@gm...> wrote: > > > In case you were interested, I am listening ;) > > > > > > ---------- Forwarded message ---------- > > > From: dan...@mo... <dan...@mo... > > > > Date: Tue, 14 Sep 2004 08:33:16 -0700 (PDT) > > > Subject: [studs-devel] rebuttal to blog post > > > To: stu...@li... > > > > > > The following post showed up on the internet the other day about how Studs > > > fails to be noteworthy. While I disagree, one can never pass up the > > > opportunity to improve on one's work. So let's talk. > > > > > > "it seems that Studs takes the most annoying aspects of Struts > > > development, and castrates the quick development process of PHP. > > > > > > * web.xml required with Servlet registration, etc. > > > * PHP Server Pages??? custom View language > > > * tld files, property files > > > * struts-config.xml > > > * restarting/reloading is often neccessary??" > > > > > > 1. web.xml is a very important part of this project's philosophy because > > > it is standard and it is familiar. While I definitely like to think > > > outside of the box, not all users will want to learn yet another > > > configuration environment. web.xml gives the flexibility of tools > > > support, documentation and standarization. Besides, most users won't even > > > touch it, opting to take the standard configuration. So I don't think it > > > is an issue to the user. It is more for the framework developer. > > > > > > 2. PHP Server Pages...yes. No one can deny the simplicity of JSTL, > > > especially in PHP, which lacks object dereferencing. I tried initially to > > > use PHP as the template language and it was FAR too verbose! I believe > > > Smarty is plain riduculous, because it is just another flavor of PHP. > > > Phase is slick. > > > > > > 3. tld files are more or less superficial, mostly just for documentation > > > purposes. The developer doesn't even have to know about them, except when > > > creating custom tags. properties files are completely naturally in most > > > programs anyway, so I am not sure what the complaint is here. You need to > > > configure the program SOMEHOW! > > > > > > 4. struts-config.xml...YES. Standard, has tools support, very familiar to > > > a large number of developers, lot's of online tutorials. We are > > > leveraging existing knowlege here folks. However, I recognize Struts has > > > its limitations and we are going to be going off on a tangent a bit to > > > integrate them, perhaps tossing back the ideas to Struts. DTDs are VERY > > > limiting in this case because changing the DTD breaks the program when it > > > doesn't have to. I haven't broken the DTD yet, but it won't be long I > > > bet. We can talk. > > > > > > 5. restarting/reloading will go away. PSP already reloads, > > > struts-config.xml just needs to in a few releases. I have plans for this, > > > just haven't gotten to it. I HATE restarting in J2EE, even though I > > > understand the need for it in that environment. > > > > > > Studs aims to be simple while leveraging existing formats. This is only > > > inning one. I wanted to create something that worked and was familiar. I > > > am open to extensions and improvements. Hell, you can leverage all the > > > tools save Studs to implement another popular MVC framework if you would > > > like. That is the benefit of the "+" part. You can use the framework to > > > do something totally different than Studs. I just needed to port Struts > > > for my own use, but feel free to jump in! > > > > > > One point I agree on is that PHP programs are ugly. Many programs are > > > just glorified perl scripts. Studs seeks to add some maturity to the PHP > > > community by laying out some standards so that programs can be shared more > > > easily. Studs definitely does not slow you down. > > > > > > Dan > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: thawte's Crypto Challenge Vl > > > Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam > > > Camcorder. More prizes in the weekly Lunch Hour Challenge. > > > Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m > > > _______________________________________________ > > > studs-devel mailing list > > > stu...@li... > > > https://lists.sourceforge.net/lists/listinfo/studs-devel > > > > > > > > > -- > > > Open Source Advocacy > > > http://www.mojavelinux.com > > > > > > > > > -- > > Best regards, > > Balazs > > > > > > > -- > Open Source Advocacy > http://www.mojavelinux.com > -- Open Source Advocacy http://www.mojavelinux.com |
|
From: Dan A. <dan...@gm...> - 2004-09-15 15:37:23
|
Well, let me answer some of those questions because I feel that I have good answers. Oh, and don't worry about offending me. I am a programmer and thus have extremely thick skin ;) Why a Struts port in PHP? Several reasons. When I first got into MVC and read about Struts I thought to myself, that would be nice, if I had access to a servlet container, but I didn't (for deployment purposes, not for development). I thought to myself, if I had this for PHP, I could make my website using it today. Then, one day, when I do have access to a servlet container, all my ideas will translate. The transition would have been very smooth. The PHP version is like the training wheels. Now, I realize it is possible to get java hosting, but it would still require an ISP change. Later on, I found even more reason since working with java servlets on a shared web hosts is a HUGE pain. I already loved PHP, and I wanted to stick with it. Okay, so I start working on the port, and it is hard. There was a lot of work to go into it. Why didn't I quit? Several reasons again. I had never taken a project from start to finish and made it a top-level sourceforge project. This was my chance. I needed it and it seemed interesting. As I was working along, I found TONS of bugs in Tomcat and Struts, which I contributed back to the community. I was reading all through the Tomcat code and it was amazing to see how it all worked. The challenge was translating that to another language, which required a whole other level of understanding. Today, I know the servlet container almost as well as the people who developed it. Ditto for Struts. That understanding is without value. Okay, that makes sense, but what benefit is it to PHP? Look, PHP frameworks are shit. Most of the code out there is shit. Now, that is not to say that the programs around good in respect to what they are trying to accomplish. phpBB code is horrid. Why does this happen? Well, even with all the frameworks in Java, at least they all share something in common. They all run in a standard container environment, handling sessions the same, importing classes the same, do error handling the same. Point is, there is a standard base. PHP has no standard base. PEAR is not it. My hopes are to strike up something to this effect. Studs is a prototype. There are so many libraries that can be used as standalone, it probably makes up 75% of what you download. Was it worth it? You bet. If only from the standpoint of a learning experience, it was invaluable. I learned how to look at a project, swallow it, and make it happen. The whole lifecycle. I'm proud of my work. I will use it. Others can choose as they may, that is why it is open sourced. Rails could EASILY be made using Studs MVC Framework+. Just implement HttpServlet and go from there. Maybe I will look into it. Struts is not the end all solution to MVC, but it is a damn good starting point. One last point. You mentioned that it would be better to not have a configuration file and just use some sort of reflection on the action to get the class, etc. I actually started that way with Studs and it is in the early code. I went back and implemented struts-config.xml support because my goal was to create a stepping stone for PHP developers moving to Java. I could easily make a framework which extends Studs and cuts out this configuration file dependency. Oh, sorry, another last point. Every PSP page is just a PHP page on drugs. With no taglibs or JSTL syntax, it just compiles as itself. So in all reality, one could use Studs either was Model 1 or Model 2. You don't HAVE to create an Action, etc. Dan On Wed, 15 Sep 2004 11:48:15 +0200, Balazs Fejes <fb...@gm...> wrote: > Hi, > > thanks for going through my points. > Can I ask you what you see as the benefits of this framework? > I think if you want to do it the "cleanly architected" way, you might > as well use Struts and JSTL. > I thought the benefit of PHP would be exactly the opposite - > simplicity (even at the expense of the architecture). > What are your thoughts on the more radical approach of Rails? You must > look at it when thinking about MVC frameworks. Maybe this would be a > worthwhile project to clone in PHP rather than Struts :-) > > I went through my post and it came off very agressive. Sorry about > that, but I felt like someone is putting in an incredible effort into > something that is not worth it. > > Best regards, > Balazs > > > > > On Tue, 14 Sep 2004 11:37:45 -0400, Dan Allen <dan...@gm...> wrote: > > In case you were interested, I am listening ;) > > > > ---------- Forwarded message ---------- > > From: dan...@mo... <dan...@mo... > > > Date: Tue, 14 Sep 2004 08:33:16 -0700 (PDT) > > Subject: [studs-devel] rebuttal to blog post > > To: stu...@li... > > > > The following post showed up on the internet the other day about how Studs > > fails to be noteworthy. While I disagree, one can never pass up the > > opportunity to improve on one's work. So let's talk. > > > > "it seems that Studs takes the most annoying aspects of Struts > > development, and castrates the quick development process of PHP. > > > > * web.xml required with Servlet registration, etc. > > * PHP Server Pages??? custom View language > > * tld files, property files > > * struts-config.xml > > * restarting/reloading is often neccessary??" > > > > 1. web.xml is a very important part of this project's philosophy because > > it is standard and it is familiar. While I definitely like to think > > outside of the box, not all users will want to learn yet another > > configuration environment. web.xml gives the flexibility of tools > > support, documentation and standarization. Besides, most users won't even > > touch it, opting to take the standard configuration. So I don't think it > > is an issue to the user. It is more for the framework developer. > > > > 2. PHP Server Pages...yes. No one can deny the simplicity of JSTL, > > especially in PHP, which lacks object dereferencing. I tried initially to > > use PHP as the template language and it was FAR too verbose! I believe > > Smarty is plain riduculous, because it is just another flavor of PHP. > > Phase is slick. > > > > 3. tld files are more or less superficial, mostly just for documentation > > purposes. The developer doesn't even have to know about them, except when > > creating custom tags. properties files are completely naturally in most > > programs anyway, so I am not sure what the complaint is here. You need to > > configure the program SOMEHOW! > > > > 4. struts-config.xml...YES. Standard, has tools support, very familiar to > > a large number of developers, lot's of online tutorials. We are > > leveraging existing knowlege here folks. However, I recognize Struts has > > its limitations and we are going to be going off on a tangent a bit to > > integrate them, perhaps tossing back the ideas to Struts. DTDs are VERY > > limiting in this case because changing the DTD breaks the program when it > > doesn't have to. I haven't broken the DTD yet, but it won't be long I > > bet. We can talk. > > > > 5. restarting/reloading will go away. PSP already reloads, > > struts-config.xml just needs to in a few releases. I have plans for this, > > just haven't gotten to it. I HATE restarting in J2EE, even though I > > understand the need for it in that environment. > > > > Studs aims to be simple while leveraging existing formats. This is only > > inning one. I wanted to create something that worked and was familiar. I > > am open to extensions and improvements. Hell, you can leverage all the > > tools save Studs to implement another popular MVC framework if you would > > like. That is the benefit of the "+" part. You can use the framework to > > do something totally different than Studs. I just needed to port Struts > > for my own use, but feel free to jump in! > > > > One point I agree on is that PHP programs are ugly. Many programs are > > just glorified perl scripts. Studs seeks to add some maturity to the PHP > > community by laying out some standards so that programs can be shared more > > easily. Studs definitely does not slow you down. > > > > Dan > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: thawte's Crypto Challenge Vl > > Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam > > Camcorder. More prizes in the weekly Lunch Hour Challenge. > > Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m > > _______________________________________________ > > studs-devel mailing list > > stu...@li... > > https://lists.sourceforge.net/lists/listinfo/studs-devel > > > > > > -- > > Open Source Advocacy > > http://www.mojavelinux.com > > > > > -- > Best regards, > Balazs > -- Open Source Advocacy http://www.mojavelinux.com |
|
From: Dan A. <dan...@gm...> - 2004-09-14 15:36:17
|
The link to that blog entry is located at: http://fb2.hu/blogs/dl.php?p=40&more=1&c=1&tb=1&pb=1 -- Dan |
|
From: <dan...@mo...> - 2004-09-14 15:32:36
|
The following post showed up on the internet the other day about how Studs
fails to be noteworthy. While I disagree, one can never pass up the
opportunity to improve on one's work. So let's talk.
"it seems that Studs takes the most annoying aspects of Struts
development, and castrates the quick development process of PHP.
* web.xml required with Servlet registration, etc.
* PHP Server Pages??? custom View language
* tld files, property files
* struts-config.xml
* restarting/reloading is often neccessary??"
1. web.xml is a very important part of this project's philosophy because
it is standard and it is familiar. While I definitely like to think
outside of the box, not all users will want to learn yet another
configuration environment. web.xml gives the flexibility of tools
support, documentation and standarization. Besides, most users won't even
touch it, opting to take the standard configuration. So I don't think it
is an issue to the user. It is more for the framework developer.
2. PHP Server Pages...yes. No one can deny the simplicity of JSTL,
especially in PHP, which lacks object dereferencing. I tried initially to
use PHP as the template language and it was FAR too verbose! I believe
Smarty is plain riduculous, because it is just another flavor of PHP.
Phase is slick.
3. tld files are more or less superficial, mostly just for documentation
purposes. The developer doesn't even have to know about them, except when
creating custom tags. properties files are completely naturally in most
programs anyway, so I am not sure what the complaint is here. You need to
configure the program SOMEHOW!
4. struts-config.xml...YES. Standard, has tools support, very familiar to
a large number of developers, lot's of online tutorials. We are
leveraging existing knowlege here folks. However, I recognize Struts has
its limitations and we are going to be going off on a tangent a bit to
integrate them, perhaps tossing back the ideas to Struts. DTDs are VERY
limiting in this case because changing the DTD breaks the program when it
doesn't have to. I haven't broken the DTD yet, but it won't be long I
bet. We can talk.
5. restarting/reloading will go away. PSP already reloads,
struts-config.xml just needs to in a few releases. I have plans for this,
just haven't gotten to it. I HATE restarting in J2EE, even though I
understand the need for it in that environment.
Studs aims to be simple while leveraging existing formats. This is only
inning one. I wanted to create something that worked and was familiar. I
am open to extensions and improvements. Hell, you can leverage all the
tools save Studs to implement another popular MVC framework if you would
like. That is the benefit of the "+" part. You can use the framework to
do something totally different than Studs. I just needed to port Struts
for my own use, but feel free to jump in!
One point I agree on is that PHP programs are ugly. Many programs are
just glorified perl scripts. Studs seeks to add some maturity to the PHP
community by laying out some standards so that programs can be shared more
easily. Studs definitely does not slow you down.
Dan
|
|
From: <dan...@mo...> - 2004-09-14 14:52:54
|
> Have you been able to finish the new release yet? Just released 0.9.4 last night. I took a little longer because I just HAD to automate my release process as it was taking more than a day just to complete all the parts (run tests, tag CVS, make packages, upload to sourceforge, go through the overly complex SF release process without error, run apidocs, upload apidocs, upload changelog, announce to mailinglist, and announce to freshmeat). It isn't all automated yet, but major steps have been taken (I am using Apache Ant if you didn't notice already). Word of advice for anyone who is running a project, automate everything, including the coffee maker, or else your life will become insane very quickly. > Please let me know if I can help with something! The biggest help you could provide right now (at minimal cost to you) is to add some of the feature requests/bugs to the sourceforge tracker. I know what needs to be done with Studs, but others don't yet. This will be a good chance for you to get what you want and for me to pave my path. I have also found some criticism to studs on the 'net. We need to get these discussions going on the mailinglists so that we can be sure to write the best code possible. Issues I know will come up are automatic reload of struts-config.xml on change, departing from Struts where it falls short, etc. Again, I have ideas, but if this is going to be a community project, we just need to start throwing out that info. In summary, add stuff to tracker, throw out ideas on mailinglist. I am extremely tough, so try me. I would rather people bash on the project than to remain in solitude. Dan |
|
From: Dan A. <dan...@gm...> - 2004-09-04 02:33:29
|
Wow, I seemed to have uncovered a whole mass of bugs and problems, which I have now ironed out. I am finding them in the process of writing a sample webapp that keeps track of golf scores and courses. Whenever I run into a problem doing something that I expect to work, it is back to the framework to patch up the issue. Look for the release this weekend as it just may solve some issues you might be running into. Dan -- Open Source Advocacy http://www.mojavelinux.com |
|
From: Dan A. <dan...@gm...> - 2004-08-26 14:35:19
|
Until this morning, I was having major issues with the c:out tag
returning completely random values if the same property was resolved
several times (sometimes leading to an infinite loop). If I had a
scoped variable instance named 'car' of the standard class Car, the
following would blow up:
<c:out value="${car.make}"/>
<c:out value="${car.make}"/>
<c:out value="${car.make}"/>
...gradually the 'car' object would degrade until it was returning
complete crap. One would expect to see the same output in each
instance. As it turns out, it was all due to a reference error in the
PageContext class. Reference errors in PHP will kill you! I have had
it happen to me before.
I had the following code in PageContext that is used by c:out
function &getAttribute($property, $scope = 'page')
{
switch ($scope)
{
case 'page':
return isset($this->attributes[$property]) ?
$this->attributes[$property] : null;
case 'request'
...
}
}
The reason this is a bug is because the posix conditional will NOT
allow a reference to be returned...and we NEED a reference here or
else it starts copying objects and that is just a VERY bad thing in
our case. The proper syntax would be to create an if...else
statement.
I bring this up because it is a huge GOTCHA that you must be aware of
in PHP less you run into the same problems as myself. For now, it
looks like the bugs in the PSP parser are now solved and all tags
should work as expected.
Dan
--
Open Source Advocacy
http://www.mojavelinux.com
|