<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Professional PHP &#187; mvc</title>
	<atom:link href="http://www.procata.com/blog/archives/tag/mvc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.procata.com/blog</link>
	<description>PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.</description>
	<lastBuildDate>Fri, 10 Dec 2010 17:23:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP first impressions from a J2EE programmer</title>
		<link>http://www.procata.com/blog/archives/2005/02/19/php-first-impressions-from-a-j2ee-programmer/</link>
		<comments>http://www.procata.com/blog/archives/2005/02/19/php-first-impressions-from-a-j2ee-programmer/#comments</comments>
		<pubDate>Sat, 19 Feb 2005 18:32:19 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[language-comparison]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2005/02/19/php-first-impressions-from-a-j2ee-programmer/</guid>
		<description><![CDATA[I ran across Cedric Otaku&#8217;s blog entry about his first impressions working with PHP as an experienced Java programmer.  Not surprisingly, he chose PHP partly because it was already available on his ISP.
He highlights syntax, available libraries  and string handling as PHP&#8217;s strengths.
He has some problems with the scoping rules and with the [...]]]></description>
			<content:encoded><![CDATA[<p>I ran across Cedric Otaku&#8217;s blog entry about his <a href="http://beust.com/weblog/archives/000245.html">first impressions working with PHP</a> as an experienced Java programmer.  Not surprisingly, he chose PHP partly because it was already available on his ISP.</p>
<p>He highlights syntax, available libraries  and string handling as PHP&#8217;s strengths.</p>
<p>He has some problems with the scoping rules and with the lack of namespaces.</p>
<p>Reading between the lines, I also wonder if he might prefer a stricter <a href="http://us4.php.net/manual/en/function.error-reporting.php">error_reporting</a> setting.</p>
<p>Perhaps as a PHP advocacy issue it might be helpful to have a &#8216;PHP for Java programmers&#8217; chapter of the PHP manual on php.net.  I&#8217;m not sure how far something like this might go, but the <a href="http://www.php.net/manual/en/faq.languages.php">seed</a> seems to be there.  A while ago, I started to <a href="http://wact.sourceforge.net/index.php/PhpHttpResponseHandling">compare the PHP response handling</a> to Java&#8217;s HttpServletResponse.  <a href="http://wact.sourceforge.net/index.php/PhpHttpRequestHandling">Request Handling is here</a>.</p>
<p>A comment on this post is disturbing.  It calls PHP &#8216;dangerous&#8217; from a security perspective because of the recent phpBB vulnerability.  To be fair, I have to admit that the /e modifier of preg_replace is obscure.  (I&#8217;ve started compiling a list of <a href="http://wact.sourceforge.net/index.php/SecuritySensitiveFunctions">Security Sensitive Functions in PHP</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/02/19/php-first-impressions-from-a-j2ee-programmer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The value of MVC</title>
		<link>http://www.procata.com/blog/archives/2004/11/28/the-value-of-mvc/</link>
		<comments>http://www.procata.com/blog/archives/2004/11/28/the-value-of-mvc/#comments</comments>
		<pubDate>Mon, 29 Nov 2004 06:01:03 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/11/28/the-value-of-mvc/</guid>
		<description><![CDATA[John Lim has a recent rant asking Is MVC over-designed crap?
I used to think so, but now having refactored some existing applications to use MVC, i see the value.
In my unscientific comparison of PHP and Java Job Markets six of ten java jobs ask for some Struts knowledge.  While I am willing to believe [...]]]></description>
			<content:encoded><![CDATA[<p>John Lim has a recent rant asking <a href="http://phplens.com/phpeverywhere/?q=node/view/143">Is MVC over-designed crap</a>?</p>
<p>I used to think so, but now having refactored some existing applications to use MVC, i see the value.</p>
<p>In my unscientific <a href="http://www.procata.com/blog/archives/2004/10/15/a-comparision-of-the-php-and-java-job-markets/">comparison of PHP and Java Job Markets</a> six of ten java jobs ask for some Struts knowledge.  While I am willing to believe that Java programmers are masochists, one cannot discount the possibility that there is value in its use. </p>
<p>Another way to approach the issue is to look at this <a href="https://equinox.dev.java.net/framework-comparison/">Java framework comparison</a>.  It compares the same CRUD application written in Struts, Spring, JSF, Tapestry, and WebWork.  The thing that I found striking about the comparison was how &#8220;crufty&#8221; the struts implementation was in comparison to the others.  And yet, none of the others were mentioned in my 10 job sampling.  Again, it seems like Struts must bring something to the table.</p>
<p>It is worth remembering that Struts did not originate inside Sun and get pushed out as a bloated vendor standard.  Rather it evolved into a de-facto standard of what MVC means on the web as an open source project.  I think this growth in use is an indication that web MVC has value.</p>
<p>Is there confusion over MVC?  </p>
<p>Yes.  Many of the &#8220;what goes where&#8221; arguments are a bit like trying to count the number of angels that can dance on the head of a pin.  In practice, a 100% separations M, V, and C concerns is almost impossible and not even desirable.  Yet, it turns out that making some kind of distinction between the concerns is helpful.</p>
<p>Adding to the confusion is the fact that most MVC frameworks do more than just MVC.</p>
<p>I tend to find that the broader your definition of MVC, the more trouble you are going to have with the &#8220;what goes where&#8221; and &#8220;where does this go&#8221; questions.  In that light, I tried to write up a fairly strict and complete <a href="http://wact.sourceforge.net/index.php/ModelViewController">definition of Model View Controller</a>.</p>
<p>I like to use an analogy from the GUI era.  If you were writing a GUI application for the Macintosh in 1987, it was hard.  Hello World was 50,000 lines long.  (at least it seemed like it.)  You were responsible for your own event loop and dispatching OS events into your application.  Every application re-invented the wheel.</p>
<p>If you are writing a windows GUI application in 1997, you would use a tool like Visual Basic or Delphi to apply the MVC pattern (well really DocumentView variant) to your GUI applications.  Both tools take the OS event loop (controller) away from the programmer and dictate an application structure.  Trust me, productivity in these environments was leaps and bounds better than the old way.  The emergence of Visual Basic and Delphi in the early 90s were just a sign that programmers were getting a handle on how to write GUI applications</p>
<p>I think we are seeing the same transition now in the web application space.  Web MVC brings a standard structure to web applications, and in a way, once again takes over the OS event interface for web applications.  In 2007, writing a web application without an MVC framework will seem as quaint and be as rare as a polling event loop is today in a GUI application.  The emergence of web MVC frameworks is a sign that we as a profession are mastering the art of building web applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2004/11/28/the-value-of-mvc/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Status of WACT</title>
		<link>http://www.procata.com/blog/archives/2004/10/25/status-of-wact/</link>
		<comments>http://www.procata.com/blog/archives/2004/10/25/status-of-wact/#comments</comments>
		<pubDate>Mon, 25 Oct 2004 21:33:42 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/10/25/status-of-wact/</guid>
		<description><![CDATA[My last WACT post drew a couple questions from Marcus Baker:

Do you have a release date planned for the next version?

Ah, the release date question.  We are certainly overdue.  Here is where things stand.
The core framework in CVS is in very good shape.  We have 3332 passing tests and 5 failing tests. [...]]]></description>
			<content:encoded><![CDATA[<p>My last <a href="http://www.procata.com/blog/archives/2004/10/18/bad-code-smells-in-wact-a-refactoring-review/">WACT</a> post drew a couple questions from <a href="http://www.lastcraft.com/blog/">Marcus Baker</a>:</p>
<blockquote><p>
Do you have a release date planned for the next version?
</p></blockquote>
<p>Ah, the release date question.  We are certainly overdue.  Here is where things stand.</p>
<p>The core framework in CVS is in very good shape.  We have 3332 passing tests and 5 failing tests.  The failing tests are relatively minor.  I would like to fix them before release, but don&#8217;t see it as absolutely necessary.</p>
<p>I feel the biggest obstacle right now is that many of the example programs that we have in WACT are either obsolete, broken or unfinished.  They are mostly broken due to the incompatibility of changes within the controller layer from the last version.  I would like to see working (and hopefully unit tested) examples for the release.  I don&#8217;t want to make a release with code that errors out.</p>
<p>The current controller architecture in the CVS version of WACT is very different from what is in the previously released version.  After writing what is there now, i have modified my thinking on what a controller framework should look like.  I&#8217;ve written up some of the theory of this on this <a href="http://wact.sourceforge.net/index.php/ModelViewController">Model View Controller</a> page.  I&#8217;ve been working on a proof of concept of this, which I think will become the final WACT controller layer.</p>
<p>As such, I am reluctant to go through the examples now and update them to the current controller when I know that I will have update them again.  I am also reluctant to expose a brand new API in the release which I already know will go away.</p>
<p>I&#8217;ve decided I want to work on the controllers and not the examples right now.  That of course doesn&#8217;t preclude anyone else who wants to work on the examples from doing so and getting us into releasable condition.  Thats just how I want to spend my time right now.  If we are going to release with what we have now, which i am not opposed to, someone else will have to step up and push that.</p>
<p>Its possible that my controller ideas won&#8217;t work out.  I&#8217;ve just reviewed the 3.0.0dev version of <a href="http://www.mojavi.org/">Mojavi</a>.  I have to say I am impressed.  I have looked at most of the controller frameworks on <a href="http://wact.sourceforge.net/index.php/MvcFrameworksWrittenInPhp">this page</a> and i have to say that Mojavi is the only one that i would seriously consider using myself.  It has the right combination of support, maturity, and good design.  If my experiments with MVC don&#8217;t pan out, i would seriously consider ditching the current WACT controller layer in favor of Mojavi integration.</p>
<p>So thats where I am at.  I would personally like to see more of the controller issues resolved before the release goes out the door.  I would like to feel as good about the controller layer of WACT as I do about the rest of it. </p>
<p>I should finish up with a project soon and have more time to devote to WACT.</p>
<p>When will the next WACT release be?  I refer you <a href="http://www.jadetower.org/muses/archives/000163.html">here</a>.</p>
<p>Marcus also asks:</p>
<blockquote><p>
The bit that I&#8217;ve never understood is, what is a DataSpace?
</p></blockquote>
<p>The DataSpace concept has evolved over time.  in WACT, DataSource is an interface that allows an object to expose properties though a generic protocol.  The DataSpace class is a convenience base class that helps implement this interface.  The DataSource interface could be considered equivalent to the properties portion of the Java Beans specification.  You could think of any object inheriting from DataSpace or implementing DataSource as a bean in java terms.  However, I would probably compare it to the more dynamic <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/">Key Value Coding</a> from Objective-C.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2004/10/25/status-of-wact/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

