<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
	<title>General Discussion</title>
	<description>General Discussion Topics</description>
	<link>http://forums.recessframework.org/index.php</link>
	<pubDate>Thu, 29 Jul 2010 21:06:41 +0000</pubDate>
	<ttl>0</ttl>
	<item>
		<title>Recess Model Pagination</title>
		<link>http://forums.recessframework.org/topic/158-recess-model-pagination/</link>
		<description><![CDATA[Hello!<br />
<br />
I have just released a Model pagination plugin for the Recess Framework. This allows you to effortlessly paginate your models using only one annotation on the Model class. It works like this:<br />
<br />
//The model<br />
<br />
/**<br />
 * !Paginate Limit: 5<br />
 */<br />
class Book extends Model {<br />
<br />
}<br />
<br />
//The controller<br />
<br />
/**<br />
 * !Route GET, books<br />
 */<br />
function listBooks() {<br />
     $book = new Book();<br />
     $books = $book-&gt;equals('genre', 'adventure')-&gt;orderBy('published_at DESC')-&gt;paginate();<br />
     $paginator = $books-&gt;paginator;<br />
}<br />
<br />
You can request subsequent "pages" by appending "?page=2" to the request URL. In this example controller, the $books variable is a filtered ModelSet containing the appropriate records based on the requested "page" and the number of results to show per page (defined on the Model, in this case, 5). You can pass the $paginator object into the View to assist with creating pagination links. See the Paginator class for details on what properties and methods are available. Installation and usage information is available in the README file.<br />
<br />
Download the plugin on GitHub:<br />
<a href='http://github.com/codeguy/Recess-Framework-Model-Pagination' class='bbc_url' title='External link' rel='nofollow'>http://github.com/codeguy/Recess-Framework-Model-Pagination</a><br />
<br />
Enjoy!<br />
Josh]]></description>
		<pubDate>Fri, 09 Jul 2010 01:37:18 +0000</pubDate>
		<guid>http://forums.recessframework.org/topic/158-recess-model-pagination/</guid>
	</item>
	<item>
		<title>Recess Model Validations</title>
		<link>http://forums.recessframework.org/topic/157-recess-model-validations/</link>
		<description><![CDATA[Hey everyone,<br />
<br />
After building a custom web app with Recess for a client of mine, I found I needed to have Model validations (which Recess does not provide built-in). So I wrote some! You can now validate Model attributes on save, insert, or update by specifying a validation annotation. Here's an example.<br />
<br />
/**<br />
 * !ValidatesPresenceOf Fields: (title, author), On: (insert, update)<br />
 */<br />
class Book extends Model {<br />
    public $title;<br />
    public $author;<br />
}<br />
<br />
I've provide the following annotations:<br />
<br />
!ValidatesPresenceOf Fields: (field), On: (save, insert, update)<br />
!ValidatesNumericalityOf Fields: (field), On: (save, insert, update)<br />
!ValidatesSizeOf Fields: (field), On: (save, insert, update), Min: 1, Max: 100<br />
!ValidatesInclusionOf Fields: (field), On: (save, insert, update), In: (value, value2, value3)<br />
!ValidatesExclusionOf Fields: (field), On: (save, insert, update), From: (value, value2, value3)<br />
!ValidatesFormatOf Fields: (field), On: (save, insert, update), With: @^[a-z0-9_]+$@<br />
<br />
These are simple implementations of the Rails validation classes. Bear in mind these are still a work in progress and have not been 100% tested. I'm using them in a current project so I'm confident they work as advertised. Be sure to read the README file on GitHub to learn how to install and use the plugin. If you like what you see, have questions, suggestions, etc, feel free to drop me a line!<br />
<br />
You can get the plugin code on GitHub at:<br />
<br />
<a href='http://github.com/codeguy/Recess-Framework-Model-Validations' class='bbc_url' title='External link' rel='nofollow'>http://github.com/codeguy/Recess-Framework-Model-Validations</a><br />
<br />
Enjoy!<br />
Josh]]></description>
		<pubDate>Thu, 08 Jul 2010 22:52:13 +0000</pubDate>
		<guid>http://forums.recessframework.org/topic/157-recess-model-validations/</guid>
	</item>
	<item>
		<title>Recess catched my attention!</title>
		<link>http://forums.recessframework.org/topic/150-recess-catched-my-attention/</link>
		<description><![CDATA[Hello,<br />
<br />
I stumbled over Recess when searching for a method to handle RESTful urls with php.<br />
I have to admit, that in general I don't like frameworks, as most of them are too large and<br />
kind of unflexible.<br />
<br />
Recess, as I think, changed my mind, it looks like there is a great concept behind it.<br />
So thanks to Kris to make it available and hopefully bring it even further!<br />
<br />
Michael<br />
<br />
PS: Be prepared for questions coming soon ;-)]]></description>
		<pubDate>Thu, 03 Jun 2010 12:31:03 +0000</pubDate>
		<guid>http://forums.recessframework.org/topic/150-recess-catched-my-attention/</guid>
	</item>
	<item>
		<title>Is Recess still being developed?</title>
		<link>http://forums.recessframework.org/topic/145-is-recess-still-being-developed/</link>
		<description><![CDATA[Hello,<br />
<br />
Recess's Framework is extremely similar to Spring MVC and I love it. <br />
Unfortunately there has been much inactivity regarding it. <br />
<br />
Key components such as validation and security are still missing and I hope to see them one day.<br />
I'd love to start a new project with Recess but I am afraid it will have no support going into the future.<br />
<br />
Your feedback will be greatly appreciated!]]></description>
		<pubDate>Thu, 27 May 2010 11:53:24 +0000</pubDate>
		<guid>http://forums.recessframework.org/topic/145-is-recess-still-being-developed/</guid>
	</item>
	<item>
		<title>Return XML with Recces</title>
		<link>http://forums.recessframework.org/topic/143-return-xml-with-recces/</link>
		<description><![CDATA[Hi<br />
 I would like to know where I can see an example of  Recces  returning  an XML<br />
<br />
regards]]></description>
		<pubDate>Tue, 11 May 2010 15:18:22 +0000</pubDate>
		<guid>http://forums.recessframework.org/topic/143-return-xml-with-recces/</guid>
	</item>
	<item>
		<title>DB column Name mapping</title>
		<link>http://forums.recessframework.org/topic/140-db-column-name-mapping/</link>
		<description><![CDATA[I want to give different column name to database table other than PHP member variable name.<br />
<br />
If I do like below,  it just mapping to database column name which is equalent to member variable name.<br />
<br />
/** !Column String */<br />
 public $groupName;<br />
<br />
<br />
What is the annotation syntax, if we are to have own table colunmn name  ?]]></description>
		<pubDate>Sun, 18 Apr 2010 13:48:02 +0000</pubDate>
		<guid>http://forums.recessframework.org/topic/140-db-column-name-mapping/</guid>
	</item>
	<item>
		<title>Add an ID argument to the HTML::img helper</title>
		<link>http://forums.recessframework.org/topic/137-add-an-id-argument-to-the-htmlimg-helper/</link>
		<description><![CDATA[What do you think about adding an ID argument to the HTML::img helper?  I have a site I'm working on, and the template I'm using puts ID's on some of the images.  I'm hacking the template a bit to make it work (I don't want img tags if I can avoid them), but it'd be nice to have the ability to put an ID right on an image using a third argument to the img helper.<br />
<br />
Thanks!]]></description>
		<pubDate>Tue, 13 Apr 2010 03:07:29 +0000</pubDate>
		<guid>http://forums.recessframework.org/topic/137-add-an-id-argument-to-the-htmlimg-helper/</guid>
	</item>
	<item>
		<title>Empty Content-Type in response headers using curl</title>
		<link>http://forums.recessframework.org/topic/131-empty-content-type-in-response-headers-using-curl/</link>
		<description><![CDATA[When I send a request to the server using Firefox, I get a Content-Type header back, but when I use curl_exec to make requests, the Content-Type comes back empty.  I've tried tracking this down but I can't figure out what's going on.  Has anyone seen this issue before?]]></description>
		<pubDate>Wed, 17 Mar 2010 22:17:43 +0000</pubDate>
		<guid>http://forums.recessframework.org/topic/131-empty-content-type-in-response-headers-using-curl/</guid>
	</item>
	<item>
		<title>Existence of Blank Objects</title>
		<link>http://forums.recessframework.org/topic/127-existence-of-blank-objects/</link>
		<description><![CDATA[Currently, the exists method on Model instances with no set properties returns true.<br />
This results in the blank object being hydrated with data from the first row in the db.<br />
This seems wrong.  Blank objects should not be considered to exist.<br />
<br />
<pre class='prettyprint'>/**
 * Shortcut method which will determine whether a row
 * with the current instances properties exists. If so, it will
 * preload those values (side effects).
 * 
 * Usage:
 * $model-&gt;id = 1;
 * if($model-&gt;exists()) {
 *  die('a lonesome death');
 * }
 *
 * @return boolean
 */
function exists() {}</pre><br />
Here's how Model::exists() used to behave.<br />
<br />
<pre class='prettyprint'>$user = new User();
echo ( $user-&gt;exists() ? $user-&gt;id : 0 );</pre><br />
<pre class='prettyprint'>1</pre><br />
Here's how it behaves now<br />
<br />
<pre class='prettyprint'>$user = new User();
echo ( $user-&gt;exists() ? $user-&gt;id : 0 );</pre><br />
<pre class='prettyprint'>0</pre><br />
If there are no model column properties set, Model::exists() returns false.<br />
<br />
Old code:<br />
<br />
<pre class='prettyprint'>function exists() {
    $result = $this-&gt;select()-&gt;first();
    if($result !== false) {
        $this-&gt;copy($result, false);
        return true;
    } else {
        return false;
    }
}</pre><br />
<br />
New code:<br />
<br />
<pre class='prettyprint'>function exists() {
    $descriptor = self::getClassDescriptor($this);
    $blank_object = true;
    foreach($this as $column =&gt; $value) {
        if(in_array($column, $descriptor-&gt;columns) && isset($value)) {
            $blank_object = false;
        }
    }
    
    if(!$blank_object) {
        $result = $this-&gt;select()-&gt;first();
        if($result !== false) {
            $this-&gt;copy($result, false);
            return true;
        } else {
            return false;
        }
    } else {
        return false;
    }
}</pre><br />
Logically it's the diff between <br />
<br />
<pre class='prettyprint'>... WHERE 1 &#91;&& (...)&#93;
... WHERE 0 &#91;|| (...)&#93;</pre><br />
<br />
Kris, have you considered this use case?<br />
Do you agree with my assessment?]]></description>
		<pubDate>Tue, 09 Mar 2010 20:41:38 +0000</pubDate>
		<guid>http://forums.recessframework.org/topic/127-existence-of-blank-objects/</guid>
	</item>
	<item>
		<title>Multi-column primary key</title>
		<link>http://forums.recessframework.org/topic/126-multi-column-primary-key/</link>
		<description><![CDATA[I like to have natural primary keys spanning across multiple columns to make rows unique instead of having one auto increment column without a real meaning.<br />
<br />
As it stands you can only specify one column to be the primary key in a model's !BelongsTo annotation, right? Or is that just the impression i get when looking at the Recess Tools? At least the !Column annotation doesn't choke on having multiple columns as PrimaryKey.<br />
<br />
So is this currently possible? If not, would it even be possible to include it? I wouldn't like it, if a framework dictated my database layout.]]></description>
		<pubDate>Tue, 09 Mar 2010 08:45:16 +0000</pubDate>
		<guid>http://forums.recessframework.org/topic/126-multi-column-primary-key/</guid>
	</item>
</channel>
</rss>