<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://rss.llamaslayers.net/~d/styles/itemcontent.css"?><rss xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>The Daily Llama</title><link>http://llamaslayers.net</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://rss.llamaslayers.net/TheDailyLlama" /><description>The ramblings on of a cat loving programmer</description><language>en</language><lastBuildDate>Fri, 30 Jul 2010 09:12:25 PDT</lastBuildDate><generator>WordPress http://wordpress.org/</generator><feedburner:info uri="thedailyllama" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license><image><link>http://llamaslayers.net/daily-llama/</link><url>http://llamaslayers.net/daily-llama/wp-content/uploads/llamalogo.png</url><title>The Daily Llama</title></image><feedburner:emailServiceId>TheDailyLlama</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item><title>First Ever FrontPress Site</title><link>http://rss.llamaslayers.net/~r/TheDailyLlama/~3/2kvexI30D3Y/first-ever-frontpress-site</link><category>Technology</category><category>FrontPress</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ben L.</dc:creator><pubDate>Fri, 30 Jul 2010 09:12:25 PDT</pubDate><guid isPermaLink="false">http://llamaslayers.net/?p=1678</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<div id="attachment_1680" class="wp-caption alignright" style="width: 315px;  border: 1px solid #dddddd; background-color: #f3f3f3; padding-top: 4px; margin: 10px; text-align:center; float: right;"><img class="size-medium wp-image-1680" title="FrontPress Site - Home" src="http://llamaslayers.net/wp-content/uploads/2010/07/fpsite-home-305x126.png" alt="FrontPress Site - Home" width="305" height="126" /><p style=' padding: 0 4px 5px; margin: 0;'  class="wp-caption-text">Home</p></div>
<p>I&#8217;ve been asked whether FrontPress was being designed for frontends, for example, if it was a template system. The answer is a definite yes: Your template code creates a frontend, but FrontPress turns your code itself into a frontend as well. The code I showed in my last post could be fully understood at a glance. <code>My_Fruit::by_color</code> retrieves fruit based on its color. <code>$apple-&gt;save();</code> stores data about an apple in the database.</p>
<div id="attachment_1682" class="wp-caption alignleft" style="width: 315px;  border: 1px solid #dddddd; background-color: #f3f3f3; padding-top: 4px; margin: 10px; text-align:center; float: left;"><img class="size-medium wp-image-1682 " title="FrontPress Site - Yellow" src="http://llamaslayers.net/wp-content/uploads/2010/07/fpsite-yellow-305x99.png" alt="FrontPress Site - Yellow" width="305" height="99" /><p style=' padding: 0 4px 5px; margin: 0;'  class="wp-caption-text">Yellow</p></div>
<p>My incredible amount of appreciation for my own system aside, it is possible to make an entire website from FrontPress. The site is pointless, but it shows the power of FrontPress and a few lines of code. The site is <a href="http://nightgunner5.is-a-geek.net:1337/frontpress/">live on my home website</a>, and you can <a href="http://llamaslayers.net/wp-content/uploads/2010/07/frontpress.zip">download the source code</a> if you want to see how exactly it works.</p>
<div id="attachment_1681" class="wp-caption alignright" style="width: 315px;  border: 1px solid #dddddd; background-color: #f3f3f3; padding-top: 4px; margin: 10px; text-align:center; float: right;"><a href="http://llamaslayers.net/wp-content/uploads/2010/07/fpsite-yelllow-apple.png"><img class="size-medium wp-image-1681" title="FrontPress Site - Yellow Apples" src="http://llamaslayers.net/wp-content/uploads/2010/07/fpsite-yelllow-apple-305x57.png" alt="FrontPress Site - Yellow Apples" width="305" height="57" /></a><p style=' padding: 0 4px 5px; margin: 0;'  class="wp-caption-text">Yellow Apples</p></div>
<p>Breadcrumbs are my favorite part of this demo. The breadcrumb for the <a href="http://nightgunner5.is-a-geek.net:1337/frontpress/yellow/fruit/apple">yellow apple page</a> is generated completely by FrontPress. The only code inside the route &#8211; routes are how FrontPress&#8217;s template system chooses which page to display &#8211; related to the breadcrumb is <code>frontpress_breadcrumb( $fruit );</code>. <code>My_Fruit</code> implements <a href="http://nightgunner5.is-a-geek.net:1337/phpdocs/frontpress/FrontPress/Thing/FP_Thing_Breadcrumb_Link.html">two</a> <a href="http://nightgunner5.is-a-geek.net:1337/phpdocs/frontpress/FrontPress/Thing/FP_Thing_With_Parent.html">interfaces</a> by way of three one line functions. <code>My_Color</code> implements a single interface by way of two one line functions.</p>
<p>FrontPress is still far from its first official release. I plan to add an easy way to build an installer, some example templates, and maybe more before then.</p>
<div class="feedflare">
<a href="http://rss.llamaslayers.net/~ff/TheDailyLlama?a=2kvexI30D3Y:xGgS4lhxhs4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyLlama?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyLlama/~4/2kvexI30D3Y" height="1" width="1"/>]]></content:encoded><description>I've been asked whether FrontPress was being designed for frontends, for example, if it was a template system. The answer is a definite yes: Your template code creates a frontend, but FrontPress turns your code itself into a frontend as well. The code I showed in my last post could be fully understood at a glance. My_Fruit::by_color retrieves fruit based on its color. $apple-&gt;save(); stores data about an apple in the database. &lt;a href="http://llamaslayers.net/daily-llama/1678/first-ever-frontpress-site"&gt;Continue reading &lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://llamaslayers.net/daily-llama/1678/first-ever-frontpress-site</feedburner:origLink></item><item><title>FrontPress</title><link>http://rss.llamaslayers.net/~r/TheDailyLlama/~3/mPsQScmD-yU/frontpress</link><category>Technology</category><category>FrontPress</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ben L.</dc:creator><pubDate>Tue, 27 Jul 2010 11:37:09 PDT</pubDate><guid isPermaLink="false">http://llamaslayers.net/?p=1674</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<pre><code><!--?<span class="hiddenSpellError" pre=""-->&lt;?</code>php

require_once dirname( __FILE__ ) . '/load.php';

// Non-programmers start reading here
$green_apple = My::$fruit-&gt;one_by_color_and_type( 'green', 'apple' );

echo '&lt;h1&gt;', $green_apple-&gt;color-&gt;name, ' apples are called "',
     $green_apple-&gt;name, '".&lt;/h1&gt;';</pre>
<p>﻿If you don&#8217;t know how to program, try reading this code. You can read it, right? That&#8217;s because the code is written using my newest project, FrontPress. Now, if you do know how to program, you may be wondering how <code>My::$fruit</code> is defined. Here&#8217;s the entire definition of <code>My::$fruit</code>:</p>
<pre>&lt;?php

class My_Fruit extends FP_Thing {
    var $__table = 'fruit';

    var $id;
    var $name;
    var $color;
    var $type;
}
My::$fruit = new My_Fruit;</pre>
<p>Now, you&#8217;re probably interested. The class has no functions and only one variable with a value. This is why FrontPress is so awesome. If you want to delete all the yellow fruit from your database, that&#8217;s one line of code:</p>
<pre>My::$fruit-&gt;by_color( 'yellow' )-&gt;delete();</pre>
<p>Or, maybe you just want to reclassify all yellow fruit as lemons:</p>
<pre>My::$fruit-&gt;by_color( 'yellow' )-&gt;set( 'type', 'lemon' )-&gt;save();</pre>
<p>You can also do so in three commands:</p>
<pre>$yellow_fruit = My::$fruit-&gt;by_color( 'yellow' );
$yellow_fruit-&gt;type = 'lemon';
$yellow_fruit-&gt;save();</pre>
<p>What if there&#8217;s some new color of apple you&#8217;ve never heard of?</p>
<pre>$c0ffee = new My_Color( array( 'name' =&gt; 'C0FFEE', 'slug' =&gt; 'c0ffee',
                               'hex' =&gt; 'c0ffee' ) );
$c0ffee_apple = new My_Fruit( array( 'name' =&gt; 'C0FFEE Apple',
                                     'color' =&gt; $c0ffee,
                                     'type' =&gt; 'apple' ) );
$c0ffee_apple-&gt;save();</pre>
<p>And it&#8217;s smart, too:</p>
<pre>$lemon = My::$fruit-&gt;by_type( 'lemon' );
$lemon-&gt;save();
$lemon-&gt;save();
$lemon-&gt;save();
$lemon-&gt;save();
$lemon-&gt;save();
$lemon-&gt;save();
$lemon-&gt;save();
$lemon-&gt;save();
$lemon-&gt;save();
$lemon-&gt;save();
$lemon-&gt;save();
$lemon-&gt;save();
$lemon-&gt;save();
$lemon-&gt;save();</pre>
<p>This code won&#8217;t even attempt to save it once because no changes are made to the object.</p>
<p>Want to try it? Break it? Change it? <a href="http://code.google.com/p/frontpress/">Go right ahead.</a> This is GPL software, after all! <img src='http://llamaslayers.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://rss.llamaslayers.net/~ff/TheDailyLlama?a=mPsQScmD-yU:r66FQhBrQvc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyLlama?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyLlama/~4/mPsQScmD-yU" height="1" width="1"/>]]></content:encoded><description>&amp;#60;?php require_once dirname( __FILE__ ) . '/load.php'; // Non-programmers start reading here $green_apple = My::$fruit-&amp;#62;one_by_color_and_type( 'green', 'apple' ); echo '&amp;#60;h1&amp;#62;', $green_apple-&amp;#62;color-&amp;#62;name, ' apples are called "',      $green_apple-&amp;#62;name, '".&amp;#60;/h1&amp;#62;'; ﻿If you don&amp;#8217;t know how to program, try reading this code. &amp;#8230; &lt;a href="http://llamaslayers.net/daily-llama/1674/frontpress"&gt;Continue reading &lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://llamaslayers.net/daily-llama/1674/frontpress</feedburner:origLink></item><item><title>It’s my birthday!</title><link>http://rss.llamaslayers.net/~r/TheDailyLlama/~3/eXDg5BNNMr0/its-my-birthday</link><category>Asides</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ben L.</dc:creator><pubDate>Thu, 17 Jun 2010 09:16:38 PDT</pubDate><guid isPermaLink="false">http://llamaslayers.net/?p=1659</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p><a href="http://nightgunner5.is-a-geek.net:1337/blog/6/birthday-2010">It&#8217;s my birthday! And I&#8217;m live blogging it on my new <del>server</del> <ins>external hard drive</ins>!</a></p>
<div class="feedflare">
<a href="http://rss.llamaslayers.net/~ff/TheDailyLlama?a=eXDg5BNNMr0:E-EQI6Osl1U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyLlama?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyLlama/~4/eXDg5BNNMr0" height="1" width="1"/>]]></content:encoded><description>It&amp;#8217;s my birthday! And I&amp;#8217;m live blogging it on my new server external hard drive!</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://llamaslayers.net/daily-llama/1659/its-my-birthday</feedburner:origLink></item><item><title>Announcing Android Shuffle</title><link>http://rss.llamaslayers.net/~r/TheDailyLlama/~3/XCMhzikHF4I/announcing-android-shuffle</link><category>Technology</category><category>Android</category><category>Android Shuffle</category><category>App</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ben L.</dc:creator><pubDate>Thu, 17 Jun 2010 07:42:00 PDT</pubDate><guid isPermaLink="false">http://llamaslayers.net/?p=1650</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Have you ever wanted to call someone, but didn&#8217;t know who to call?</p>
<p>Is typing a seven digit phone number and clicking the call button too mentally taxing for you to accomplish?</p>
<p>Have you noticed that these sentences keep getting progressively longer until they reach the maximum limit for sentence length, which is right about here?</p>
<p>No?</p>
<p>Then why the heck are you still reading this post?</p>
<p>Oh, sorry! I thought you said no! What you really said was &#8220;I love you, Ben!&#8221;</p>
<p>That&#8217;s right, folks! Today, we at the LlamaSlayers™ © ® LLC,,. have invented an amazing new technology known as &#8220;Android Soufflé&#8221; or some other crappy name like that.</p>
<p><a href="http://llamaslayers.net/wp-content/uploads/2010/06/shuffle-screenshot.png"><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-thumbnail wp-image-1654" title="LlamaSlayers™ © ® LLC,,. Large Button Pushing Technology Software Program" src="http://llamaslayers.net/wp-content/uploads/2010/06/shuffle-screenshot-100x150.png" alt="LlamaSlayers™ © ® LLC,,. Large Button Pushing Technology Software Program" width="100" height="150" /></a>A cutting-art, state-of-the-edge technology known as &#8220;LlamaSlayers™ © ® LLC,,. Large Button Pushing Technology Software Program&#8221;, or &#8220;LlamaSlayers™ © ® LLC,,. Large Button Pushing Technology Software Program&#8221; for short, ensures that your experience is as smooth as possible. Here is a diagram of how it works:</p>
<p><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-full wp-image-1651" title="Android Shuffle" src="http://llamaslayers.net/wp-content/uploads/2010/06/shuffle-icon.png" alt="Android Shuffle" width="640" height="640" /></p>
<p>Amazing, huh? Download the LlamaSlayers™ © ® LLC,,. Large Button Pushing Technology Software Program-based software program called Android Shuffle from our <a href="http://llamaslayers.net/wp-content/uploads/2010/06/Android Shuffle.apk">web site</a> or send an email to the following address and we&#8217;ll fax you a copy of this amazing software program!</p>
<p>LlamaSlayers™ © ® LLC,,.<br />
Tsinghua Science Park Bldg 6<br />
No. 1 Zhongguancun East Road<br />
Haidian District<br />
Beijing 100084</p>
<p><!-- YES THIS POST IS A JOKE - But the app actually works, so give it a try some time :) -Ben L. P.S. Happy birthday to me --></p>
<div class="feedflare">
<a href="http://rss.llamaslayers.net/~ff/TheDailyLlama?a=XCMhzikHF4I:jOAO5bzVWjY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyLlama?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyLlama/~4/XCMhzikHF4I" height="1" width="1"/>]]></content:encoded><description>Have you ever wanted to call someone, but didn&amp;#8217;t know who to call? Is typing a seven digit phone number and clicking the call button too mentally taxing for you to accomplish? Have you noticed that these sentences keep getting &amp;#8230; &lt;a href="http://llamaslayers.net/daily-llama/1650/announcing-android-shuffle"&gt;Continue reading &lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://llamaslayers.net/daily-llama/1650/announcing-android-shuffle</feedburner:origLink></item><item><title>This is why I hate Apple</title><link>http://rss.llamaslayers.net/~r/TheDailyLlama/~3/T10TjATg9No/this-is-why-i-hate-apple</link><category>Asides</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ben L.</dc:creator><pubDate>Wed, 16 Jun 2010 12:58:27 PDT</pubDate><guid isPermaLink="false">http://llamaslayers.net/?p=1648</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Cost to make an iPhone app: <a href="http://developer.apple.com/programs/iphone/">$99/year (plus the cost of a Mac)</a><br />
Cost to make an Android app: <a href="http://developer.android.com/sdk/index.html">$0 (you must have a computer)</a></p>
<p>Cost to distribute said iPhone app: <a href="http://developer.apple.com/programs/iphone/">$99/year (included in cost to make &#8211; you can do it for free, but you can only put it on 100 phones)</a><br />
Cost to distribute said Android app: <a href="http://market.android.com/publish/signup">$25 (free if you&#8217;ve already paid the $25 for another app or if you&#8217;re going to distribute the app on your own)</a></p>
<p>Money required to create and distribute a single app for 1 year: (assuming I&#8217;m doing the development)<br />
For iPhone: <a href="http://store.apple.com/us/browse/home/shop_mac/family/mac_mini">$699</a> + $99 = $798<br />
For Android: $0 + $25 = $25</p>
<p>For 5 years:<br />
For iPhone: <a href="http://store.apple.com/us/browse/home/shop_mac/family/mac_mini">$699</a> + $99 * 5 = $1293<br />
For Android: $0 + $25 = $25</p>
<div class="feedflare">
<a href="http://rss.llamaslayers.net/~ff/TheDailyLlama?a=T10TjATg9No:vGSvIYCP5YU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/TheDailyLlama?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/TheDailyLlama/~4/T10TjATg9No" height="1" width="1"/>]]></content:encoded><description>Cost to make an iPhone app: $99/year (plus the cost of a Mac) Cost to make an Android app: $0 (you must have a computer) Cost to distribute said iPhone app: $99/year (included in cost to make &amp;#8211; you can &amp;#8230; &lt;a href="http://llamaslayers.net/daily-llama/1648/this-is-why-i-hate-apple"&gt;Continue reading &lt;span class="meta-nav"&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://llamaslayers.net/daily-llama/1648/this-is-why-i-hate-apple</feedburner:origLink></item></channel></rss>
