<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 18 May 2013 16:15:57 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Refulz Blog: Yii Framework - Scenarios for Conditional Multiple Validation Rules]]></title>
      <guid>http://www.phpdeveloper.org/news/17857</guid>
      <link>http://www.phpdeveloper.org/news/17857</link>
      <description><![CDATA[<p>
On the Refulz blog there's a post showing you how to <a href="http://php.refulz.com/yii-framework-scenarios-for-conditional-multiple-validation-rules/">set up conditional multiple validation rules</a> in a Yii framework application.
</p>
<blockquote>
I am yet to write the last article of the <a href="http://php.refulz.com/series/sessions-in-yii/">Yii Session</a> series. I just decided to write something about the scenarios in the Validation feature of Yii framework. Scenarios are a very useful tool for adding different validations rules for different cases on the same model. In a real life situation, you would require one validation rule for user registration but the same rule might not be applicable to the User login. Scenarios help you define validation rules for different situations within same model.
</blockquote>
<p>
He shows you how to set up a "rules()" method in your model and a few validation configurations inside it - ensuring the password and email are set, checking the length of the password, etc. Then, by calling the "validate()" method on the model, you can easily apply these rules and check the pass/fail status.
</p>]]></description>
      <pubDate>Tue, 24 Apr 2012 09:18:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gaurish Patil's Blog: URL rewriting in Yii to hide index.php]]></title>
      <guid>http://www.phpdeveloper.org/news/17844</guid>
      <link>http://www.phpdeveloper.org/news/17844</link>
      <description><![CDATA[<p>
In <a href="http://gaurishpatil.wordpress.com/2012/04/19/url-rewriting-in-yii-to-hide-index-php/">this new post</a> to his blog <i>Gaurish Patil</i> shows users of the <a href="http://www.yiiframework.com/">Yii framework</a> how they can update their configuration settings to hide the "index.php" in their requests and make cleaner URLs.
</p>
<blockquote>
Finally we figure out the basics of  Yii. While working on basic of Yii, I want to rewrite the url to SEO friendly. So I started to search on google, forum got useful information here http://www.yiiframework.com/doc/guide/1.1/en/topics.url To hide the index.php from url I did changes in config/main.php [...] and I created new .htaccess file in the same directory as my index.php file.
</blockquote>
<p>
The changes are pretty simple - it's mostly a change to the "urlManager" setting to provide some rules for mapping controller and actions to the right place. The .htaccess file uses Apache's mod_rewrite functionality to grab the requested URL and remap it back to lay on top of the "index.php" front controller for the request.
</p>]]></description>
      <pubDate>Fri, 20 Apr 2012 09:27:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Under the Hood of Yii's Component Architecture, Part 3]]></title>
      <guid>http://www.phpdeveloper.org/news/17537</guid>
      <link>http://www.phpdeveloper.org/news/17537</link>
      <description><![CDATA[<p>
PHPMaster.com is back with the <a href="http://phpmaster.com/under-the-hood-of-yii%E2%80%99s-component-architecture-part-3/">third part of their series</a> looking at the internals of the Yii framework (specifically, its components). In this latest article <i>Steven O'Brien</i> focuses on how the framework uses behaviors.
</p>
<blockquote>
A behavior, as it is called in Yii, is a manner of combining objects at runtime to extend an object's functionality. Behaviors are an excellent way to decouple code and keep ever expanding systems maintainable. [...] We can not reuse our code effectively because PHP doesn't support multiple inheritance. The Yii behavior system is a way of achieving multiple inheritance by implementing <a href="http://en.wikipedia.org/wiki/Mixin">mixins</a>.
</blockquote>
<p>
He gives an example of working with a user that's connecting to your application just to get to a third-party billing system. They show how to take this functionality our of your generic "User" class and make a behavior out of it. This functionality can then be attached to the User object (via an attachBehavior call) and used directly. He gets into how Yii does this magic, showing how it appends it to a special value in the class and the __call method checks the method call to see if it exists in one of these special classes.
</p>]]></description>
      <pubDate>Tue, 14 Feb 2012 09:28:34 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Under the Hood of Yii's Component Architecture, Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/17510</guid>
      <link>http://www.phpdeveloper.org/news/17510</link>
      <description><![CDATA[<p>
Following up on their <a href="http://phpdeveloper.org/news/17472">previous look</a> at the component architecture of the Yii framework, PHPMaster has posted <a href="http://phpmaster.com/yii-under-the-hood-2">this new tutorial</a> showing how the framework allows you to do some event-based programming.
</p>
<blockquote>
An application event is something that occurs which might be of interest to other bits of code. A standard event in most GUI applications would be a "click" event, but the sky's the limit and what events you define is really up to you. [...] The details can be provided by application-specific modules allowing you to keep individual requirements separate from your reusable code. Events allow you to attach a potentially unlimited amount of functionality without changing your core modules and components.
</blockquote>
<p>
In his example, he shows how to create an event handler that is triggered when the user registers on the site. This event (CEvent) is then registered with the system and is attached via a call in the controller's "init" method.
</p>]]></description>
      <pubDate>Tue, 07 Feb 2012 11:53:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Under the Hood of Yii's Component Architecture, Part 1]]></title>
      <guid>http://www.phpdeveloper.org/news/17472</guid>
      <link>http://www.phpdeveloper.org/news/17472</link>
      <description><![CDATA[<p>
On PHPMaster.com today <i>Steven O'Brien</i> takes a look at a popular PHP-based framework, <a href="http://www.yiiframework.com/">Yii</a> - specifically one of the components that makes it up, the <a href="http://www.yiiframework.com/doc/api/1.1/CComponent">CComponent</a> that provides a base for all other components in the framework.
</p>
<blockquote>
There's been a lot of buzz surrounding the use of frameworks for quite a while now and there are many great PHP frameworks to choose from. I was blown away by the simplicity and power of the base <a href="http://www.yiiframework.com/doc/api/1.1/CComponent">CComponent</a> class in the Yii framework. [...] Every class in the framework extends from the CComponent class, which means that all subclasses work as components and can raise and handle events as well as be reusable and configurable. This packs a lot of punch for such a little class!
</blockquote>
<p>
In this first post of the series, he looks at how this base class lets you work with class properties using the magic getters and setters. He includes some code showing how to set them up and how to use it to configure your object by passing in other component and their configuration.
</p>]]></description>
      <pubDate>Tue, 31 Jan 2012 11:19:47 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[AppBackr Blog: Automated PHP unit testing for lazy coders]]></title>
      <guid>http://www.phpdeveloper.org/news/16664</guid>
      <link>http://www.phpdeveloper.org/news/16664</link>
      <description><![CDATA[<p>
In a recent post from the AppBackr blog they share a solution they've found for running unit tests automatically <a href="http://geeks.appbackr.com/61971101">for lazy coders</a> using a combination of PHPUnit, Watchr and Growl notifications (OS X-only, obviously).
</p>
<blockquote>
Now you could run [your] tests manually after each change by typing 'phpunit <your test folder>', but we were looking for something a little more comfortable. We want to decrease the transactional cost of running the tests as much as possible to make the lives of our engineers more pleasant. Making testing easy is the only way the engineers will run the tests frequently.
</blockquote>
<p>
Instead they opted for <a href="https://github.com/mynyml/watchr">Watchr</a>, a tool that keeps an eye on a list of files looking for a change. When one happens, a process is fired off - in this case a PHPUnit run. To make it even easier to see feedback, they integrated it with <a href="http://growl.info/">Growl</a> to show <a href="http://posterous.com/getfile/files.posterous.com/temp-2011-07-21/aGCnenemtzIzodDbvkeCAuyEHyyepnmCIBwovsrlFohtrgJkehawphtHIpGk/test_succeeded.png.scaled500.png">pass</a> or <a href="http://posterous.com/getfile/files.posterous.com/temp-2011-07-21/digwcGCjjfvoxiHkwFCkkgshJHHBmhejDozyrAgsxsHdeCImhqncdiEJzlIm/test_failed.png.scaled500.png">fail</a> results. He includes the <a href="https://github.com/appbackr/watchr-phpunit-yii-config">source for his Watchr script</a> to help you get started.
</p>]]></description>
      <pubDate>Tue, 02 Aug 2011 10:41:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Introducing the Yii PHP Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/16259</guid>
      <link>http://www.phpdeveloper.org/news/16259</link>
      <description><![CDATA[<p>
In another in his framework series, <i>Jason Gilmore</i> has a new post on PHPBuilder.com about another popular framework - <a href="http://www.phpbuilder.com/columns/yii-php-framework/Jason_Gilmore04262011.php3">the Yii framework</a>. He introduces you to the framework and shows the creation of a sample, basic site.
</p>
<blockquote>
Frameworks have been the topic du jour here at PHPBuilder.com, with numerous recent articles covering DooPHP and Fat-free. In this latest stop on the framework tour, we'll check out Yii, a relatively new framework (less than three years old) that boasts an impressive array of features and an equally impressive array of users, among them the enormously popular <a href="http://www.stay.com/">Stay.com</a>.
</blockquote>
<p>
He walks you through the install (downloading the latest version) and shows how to use the command-line tool to automatically generate the basic website structure. He continues on showing how to update the main page and template, how to get it connected to a MySQL database and how to use the Gii tool to create basic admin forms for working with the tables.
</p>]]></description>
      <pubDate>Wed, 27 Apr 2011 11:03:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[php|architect: Ext4Yii, bridging PHP and JavaScript frameworks together]]></title>
      <guid>http://www.phpdeveloper.org/news/14796</guid>
      <link>http://www.phpdeveloper.org/news/14796</link>
      <description><![CDATA[<p>
On the php|architect blog today there's <a href="http://www.phparch.com/2010/07/15/ext4yii-bridging-php-and-javascript-frameworks-together">a new post</a> about a framework that joins together two others (ExtJS and Yii) to make for an even more powerful combo - <a href="http://www.ext4yii.com/">Ext4Yii</a>.
</p>
<blockquote>
Ext4Yii is essentially a bridge between these two projects, which aims to integrate Ext JS as an extension for Yii. Ext4Yii is implemented as a templating system, which consumes XML models where you define widget elements like buttons or handlers (in embedded JavaScript code which can take advantage of Ext-powered methods and objects).
</blockquote>
<p>
This templating system integrates directly with the Yii framework's structure and gives you access to a lot of the ExtJS objects without the need for multiple calls to .js files.  The tool also comes with a bundled plugin for Netbeans that can help you get started quickly (rather than having to work out the syntax by hand from the start).
</p>]]></description>
      <pubDate>Thu, 15 Jul 2010 09:44:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Paul Jones' Blog: Running The Symfony 2 Benchmarks]]></title>
      <guid>http://www.phpdeveloper.org/news/14067</guid>
      <link>http://www.phpdeveloper.org/news/14067</link>
      <description><![CDATA[<p>
In responding to some of the benchmarks posted about <a href="http://symfony-reloaded.org/fast">the speed and performance of Symfony 2</a> and how they truly compare to some of the other frameworks out there, <i>Paul Jones</i> has <a href="http://paul-m-jones.com/?p=1222">shared his thoughts and process</a> on using his benchmarking system to get some differing results.
</p>
<blockquote>
Fabien Potencier released Symfony 2.0.0alpha1 last week, along with some benchmarks showing its performance. I am glad to see that Fabien used <a href="http://code.google.com/p/web-framework-benchmarks/">my benchmarking system and methodology</a>, and am happy to see that he is paying attention to the performance of his framework. I take this as an acceptance on his part that my methodology is legitimate and valid, and that it has value when comparing framework responsiveness.
</blockquote>
<p>
<i>Paul</i> points out that <i>Fabien</i>'s reporting is a bit inaccurate and goes on to talk about how his numbers are off and what a more correct version of the benchmarks would look like. He takes the testing methodology that <i>Fabien</i> used in his process and reapplies it to his benchmarking process using clean Amazon EC2 instances and Siege to run some response/request testing on software running on each framework. Numbers are run for three different comparisons and results are found...but you'll have to <a href="http://paul-m-jones.com/?p=1222">read the rest of the post</a> to find those out.
</p>]]></description>
      <pubDate>Mon, 22 Feb 2010 10:37:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Frank Wu's Blog: Choosing a PHP Framework Round 2: Yii vs Kohana vs CodeIgniter]]></title>
      <guid>http://www.phpdeveloper.org/news/12163</guid>
      <link>http://www.phpdeveloper.org/news/12163</link>
      <description><![CDATA[<p>
<i>Fred Wu</i> has <a href="http://www.beyondcoding.com/2009/03/02/choosing-a-php-framework-round-2-yii-vs-kohana-vs-codeigniter/">put together a comparison</a> of three of the more well-known PHP frameworks out there - CodeIgniter, Kohana and the relative newcomer Yii.
</p>
<blockquote>
It was over a year ago that I wrote <A href="http://www.beyondcoding.com/2008/02/23/notes-on-choosing-a-php-framework-a-quick-comparison-of-codeigniter-and-kohana/">the article that compares CodeIgniter and Kohana</a>. Since then both CodeIgniter and Kohana have seen major progress with the release of <a href="http://www.derekallard.com/blog/post/codeigniter-170-released/">CodeIgniter 1.7.0</a> and <a href="http://learn.kohanaphp.com/2008/08/09/kohana-22-released/">Kohana 2.3</a>. [...] Let's see how they compare with each other.
</blockquote>
<p>
He judges on a list of criteria including licensing, supported databases, community, documentation and modularity. Ratings are gives for each framework (like "Excellent" or "Good") on each item with over twenty aspects considered.
</p>]]></description>
      <pubDate>Wed, 18 Mar 2009 12:57:48 -0500</pubDate>
    </item>
  </channel>
</rss>
