<?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>Loosely Typed in Ohio &#187; phpSprockets</title>
	<atom:link href="http://www.innova-partners.com/blog/category/phpsprockets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.innova-partners.com/blog</link>
	<description>Innova Partners, software, networking, and websites.</description>
	<lastBuildDate>Tue, 03 Aug 2010 14:25:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Intro to phpSprockets</title>
		<link>http://www.innova-partners.com/blog/2007/10/23/intro-to-phpsprockets/</link>
		<comments>http://www.innova-partners.com/blog/2007/10/23/intro-to-phpsprockets/#comments</comments>
		<pubDate>Tue, 23 Oct 2007 16:32:28 +0000</pubDate>
		<dc:creator>Jon Canady</dc:creator>
				<category><![CDATA[phpSprockets]]></category>

		<guid isPermaLink="false">http://innova-partners.com/blog/2007/10/23/intro-to-phpsprockets/</guid>
		<description><![CDATA[On one of my recent days off, I decided to figure out how these screencast things work.  To that end, I threw together a quick Introduction to phpSprockets.  It&#8217;s obviously my first screencast, so be gentle.  You&#8217;re watching about Take 45, if it matters.


    
    
 [...]]]></description>
			<content:encoded><![CDATA[<p>On one of my recent days off, I decided to figure out how these screencast things work.  To that end, I threw together a quick Introduction to phpSprockets.  It&#8217;s obviously my first screencast, so be gentle.  You&#8217;re watching about Take 45, if it matters.</p>

<p><object width="400" height="300" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
    <param name="src" value="/screencasts/phpSprockets_intro.mov">
    </param><param name="controller" value="true">
    </param><param name="autoplay" value="true">
    <embed src="/screencasts/phpSprockets_intro.mov"
        width="400" height="300"
        controller="true" autoplay="false"
        scale="tofit" cache="true"
        pluginspage="http://www.apple.com/quicktime/download/"
    >
</embed></param></object></p>

<p>If you want, just <a href="/screencasts/phpSprockets_intro.mov">download the video.</a></p>

<p>Like what you see?  Head over to our <a href="http://phpsprockets.googlecode.com">Google Code</a> page to download the latest release, read more tutorials, and provide feedback!</p>

<p>Also, I&#8217;m certain our resident Graphic Artists wouldn&#8217;t mind throwing together some awesome &#8220;Made with phpSprockets&#8221; buttons, so expect to see those and an awesome download link within the next few days.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.innova-partners.com/blog/2007/10/23/intro-to-phpsprockets/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>You got some OOXML on my Sprockets</title>
		<link>http://www.innova-partners.com/blog/2007/08/01/domo-arrigato-mr-sprocketo/</link>
		<comments>http://www.innova-partners.com/blog/2007/08/01/domo-arrigato-mr-sprocketo/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 15:23:35 +0000</pubDate>
		<dc:creator>Eddie Bowen</dc:creator>
				<category><![CDATA[phpSprockets]]></category>

		<guid isPermaLink="false">http://innova-partners.com/blog/2007/08/01/domo-arrigato-mr-sprocketo/</guid>
		<description><![CDATA[We had another nice win for Sprockets this week; web-based Microsoft Excel .xls output. 

Personally, I hate Excel. I regard Microsoft&#8217;s desktop applications as poorly made, marketing-led disasters which achieve sales at the cost of productivity and happiness across the globe. Considering the immense assets available to Microsoft, it is truly astonishing that they produce [...]]]></description>
			<content:encoded><![CDATA[<p>We had another nice win for <a href="http://code.google.com/p/phpsprockets/">Sprockets</a> this week; web-based Microsoft Excel .xls output. </p>

<p>Personally, I hate Excel. I regard Microsoft&#8217;s desktop applications as poorly made, marketing-led disasters which achieve sales at the cost of productivity and happiness across the globe. Considering the immense assets available to Microsoft, it is truly astonishing that they produce applications that make no sense, are ugly, inconsistent, do not work properly, frustrate their users, and waste resources. In Microsoft&#8217;s litany of crimes against humanity, Excel is #1, somehow managing to be even more awful than Word. I truly hate Excel and always will.</p>

<p>However, client wants Excel format, so I love Excel.</p>

<p><span id="more-101"></span>
It turns out that Excel reads Office Open XML files with a .xls extension as though they were native files. This means that Sprockets, which is an XML generator <em>sans pareil</em>, can output to .xls, instead of having to use a minor league format like CSV. The code looks like this:</p>

<pre>
$workbook = new Sprocket( 'Workbook' );
...
        
$document = $workbook->DocumentProperties();
$document->xmlns = "urn:schemas-microsoft-com:office:office";
$document->Author( "Innova Formularymaker" );
...

$excel_workbook = $workbook->ExcelWorkbook();
$excel_workbook->xmlns = "urn:schemas-microsoft-com:office:excel";
        
$styles = $workbook->Styles();
$header_style = $styles->Style();
$header_style->setAttribute( 'ss:ID', 'header' );
...</pre>

<p>Remember that this is pure Sprockets code; there&#8217;s no special Excel library being used here. Up until the code above, Sprockets had never even thought about workbooks and document properties. The objects and attributes are all being created dynamically, <em>deus ex machina</em>.</p>

<p>Incidentally, the use of setAttribute() instead of regular sprocket setter calls are made necessary by the colons in xml namespaces.</p>

<p>For Sprockets,</p>

<pre>$tag->setAttribute( 'name', 'value' );</pre>

<p>is equivalent to:</p>

<pre>$tag->name = 'value';</pre>

<p>The row data can be added as a table in a worksheet:</p>

<pre>
$worksheet = $workbook->Worksheet();
$worksheet->setAttribute( 'ss:Name', "Formulary" );
$table = $worksheet->Table();
...

$entry_row = $table->Row();
</pre>

<p>And so on. Excel is surprisingly fussy about the structure of its XML, but the entire Excel functionality &#8211; formulas, styling, macros &#8211; can be represented.</p>

<p>Some of the idiomatic aspects of the format are pure Microsoft. For example, the table declaration needs to know how many rows it contains (and crashes the parser if the number is wrong). That the problem could be fixed in half an hour, but isn&#8217;t, is indicative of Microsoft&#8217;s half-hearted embrace of open formats. Indeed, it would be much, much easier to support Open Document Format, but since Microsoft seems to be determined not to go there, the exercise would be academic.</p>

<p>Excel-format output is a nice leveraging of the Sprockets code. The next step is to wrap up our acquired knowledge of the Office Open XML format in a Sprockets library, so we don&#8217;t have to learn it all over again next time. Code reuse is usually difficult in output-specific situations, but Sprockets makes it much easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.innova-partners.com/blog/2007/08/01/domo-arrigato-mr-sprocketo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coping with toxic code</title>
		<link>http://www.innova-partners.com/blog/2007/04/24/coping-with-toxic-code/</link>
		<comments>http://www.innova-partners.com/blog/2007/04/24/coping-with-toxic-code/#comments</comments>
		<pubDate>Tue, 24 Apr 2007 14:47:02 +0000</pubDate>
		<dc:creator>Eddie Bowen</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[phpSprockets]]></category>

		<guid isPermaLink="false">http://innova-partners.com/blog/2007/04/24/coping-with-toxic-code/</guid>
		<description><![CDATA[ Regular readers of this blog will notice how we&#39;ve spruced the place up a little recently. A little Photoshop here, a little CSS there, a nod to contemporary design mores, it all works wonders. We should have a party to celebrate. We really should. As you may know, this blog uses WordPress, so the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><img src="http://innova-partners.com/blog/wp-content/uploads/2007/04/code.gif" border="0" alt="Wordpress code" style="margin: 0px 5px 5px 0px; float: left" /> Regular readers of this blog will notice how we&#39;ve spruced the place up a little recently. A little Photoshop here, a little CSS there, a nod to contemporary design mores, it all works wonders. We should have a party to celebrate. We really should. As you may know, this blog uses <a href="http://wordpress.org/">WordPress</a>, so the redesign delivery consisted of a WordPress theme. And since Innova is very much an eat-your-own-dog-food kind of place, we wanted the new theme to use our open source offering, <a href="http://code.google.com/p/phpsprockets/">phpSprockets</a>.  </p><p>And there begins a cautionary tale.<span id="more-46"></span>   </p><p>From a programmer&#39;s perspective, WordPress themes are ugly. Context-switching &lt; ?php tags are literally peppered over the code. Well, perhaps not literally, but it is quite jarring, looking rather like XML-encoded COBOL. Dynamic HTML output is old-school concatenated strings interspersed with application function calls.  The combination is almost, but not quite, entirely unreadable.  Naturally, being tough, manly coders with women and children to impress, we wanted to reinvent this mess into a nice, sprocketized, object-oriented project. We were all hopped up, Eclipse at the ready, require<em>once at our fingertips. Then it happened.  </em></p><p>We realized Wordpress code isn&#39;t just ugly. It&#39;s toxic.  For example, here&#39;s a tiny snippet:  </p><blockquote>&lt;a xhref=&quot;&lt;?php trackbackurl() ?&gt;&quot;&lt;/a&gt;</blockquote>The function isn&#39;t returning a url, it&#39;s echoing one to the output buffer. This is fine, provided that you never want to actually do anything with the confounded url. If we were to sprocketize, we&#39;d have to trap the output buffer and then read from it, which is all sorts of crazy. <br /><br />We&#39;d also have to work out which calls echo and which return values, because the application sometimes returns a value. We could edit the WordPress code, but then we&#39;d be forking the application, not to mention breaking all the other themes that people have created. Even if we modified the calls to return a value as well as echo it, to preserve compatibility, we&#39;d have to suppress the output buffer before the Sprockets rendered. <br /><br />The only sensible alternative would be to write an alternative WordPress API plugin, and if we were doing that, we might as well have functions return readymade Sprockets. Somehow a two-day redesign has blossomed into an open-ended commitment to developing a project that would be beautiful, elegant, and entirely unappreciated.<br /><br />In the light of this, we made the pragmatic decision to write static HTML and forgo Sprockets for the time being. It&#39;s dissatisfying not least because Sprockets works so well with other open-source applications, even those written to be able to run on PHP4, such as MediaWiki. But then, as Yogi Berra once said, if you don&#39;t set goals, you can&#39;t regret not reaching them.<br />
]]></content:encoded>
			<wfw:commentRss>http://www.innova-partners.com/blog/2007/04/24/coping-with-toxic-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpSprockets en espanol</title>
		<link>http://www.innova-partners.com/blog/2007/04/04/phpsprockets-en-espanol/</link>
		<comments>http://www.innova-partners.com/blog/2007/04/04/phpsprockets-en-espanol/#comments</comments>
		<pubDate>Wed, 04 Apr 2007 13:43:12 +0000</pubDate>
		<dc:creator>Eddie Bowen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[phpSprockets]]></category>

		<guid isPermaLink="false">http://innova-partners.com/blog/?p=27</guid>
		<description><![CDATA[phpSprockets merits a link at the wonderfully frank El Blog de Leech, who regard it as an essential PHP library alongside swiftmailer,  ezSQL,  ADOdb,  Logger,  JSON-PHP,  ezComponents,  GeSHi,  SimplePie,  JpGraph,  Sparklines,  FeedCreator,  spyc,  DomPDF,  FPDF and XDebug, amongst a bunch of fine [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><img style='float:left; margin: 4px;' src="http://innova-partners.com/blog/wp-content/uploads/2007/04/cow.gif" alt="Well spanish is hard" /><a href='http://code.google.com/p/phpsprockets/'>phpSprockets</a> merits a link at the wonderfully frank <a href="http://www.dr-leech.com.ar/2007/04/02/clases-y-librerias-esenciales-en-php/">El Blog de Leech</a>, who regard it as an essential PHP library alongside <a href="http://www.swiftmailer.org/">swiftmailer</a>,  <a href="http://www.woyano.com/jv/ezsql">ezSQL</a>,  <a href="http://adodb.sourceforge.net/">ADOdb</a>,  <a href="http://www.thewebmasters.net/php/Logger.phtml">Logger</a>,  <a href="http://mike.teczno.com/json.html">JSON-PHP</a>,  <a href="http://ez.no/ezcomponents">ezComponents</a>,  <a href="http://qbnz.com/highlighter/">GeSHi</a>,  <a href="http://simplepie.org/">SimplePie</a>,  <a href="http://www.aditus.nu/jpgraph/">JpGraph</a>,  <a href="http://sparkline.org/">Sparklines</a>,  <a href="http://www.bitfolge.de/rsscreator-en.html">FeedCreator</a>,  <a href="http://spyc.sourceforge.net/">spyc</a>,  <a href="http://www.digitaljunkies.ca/dompdf/">DomPDF</a>,  <a href="http://www.fpdf.org/">FPDF</a> and <a href="http://xdebug.org/">XDebug</a>, amongst a bunch of fine PEAR stalwarts.</p><p>As de Leech puts it, phpSprockets is <em>A veces el generar HTML suele ser una tarea tediosa, </em>which I translate as <em>A cow of generated HTML only on a boring cake.</em> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.innova-partners.com/blog/2007/04/04/phpsprockets-en-espanol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sprocketMan has crossed the Atlantic</title>
		<link>http://www.innova-partners.com/blog/2007/03/28/sprocketman-has-crossed-the-atlantic/</link>
		<comments>http://www.innova-partners.com/blog/2007/03/28/sprocketman-has-crossed-the-atlantic/#comments</comments>
		<pubDate>Wed, 28 Mar 2007 22:42:54 +0000</pubDate>
		<dc:creator>Matt Scantland</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[phpSprockets]]></category>

		<guid isPermaLink="false">http://innova-partners.com/blog/?p=18</guid>
		<description><![CDATA[I&#39;ve been checking the phpSprockets download count on Google Code like a fiend, and was pleased when I came back to Columbus today to see our lovable little mascot, ElegentyMcGracefull on German PHP blog phpblogger.net. Eddie had Kent translate it earlier, but without the benefit of our German Lit scholar&#39;s services this evening, I used [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://warsaw.innova-partners.com/~mscantland/phpblogger.png" border="0" alt="phpblogger" title="phpblogger" hspace="5" vspace="5" width="150" height="101" align="left" /></p><p>I&#39;ve been checking the <a href="http://code.google.com/p/phpsprockets/">phpSprockets</a> download count on Google Code like a fiend, and was pleased when I came back to Columbus today to see our lovable little mascot, ElegentyMcGracefull on German PHP blog <a href="http://www.phpblogger.net/2007/03/24/broeckchen-fuer-broeckchen/">phpblogger.net.</a></p> <p>Eddie had Kent translate it earlier, but without the benefit of our German Lit scholar&#39;s services this evening, I used Google&#39;s translation service, which doesn&#39;t handle German leet-speak well.</p> <blockquote> <p>Small HTML Fetzen, which draws itself across the complete code and simply only shits look. And with genuine object orientation has to also do nix. For such cases gibts phpsprockets HTML/XML the generator.</p>  <p>What means Sprocket&#8230;this library is perfect and elegant solution. For whole Templates large muck.</p> </blockquote>  <p>Eddie was assured the review was positive. Br&ouml;ckchen for Br&ouml;ckchen.</p> 
]]></content:encoded>
			<wfw:commentRss>http://www.innova-partners.com/blog/2007/03/28/sprocketman-has-crossed-the-atlantic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
