<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0" -->
<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/"
	>

<channel>
	<title>TSG Dev Blog</title>
	<link>http://devblog.thesonicgroup.net</link>
	<description>Development News from The Sonic Group, LLC</description>
	<pubDate>Mon, 06 Feb 2006 04:58:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0</generator>
	<language>en</language>
			<item>
		<title>Ruby and Rails</title>
		<link>http://devblog.thesonicgroup.net/archives/2006/02-05-ruby-and-rails</link>
		<comments>http://devblog.thesonicgroup.net/archives/2006/02-05-ruby-and-rails#comments</comments>
		<pubDate>Mon, 06 Feb 2006 04:56:25 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
	<category>Development</category>
	<category>Ruby (on Rails)</category>
		<guid isPermaLink="false">http://devblog.thesonicgroup.net/archives/2006/02-05-ruby-and-rails</guid>
		<description><![CDATA[So, I&#8217;ve been doing a lot of experimentation with Ruby and Ruby on Rails recently. And I have to say, I&#8217;m really liking it.
First off, the learning curve for getting a basic app using Rails up and running is very low. Since it&#8217;s shot to the mainstream, there are many great tutorials available, as well [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;ve been doing a lot of experimentation with <a href="http://www.ruby-lang.org">Ruby</a> and <a href="http://www.rubyonrails.com">Ruby on Rails</a> recently. And I have to say, I&#8217;m really liking it.</p>
<p>First off, the learning curve for getting a basic app using Rails up and running is very low. Since it&#8217;s shot to the mainstream, there are <a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html">many</a> <a href="http://www.onlamp.com/pub/a/onlamp/2005/03/03/rails.html">great</a> <a href="http://www.slash7.com/articles/2005/01/24/really-getting-started-in-rails">tutorials</a> available, as well as several great books <a href="http://pragmaticprogrammer.com/titles/ruby/index.html">out</a> <a href="http://www.pragmaticprogrammer.com/titles/rails/index.html">now</a> and <a href="http://pragmaticprogrammer.com/titles/fr_rr/">coming soon</a>.<br />
<a id="more-9"></a><br />
The main reason I like Ruby is because of it&#8217;s syntax. It&#8217;s so natural and free-flowing, and it makes perfect sense. As <a href="http://www.loudthinking.com/">David Heinemeier Hansson</a> says, it&#8217;s beautiful code. And Rails takes full advantage of that. Ruby is also completely object-based &#8212; everything&#8217;s an object, even strings and numbers. This makes it much more natural to, say convert back and forth, or run alteration methods on them:</p>
<p><code>length_in_seconds = mins.to_i*60 #convert minutes to integer and multiply by 60<br />
person = "dave scott"<br />
person.capitalize<br />
puts person<br />
# prints: Dave Scott</code></p>
<p>Even testing variables for empty values is much simpler and more natural:</p>
<p><code>if (var.empty?)<br />
...<br />
end</code></p>
<p>Ruby syntax includes the ? and ! operators, which give humans visual clues as to what a method does. The ? on the empty?() method tells us that this is a test &#8212; it&#8217;s asking the variable a question: Are you empty? Similarly, the ! operator, through common convention, indicates that a function does something destructive (whether that&#8217;s deleting something or changing a value permanently, or something else entirely).</p>
<p>And Rails makes it so easy to get everything up and running. Generators are the single greatest thing I&#8217;ve seen in web development recently. Say we wanted to create a recipe application that stored our recipes in a cookbook:</p>
<p><code># rails cookbook<br />
# rails script/generate scaffold Recipe</code></p>
<p>Those two simple commands will generate all the application files we need, and even generate a working <abbr title="Create, Read, Update, Delete">CRUD</abbr> interface. Of course, it doesn&#8217;t look pretty, but that&#8217;s not the point. The point is that this gives us the foundation to build our app on. We don&#8217;t have to worry about recreating database connection functions, writing and hooking up CRUD functions, or writing the code to display the interfaces for these &#8212; the generator does it for us. Now we can extend this app, while still retaining the full functionality of a CRUD interface, replacing a piece at a time.</p>
<p>I can&#8217;t tell you how much faster and easier the development process is using these tools, but I can try. <img src='http://devblog.thesonicgroup.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  For example, I recently finished writing a web app for a local church. This web app enabled members of a program that the church sponsors to interact with each other and plan gatherings. The app is written in PHP and all told contains over 30,000 lines of code, most of which is your traditional &#8220;templatey&#8221; mess of spaghetti &#8212; PHP interspersed with HTML. It works, and it works well, but with my recent endeavors in Ruby and Rails, I decided to recreate at least a part of it in Rails to see what we can do.</p>
<p>So, I picked the largest portion of the site &#8212; the &#8220;call list&#8221; (this is a list of all the past attendees of the gatherings that this group holds, which is sortable, paged, and has several functions associated with each member) &#8212; to recreate in Rails. Each member can be toggled between an OK to Call state and a Do Not Call state. Each member also has comments associated with them, which are editable. There are other functions, but they are secondary. These features are the thrust of the call list, and what I was shooting to replicate.</p>
<p>In PHP, these functions represent roughly 900 lines of code. In Ruby/Rails, I can accomplish the same tasks in less than 100 lines of code, including display, and an AJAX request to toggle the call state. The page is identical from a user standpoint &#8212; I can toggle call state, sort, page, and view, add, and edit comments. As a bonus, I&#8217;ve also got code that allows me to add, edit, and delete attendees built-in to the app due to the Rails generator, which, in my PHP app, adds another 300 lines of code, but is less than 20 in the Ruby/Rails version.</p>
<p>Now, I won&#8217;t say that I&#8217;ll stop PHP development, because after all, it&#8217;s what I started in, and I still have fondness for it, but I&#8217;m beginning to come around to Mr. Hansson&#8217;s way of thinking: If I&#8217;m going to be programming day in and day out, I should be able to really enjoy it. And working in Ruby and with Rails makes it much more enjoyable. Looking at beautiful, compact, readable code that just makes sense is what it&#8217;s all about.</p>
<p>That all being said, once <a href="http://labs.thesonicgroup.net/projects/Snaps!/">Snaps! 2.0</a> is out the door, look for a Snaps! on Rails to follow&#8230; <img src='http://devblog.thesonicgroup.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
</p>
]]></content:encoded>
			<wfw:commentRSS>http://devblog.thesonicgroup.net/archives/2006/02-05-ruby-and-rails/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>TSG Labs and Snaps! Gallery</title>
		<link>http://devblog.thesonicgroup.net/archives/2006/01-08-tsg-labs-and-snaps-gallery</link>
		<comments>http://devblog.thesonicgroup.net/archives/2006/01-08-tsg-labs-and-snaps-gallery#comments</comments>
		<pubDate>Sun, 08 Jan 2006 18:40:31 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
	<category>TSG Products</category>
	<category>Development</category>
		<guid isPermaLink="false">http://devblog.thesonicgroup.net/archives/2006/01-08-tsg-labs-and-snaps-gallery</guid>
		<description><![CDATA[Well, I&#8217;ve just yesterday committed the initial check-in of the Snaps! Gallery 2.0 development code to our new CVS repository at SourceForge.net. There are instructions for getting and installing the development code posted at the new Labs Forums.
Also, the Snaps! Gallery project page is now up and running to coincide (roughly) with the initial commit [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I&#8217;ve just yesterday committed the initial check-in of the Snaps! Gallery 2.0 development code to our new CVS repository at <a href="http://sourceforge.net">SourceForge.net</a>. There are instructions for getting and installing the development code posted at the new <a href="http://labs.thesonicgroup.net/forums/">Labs Forums</a>.</p>
<p>Also, the Snaps! Gallery project page is now up and running to coincide (roughly) with the initial commit of the development code. You can visit the Snaps! project page <a href="http://labs.thesonicgroup.net/projects/Snaps!/index.php">here</a>. The project page also sports a couple new screenshots of the current development code.</p>
<p>Currently, I&#8217;m working out the technical details and schema for the new user permissions setup that Snaps! 2.0 will use, as well as trying to figure out an elegant way to template the admin section without having to re-write it. The way it was written initially did not take into account the possibility that it would ever be templated, so it&#8217;s really gonna be a task to convert it to a template friendly form. Which is exactly why I think I&#8217;m gonna have to rewrite it. <img src='http://devblog.thesonicgroup.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />
</p>
]]></content:encoded>
			<wfw:commentRSS>http://devblog.thesonicgroup.net/archives/2006/01-08-tsg-labs-and-snaps-gallery/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Another Snaps! Gallery Update</title>
		<link>http://devblog.thesonicgroup.net/archives/2006/01-02-another-snaps-gallery-update</link>
		<comments>http://devblog.thesonicgroup.net/archives/2006/01-02-another-snaps-gallery-update#comments</comments>
		<pubDate>Tue, 03 Jan 2006 04:06:52 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
	<category>TSG Products</category>
	<category>Development</category>
		<guid isPermaLink="false">http://devblog.thesonicgroup.net/archives/2006/01-02-another-snaps-gallery-update</guid>
		<description><![CDATA[Well, Snaps! Gallery is getting updated, as you all know. But what you problably didn&#8217;t know is that it&#8217;s basically getting a complete overhaul.
Since initially writing it, I&#8217;ve learned a lot more about good coding practice and code libraries. For instance, I didn&#8217;t know how really terrible the DB class from PEAR was until I [...]]]></description>
			<content:encoded><![CDATA[<p>Well, Snaps! Gallery is getting updated, as you all know. But what you problably didn&#8217;t know is that it&#8217;s basically getting a complete overhaul.</p>
<p>Since initially writing it, I&#8217;ve learned a lot more about good coding practice and code libraries. For instance, I didn&#8217;t know how really terrible the <a href="http://pear.php.net/package/DB">DB</a> class from <a href="http://pear.php.net/">PEAR</a> was until I saw the <a href="http://phplens.com/lens/adodb/">benchmarks</a> comparing it to straight SQL statements and other code libraries. So, with that in mind, I&#8217;ve switched over to the <a href="http://adodb.sourceforge.net/">ADOdb</a> library for database access. What this gains is: a much faster library, which results in a faster Snaps!, and better portability between database servers, which was one of my main goals in the original versions of Snaps!, but which DB doesn&#8217;t enforce very well. ADOdb&#8217;s design, by default, forces you to re-examine your queries and write them in a manner to fit ADOdb, rather than the database server you are using. ADOdb takes care of making it work with the various servers.</p>
<p>Along with that switch, I&#8217;m also re-examining <strong>all</strong> my code to try and remove as much extraneous and repetitive stuff as I can, in an effort to slim down and speed up Snaps! (not that it was ever slow, but&#8230;). And of course, I&#8217;m adding several features, two of which are complete and ready to unveil!</p>
<p><a id="more-6"></a></p>
<p><strong>Woo! New Features!</strong><br />
So, the first thing that&#8217;s completed and working was a user-requested feature way back when: album thumbnails. So, the implementation I&#8217;ve created allows 3 &#8220;modes:&#8221; </p>
<ol>
<li>default (folder image as in previous versions of Snaps!)</li>
<li>random (Snaps! selects a random image from the album)</li>
<li>selected (You select an image to use for the thumbnail of each album - if an album doesn&#8217;t have a selected thumbnail, it defaults to the folder image)</li>
</ol>
<p>The second new completed feature is a Recently Added section on the front page of the gallery. This section shows the 5 most recently added images (go figure). You will have the ability to enable or disable this feature, as well as change the number of images shown.</p>
<p>Along with these new features, the screenshot (at end of this post - click for big version) shows an early version of the new default theme for Snaps!. I&#8217;ve taken a lot of time to develop the themes as well during this rewrite. Snaps! has always been templated, to allow for easy customization, but this rewrite will allow you the option of not only customizing, but also installing themes. You&#8217;ll be able to download themes, upload them to the templates directory and then select them from your administration area to change the theme on-the-fly. For those not graphically-oriented, or who aren&#8217;t coders, this is a great leap forward in being able to customize your gallery.</p>
<p>Along with the new color scheme, the new default theme will sport a new logo (rough early version in the screenshot), and a new set of icons from the fabulous <a href="http://www.famfamfam.com/lab/icons/silk/">Silk icon set</a> by <a href="http://www.famfamfam.com/">Mark James</a>.</p>
<p>And of course you can expect the same XHTML and CSS valid official themes, as well as the super-easy web-based installer and web-based administration that you&#8217;ve all come to know and love.</p>
<p>You can probably expect an early-early beta sometime in the next few weeks, along with the new Labs website rollout soon.</p>
<p><a class="imagelink" href="http://devblog.thesonicgroup.net/wp-content/uploads/2006/01/snaps_2.0.0_preview.jpg" title="Snaps! Gallery 2.0 Preview"><img id="image5" src="http://devblog.thesonicgroup.net/wp-content/uploads/2006/01/snaps_2.0.0_preview.thumbnail.jpg" alt="Snaps! Gallery 2.0 Preview" height="96" width="105" /></a>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://devblog.thesonicgroup.net/archives/2006/01-02-another-snaps-gallery-update/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>TSG Labs Down&#8230;For Now</title>
		<link>http://devblog.thesonicgroup.net/archives/2005/12-27-tsg-labs-downfor-now</link>
		<comments>http://devblog.thesonicgroup.net/archives/2005/12-27-tsg-labs-downfor-now#comments</comments>
		<pubDate>Tue, 27 Dec 2005 05:35:25 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
	<category>TSG General</category>
	<category>TSG Products</category>
		<guid isPermaLink="false">http://devblog.thesonicgroup.net/archives/2005/12-27-tsg-labs-downfor-now</guid>
		<description><![CDATA[The Labs site (and along with it, the Snaps! Gallery project pages) are offline for now. I&#8217;m transferring everything this new server, and moving from the good old .us domain to this new .net domain. Along with the move, the Labs will get a facelift.
When Snaps! 2.0 is ready for public release, the new project [...]]]></description>
			<content:encoded><![CDATA[<p>The Labs site (and along with it, the Snaps! Gallery project pages) are offline for now. I&#8217;m transferring everything this new server, and moving from the good old .us domain to this new .net domain. Along with the move, the Labs will get a facelift.</p>
<p>When Snaps! 2.0 is ready for public release, the new project pages will also go online, with an updated look to match the new Snaps! Gallery default theme (which, I must say, is looking rather nice <img src='http://devblog.thesonicgroup.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ). Stay tuned here for more details, and maybe a few teasers&#8230;
</p>
]]></content:encoded>
			<wfw:commentRSS>http://devblog.thesonicgroup.net/archives/2005/12-27-tsg-labs-downfor-now/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Snaps! Gallery Update</title>
		<link>http://devblog.thesonicgroup.net/archives/2005/12-22-snaps-gallery-update</link>
		<comments>http://devblog.thesonicgroup.net/archives/2005/12-22-snaps-gallery-update#comments</comments>
		<pubDate>Fri, 23 Dec 2005 04:44:13 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
	<category>TSG Products</category>
		<guid isPermaLink="false">http://devblog.thesonicgroup.net/archives/2005/12-22-snaps-gallery-update</guid>
		<description><![CDATA[Snaps! Gallery has lain dormant at version 1.4.4 since early in 2005 due to my lack of time to devote to the project. However, rest assured Snaps! is not forgotten, nor abandoned.
Beginning in January, development on Snaps! will resume an active status and many of the features our users have been looking forward to will [...]]]></description>
			<content:encoded><![CDATA[<p>Snaps! Gallery has lain dormant at version 1.4.4 since early in 2005 due to my lack of time to devote to the project. However, rest assured Snaps! is not forgotten, nor abandoned.</p>
<p>Beginning in January, development on Snaps! will resume an active status and many of the features our users have been looking forward to will be implemented. Along with those features, and items on the todo list, Snaps! will be receiving many functionality updates to its user interface.</p>
<p>I don’t want to give away too much, but I’ll say that the whole thing is going to be much faster, and it will use a generous amount of AJAX for its user interface. Hopefully, if I can do everything I’ve got planned, the gallery will be a much more interactive piece of software, and it will be more fun to use and administer than a traditional piece of web software.</p>
<p>Along with the new features I can’t discuss, the planned feature upgrades will be implemented, such as unlimited sub-albums, album preview images, a more extensive user permissions system, along with some better comment spam protection (Captcha). So, stay tuned to the Devlog here for more updates into the new year.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://devblog.thesonicgroup.net/archives/2005/12-22-snaps-gallery-update/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Welcome to the TSG Devblog</title>
		<link>http://devblog.thesonicgroup.net/archives/2005/12-22-welcome-to-the-tsg-devblog</link>
		<comments>http://devblog.thesonicgroup.net/archives/2005/12-22-welcome-to-the-tsg-devblog#comments</comments>
		<pubDate>Fri, 23 Dec 2005 04:43:56 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
	<category>TSG General</category>
		<guid isPermaLink="false">http://devblog.thesonicgroup.net/archives/2005/12-22-welcome-to-the-tsg-devblog</guid>
		<description><![CDATA[The TSG Devlog was created for us to accomplish several things:

Provide a running log of our development on current and future products and projects.
Provide a means to explore and discuss web technologies.
Solicit discussion about web design in general.

Hopefully, we’ll be able to forge a good relationship with our readers and provide a lot of information [...]]]></description>
			<content:encoded><![CDATA[<p>The TSG Devlog was created for us to accomplish several things:</p>
<ol>
<li>Provide a running log of our development on current and future products and projects.</li>
<li>Provide a means to explore and discuss web technologies.</li>
<li>Solicit discussion about web design in general.</li>
</ol>
<p>Hopefully, we’ll be able to forge a good relationship with our readers and provide a lot of information on what’s going on behind the scenes at TSG.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://devblog.thesonicgroup.net/archives/2005/12-22-welcome-to-the-tsg-devblog/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
