<?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>Noun &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/noun/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>MVC in Practice: Designing Models</title>
		<link>/2010/07/12/mvc-in-practice-designing-models/</link>
		<comments>/2010/07/12/mvc-in-practice-designing-models/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 18:19:39 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linguistics]]></category>
		<category><![CDATA[Noun]]></category>
		<category><![CDATA[Social information processing]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Technology/Internet]]></category>

		<guid isPermaLink="false">/?p=1786</guid>
		<description><![CDATA[Existing Examples There are lots of examples online teaching you what is MVC, why it is good and how to develop an application using this pattern. However most of them use a predefined structure with already constructed database and only the connection between a database table and a model is described. Actually what happens before &#8230; <a href="/2010/07/12/mvc-in-practice-designing-models/" class="more-link">Continue reading <span class="screen-reader-text">MVC in Practice: Designing Models</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/08/09/models-in-zend-framework-initialize-all-methods-with-init/" rel="bookmark" title="Models in Zend Framework &#8211; Initialize All Methods with init()">Models in Zend Framework &#8211; Initialize All Methods with init() </a></li>
<li><a href="/2010/09/29/construct-a-sorted-php-linked-list/" rel="bookmark" title="Construct a Sorted PHP Linked List">Construct a Sorted PHP Linked List </a></li>
<li><a href="/2010/06/04/one-form-multiple-db-records/" rel="bookmark" title="One Form &#8211; Multiple DB Records">One Form &#8211; Multiple DB Records </a></li>
<li><a href="/2010/06/28/send-authenticated-post-request-with-zend_http_client/" rel="bookmark" title="Send Authenticated POST Request with Zend_Http_Client">Send Authenticated POST Request with Zend_Http_Client </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Existing Examples</h2>
<p><a href="/wp-content/uploads/2010/07/sketch.jpg"><img class="aligncenter size-full wp-image-1798" title="sketch" src="/wp-content/uploads/2010/07/sketch.jpg" alt="Sketch" width="430" height="332" srcset="/wp-content/uploads/2010/07/sketch.jpg 430w, /wp-content/uploads/2010/07/sketch-300x231.jpg 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<p>There are lots of examples online teaching you what is MVC, why it is good and how to develop an application using this pattern. However most of them use a predefined structure with already constructed database and only the connection between a database table and a model is described. Actually what happens before all this. The client tells you something he&#8217;d like to have in his application.</p>
<p>Just imagine the following situation. You&#8217;ve a client who tells you that he wants a blog. The blog has to have posts and users, and every user must write posts and every post must have comments. Also he wants a set of categories where each post will be attached to one ore more categories. And finally a blogroll &#8211; one ore more links to another blogs.</p>
<p>This is pretty general and does not pretend to be a full featured example. However the strategy to make a primary structure of the future models is to pickup the nouns in this paragraph. It is really simple:</p>
<blockquote><p><span style="color: #999999;">The blog has to have <span style="color: #000000;"><strong>posts</strong></span> and <span style="color: #000000;"><strong>users</strong></span>, and every user must write posts  and every post must have <span style="color: #000000;"><strong>comments</strong></span>. Also he wants a set of <span style="color: #000000;"><strong>categories</strong></span> where each post will be attached to one or more categories. And finally  a blogroll &#8211; one ore more <span style="color: #000000;"><strong>links</strong></span> to another blogs.</span></p></blockquote>
<p>So far you can see there are five prototypes of database tables: post, user, comment, category and link.</p>
<p>It&#8217;s important to note that not every noun is ready to be a database table. In some cases, when the client is really smart, he can give you a more detailed description. Than there are nouns describing the other nouns, of course, they are supposed to be columns to those tables.</p>
<blockquote><p><span style="color: #999999;">Every <strong><span style="color: #000000;">post</span></strong> must have <strong><span style="color: #800000;">title</span></strong> and <strong><span style="color: #800000;">description</span></strong> &#8230;</span></p></blockquote>
<p>This is what we can do for now. From a raw text you can design your database and models in the MVC architecture.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/08/09/models-in-zend-framework-initialize-all-methods-with-init/" rel="bookmark" title="Models in Zend Framework &#8211; Initialize All Methods with init()">Models in Zend Framework &#8211; Initialize All Methods with init() </a></li>
<li><a href="/2010/09/29/construct-a-sorted-php-linked-list/" rel="bookmark" title="Construct a Sorted PHP Linked List">Construct a Sorted PHP Linked List </a></li>
<li><a href="/2010/06/04/one-form-multiple-db-records/" rel="bookmark" title="One Form &#8211; Multiple DB Records">One Form &#8211; Multiple DB Records </a></li>
<li><a href="/2010/06/28/send-authenticated-post-request-with-zend_http_client/" rel="bookmark" title="Send Authenticated POST Request with Zend_Http_Client">Send Authenticated POST Request with Zend_Http_Client </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/07/12/mvc-in-practice-designing-models/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
