<?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>Webscriptz.be &#187; framework</title>
	<atom:link href="http://webscriptz.be/tags/framework/feed" rel="self" type="application/rss+xml" />
	<link>http://webscriptz.be</link>
	<description></description>
	<lastBuildDate>Thu, 13 Oct 2011 18:16:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>YiiFramework adding functions to your models</title>
		<link>http://webscriptz.be/2011/06/23/yiiframework-adding-functions-to-your-models/406</link>
		<comments>http://webscriptz.be/2011/06/23/yiiframework-adding-functions-to-your-models/406#comments</comments>
		<pubDate>Thu, 23 Jun 2011 21:16:04 +0000</pubDate>
		<dc:creator>webscriptz</dc:creator>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[queries]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[yii]]></category>
		<category><![CDATA[yii framework]]></category>
		<category><![CDATA[yiiframework]]></category>

		<guid isPermaLink="false">http://webscriptz.be/?p=406</guid>
		<description><![CDATA[MVC has some principals to it, like the fat model principal that I&#8217;ll show in this tutorial and which is used in a lot of frameworks. I&#8217;m going to show how to add and use functions that can be added to a model. There are a few ways to add to a models that increase [...]]]></description>
			<content:encoded><![CDATA[<p>MVC has some principals to it, like the fat model principal that I&#8217;ll show in this tutorial and which is used in a lot of frameworks. I&#8217;m going to show how to add and use functions that can be added to a model.</p>
<p>There are a few ways to add to a models that increase code re-usability. One way is to just add methods to the models, methods which can execute complex queries and make your controller thinner. </p>
<p>The first example, a query that will get all products within a price range, it will need a limit and an offset for pagination, so in the Products model, the following function can be added:</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="PHP"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> findAllByPrice<span style="color: #009900;">&#40;</span><span style="color: #000088;">$min</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$max</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1000000</span><span style="color: #339933;">,</span> <span style="color: #000088;">$offset</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$limit</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$Criteria</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CDbCriteria<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$Criteria</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">condition</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;price &gt;= :min AND price &lt;=:max&quot;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$Criteria</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">limit</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$limit</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$Criteria</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">offset</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$offset</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$Criteria</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">':min'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$min</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">':max'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$max</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">with</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'brand'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">findAll</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Criteria</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li><span style="color: #009900;">&#125;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Now in any of the controlller files this method can be easily accessed and returns all of the &#8216;Product&#8217; objects with a single line command:</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="PHP"><div class="devcodeoverflow"><ol><li><span style="color: #000088;">$Products</span> <span style="color: #339933;">=</span> Product<span style="color: #339933;">::</span><span style="color: #004000;">model</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">findAllByPrice</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">700</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Another way to do the same is to:</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="PHP"><div class="devcodeoverflow"><ol><li><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getProducts<span style="color: #009900;">&#40;</span><span style="color: #000088;">$category</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">findAll</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'categoryIdFk=:category'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">':category'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$category</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li><span style="color: #009900;">&#125;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Let&#8217;s implement the first query using two named scope methods that I&#8217;ll create.</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="PHP"><div class="devcodeoverflow"><ol><li><span style="color: #666666; font-style: italic;">// Price Between - Named Scope ---------------------------------//</span></li><li><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> scopePriceBetween<span style="color: #009900;">&#40;</span><span style="color: #000088;">$min</span><span style="color: #339933;">,</span> <span style="color: #000088;">$max</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$Criteria</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CDbCriteria<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$Criteria</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">condition</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$this-&gt;tableName</span>().price BETWEEN :min AND :max&quot;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$Criteria</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">':min'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$min</span><span style="color: #339933;">,</span>&nbsp;&nbsp; <span style="color: #0000ff;">':max'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$max</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDbCriteria</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">mergeWith</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Criteria</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">;</span></li><li><span style="color: #009900;">&#125;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Now an additional named scope for the limit element</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="PHP"><div class="devcodeoverflow"><ol><li><span style="color: #666666; font-style: italic;">//&nbsp;&nbsp;Limit - Named Scope --------------------------------------//</span></li><li><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> scopeLimit<span style="color: #009900;">&#40;</span><span style="color: #000088;">$limit</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">30</span><span style="color: #339933;">,</span> <span style="color: #000088;">$offset</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$Criteria</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CDbCriteria<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$Criteria</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">limit</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$limit</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$Criteria</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">offset</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$offset</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDbCriteria</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">mergeWith</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Criteria</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">;</span></li><li><span style="color: #009900;">&#125;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Now we can simply use our named scopes to get our data back, and then we could continue to pile on named scopes to return our data.</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="PHP"><div class="devcodeoverflow"><ol><li><span style="color: #000088;">$Products</span> <span style="color: #339933;">=</span> Product<span style="color: #339933;">::</span><span style="color: #004000;">model</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">scopePriceBetween</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5000</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-&gt;</span><span style="color: #004000;">scopeLimit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">30</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">findAll</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>The query that actually gets executed is simple and looks like this:</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="SQL"><div class="devcodeoverflow"><ol><li><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #ff0000;">`Product`</span> <span style="color: #993333; font-weight: bold;">WHERE</span> Product<span style="color: #66cc66;">.</span>price <span style="color: #993333; font-weight: bold;">BETWEEN</span> :<span style="color: #993333; font-weight: bold;">MIN</span> <span style="color: #993333; font-weight: bold;">AND</span> :<span style="color: #993333; font-weight: bold;">MAX</span> <span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">30</span> OFFSET <span style="color: #cc66cc;">1</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<blockquote><p>This tutorial is a modified tutorial from another website/blog that unfortunantly isn&#8217;t online anymore, domain is being sold by godaddy.com, so I search my archives to retrieve this on, and post him here, hence a few additions, deletes and rewrites from me.</p></blockquote>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2011/06/23/yiiframework-adding-functions-to-your-models/406" target="_blank"><img src="http://webscriptz.be/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2011/06/23/yiiframework-adding-functions-to-your-models/406" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://webscriptz.be/2011/06/23/yiiframework-adding-functions-to-your-models/406/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Annoyed&#8230;with coding</title>
		<link>http://webscriptz.be/2010/02/22/annoyed-with-coding/259</link>
		<comments>http://webscriptz.be/2010/02/22/annoyed-with-coding/259#comments</comments>
		<pubDate>Sun, 21 Feb 2010 23:39:23 +0000</pubDate>
		<dc:creator>webscriptz</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[annoyed]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[yii]]></category>
		<category><![CDATA[yii framework]]></category>

		<guid isPermaLink="false">http://webscriptz.be/?p=259</guid>
		<description><![CDATA[I&#8217;ve been coding away all week, that is between my other jobs at home In all my &#8216;wisdom&#8217; and persistence i made a small app with Yii which stores data in an array and serializes it into a db, and a basic CRUD, a proof of concept to see if the framework was capable of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been coding away all week, that is between my other jobs at home <img src='http://webscriptz.be/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>In all my &#8216;wisdom&#8217; and persistence i made a small app with Yii which stores data in an array and serializes it into a db, and a basic CRUD, a proof of concept to see if the framework was capable of doing this <span style="text-decoration: line-through;">and in the fastest way possible.</span></p>
<p>No problem so far, getting it is simple, but apparently you Yii doesn&#8217;t permit everything. So you need a $temp variable to store the model data in, suffice to say that it isn&#8217;t really the shortest route to take nor in my opinion the fastest bus alas I have to do with it. This little app of not more then a 60 lines of code took me four days, four damn days to figure out the error,  honestly if we have methods to &#8216;save space&#8217; in your coding why not permit them?</p>
<p>I&#8217;m not going to bother everybody with my nagging so, I&#8217;ll stop here.</p>
<p><a href="http://www.yiiframework.com/forum/index.php?/topic/7409-ar-array-problem/">For those who want to see the topic on the yii forums.</a></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2010/02/22/annoyed-with-coding/259" target="_blank"><img src="http://webscriptz.be/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2010/02/22/annoyed-with-coding/259" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://webscriptz.be/2010/02/22/annoyed-with-coding/259/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YII framework configuration</title>
		<link>http://webscriptz.be/2009/12/20/yii-framework-configuration/253</link>
		<comments>http://webscriptz.be/2009/12/20/yii-framework-configuration/253#comments</comments>
		<pubDate>Sun, 20 Dec 2009 22:47:49 +0000</pubDate>
		<dc:creator>webscriptz</dc:creator>
				<category><![CDATA[tutorials]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[yii]]></category>
		<category><![CDATA[yii framework]]></category>

		<guid isPermaLink="false">http://webscriptz.be/?p=253</guid>
		<description><![CDATA[I&#8217;m toying with the Yii Framework for some time now and even if i cost me a lot of anger and frustration in the beginning I&#8217;m starting to like it more and more, alas I do have to say that the documentation isn&#8217;t always that clear and for someone who begins or who&#8217;ll write some [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m toying with the Yii Framework for some time now and even if i cost me a lot of anger and frustration in the beginning I&#8217;m starting to like it more and more, alas I do have to say that the documentation isn&#8217;t always that clear and for someone who begins or who&#8217;ll write some large applications the configuration file can be a hassle so here&#8217;s my solution:</p>
<blockquote><p>Brake down the configuration file in multiple files, this will give you some speed disadvantage and some will  saying that I&#8217;m raping Yii framework purpose for speed but at least to me it seems more clear</p></blockquote>
<p>This is the protected.config/main.php</p>
<p><pre class="brush:[php]">
dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=&gt;'WEBSITENAME',
'modules'=&gt;array(
'users'=&gt;array(
//sub modules in the module users
'modules'=&gt;array(
'messaging',
'profile',
'dashboard',
)
),
'about',
'forums',
),
// preloading 'log' component active loading
'preload'=&gt;array('log'),

// autoloading model and component classes lazy loading
// I make the difference between CformModel and CActiveRecord
'import'=&gt;array(
'application.models.*',
'application.models.forms.*',
'application.models.database.*',
),

// application components
'components'=&gt;array(
// enable cookie-based authentication
'user'=&gt;array('allowAutoLogin'=&gt;true),

// data relinquished to database.php
// for easy access and usability as also for the future
// installation procedure, it's less to write to a file
'db'=&gt;include(dirname(__FILE__).'/database.php'),

// for a better overview we exculded url routes to a seperate file
'urlManager'=&gt;include(dirname(__FILE__).'/routes.php'),

//authentication component needs data from db for CdbConnection
'authManager'=&gt;array(
'class'=&gt;'CDbAuthManager',
'connectionID'=&gt;'db',
'defaultRoles'=&gt;array('authenticated', 'guest'),
),

//security measures
'request'=&gt;array(
'enableCsrfValidation'=&gt;true,
'enableCookieValidation'=&gt;true,
),
),

// application-level parameters that can be accessed
// using Yii::app()-&gt;params['paramName']
// uncomment the following if you want static params in the application
//'params'=&gt;array(include(dirname(__FILE__).'/params.php'))
);</pre></p>
<p>database.php<br />
<pre class="brush:[php]">
'CDbConnection',
'connectionString'=&gt;'mysql:host=localhost;dbname=mysql',
//'connectionString'=&gt;'pgsql:host=localhost;port=5432;dbname=mysql',
'username' =&gt; 'root',
'password' =&gt; '',
);
?&gt;
</pre></p>
<p>routes.php<br />
<pre class="brush:[php]">
'path', // path or get
'urlSuffix' =&gt; '', //.html .whateverextentionyouwant
'showScriptName' =&gt; true,
'rules'=&gt;array(
'users/recovery/perimeterSecurity/'=&gt;'users/recovery/perimeterSecurity',
),
);
?&gt;
</pre></p>
<p>param.php<br />
<pre class="brush:[php]">//nothing in it at the moment</pre></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2009/12/20/yii-framework-configuration/253" target="_blank"><img src="http://webscriptz.be/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2009/12/20/yii-framework-configuration/253" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://webscriptz.be/2009/12/20/yii-framework-configuration/253/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Register &amp; Yii projects</title>
		<link>http://webscriptz.be/2009/09/24/register-yii-projects/244</link>
		<comments>http://webscriptz.be/2009/09/24/register-yii-projects/244#comments</comments>
		<pubDate>Thu, 24 Sep 2009 22:09:19 +0000</pubDate>
		<dc:creator>webscriptz</dc:creator>
				<category><![CDATA[myself and me]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[AR]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[me]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[RBAC]]></category>
		<category><![CDATA[register]]></category>
		<category><![CDATA[yii]]></category>

		<guid isPermaLink="false">http://webscriptz.be/?p=244</guid>
		<description><![CDATA[So, I think ti&#8217;s time for some updates on the website. I has been a bit wild the last 3 weeks. School has started yet again and I had a project to finish not to mention that i&#8217;m starting to see through the Yii framework structure. I&#8217;ve been writing diagrams for different project that I [...]]]></description>
			<content:encoded><![CDATA[<p>So, I think ti&#8217;s time for some updates on the website.</p>
<p>I has been a bit wild the last 3 weeks. School has started yet again and I had a project to finish not to mention that i&#8217;m starting to see through the Yii framework structure. I&#8217;ve been writing diagrams for different project that I have in my head too and that takes a lot of time. Besides figuring out how I want the database to be and my database system had schifted, alto mysql is the favorite, a friend encouraged that i take a look to postgresql. Yii has given me a hard time to basically because it&#8217;s been a bit of a struggle to change coding methodes in function of Yii and then I don&#8217;t start talking about the RBAC system it has build-in. It took every neuron to understand everything form begin to end. Models was also something, Yii has two model types and the active records model is something to understand, I was a bit lost at how I would have to write my own AR functions but thanks to the forums I got that figured out too. All in all everything is good at the moment.</p>
<p>I&#8217;ll be uploading some pictures of the system I wrote recently so you can get some sneaky peaks at it but unfortunately it won&#8217;t be open source system.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2009/09/24/register-yii-projects/244" target="_blank"><img src="http://webscriptz.be/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2009/09/24/register-yii-projects/244" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://webscriptz.be/2009/09/24/register-yii-projects/244/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yii framework very first findings</title>
		<link>http://webscriptz.be/2009/09/07/yii-framework-very-first-findings/240</link>
		<comments>http://webscriptz.be/2009/09/07/yii-framework-very-first-findings/240#comments</comments>
		<pubDate>Mon, 07 Sep 2009 21:46:51 +0000</pubDate>
		<dc:creator>webscriptz</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[yii]]></category>
		<category><![CDATA[yii framework]]></category>

		<guid isPermaLink="false">http://webscriptz.be/?p=240</guid>
		<description><![CDATA[Yii framework (yiiframework.com) is a very fast php5 framework. At first it seems like a jungle in the code, everything is put into motion to make the framework very fast. It&#8217;s been really a steep lurning curve, even if you seen oop programming, alas seen it in a totally different way that corresponds to nothing [...]]]></description>
			<content:encoded><![CDATA[<p>Yii framework (yiiframework.com) is a very fast php5 framework. At first it seems like a jungle in the code, everything is put into motion to make the framework very fast. It&#8217;s been really a steep lurning curve, even if you seen oop programming, alas seen it in a totally different way that corresponds to nothing in yii. So you have to adapt to it&#8217;s style of coding, writing and thinking.</p>
<p>It&#8217;s not a regular MVC framework, yii had a module concept integrated, if you want to use it that it. Tinny mini applications, pull them out and they don&#8217;t work but in the larger application they work just fine.</p>
<p>The logic as said is a bit different, in the configuration of the app you got one large file that has everything in it, but it&#8217;s messy, so i sacrificed a bit of my speed to put it into separate files, separated db config and routes as this gave a more clear picture of the code and you find your environment variables really fast, if you need to switch dbs</p>
<p>The documentation of yii could be better, some things are left up to your sense, chuncks of code are left out instead of leaving the whole things standing which would be far more handy. Luckily for he who wants to contunie with it there is a good forum with dedicated people answering even the most idiotic questions.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2009/09/07/yii-framework-very-first-findings/240" target="_blank"><img src="http://webscriptz.be/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2009/09/07/yii-framework-very-first-findings/240" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://webscriptz.be/2009/09/07/yii-framework-very-first-findings/240/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cakephp</title>
		<link>http://webscriptz.be/2008/11/01/cakephp/142</link>
		<comments>http://webscriptz.be/2008/11/01/cakephp/142#comments</comments>
		<pubDate>Fri, 31 Oct 2008 22:40:15 +0000</pubDate>
		<dc:creator>webscriptz</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://webscriptz.be/?p=142</guid>
		<description><![CDATA[Begin this week I began to experiment with cakephp but there&#8217;s a downside, Cake is something like rails but unfortunately the framework has less good tutorials. Share on Facebook]]></description>
			<content:encoded><![CDATA[<p>Begin this week I began to experiment with cakephp but there&#8217;s a downside, Cake is something like rails but unfortunately the framework has less good tutorials.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2008/11/01/cakephp/142" target="_blank"><img src="http://webscriptz.be/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2008/11/01/cakephp/142" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://webscriptz.be/2008/11/01/cakephp/142/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restful_authentication</title>
		<link>http://webscriptz.be/2008/08/20/restful_authentication/98</link>
		<comments>http://webscriptz.be/2008/08/20/restful_authentication/98#comments</comments>
		<pubDate>Wed, 20 Aug 2008 19:41:10 +0000</pubDate>
		<dc:creator>webscriptz</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://webscriptz.be/2008/08/20/restful_authentication/</guid>
		<description><![CDATA[This is probably one of the easiest authantication plugins for rails. I&#8217;m learning it at the moment and it isn&#8217;t easy, the biggest obstacle is the tutorials that often are but available for rails 1.x.x. Railscasts &#8211; restful_authentication. Share on Facebook]]></description>
			<content:encoded><![CDATA[<p>This is probably one of the easiest authantication plugins for rails. I&#8217;m learning it at the moment and it isn&#8217;t easy, the biggest obstacle is the tutorials that often are but available for rails 1.x.x.</p>
<p><a href="http://railscasts.com/episodes/67-restful-authentication">Railscasts &#8211; restful_authentication</a>.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2008/08/20/restful_authentication/98" target="_blank"><img src="http://webscriptz.be/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://webscriptz.be/2008/08/20/restful_authentication/98" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://webscriptz.be/2008/08/20/restful_authentication/98/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

