<?xml version="1.0"?>
<feed xmlns="http://purl.org/atom/ns#" version="0.3" xml:lang="en-GB"><title>Planet.PHP.ie</title><link rel="alternate" type="text/html" href="http://planet.php.ie"/><tagline>Blogs of members of the Irish PHP Users Group</tagline><id>http://planet.php.ie</id><generator url="http://planet.php.ie/">
            Planet.PHP.ie Aggregator
            </generator><modified>2012-02-03T08:51:00Z</modified><entry xmlns=""><title type="text/plain" mode="escaped">How to build mongodb pecl extension in 32bit for PHP 5.2 on MacOSX Snow Leaopard</title><link rel="alternate" type="text/html" href="http://artur.ejsmont.org/blog/content/how-to-build-mongodb-pecl-extension-in-32bit-for-php-52-on-macosx-snow-leaopard" title="How to build mongodb pecl extension in 32bit for PHP 5.2 on MacOSX Snow Leaopard"/><author><name>artur.ejsmont.org - PHP-Blog</name></author><id>http://artur.ejsmont.org/blog/content/how-to-build-mongodb-pecl-extension-in-32bit-for-php-52-on-macosx-snow-leaopard</id><modified>2012-02-03T08:51:00Z</modified><issued>2012-02-03T08:51:00Z</issued><content type="text/html" mode="escaped"><![CDATA[<p>Unfortunately i have to support PHP 5.2 and i also need to run my Mac in 32 bit mode as my VPN client does not support 64 bit :(</p>
<p>This causes quite a lot of hassle as PHP 5.2 is less and less supported by frameworks, extensions etc. It is also waste of time as i have to manually build stuff instead of using regular packages, ports etc.</p>
<p>Here is a quick step by step guide on how to get mongodb and PHP5.2 mongo pecl extension going on your MacOSX in 32bit mode!</p>
<p>NOTE: 32 bit mongodb binaries have 2GB address space limit so you wont be able to process too much on your laptop. You will still be able to code and connect to remote instances just fine.</p>
<p><a href="http://artur.ejsmont.org/blog/content/how-to-build-mongodb-pecl-extension-in-32bit-for-php-52-on-macosx-snow-leaopard" target="_blank">read more</a></p>]]></content></entry><entry xmlns=""><title type="text/plain" mode="escaped">Mockery 0.7.2 Released (And On Packagist.org!)</title><link rel="alternate" type="text/html" href="http://blog.astrumfutura.com/2012/01/mockery-0-7-2-released-and-on-packagist-org/" title="Mockery 0.7.2 Released (And On Packagist.org!)"/><author><name>P&#xE1;draic Brady</name></author><id>http://blog.astrumfutura.com/2012/01/mockery-0-7-2-released-and-on-packagist-org/</id><modified>2012-01-25T11:07:00Z</modified><issued>2012-01-25T11:07:00Z</issued><content type="text/html" mode="escaped"><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.astrumfutura.com%2F2012%2F01%2Fmockery-0-7-2-released-and-on-packagist-org%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.astrumfutura.com%2F2012%2F01%2Fmockery-0-7-2-released-and-on-packagist-org%2F&source=padraicb&style=normal&service=bit.ly&service_api=padraic%3AR_94101570b7e190f3de921bc15bb9438d&hashtags=mockery&b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="https://github.com/padraic/mockery">Mockery</a> is a simple yet flexible PHP mock object framework for use in unit testing with <a class="zem_slink" title="PHPUnit" rel="homepage" href="http://www.phpunit.de">PHPUnit</a>, <a href="http://www.phpspec.net/">PHPSpec</a> or any other testing framework. Its core goal is to offer a framework for creating test doubles like mock objects through the use of a simple and succint API capable of clearly defining all possible object operations and interactions using a human readable <a class="zem_slink" title="Domain-specific language" rel="wikipedia" href="http://en.wikipedia.org/wiki/Domain-specific_language">Domain Specific Language</a> (DSL). Designed as a drop in alternative to PHPUnit’s <a href="https://github.com/sebastianbergmann/phpunit-mock-objects">phpunit-mock-objects</a> library, Mockery is easy to integrate with PHPUnit and can happily operate alongside phpunit-mock-objects.</p>
<p>Today, I am pleased to announce the release of Mockery 0.7.2, a maintenance release fixing a small number of bugs and annoyances. A special thanks to all those who forked the Github project at and submitted pull requests! Leaving a developer with hardly any work to do other than a quick test and merge is always appreciated! You can install or upgrade to the new version from the <a href="http://pear.survivethedeepend.com">survivethedeepend.com PEAR channel</a>.</p>
<p>Another piece of news is that Mockery is now available on <a href="http://packagist.org/packages/mockery/mockery">Packagist.org</a> for users of <a href="http://packagist.org/about-composer">Composer</a>. Composer is a tool to help you manage your own projects’ or librarys’ dependencies and it can handle and mix dependencies from Composer compatible repositories like <a href="http://packagist.org">Packagist.org</a>, any git repository using tags, and any PEAR channel. I do this of my own free will and not because Luis Cordova and Benjamin Eberlei are standing behind me with pitchforks <img src='http://blog.astrumfutura.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>The more pertinant fixes include:</p>
<ol>
<li>Fixed a problem in resolving methods chains which abuse the <a title="Law of Demeter" rel="wikipedia" href="http://en.wikipedia.org/wiki/Law_of_Demeter">Law of Demeter</a> (thanks to the wizardly Robert Basic).</li>
<li>Fixed unexpected static calls to an alias mock which were causing fatal errors (thanks to Luis Cordova).</li>
<li>Fixed a crash present since PHP 5.3.6 due to a referenced $this variable entering a closure (thanks to Martin Sadovy).</li>
<li>Added support for PHP_CodeCoverage 1.1 whose filter class is no longer a singleton (thanks to Matthew Vivian).</li>
<li>Added non-halting exception handling (for Mockery exceptions) to the PHPUnit TestListener (thanks to Adrian Slade).</li>
<li>Added boolean $prepend (defaults to FALSE) parameter to  \Mockery\Loader::register() to allow for registering Mockery’s  autoloader to the top of the autoloader stack even after other  autoloaders have been registered (thanks to Hermann Kosselowski).</li>
<li>Updated documentation/tests for the release of Hamcrest 1.0.0 several  days ago (thanks to me, me, me – who finally got to do something nobody  else had a pull request for!).</li>
<li>Added new \Mockery::self() static method to make retrieving the current  mock object simpler and more readable while setting expectations without  the need to refer back to past variable assignments.</li>
</ol>
<p>Users should also note that <a href="http://code.google.com/p/hamcrest/downloads/list">Hamcrest 1.0.0</a>, which includes a small filename change (hamcrest.php was capitalised to Hamcrest.php), was released several days ago. If you use Hamcrest matchers with Mockery, you should ensure that both libraries are updated on your system.</p>
<p>As always, please report any bugs or potential improvements to the Github issue tracker using the relevant label or, even more appreciated, send me a pull request.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=bca20a55-a102-4f9e-87be-350304e0b374" alt="Enhanced by Zemanta" /></a></div>
]]></content></entry><entry xmlns=""><title type="text/plain" mode="escaped">Storing Session Data In Cookies: Problems And Security Concerns To Be Aware Of</title><link rel="alternate" type="text/html" href="http://blog.astrumfutura.com/2012/01/storing-session-data-in-cookies-problems-and-security-concerns-to-be-aware-of/" title="Storing Session Data In Cookies: Problems And Security Concerns To Be Aware Of"/><author><name>P&#xE1;draic Brady</name></author><id>http://blog.astrumfutura.com/2012/01/storing-session-data-in-cookies-problems-and-security-concerns-to-be-aware-of/</id><modified>2012-01-23T21:20:00Z</modified><issued>2012-01-23T21:20:00Z</issued><content type="text/html" mode="escaped"><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.astrumfutura.com%2F2012%2F01%2Fstoring-session-data-in-cookies-problems-and-security-concerns-to-be-aware-of%2F"><br/><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.astrumfutura.com%2F2012%2F01%2Fstoring-session-data-in-cookies-problems-and-security-concerns-to-be-aware-of%2F&source=padraicb&style=normal&service=bit.ly&service_api=padraic%3AR_94101570b7e190f3de921bc15bb9438d&hashtags=php&b=2" height="61" width="50"/><br/></a>
		</div>
<div class="wp-caption alignright" style="width: 310px"><a href="http://commons.wikipedia.org/wiki/File:ChocolateChipSmile.jpg"><img class="zemanta-img-inserted zemanta-img-configured" title="English: Peanut butter cookie with a chocolate..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/e/ee/ChocolateChipSmile.jpg/300px-ChocolateChipSmile.jpg" alt="English: Peanut butter cookie with a chocolate..." width="300" height="301"/></a><p class="wp-caption-text">Image via Wikipedia</p></div>
<p>Back from my extended leave of absence, I’ll re-open the dusty cobwebbed depths of this blog to echo the sentiments of Paul Reinheimer in his recent article “<a href="http://blog.preinheimer.com/index.php?/archives/373-Cookies-dont-replace-Sessions.html">Cookies don’t replace Sessions</a>“. The topic is actually an old one since Ruby On Rails has adopted the strategy of storing application session data in cookies by default (take note, performance hounds). The purposes of storing sessions in userland cookies rather than the conventional “stick-it-on-the-filesystem/database” used by many apps is one of performance and a little obscuration. Cookie data can be accessed faster than hitting the filesystem/database plus it has the dubious ability to disguise the session-targeted programming language. Really though, PHP is assumed to be on all web servers so hiding its existence is a bit like trying to hide an elephant in a zoo. Hide it all you want – we still know there has to be one in there!</p>
<p>In exchange for speeding up session reading, storing session data in cookies has some fairly uncomfortable costs.</p>
<p>Now, developers are not unaware of the problems of storing potentially sensitive application data in plain text files on the user’s PC which users can manipulate, copy, and mangle to their (or the hacker’s currently fiddling with the user’s PC) heart’s content. It’s dangerous depending on just how much you rely on session data to drive other security rules or restrictions on business logic within the application. Technically, the reliance placed on sessions should be close to nothing – session data should drive the application towards other storage solutions for the really essential stuff and just stay around as a minimal identifier/stash of basic ID info. Such minimal information can be dumped, corrupted, or overwritten with the only cost being to perhaps require a user to login again when that happens. Stuffing a bank balance into a session, on the other hand, is one (very exaggerated!) example of the kind of data you should be shot for relying on a session for.</p>
<p>Programmers being programmers, it’s not rare to see sessions become a more intrinsically important storage location than it should be. In those cases, being able to manipulate the session data can become a problem and may give rise to exploitation scenarios where tampering with the stored data leads to some benefit for the manipulator. Obviously we want to make sure that that can’t happen even in scenarios where programmers may be a bit loose with where they store data. We don’t build frameworks and libraries for Gurus, we build them for all programmers – even the sometimes ignorant and under trained ones. This cookie stored session data is often coupled with the ability to encrypt that data. However…</p>
<p>As Paul Rainheimer remarks <a href="http://blog.preinheimer.com/index.php?/archives/373-Cookies-dont-replace-Sessions.html">in his article</a>, “Encryption is often viewed as a panacea for security problems, you sprinkle a little encryption dust around, and your problems dissolve”. This is an absolute truth in programming – programmers often view encryption as a solution without regard for one teeny tiny problem. If you encrypt a set of data for any purpose, even though it’s encrypted, the user (or the hacker hacking the user’s account) still has the data in some usable form!</p>
<p>With perfectly intact data, and even through it’s hidden by encryption, that data can be recycled simply by copying it to another machine. Depending on the data that is stored (which admittedly may require the hacker/user to figure out by doing actual work like finding your open source a</p><p><i>Truncated by Planet PHP.ie, read more at <a href="http://blog.astrumfutura.com/2012/01/storing-session-data-in-cookies-problems-and-security-concerns-to-be-aware-of/">the original</a> (another 3726 bytes)</i></p>]]></content></entry><entry xmlns=""><title type="text/plain" mode="escaped">Agile Toolkit to join Wikipedia in 24-hour Blackout against SOPA.</title><link rel="alternate" type="text/html" href="http://agiletoolkit.org/blog/agile-toolkit-to-join-wikipedia-in-24-hour-blackout-against-sopa/" title="Agile Toolkit to join Wikipedia in 24-hour Blackout against SOPA."/><author><name>Agile Toolkit Blog</name></author><id>http://agiletoolkit.org/blog/agile-toolkit-to-join-wikipedia-in-24-hour-blackout-against-sopa/</id><modified>2012-01-17T13:16:00Z</modified><issued>2012-01-17T13:16:00Z</issued><content type="text/html" mode="escaped"><![CDATA[<p>Web developer is already under tremendous pressure from the patents, but it might get even worse with SOPA.</p>
<p><a href="http://vimeo.com/31100268">http://vimeo.com/31100268</a></p>
<p>Imagine the need to censor every user post on your site. Most of the web projects I’ve been involved with has the “website claims no responsibility for user content”. That won’t be the case anymore. Imagine if you as a webmaster could go to jail if user posts a copyrighted piece of information.</p>
<p>Agile Toolkit website will be unavailable for 24-hours to join Wikipedia in efforts to raise awareness on Jan 18th.</p>
<p>More about SOPA: <a href="http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act">http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act</a></p>
]]></content></entry><entry xmlns=""><title type="text/plain" mode="escaped">Our progress in 2011</title><link rel="alternate" type="text/html" href="http://agiletoolkit.org/blog/progress-in-2011/" title="Our progress in 2011"/><author><name>Agile Toolkit Blog</name></author><id>http://agiletoolkit.org/blog/progress-in-2011/</id><modified>2011-12-31T01:17:00Z</modified><issued>2011-12-31T01:17:00Z</issued><content type="text/html" mode="escaped"><![CDATA[<p>In just about 12 months since the first public release in Feb 2011, Agile Toolkit now have thousands of users worldwide (with no paid advertising). We’ve came the long way in 2011 and there is an exciting way ahead in 2012.</p>
<p><span id="more-884"></span></p>
<h2>How did we start?</h2>
<p>Agile Toolkit 4.0.1 was publicly released about a year ago, in early 2011. It came with a brand new homepage, which by the middle of February was looking like this: <a href="http://old.agiletoolkit.org/">http://old.agiletoolkit.org/</a> (Enjoy this older snapshot, I might remove it later).</p>
<p>The important point here is that Until February 2011 there were about 5-10 developer who knew Agile Toolkit. It hasn’t been a year but we now have thousands of installations across the world and we have very stable 4.1.3 and are working on 4.2. Back in February the whole community management deal was very new to me and I still think  we could use more active supporters.</p>
<p>At the start of the year, I knew of just a few cases where Agile Toolkit was used outside of our company and now there are lots of projects in development such as Support Ticket systems, Project management, Accounting systems, Payroll, Cloud Control Interfaces, Skill testing, Graphing and Plotting UI, Political discussion websites, Application Store Management System, Game statistics tracking, Racing database and even for an interface for ordering Salad from local cafeteria.</p>
<p>Lately we have been working further to commit back code and start several open-source project including Agile Content Management System, Agile Cart/Checkout, Generic Membership website, Project development collaboration platform (Colubris).</p>
<h2>What Users Say?</h2>
<p>Here is some of our user feedback I’ve collected:</p>
<p><em>Thanks. I think you have done an incredible project. With some more documentation it will overtake some big and hard to learn frameworks. [Jaume]</em></p>
<p><em>I am quite curious about atk4. I ran into AModules3 a few years back and was intrigued but did not have the time to do anything with it. I now ran into ATK and realized it is fact based on AModules3! I am taking a better look now. [skip] Cheers for what looks very promising! [Dominic]</em></p>
<p><em>Hi, I’m a simple php developer from Montevideo Uruguay.I’m in the process of adopt a PHP framework and are very Impressed with ATK, It’s really very simple to learn (for me) compared with other frameworks thath I have tried (zend, symfony, cake). [Alejandro]</em></p>
<p><em>This framework is very promising. We’re going to try it in a internal project initially and then if succesfull we will integrate it in our products. [Ivan]</em></p>
<p><em>Looks very interesting on first look through, anything that makes UI development/intigration more streamlined is welcome [Dave]</em></p>
<p><em>This framework looks solid and extremely sophisticated yet simple at what it does! [?]</em></p>
<p><em>Geez! How powerful is ATK, and getting even stronger! Thumbs up guys! Congrats.Hoping to become familiar with the toolkit and start using it as my best tool. [Fernando]</em></p>
<p><em>This is Babu…. your technology seems to be awesome and very efficient one.It would be more better for me if there is any complete reference materials for this technology because i am working in a project using this framework. [Babu]</em></p>
<div><em>Love the toolkit! [Bob]</em></div>
<div><em>hi romans, i using ur toolkit, it was great, i can easily generate almost any kind of web element. [PHP Newbie]</em></div>
<p><em>I just checked the presentation .. and I can say WOW! indeed looks very promising and powerfull. I also am checkign the new demos. Very good impression! [Svetlozar]</em></p>
<p><em>Congratulations! I am glad, framework keeps on growing. With a lot of interest now I am going to check atk4.com looking for new things =) [Kirill]</em></p>
<h2>My Wish for New Year</h2>
<p>For the new year I wish that Agile Toolkit would simplify a daily life of as many web developers as our word of mouth could reach.</p>
<p>Happy New Year Everyone!</p>
]]></content></entry><entry xmlns=""><title type="text/plain" mode="escaped">Development Mailing List / Group Launched</title><link rel="alternate" type="text/html" href="http://agiletoolkit.org/blog/development-mailing-list-group/" title="Development Mailing List / Group Launched"/><author><name>Agile Toolkit Blog</name></author><id>http://agiletoolkit.org/blog/development-mailing-list-group/</id><modified>2011-12-08T16:27:00Z</modified><issued>2011-12-08T16:27:00Z</issued><content type="text/html" mode="escaped"><![CDATA[<p>I would like to welcome anyone who wants to participate in brain-storming and helping with some testing of 4.2 into our new google group:</p>
<p>https://groups.google.com/forum/#!forum/agile-toolkit-devel</p>
<p>You can learn a lot buy learning fundamentals of Agile Toolkit.  I’m starting from the very bottom layers of the framework, so join in quick!</p>
]]></content></entry><entry xmlns=""><title type="text/plain" mode="escaped">How to execute PHP code from JavaScript</title><link rel="alternate" type="text/html" href="http://agiletoolkit.org/blog/how-to-execute-php-code-from-javascript/" title="How to execute PHP code from JavaScript"/><author><name>Agile Toolkit Blog</name></author><id>http://agiletoolkit.org/blog/how-to-execute-php-code-from-javascript/</id><modified>2011-11-14T11:10:00Z</modified><issued>2011-11-14T11:10:00Z</issued><content type="text/html" mode="escaped"><![CDATA[<p>If you are only starting with PHP and Web Development, questions like “how to execute PHP from JavaScript” are inevitable. First I must say that JavaScript and PHP are living on the different sides of the fence and are simply throwing ball over to each-other. So your JavaScript needs a request to the PHP asking it to execute some code.</p>
<p>Unless you want to reinvent the wheel, you should look into using some <a href="http://ajaxpatterns.org/PHP_Ajax_Frameworks">AJAX / PHP library</a>. Agile Toolkit amongst other can be a great help when you want to build interaction between JavaScript and PHP.</p>
<p><span id="more-876"></span></p>
<h2>JavaScript event to trigger PHP function</h2>
<p>Before going into AJAX, here is how you could produce random numbers in plain JavaScript:</p>
<p>&lt;button id=”mybutton”>Click Me&lt;/button><br />
&lt;script><br />
$(‘#mybutton’).click( function(){<br />
$(‘#mybutton’).text( Math.random() );<br />
}<br />
&lt;/script></p>
<p>Agile Toolkit comes up with an elegant way in PHP:</p>
<p>$mybutton=$this->add(‘Button’)->setLabel(‘Click me’);<br />
if($mybutton->isClicked()){<br />
$mybutton->js()->text( rand() )->execute();<br />
}</p>
<p><a title="Executing PHP code when button is clicked. AJAX and JavaScript events" href="http://codepad.agiletoolkit.org/buttonpushing" target="_blank">See this example in action</a></p>
<p><a title="JavaScript binding with PHP" href="http://agiletoolkit.org/learn/understand/chains" target="_blank">More information of Binding JavaScript actions to PHP</a></p>
<p>Code achieves same result, but the “Rand” value is calculated on the server. This code relies on the JavaScript function “ajaxec()” defined in JavaScript Utility library (Universal Chain).</p>
<h2>How to make it even better?</h2>
<p>Wouldn’t it be even greater if you could bind any action to any object like that?</p>
<p>$this->add(‘H3′)->set(‘Move mouse over’)->on(‘mouseover’, function(){</p>
<p>$this->js()->text(‘Thank you’)->execute();</p>
<p>});</p>
]]></content></entry><entry xmlns=""><title type="text/plain" mode="escaped">New Screencast Series for PHP Developers</title><link rel="alternate" type="text/html" href="http://agiletoolkit.org/blog/practical-screencasts/" title="New Screencast Series for PHP Developers"/><author><name>Agile Toolkit Blog</name></author><id>http://agiletoolkit.org/blog/practical-screencasts/</id><modified>2011-11-11T17:07:00Z</modified><issued>2011-11-11T17:07:00Z</issued><content type="text/html" mode="escaped"><![CDATA[<p>I have asked few people in London, who was up to help me out with Screencasts. Few people responded who have some ideas they wanted to implement in Agile Toolkit. I was able to help them and recorded our sessions. I now have 8 hours of screencast footage, which I’ll be releasing to youtube.</p>
<p><a href="http://www.youtube.com/romaninsh/#p/a/u/1/0_OROS53Fq8">Subscribe to my channel on YouTube to see the screencasts as soon as I publish them</a>.</p>
<p>The first 6 one-hour sessions is about creating a simple Task Manager. Many thanks to Maurizio for his participations.</p>
<h2>Screencast with me!</h2>
<p>If you’ve got Skype and great idea for Agile Toolkit we could help each-other. I can help you move forward with your idea and I would get a material for a new screencast session. Please use contact form to send me your ideas.</p>
]]></content></entry><entry xmlns=""><title type="text/plain" mode="escaped">Sneak Peak into Agile Toolkit 4.2</title><link rel="alternate" type="text/html" href="http://agiletoolkit.org/blog/sneak-peak-into-agile-toolkit-4-2/" title="Sneak Peak into Agile Toolkit 4.2"/><author><name>Agile Toolkit Blog</name></author><id>http://agiletoolkit.org/blog/sneak-peak-into-agile-toolkit-4-2/</id><modified>2011-11-03T23:39:00Z</modified><issued>2011-11-03T23:39:00Z</issued><content type="text/html" mode="escaped"><![CDATA[<p>As we nearing our deadline fro 4.2 release a lot of cool features have been added into development branch of Agile Toolkit such as:</p>
<ul><li>Completely new “TMail” implementation</li>
<li>Completely new “DB” implementation based on PDO</li>
<li>Completely new “DSQL” implementation</li>
<li>Completely new “Model” implementation</li>
<li>Completely new SMlite implementation</li>
<li>Improvements in Site Debugging</li>
</ul><p>The new implementations are functionally compatible with the 4.1 branch, although the do offer a number of benefits. In this article, I’ll highlight some of the new features about the new component implementation.</p>
<p>Another important feature of all the new modules is that they are are under heavy automated testing from the very start.</p>
<p><span id="more-866"/></p>
<h3>What’s new in the “TMail 2.0″</h3>
<p>The TMail class actually been pushed into 4.1.3 release adds much more modularity as well as support for transports. Previously TMail would only send out emails through the mail() function, now it could be written into database, sent over Amazon SES, mail() or any combination of these.</p>
<p>There are also number of improvements in how TMail manages templates – it allow both html and Text part to be defined in your template and will automatically produce non-html version if you supply with the html only.</p>
<h3>What’s new in DB implementation</h3>
<p>Actually there is nothing new in the DB as compared to “DBlite”. You initialize database by calling $api->dbConnect() and it’s going to stay this way. To use the new database driver you would need to supply the “pdo” in the $config file.</p>
<p>DB implementation features a “query cache”, if a query is executed multiple times, it is prepared only once. This actually makes a lot of sense when you operate with models and parametric values.</p>
<h3>What’s new in DSQL implementation</h3>
<p>DSQL has been rewritten, but the fundamentals are the same. You create dsql() instance then call methods such as “field()”, “where()”. The new version is much more consistent about escaping arguments and handling of expressions. The new implementation completely relies on parametric nature of PDO, which proved to be a little more challenging to implement, but the interface have not been changed.</p>
<p>1. where(‘id’,2);                    // equals<br/>
2. where(‘id’,'>’,2);                // explicit condition<br/>
3. where(array(‘id’,2),array(‘id’,3));    // or<br/>
4. where(‘id’,array(2,3));           // in<br/>
5. where($dsql,4);                   // subquery<br/>
6. where(‘id’,dsql);                // in subquery<br/>
7. where($dsql->expr(‘length(name)’),123);      // expressions</p>
<p>The new are expression and sub-qureies, and DSQL does a great job figuring out all the parametric queries as you wildly join tables. Dsql now support iterators and the following syntax is permitted:</p>
<pre class="brush: php; title: ; notranslate">
$q=$this->api->db->dsql();
$q->table('books')->where('price&lt;',20);
foreach($q as $row){
    echo implode(',',$row)."\n";
}
</pre>
<h3>What’s new in Model implementation</h3>
<p>It has become much simpler and modular. Also I’m adding implementation of interfaces which makes it possible to access active-record in a super-easy way. Here is an example of model use in 4.2 which implements Iterators and ArrayAccess:</p>
<pre class="brush: php; title: ; notranslate">
foreach($this->add('Model_Books')->addCondition('price&lt;',20) as $book){
    $author = $book->getRef('author_id')->sendNotification();
    echo $book['name']." by ".$author['name']."\n";
}
</pre>
<p>Additionally field implementation is now implemented as number of classes, not just a single “FieldDefinition” class.</p>
<pre class="brush: php; title: ; notranslate">
$model->addField('name');
$model->addExpression('age')->calculated(function(){ return 'years(now())-years(birthday)'; });
$model->addReference('client_id')->setModel('Client');
</pre>
<p>In all 3 cases the field is defined by a different class which defines how the field is being queried. “Model_Table” is now implemented on top of “Model” class which is a very simple implementation of a model without data-source. This base class can be further extended to allow storing model data in No-SQL storage. Caching could also be further added through controllers.</p>
<p>Models have also some of their methods renamed shorter. Long version will continue to work throughout 4.2, but the use of shorter version is recommended.</p>
<pre class="brush: php; title: ; notranslate">

</pre><p><i>Truncated by Planet PHP.ie, read more at <a href="http://agiletoolkit.org/blog/sneak-peak-into-agile-toolkit-4-2/">the original</a> (another 3976 bytes)</i></p>]]></content></entry><entry xmlns=""><title type="text/plain" mode="escaped">Why I created Agile Toolkit?</title><link rel="alternate" type="text/html" href="http://agiletoolkit.org/blog/why-i-created-agile-toolkit/" title="Why I created Agile Toolkit?"/><author><name>Agile Toolkit Blog</name></author><id>http://agiletoolkit.org/blog/why-i-created-agile-toolkit/</id><modified>2011-11-03T18:12:00Z</modified><issued>2011-11-03T18:12:00Z</issued><content type="text/html" mode="escaped"><![CDATA[<div class="float-right" style="margin: 0 0 10px 20px;">
<div><a href="http://agiletoolkit.org/blog/wp-content/uploads/2011/10/romans-malinovskis-1.jpg"><img class="size-full wp-image-846  " title="romans-malinovskis-1" src="http://agiletoolkit.org/blog/wp-content/uploads/2011/10/romans-malinovskis-1.jpg" alt="" width="133" height="200"/></a></div>
<div class="small" style="margin-top: 5px;"><strong>Romans Malinovskis</strong><br/>
Author of Agile Toolkit</div>
</div>
<p>I first have learned about Object Oriented in the age of 10, in 1990. I have already mastered BASIC and was exploring the world of Turbo Pascal. My young mind couldn’t grasp the ideas of in capsulation and polymorphism so I asked my mom to help out. She took the book and carefully kept re-reading the introduction.</p>
<p>“Objects. Think Objects”.</p>
<p>Years later I have been eager to apply the Object Oriented principles everywhere: the games I wrote, the demo-scene productions, my copy of multiplayer user dungeon. When I settled in as a Web Developer and learned PHP3.0 I was disappointed at the poor implementation of the objects.</p>
<p>The birth of Agile Toolkit was as soon as the Zend Engine 2.0 alpha was released. I started to re-wrote the framework I had into a new, powerful language. From the first versions the most important distinctive feature of Agile Toolkit today have been embedded into the very core of the framework.</p>
<h2>Rendering of the Runtime Object Tree</h2>
<p>2-3 decades have passed since the concept of Object-Oriented User Interface have been launched on the desk-top computers. The realization that the elements you can see on your screen have many similarities even through the look differently defines every Graphics User Interface today. To understand this concept Imagine a “button” and a “input field” next to each-other.</p>
<p><a href="http://agiletoolkit.org/blog/wp-content/uploads/2011/10/Screen-Shot-2011-10-30-at-01.38.39.png"/><span style="font-size: 13px; font-weight: normal;"><a href="http://agiletoolkit.org/blog/wp-content/uploads/2011/10/Screen-Shot-2011-10-30-at-01.38.39.png"><img class="aligncenter size-full wp-image-848" title="Screen Shot 2011-10-30 at 01.38.39" src="http://agiletoolkit.org/blog/wp-content/uploads/2011/10/Screen-Shot-2011-10-30-at-01.38.39.png" alt="" width="214" height="35"/></a></span>Here a two object quite distinctive in their appearance are being rendered by the operating system by calling each object’s rendering function. The system may decide to force objects to re-render or skip rendering if they are not actually visible on the screen.</p>
<p>The exactly same idea is in the foundation of Agile Toolkit. Because I have been creating my own User Interface in Pascal and Assembler this was to me the best possible solution to interfaces in the Web Applications – implement them as a tree of visual objects generated during the run-time of your application and then rendering the necessary components.</p>
<h2>Making Interface More “Webby”</h2>
<p>Initial implementation of Agile Toolkit was only good to produce back-end administration systems as it was too in-flexible to do the requirements of the creative minds of our web-designers. Many UI Frameworks are destined with the same interface style, but Agile Toolkit was able to introduce a great breakthrough.</p>
<p>All the objects in Agile Toolkit, no matter how complex, are producing a valid html code based on object templates. This approach allows to easily change html behind individual or all objects and finally produce the great solution for website front-ends. However the default look and feel of Agile Toolkit application gives developers a great start.</p>
<h2>Progressive Enhancement</h2>
<p>By the time Agile Toolkit has matured the move towards Progressive Enhancements in CSS and Scripting made it possible to create a separate JavaScript layer which would  be optional for the elements. While earlier we would need to set “onchange” and “onsubmit” handlers into html baking templates extremely complex, now all of the JavaScript code have gone into a separate JavaScript API based on top of jQuery UI.</p>
<p>This allowed to purge all the JavaScript hacks from the code and rely on a much more powerful Object-oriented interface between JavaScript and PHP.</p>
<h2>Business Logic</h2>
<p>With the increasing complexity of our projects, it became apparent that a Objective Model layer is necessary. It finally appeared in Agile Toolkit in 2008 as an optional component. The models in Agile Toolkit serve a different role than the Models of other ORMs and Frameworks. Instead of only offering DataBase engine transparency and populating classes from data structures models in Agile Toolkit introduce a new dimension to modeling – inheritance. You can understand the power of this when you can narrow down values in the drop-down field by simply setting th</p><p><i>Truncated by Planet PHP.ie, read more at <a href="http://agiletoolkit.org/blog/why-i-created-agile-toolkit/">the original</a> (another 2202 bytes)</i></p>]]></content></entry></feed>

