Re: [studs-devel] rebuttal to blog post
Status: Beta
Brought to you by:
mojavelinux
|
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 |