<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Note to CodeIgniter nerds: please, no looping code in your views.</title>
	<atom:link href="http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/</link>
	<description>Dedicated to teaching web designers PHP.</description>
	<pubDate>Fri, 21 Nov 2008 22:08:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: bolongsox</title>
		<link>http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-78544</link>
		<dc:creator>bolongsox</dc:creator>
		<pubDate>Mon, 04 Aug 2008 15:25:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-78544</guid>
		<description>If I have to prepare the whole stuff in the controller, then I can scrap the view altogether, and instead of loading view files, just print the html stuff directly from the controller to the browser... but then wasn't it like the old days of php when you can put the whole thing in ONE script , yes, ONE piece of script :p db connection, queries, html tags, and molasses of if-else and case switches... and it still works as intended as an application.
I know i don't make any point here , sorry... but here's the thing :
Using template engine is no different with putting looping code of pure php. Template engine is just another layer of php logic which parses "designer friendly tags" into final presentation. The logic, is still very much the same. template engine tags also has loops, and conditionals, and also prone to be broken by designers. But then, in the case of designers breaking the code, I absolutely believe that when they do so, it's a sign for me to get their replacement, heheh..
get code aware designer, it won't hurt the budget that much. If you think that code illiterate designer worth maintaining, ie: they can create venus de milo of web design, keep them, but just switch the work flow.
Let them design their masterpiece, have them weave the html+css beautifully, then let the programmer pour in the necessary code. Works all the time for me, at very least.
I use CI for some time now, and after a dozen plus projects I still see no problem in the way CI's view works. Lighten up, designers may break code, but coding in php and web is still fun because you can just refresh and see what is going wrong then fix it quickly. compare that to coding in J2ME, no designers, too many devices, programmer does breaking codes, and no nothing you can count on except System.out.println().
"Presentation logic in view is good, business logic in view, bad !! " ( DHH of RoR, leader of opinionated, pragmatic software... huh ? opinionated what ??? )</description>
		<content:encoded><![CDATA[<p>If I have to prepare the whole stuff in the controller, then I can scrap the view altogether, and instead of loading view files, just print the html stuff directly from the controller to the browser&#8230; but then wasn&#8217;t it like the old days of php when you can put the whole thing in ONE script , yes, ONE piece of script :p db connection, queries, html tags, and molasses of if-else and case switches&#8230; and it still works as intended as an application.<br />
I know i don&#8217;t make any point here , sorry&#8230; but here&#8217;s the thing :<br />
Using template engine is no different with putting looping code of pure php. Template engine is just another layer of php logic which parses &#8220;designer friendly tags&#8221; into final presentation. The logic, is still very much the same. template engine tags also has loops, and conditionals, and also prone to be broken by designers. But then, in the case of designers breaking the code, I absolutely believe that when they do so, it&#8217;s a sign for me to get their replacement, heheh..<br />
get code aware designer, it won&#8217;t hurt the budget that much. If you think that code illiterate designer worth maintaining, ie: they can create venus de milo of web design, keep them, but just switch the work flow.<br />
Let them design their masterpiece, have them weave the html+css beautifully, then let the programmer pour in the necessary code. Works all the time for me, at very least.<br />
I use CI for some time now, and after a dozen plus projects I still see no problem in the way CI&#8217;s view works. Lighten up, designers may break code, but coding in php and web is still fun because you can just refresh and see what is going wrong then fix it quickly. compare that to coding in J2ME, no designers, too many devices, programmer does breaking codes, and no nothing you can count on except System.out.println().<br />
&#8220;Presentation logic in view is good, business logic in view, bad !! &#8221; ( DHH of RoR, leader of opinionated, pragmatic software&#8230; huh ? opinionated what ??? )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Mischook</title>
		<link>http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-77827</link>
		<dc:creator>Stefan Mischook</dc:creator>
		<pubDate>Mon, 07 Jul 2008 16:59:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-77827</guid>
		<description>goldoraf,

To answer your questions:

"How can your web designer modify the table appearance (for example, adding a caption)"

Easily since table appearance is controlled in the CSS and since the table tag itself is not generated in the PHP.

"You should read (or re-read) the PoEAA book : logic is allowed in the views, but PRESENTATION logic, and not BUSINESS logic"

I am not a dogmatic nerd, my opinion is based on my experience. My experience has shown if you logic in the views (business or presentation) web designers can easily bust it.

Conclusion - you are an angry nerd: 
http://www.killerphp.com/articles/angry-self-righteous-tech-nerds/</description>
		<content:encoded><![CDATA[<p>goldoraf,</p>
<p>To answer your questions:</p>
<p>&#8220;How can your web designer modify the table appearance (for example, adding a caption)&#8221;</p>
<p>Easily since table appearance is controlled in the CSS and since the table tag itself is not generated in the PHP.</p>
<p>&#8220;You should read (or re-read) the PoEAA book : logic is allowed in the views, but PRESENTATION logic, and not BUSINESS logic&#8221;</p>
<p>I am not a dogmatic nerd, my opinion is based on my experience. My experience has shown if you logic in the views (business or presentation) web designers can easily bust it.</p>
<p>Conclusion - you are an angry nerd:<br />
<a href="http://www.killerphp.com/articles/angry-self-righteous-tech-nerds/" rel="nofollow">http://www.killerphp.com/articles/angry-self-righteous-tech-nerds/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: goldoraf</title>
		<link>http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-77826</link>
		<dc:creator>goldoraf</dc:creator>
		<pubDate>Mon, 07 Jul 2008 13:55:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-77826</guid>
		<description>1. How can your web designer modify the table appearance (for example, adding a caption)

2. You should read (or re-read) the PoEAA book : logic is allowed in the views, but PRESENTATION logic, and not BUSINESS logic

Conclusion : you wrote another useless post, which will help to confuse even more people who still doesn't get MVC. For them, thank you...</description>
		<content:encoded><![CDATA[<p>1. How can your web designer modify the table appearance (for example, adding a caption)</p>
<p>2. You should read (or re-read) the PoEAA book : logic is allowed in the views, but PRESENTATION logic, and not BUSINESS logic</p>
<p>Conclusion : you wrote another useless post, which will help to confuse even more people who still doesn&#8217;t get MVC. For them, thank you&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Murray</title>
		<link>http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-77400</link>
		<dc:creator>William Murray</dc:creator>
		<pubDate>Mon, 23 Jun 2008 20:54:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-77400</guid>
		<description>Interesting takes on using PHP in the view. First, I'd like to say that it's very important that every bit of HTML that is needed for the page layout has to be available in the view. While many of us are probably doing the view on our own, or working closely with a designer, the view should dictate all elements of the page that a designer can change. Yes, you can get pretty granular by using CSS selectors, but the purpose of the view is to let the designer do whatever he wants. You provide the data and get out of the way. As developers it's easy to forget that the UI is the most important part of your application. You could have the most beautiful, efficient code, but it doesn't mean anything if the interface that uses your code is garbage. If you have the chance to work with a very good designer, let the designer do his thing, and don't limit him by saying "just imagine it's a table, the trs and tds will be there in the end and when you publish it everything will work".

That is the whole point of the view, to allow the designer to take it and run with it by adding class names, ids, whatever, then be able to test that without having to publish it to a web server. This is very important: some designers will not be publishing to a testing server every 30 seconds to test a design. If they're working in Dreamweaver or some other WYSIWYG app, a designer will get a rough idea of how the design is working. When I set up a view to use this loop:









this works in Dreamweaver. Yes, the actual data is not there yet, but the designer can see how the CSS is behaving (roughly) without having to publish to a server. Also, I'm using the template-style PHP syntax since that is more easily understood by the designer.

Better yet, using the standard Code Igniter parsing system, you can do this:


{things}

{things_t}

{/things}


Code Igniter takes care of the data structure, and the designer can see the {things_t} in the design to get an idea of where the final data will go. And this templating style is pretty easy for a designer to figure out what's going on and what he should change and not change.

Long story short, give the designer everything he might ever need to update the design so you don't get a call a year from now when they want to do a refresh. Your job is to make your data structure work, not tell the designer what to do.</description>
		<content:encoded><![CDATA[<p>Interesting takes on using PHP in the view. First, I&#8217;d like to say that it&#8217;s very important that every bit of HTML that is needed for the page layout has to be available in the view. While many of us are probably doing the view on our own, or working closely with a designer, the view should dictate all elements of the page that a designer can change. Yes, you can get pretty granular by using CSS selectors, but the purpose of the view is to let the designer do whatever he wants. You provide the data and get out of the way. As developers it&#8217;s easy to forget that the UI is the most important part of your application. You could have the most beautiful, efficient code, but it doesn&#8217;t mean anything if the interface that uses your code is garbage. If you have the chance to work with a very good designer, let the designer do his thing, and don&#8217;t limit him by saying &#8220;just imagine it&#8217;s a table, the trs and tds will be there in the end and when you publish it everything will work&#8221;.</p>
<p>That is the whole point of the view, to allow the designer to take it and run with it by adding class names, ids, whatever, then be able to test that without having to publish it to a web server. This is very important: some designers will not be publishing to a testing server every 30 seconds to test a design. If they&#8217;re working in Dreamweaver or some other WYSIWYG app, a designer will get a rough idea of how the design is working. When I set up a view to use this loop:</p>
<p>this works in Dreamweaver. Yes, the actual data is not there yet, but the designer can see how the CSS is behaving (roughly) without having to publish to a server. Also, I&#8217;m using the template-style PHP syntax since that is more easily understood by the designer.</p>
<p>Better yet, using the standard Code Igniter parsing system, you can do this:</p>
<p>{things}</p>
<p>{things_t}</p>
<p>{/things}</p>
<p>Code Igniter takes care of the data structure, and the designer can see the {things_t} in the design to get an idea of where the final data will go. And this templating style is pretty easy for a designer to figure out what&#8217;s going on and what he should change and not change.</p>
<p>Long story short, give the designer everything he might ever need to update the design so you don&#8217;t get a call a year from now when they want to do a refresh. Your job is to make your data structure work, not tell the designer what to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Mischook</title>
		<link>http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-77314</link>
		<dc:creator>Stefan Mischook</dc:creator>
		<pubDate>Fri, 20 Jun 2008 19:38:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-77314</guid>
		<description>Emron,

I may get to it at some point but for now, I have  a lot on my plate.</description>
		<content:encoded><![CDATA[<p>Emron,</p>
<p>I may get to it at some point but for now, I have  a lot on my plate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emron</title>
		<link>http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-77311</link>
		<dc:creator>Emron</dc:creator>
		<pubDate>Fri, 20 Jun 2008 15:15:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-77311</guid>
		<description>HI Stefan
I am going deviate from the argument presented in this thread slightly. I have been learning and developing in PHP on/off for a few years and just recently strongly felt the need of framework. Hence the quest began and i came across your tutorials. Which by the way are the BEST so far and i would really like you to add more tutorials and probably some full fledge applications as that is the best way to teach someone (slightly spoon fed but hands on). Anyway i tested a few frameworks in the last few weeks namely Zend, Symfony, Cake, And CodeIgnitor. And I really find CI is the only one which is close to common sense and give you the tool kit (in other words a real framework). With the others it almost feels like you have to learn them first and then be able to do anything which defeats the whole purpose of a framework to start off with. Let me put simply from an every day life example. Task "Change the car tyre". Now i know how to change it, I could pick up a manual tool (traditional approach) or an electric tool (framework) but then i should not have to sit there and teach myself how to use this electric tool for hours and hours before i could even get to lift my jack. 
Moving on, i was wondering if you would look more into CI and put a few hands on tutorials on your site ?????
And in regards to the view issue really we are trying to separate salt from the flour !!!!!!</description>
		<content:encoded><![CDATA[<p>HI Stefan<br />
I am going deviate from the argument presented in this thread slightly. I have been learning and developing in PHP on/off for a few years and just recently strongly felt the need of framework. Hence the quest began and i came across your tutorials. Which by the way are the BEST so far and i would really like you to add more tutorials and probably some full fledge applications as that is the best way to teach someone (slightly spoon fed but hands on). Anyway i tested a few frameworks in the last few weeks namely Zend, Symfony, Cake, And CodeIgnitor. And I really find CI is the only one which is close to common sense and give you the tool kit (in other words a real framework). With the others it almost feels like you have to learn them first and then be able to do anything which defeats the whole purpose of a framework to start off with. Let me put simply from an every day life example. Task &#8220;Change the car tyre&#8221;. Now i know how to change it, I could pick up a manual tool (traditional approach) or an electric tool (framework) but then i should not have to sit there and teach myself how to use this electric tool for hours and hours before i could even get to lift my jack.<br />
Moving on, i was wondering if you would look more into CI and put a few hands on tutorials on your site ?????<br />
And in regards to the view issue really we are trying to separate salt from the flour !!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MonkeyT</title>
		<link>http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-76831</link>
		<dc:creator>MonkeyT</dc:creator>
		<pubDate>Sat, 07 Jun 2008 20:31:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-76831</guid>
		<description>As you are seeing, there are lots of different ways that PHP developers interpret MVC.  It mostly boils down to either a Strong Model or a Weak Model.  In a Strong Model system, the brains of the app (and most of the work gets done) inside the Model objects.  In a Weak Model system, the Model is little more than a minimally intelligent shelf that manages the data.  It can validate, it can get and store data, but the application's decision making has to occur elsewhere, which usually means it's mixed in with the Controller.

From what I've seen, the cleanest separation of responsibility (and the most flexible implementation) is a Strong Model, which has been brilliantly characterized by Bill Karwin, in a discussion thread on his own blog last week: "Ideally, the Controller should serve as a thin layer to pass application inputs to the Model classes, and then pass the Models to the Views."  This puts the smarts of the app into the Models, which are hopefully designed to be able to export that updated data into formats that can either be prepared for databases/repositories or formats that can be parsed easily by Views and ViewHelpers. 

A Strong Model IS your application.  It just executes instructions that have been parsed by the Controller/Request and it can relay its data (upon request) in formats both the database and the Views can use.  To answer your issue, a View/ViewHelper should be smart and capable enough to render either string data or to parse arrays as necessary, but under no circumstances should either a Controller or a Model render HTML.  The fun part is that there is no rule which says a Strong Model can't know how to use a Weak Model for database interactions.

In an ideal world, of course.</description>
		<content:encoded><![CDATA[<p>As you are seeing, there are lots of different ways that PHP developers interpret MVC.  It mostly boils down to either a Strong Model or a Weak Model.  In a Strong Model system, the brains of the app (and most of the work gets done) inside the Model objects.  In a Weak Model system, the Model is little more than a minimally intelligent shelf that manages the data.  It can validate, it can get and store data, but the application&#8217;s decision making has to occur elsewhere, which usually means it&#8217;s mixed in with the Controller.</p>
<p>From what I&#8217;ve seen, the cleanest separation of responsibility (and the most flexible implementation) is a Strong Model, which has been brilliantly characterized by Bill Karwin, in a discussion thread on his own blog last week: &#8220;Ideally, the Controller should serve as a thin layer to pass application inputs to the Model classes, and then pass the Models to the Views.&#8221;  This puts the smarts of the app into the Models, which are hopefully designed to be able to export that updated data into formats that can either be prepared for databases/repositories or formats that can be parsed easily by Views and ViewHelpers. </p>
<p>A Strong Model IS your application.  It just executes instructions that have been parsed by the Controller/Request and it can relay its data (upon request) in formats both the database and the Views can use.  To answer your issue, a View/ViewHelper should be smart and capable enough to render either string data or to parse arrays as necessary, but under no circumstances should either a Controller or a Model render HTML.  The fun part is that there is no rule which says a Strong Model can&#8217;t know how to use a Weak Model for database interactions.</p>
<p>In an ideal world, of course.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thinsoldier</title>
		<link>http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-76829</link>
		<dc:creator>thinsoldier</dc:creator>
		<pubDate>Sat, 07 Jun 2008 18:07:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-76829</guid>
		<description>Totally agree with David Dashifen Kees.
--
The model contains all your application (business) logic including access to the database (which is hopefully provided by another (database access) object that exists within the model object)
--
I am the designer and the programmer and all my co-workers are designers and programmers too. CSS isn't actually that hard. Even if you can't "create" the concept you can easily take the concept from image to html+css yourself.
--
The 'view' portion and all this debate about where to put logic related to the visible output is what had me still using inlcude('header') for so many years. If i'm supposed to show 1 of 3 possible sidebars and headers depending on the users $_SESSION['level'] where am I supposed to put that IF statement? It only makes sense to me to put it in the view. The same with looping.

--

It's annoying to me to have to write a ‘page-widget’ object for every little building block of the layout and the associated html. If it's just one quick if() to swich 1 sentence and loop out 4 anchors in the footer based on if you're logged in or not, I don't think that justifies a whole new widget object.

--

@Keith Jackson - Display ALWAYS needs loops. I have not had a single project where there wasn't lots of looping all over the place. News categories, photo gallery images, paginated search results, related documents, select lists, all need looping through an array or result set.

--

We recently reviewed a couple of our sites and generated some html widget objects from the most common elements. The very next site we did, while using the same features that used those widgets, needed to look so completely different that the widgets were of no use to us. But since the controller was already giving the needed data to the widget I decided to make the widged return both the original data and it's version of the html out put so that if need be we can simply loop through the original data in the view to do what we need instead of just echoing the widget's default markup.

--

Also, totally agree with Rick.</description>
		<content:encoded><![CDATA[<p>Totally agree with David Dashifen Kees.<br />
&#8211;<br />
The model contains all your application (business) logic including access to the database (which is hopefully provided by another (database access) object that exists within the model object)<br />
&#8211;<br />
I am the designer and the programmer and all my co-workers are designers and programmers too. CSS isn&#8217;t actually that hard. Even if you can&#8217;t &#8220;create&#8221; the concept you can easily take the concept from image to html+css yourself.<br />
&#8211;<br />
The &#8216;view&#8217; portion and all this debate about where to put logic related to the visible output is what had me still using inlcude(&#8217;header&#8217;) for so many years. If i&#8217;m supposed to show 1 of 3 possible sidebars and headers depending on the users $_SESSION['level'] where am I supposed to put that IF statement? It only makes sense to me to put it in the view. The same with looping.</p>
<p>&#8211;</p>
<p>It&#8217;s annoying to me to have to write a ‘page-widget’ object for every little building block of the layout and the associated html. If it&#8217;s just one quick if() to swich 1 sentence and loop out 4 anchors in the footer based on if you&#8217;re logged in or not, I don&#8217;t think that justifies a whole new widget object.</p>
<p>&#8211;</p>
<p>@Keith Jackson - Display ALWAYS needs loops. I have not had a single project where there wasn&#8217;t lots of looping all over the place. News categories, photo gallery images, paginated search results, related documents, select lists, all need looping through an array or result set.</p>
<p>&#8211;</p>
<p>We recently reviewed a couple of our sites and generated some html widget objects from the most common elements. The very next site we did, while using the same features that used those widgets, needed to look so completely different that the widgets were of no use to us. But since the controller was already giving the needed data to the widget I decided to make the widged return both the original data and it&#8217;s version of the html out put so that if need be we can simply loop through the original data in the view to do what we need instead of just echoing the widget&#8217;s default markup.</p>
<p>&#8211;</p>
<p>Also, totally agree with Rick.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Wright</title>
		<link>http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-76817</link>
		<dc:creator>Tom Wright</dc:creator>
		<pubDate>Sat, 07 Jun 2008 11:43:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-76817</guid>
		<description>I can't believe we still live in a world where developers expect designers to be going anywhere near any code whatsoever. The clue is in the name. They design. Not build.

Don't get me wrong, it's perfectly feasible for a designer to learn to program views. But the key is *views require programming, by a programmer*. In many cases the view logic can be by far the most esoteric and complex of an application (note, logic, not necessarily code itself, depending on the abstractions used).

A view is the underlying manifestation of a design, not the design itself - just as a well defined model is the manifestation of the real life objects it represents.

As explained in a previous comment, the MVC paradigm was designed to separate the logic of an application in to well defined categories. Show me one accepted definition of MVC where it states that code should not be used in a view. You wont find one. 
Without such code, a view just becomes a static page and we may as well be using plain html - unless the code is moved somewhere else; this "somewhere else" however absolutely MUST still be in the view domain, otherwise you lose all the benefits of the MVC paradigm. In fact you'd likely be better off going back to the old page controller setup of yesteryear.

When it comes down to it, an ideal development team will have the expertise of a model programmer, a controller programmer, a view programmer and a designer. It may well be the case that one person can take on more than one of those roles, even all of them, however the skills must be aquired in each role to do so. The ideas brought forward by this blog post represent the wrong solution to the wrong problem.

PS. Apologies for the rant-esque nature of my post.. This is in no way derogatory towards anyone in particular. I just find this whole topic rather frustrating!</description>
		<content:encoded><![CDATA[<p>I can&#8217;t believe we still live in a world where developers expect designers to be going anywhere near any code whatsoever. The clue is in the name. They design. Not build.</p>
<p>Don&#8217;t get me wrong, it&#8217;s perfectly feasible for a designer to learn to program views. But the key is *views require programming, by a programmer*. In many cases the view logic can be by far the most esoteric and complex of an application (note, logic, not necessarily code itself, depending on the abstractions used).</p>
<p>A view is the underlying manifestation of a design, not the design itself - just as a well defined model is the manifestation of the real life objects it represents.</p>
<p>As explained in a previous comment, the MVC paradigm was designed to separate the logic of an application in to well defined categories. Show me one accepted definition of MVC where it states that code should not be used in a view. You wont find one.<br />
Without such code, a view just becomes a static page and we may as well be using plain html - unless the code is moved somewhere else; this &#8220;somewhere else&#8221; however absolutely MUST still be in the view domain, otherwise you lose all the benefits of the MVC paradigm. In fact you&#8217;d likely be better off going back to the old page controller setup of yesteryear.</p>
<p>When it comes down to it, an ideal development team will have the expertise of a model programmer, a controller programmer, a view programmer and a designer. It may well be the case that one person can take on more than one of those roles, even all of them, however the skills must be aquired in each role to do so. The ideas brought forward by this blog post represent the wrong solution to the wrong problem.</p>
<p>PS. Apologies for the rant-esque nature of my post.. This is in no way derogatory towards anyone in particular. I just find this whole topic rather frustrating!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed Finkler</title>
		<link>http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-76803</link>
		<dc:creator>Ed Finkler</dc:creator>
		<pubDate>Sat, 07 Jun 2008 02:59:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/note-to-codeigniter-nerds-please-no-looping-code-in-your-views/#comment-76803</guid>
		<description>Spelling is clearly not a strong suit of mine.</description>
		<content:encoded><![CDATA[<p>Spelling is clearly not a strong suit of mine.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
