<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Wiseheart Design - Home</title>
  <id>tag:wiseheartdesign.com,2008:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.7.3">Mephisto Noh-Varr</generator>
  <link href="http://wiseheartdesign.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://wiseheartdesign.com/" rel="alternate" type="text/html"/>
  <updated>2008-07-18T02:03:11Z</updated>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2008-07-17:643</id>
    <published>2008-07-17T04:00:00Z</published>
    <updated>2008-07-18T02:03:11Z</updated>
    <category term="Articles"/>
    <link href="http://wiseheartdesign.com/2008/7/17/create-facebook-like-windows-with-popup-js" rel="alternate" type="text/html"/>
    <title>Create Facebook-like Windows with Popup.js</title>
<content type="html">
            &lt;p&gt;&lt;img title='popup.js' src='http://wiseheartdesign.com/assets/2008/7/18/popupjs_1.png' height='150' alt='popup.js' width='453' /&gt;&lt;/p&gt;


	&lt;p&gt;Over the past couple of months I&#8217;ve been working on a little library for a client that allows us to create Facebook-like popup windows with ease. It&#8217;s called &lt;a href='http://github.com/jlong/popupjs/tree/master'&gt;popup.js&lt;/a&gt;. The library depends on Dan Webb&#8217;s excellent &lt;a href='http://www.danwebb.net/2006/9/3/low-pro-unobtrusive-scripting-for-prototype'&gt;Low Pro&lt;/a&gt; and comes complete with it&#8217;s own behavior for easy unobtrusive use.&lt;/p&gt;


	&lt;p&gt;So how does it work? Well, once you have the proper plumbing in place you can declare a simple popup window like this:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
&amp;lt;div class=&quot;popup&quot; id=&quot;test&quot; style=&quot;display: none&quot;&amp;gt;
  &amp;lt;h3 class=&quot;title&quot;&amp;gt;Popup Window&amp;lt;/h3&amp;gt;
  &amp;lt;div class=&quot;popup_content&quot;&amp;gt;
    &amp;lt;p&amp;gt;Hello world!&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;a href=&quot;javascript: Element.closePopup('test')&quot;&amp;gt;Close&amp;lt;/a&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This markup assumes that you are using the included facebook.css stylesheet, but the only thing that is necessary to have a functioning popup window is a div with an ID attribute. You should also set style=&#8221;display: none&#8221; to ensure that the div is not visible when the page loads.&lt;/p&gt;


	&lt;p&gt;Popping up the window is as simple as linking to it:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
&amp;lt;a href=&quot;#test&quot; class=&quot;popup&quot;&amp;gt;Popup&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Links with the class of &#8220;popup&#8221; get the Popup.TriggerBehavior which will trigger the popup when clicked. Note that the href should be set to the ID of the element to popup. If you prefer you can set the href to a &lt;span class='caps'&gt;URL&lt;/span&gt; that returns the &lt;span class='caps'&gt;HTML&lt;/span&gt; for the popup and an &lt;span class='caps'&gt;AJAX&lt;/span&gt; call will be made to that &lt;span class='caps'&gt;URL&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;For more information about this little lib, see the &lt;span class='caps'&gt;README&lt;/span&gt; in the GitHub project:&lt;/p&gt;


	&lt;p&gt;&lt;a href='http://github.com/jlong/popupjs/tree/master/README'&gt;http://github.com/jlong/popupjs/tree/master/README&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;And investigate the test project:&lt;/p&gt;


	&lt;p&gt;&lt;a href='http://github.com/jlong/popupjs/tree/master/test'&gt;http://github.com/jlong/popupjs/tree/master/test&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;Special thanks to Five Points Solutions for their help with debugging this library. They have contributed several Internet Explorer bug fixes in addition to funding much of the initial development.&lt;/em&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2007-10-27:552</id>
    <published>2007-10-27T00:39:00Z</published>
    <updated>2007-10-27T00:52:15Z</updated>
    <category term="Articles"/>
    <link href="http://wiseheartdesign.com/2007/10/27/pragmatic-programmer-site-live" rel="alternate" type="text/html"/>
    <title>Pragmatic Programmer Site Live!</title>
<content type="html">
            &lt;p&gt;&lt;a href='http://pragprog.com/' title='The Pragmatic Programmers'&gt;&lt;img title='The Pragmatic Programmers' src='http://wiseheartdesign.com/assets/2007/10/27/pragprog-com-screenshot.png' height='150' alt='The Pragmatic Programmers' width='453' /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;This may be old news for some of you, but the &lt;a href='http://pragprog.com'&gt;Pragmatic Web Site&lt;/a&gt; got a face lift a couple of weeks ago. I was thrilled to have the opportunity to work on the site with Mike, Dave, and Andy. Most of the design work was done this summer, while the finishing touches on programming and the data import pushed the launch date back to the beginning of October. (Site credits &lt;a href='http://pragprog.com/resources/credits/'&gt;here&lt;/a&gt;.)&lt;/p&gt;


	&lt;p&gt;If you haven&#8217;t seen it yet, I&#8217;d encourage you to head on over to the site and &lt;a href='http://pragmaticprogrammer.com/titles/'&gt;buy a book or something&lt;/a&gt;!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2007-09-25:550</id>
    <published>2007-09-25T05:59:00Z</published>
    <updated>2007-09-25T06:23:18Z</updated>
    <category term="Articles"/>
    <link href="http://wiseheartdesign.com/2007/9/25/introducing-serve" rel="alternate" type="text/html"/>
    <title>Introducing Serve: Now With Gemmi Goodness!</title>
<content type="html">
            &lt;p&gt;Based on my &lt;a href='http://wiseheartdesign.com/2007/9/4/a-haml-server-for-web-designers/'&gt;&lt;span class='caps'&gt;HAML&lt;/span&gt; Server for Web Designers&lt;/a&gt; article, I&#8217;ve created a small gem &#8220;serve&#8221; which makes it extremely easy for a Web Designer to get up and running with Haml and Sass:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;$ sudo gem install haml redcloth bluecloth serve
$ cd ~/Workspaces/prototype
$ ls . * 
.:
index.haml&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;images:
logo.gif&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;javascripts:
prototype.js        dialogs.js         tabset.js&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;stylesheets:
application.sass        dialogs.sass
$ serve
[2007-09-25 02:11:42] INFO  WEBrick 1.3.1
[2007-09-25 02:11:42] INFO  ruby 1.8.5 (2006-12-25)
[2007-09-25 02:11:42] INFO  Serve::Server#start: pid=1626 port=3000
...&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;And voila! I can now access the files in ~/Workspaces/prototype at:&lt;/p&gt;


&lt;blockquote&gt;&lt;a href='http://localhost:3000'&gt;http://localhost:3000&lt;/a&gt;&lt;/blockquote&gt;

	&lt;p&gt;&lt;strong&gt;Serve isn&#8217;t just a &lt;span class='caps'&gt;HAML&lt;/span&gt; or &lt;span class='caps'&gt;SASS&lt;/span&gt; server.&lt;/strong&gt; With the proper gems it can also handle Textile and Markdown (not to mention plain Jane &lt;span class='caps'&gt;HTML&lt;/span&gt;!).&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Serve also plays nicely with Rails.&lt;/strong&gt; If you have a file named &#8220;script/server&#8221; in the current directory, Serve will execute that script instead of launching the normal WEBrick server.&lt;/p&gt;


	&lt;p&gt;Complete usage information is available with:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;$ serve --help&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;&lt;a href='http://rubyforge.org/projects/serve/'&gt;Learn more about the project over at Ruby Forge&#8230;&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2007-09-04:549</id>
    <published>2007-09-04T02:45:00Z</published>
    <updated>2007-09-04T02:58:09Z</updated>
    <link href="http://wiseheartdesign.com/2007/9/4/a-haml-server-for-web-designers" rel="alternate" type="text/html"/>
    <title>A HAML Server for Web Designers</title>
<content type="html">
            &lt;p&gt;I have a script named &lt;tt&gt;serve&lt;/tt&gt; in my &lt;tt&gt;bin&lt;/tt&gt; directory that let&#8217;s me quickly startup a Webrick server in any directory. This is handy for serving &lt;span class='caps'&gt;HTML&lt;/span&gt; mockups or other files. Today, updated it to work with &lt;span class='caps'&gt;HAML&lt;/span&gt;:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
#!/usr/bin/env ruby
require 'webrick'
require 'rubygems'
require 'haml'

class HamlHandler &amp;lt; WEBrick::HTTPServlet::AbstractServlet

  def initialize(server, name)
    super
    @script_filename = name
  end

  def do_GET(req, res)
    begin
      data = open(@script_filename){|io| io.read }
      res.body = parse_haml(data)
      res['content-type'] = 'text/html'
    rescue StandardError =&amp;gt; ex
      raise
    rescue Exception =&amp;gt; ex
      @logger.error(ex)
      raise HTTPStatus::InternalServerError, ex.message
    end
  end

  alias do_POST do_GET

  private
    def parse_haml(string)
      engine = Haml::Engine.new(string,
        :attr_wrapper =&amp;gt; '&quot;',
        :filename =&amp;gt; @script_filename
      )
      engine.render
    end

end

WEBrick::HTTPServlet::FileHandler.add_handler(&quot;haml&quot;, HamlHandler)

args = ARGV.join(' ')
args.gsub!(%r{^http://}, '')
args = args.split(/[ :]/).compact

server = WEBrick::HTTPServer.new(
  :Port =&amp;gt; args.pop || 3000,
  :BindAddress =&amp;gt; args.pop || '0.0.0.0',
  :DocumentRoot =&amp;gt; Dir.pwd
)

trap(&quot;INT&quot;) { server.shutdown }

server.start
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2007-08-26:547</id>
    <published>2007-08-26T00:02:00Z</published>
    <updated>2007-08-26T00:08:58Z</updated>
    <category term="Articles"/>
    <link href="http://wiseheartdesign.com/2007/8/26/just-an-experiment" rel="alternate" type="text/html"/>
    <title>Just an Experiment</title>
<content type="html">
            &lt;p&gt;&lt;img src='http://wiseheartdesign.com/assets/2007/8/26/game.png' alt='' /&gt;&lt;/p&gt;


	&lt;p&gt;OK, this has nothing to do with what I&#8217;m working on in &lt;a href='http://basement.thewilliams.ws'&gt;Adam&#8217;s basement&lt;/a&gt;, but &lt;a href='http://johnwlong.com/game.html'&gt;here&#8217;s a starfield simulation&lt;/a&gt; I&#8217;ve been working on for a small game in Javascript. It&#8217;s an interesting example of what is possible in Javascript on a modern Web browser (tested on Safari 3 and Firefox 2). Be sure to check out the source. Prototype makes this type of thing extremely easy.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2007-08-25:545</id>
    <published>2007-08-25T15:28:00Z</published>
    <updated>2008-06-22T22:03:24Z</updated>
    <category term="Articles"/>
    <link href="http://wiseheartdesign.com/2007/8/25/constraints-frameworks-and-adam-s-basement" rel="alternate" type="text/html"/>
    <title>Constraints, Frameworks, and Adam's Basement</title>
<content type="html">
            &lt;p&gt;It&#8217;s official. Adam Williams and I are now working feverishly &lt;a href='http://basement.thewilliams.ws'&gt;in his basement&lt;/a&gt; on our little idea for a web app. We&#8217;re both pushing off other obligations for the next 3 months so that we can concentrate on building a quality product.&lt;/p&gt;


	&lt;p&gt;One of the fun things about building your own application is that you can truly make it whatever you want it to be. If you&#8217;ve been in an environment (like me) where you are constantly building things for other people, working on your own project can be liberating. As a creative person I love this! The sky is the limit. No idea is a bad one. Every idea is worth considering.&lt;/p&gt;


	&lt;p&gt;But wait a minute! Even though we are now working on our own project we still have constraints. We don&#8217;t have an unlimited amount of time or money that we can devote to this. We eventually need to ship a working product even if it isn&#8217;t everything we initially visualized it would be. In fact, we have to be brutal about what we allow into the app and what we throw out. If we aren&#8217;t brutal we&#8217;ll end up with something sub-par. Either the app will lack the really useful features when it ships or it will never ship.&lt;/p&gt;


	&lt;p&gt;This week we&#8217;ve worn our creative hat a lot. One of the mistakes I think that we have made is that we have focused a lot on system architecture issues and not enough on application features. I&#8217;m beginning to realize that on the front end of this process it is extremely important to focus on application features. We can always refactor the application in the future when we know more about what the system architecture issues are. The features will help clarify that.&lt;/p&gt;


	&lt;p&gt;Extract a framework from your application. Resist the urge to invent a framework before working on features.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2007-06-15:382</id>
    <published>2007-06-15T21:27:00Z</published>
    <updated>2007-06-16T16:01:28Z</updated>
    <category term="Articles"/>
    <link href="http://wiseheartdesign.com/2007/6/15/better-modularization-for-rails-2-0" rel="alternate" type="text/html"/>
    <title>Better Modularization for Rails 2.0 (or What Rails Can Learn from Django)</title>
<summary type="html">&lt;p&gt;In my previous post about &lt;a href='http://wiseheartdesign.com/2006/12/6/rails-needs-something-better-than-engines/'&gt;Rails and Engines&lt;/a&gt;, I talked about some of the issues I&#8217;d like to see resolved in Rails 2.0. Specifically, it seems that we need to rethink modularization in Rails and make it easier for people to share complete slices of applications.&lt;/p&gt;


	&lt;p&gt;One of the primary hinderances of the present Rails architecture to modularization is the directory structure.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;In my previous post about &lt;a href='http://wiseheartdesign.com/2006/12/6/rails-needs-something-better-than-engines/'&gt;Rails and Engines&lt;/a&gt;, I talked about some of the issues I&#8217;d like to see resolved in Rails 2.0. Specifically, it seems that we need to rethink modularization in Rails and make it easier for people to share complete slices of applications.&lt;/p&gt;


	&lt;p&gt;One of the primary hinderances of the present Rails architecture to modularization is the directory structure.&lt;/p&gt;
&lt;p&gt;Consider the typical rails &lt;code&gt;app&lt;/code&gt; directory:&lt;/p&gt;


&lt;pre&gt;
app/
  controllers/
    application.rb
    account_controller.rb
    blog_controller.rb
    comments_controller.rb
  helpers/
    application_helper.rb
    account_helper.rb
    blog_helper.rb
  models/
    user.rb
    blog.rb
    post.rb
    comment.rb
  views/
    account/
      signup.rhtml
      login.rhtml
      edit.rhtml
    blog/
      index.rhtml
      archive.rhtml
      post.rhtml
    comments/
      view.rhtml
      remove.rhtml
    layouts/
      application.rhtml
&lt;/pre&gt;

	&lt;p&gt;Now at first glance, the Rails directory structure seems quite helpful. There is a place for everything and everything is in its place. Models go here, views here, controllers here&#8230; The entire &lt;span class='caps'&gt;MVC&lt;/span&gt; in 3 different directories. Wait a minute! Compare this to the &lt;a href='http://djangoproject.com'&gt;Django&lt;/a&gt; directory structure for the same application:&lt;/p&gt;


&lt;pre&gt;
account/
  __init__.py
  urls.py
  models.py
  views.py
  templates/
    account/
      account_login.html
      account_signup.html
      account_edit.html
blog/
  __init__.py
  urls.py
  models.py
  views.py
  templates/
    blog/
      blog_list.html
      blog_archive.html
      blog_detail.html
    comment/
      comment_view.html
      comment_remove.html
&lt;/pre&gt;

	&lt;p&gt;Wow! See the difference? Django divides the application up not according to file type, but according to &lt;i&gt;logical structure&lt;/i&gt;. Related files are together. This makes it easy to share entire chunks of an application. All you have to do is create an svn:external to the appropriate directory of another app and instantly you have access to an entire slice of the other application.&lt;/p&gt;


	&lt;p&gt;Imagine if Rails took the same approach. The new app directory could look something like this:&lt;/p&gt;


&lt;pre&gt;
app/
  application/
    application_controller.rb
    application_layout.rhtml
  account/
    _config.rb
    _routes.rb
    account_controller.rb
    account_helper.rb
    account_edit.rhtml
    account_login.rhtml
    account_signup.rhtml
    user.rb
    user_migrations.rb
  blog/
    _config.rb
    _routes.rb
    blog_controller.rb
    blog_helper.rb
    blog_index.rhtml
    blog_archive.rhtml
    blog_post.rhtml
    comment.rb
    comment_migrations.rb
    comments_controller.rb
    comments_helper.rb
    comments_view.rhtml
    post.rb
    post_migrations.rb
&lt;/pre&gt;

	&lt;p&gt;Now I&#8217;ve changed things around just a bit to accommodate the new directory structure and support better modularization. Views are now prefixed with the name of the controller that they are associated with (this allows us to avoid having to put them in a separate directory). I&#8217;ve also changed migrations around so that all the migrations for a particular model are in the same file (we would probably need a new domain language for this). Also note that the &lt;code&gt;_config.rb&lt;/code&gt; and &lt;code&gt;_routes.rb&lt;/code&gt; files give us a convenient place to store configuration for a particular slice of our application (the underscore prefix would sort them to the top of a directory listing).&lt;/p&gt;


	&lt;p&gt;So that&#8217;s my big idea for Rails 2.0. It would be a radical departure from the present directory structure. So radical that it would effectively make Rails 2.0 applications incompatible with Rails 1.0 apps. But as we are already dropping support for deprecated features in Rails 2.0, so perhaps it&#8217;s time to rethink the directory structure.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; There is some &lt;a href='http://groups.google.com/group/rubyonrails-core/browse_thread/thread/45685895778b1357/'&gt;interesting discussion&lt;/a&gt; going on about this on the Rails-Core mailing list.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2007-05-03:374</id>
    <published>2007-05-03T13:09:00Z</published>
    <updated>2007-05-03T13:26:41Z</updated>
    <link href="http://wiseheartdesign.com/2007/5/3/setting-up-ubuntu-for-rails" rel="alternate" type="text/html"/>
    <title>Setting Up Ubuntu for Rails</title>
<content type="html">
            &lt;p&gt;&lt;a href='http://showmedo.com/videos/video?name=rubyGrosenbachDeprec&#38;fromSeriesID=48'&gt;&lt;img class='float-right' src='http://farm1.static.flickr.com/198/482613727_d250389253_m.jpg' alt='' /&gt;&lt;/a&gt; I just found a wonderful little screencast by &lt;a href='http://nubyonrails.com/'&gt;Geoffrey Grosenbach&lt;/a&gt; of &lt;a href='http://peepcode.com/'&gt;Peep Code Screencasts&lt;/a&gt; on setting up the full Rails stack on Ubuntu. He&#8217;s uploaded it so that &lt;a href='http://showmedo.com/videos/video?name=rubyGrosenbachDeprec&#38;fromSeriesID=48'&gt;anyone can watch it over on the ShowMeDo website&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;From the description:&lt;/p&gt;


&lt;blockquote&gt;
This 10 minute demo shows how easy it is to install Ruby, Rails, Apache, Mongrel, Subversion, and MySQL on an Ubuntu server. Capistrano and the deprec gem (deployment recipes) are used to automate the installation process with only a few commands. It finishes with a deployment of a Rails app to the newly built server!

The demo is done with Parallels on a Mac, but would work with any machine that can boot from the Ubuntu 6.06 Live CD.
&lt;/blockquote&gt;

	&lt;p&gt;Props to Geoffrey for his great work with helping Rails newbies (and even &#8220;old timers&#8221; like me) get their feet wet.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2007-05-03:367</id>
    <published>2007-05-03T01:37:00Z</published>
    <updated>2007-05-03T02:33:05Z</updated>
    <link href="http://wiseheartdesign.com/2007/5/3/two-rails-testing-plugins" rel="alternate" type="text/html"/>
    <title>Two Rails Testing Plugins</title>
<content type="html">
            &lt;p&gt;I just released two Rails plugins that should make testing a little easier for some of you.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;The &lt;a href='http://wiseheartdesign.com/svn/plugins/test_helpers/README'&gt;test_helpers&lt;/a&gt; plugin makes it easy to &lt;span class='caps'&gt;DRY&lt;/span&gt; up your test cases by moving shared code into modules. It includes the handy dandy  &#8220;test_helper&#8221; class method to make requiring and including a snap.&lt;/li&gt;
		&lt;li&gt;The &lt;a href='http://wiseheartdesign.com/svn/plugins/abstract_testcases/README'&gt;abstract_testcases&lt;/a&gt; plugin makes it easy to create abstract test cases that don&#8217;t complain about tests not being defined. If you&#8217;d rather not go the module route, this is the plugin for you.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Installation is just like any other Rails plugin:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
% script/plugin source http://wiseheartdesign.com/svn/plugins/
% script/plugin install test_helpers
% script/plugin install abstract_testcases
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Comments and feedback are welcome.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2007-03-12:118</id>
    <published>2007-03-12T17:29:00Z</published>
    <updated>2007-03-17T02:59:41Z</updated>
    <category term="Articles"/>
    <link href="http://wiseheartdesign.com/2007/3/12/so-you-want-to-write-a-book" rel="alternate" type="text/html"/>
    <title>So You Want to Write a Book?</title>
<content type="html">
            &lt;p&gt;Over on &lt;a href='http://pragdave.pragprog.com/'&gt;Dave Thomas&#8217; Blog&lt;/a&gt; he&#8217;s writing a unique series of articles entitled &lt;em&gt;So You Want To Write a Book&lt;/em&gt;. If you&#8217;ve ever thought about writing a technical book, or even a non-technical book you will definitely enjoy the series. Here&#8217;s an excerpt from his second article, &lt;a href='http://pragdave.pragprog.com/pragdave/2007/03/sywtwab_2_the_h.html'&gt;&lt;em&gt;The Hero&#8217;s Journey&lt;/em&gt;&lt;/a&gt;:&lt;/p&gt;


&lt;blockquote&gt;
&lt;p&gt;Every Hero&#8217;s Journey follows the same basic plan. We start by meeting the protagonist, an average person living a standard life. Suddenly, something bad happens to them, normally something unimaginable and outside their control. At this point, our character must make a decision. Do they cave, or do they commit to face the challenge—do the take a risk an embark on the journey?&lt;/p&gt;

	&lt;p&gt;Once they join the path, they face a series of challenges, often getting harder or more complex as the story progresses. By overcoming each, the hero gradually masters the initial problem.&lt;/p&gt;


	&lt;p&gt;But the story never ends there. Once the hero conquers all the problems, they face one last challenge. They must return to the real world, which often feels different to them. However, once back home, they get to apply what they learned on their journey. They are stronger.&lt;/p&gt;


	&lt;p&gt;What does this have to do with technical books?&lt;/p&gt;


	&lt;p&gt;Everything.&lt;/p&gt;


&lt;p&gt;Because a good technical book is also a hero&#8217;s journey. The reader joins the book already faced with a major challenge—they need to learn some new technique or technology. Thy need to make a commitment to follow the path. Along the way, they need to learn stuff, try things, conquering increasingly difficult concepts and challenges. Eventually they graduate; they&#8217;ve learned what they came to learn. But they journey doesn&#8217;t end there. Like the hero, they then have to come home, bringing back what they learned.&lt;/p&gt;
&lt;/blockquote&gt;

	&lt;p&gt;Dave really has a talent for connecting with his readers. &lt;a href='http://pragdave.pragprog.com/pragdave/writing_a_book/index.html'&gt;Read More&#8230;&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2007-02-13:115</id>
    <published>2007-02-13T16:07:00Z</published>
    <updated>2007-03-17T03:00:21Z</updated>
    <category term="Articles"/>
    <link href="http://wiseheartdesign.com/2007/2/13/johns-essential-css" rel="alternate" type="text/html"/>
    <title>John's Essential Guide to CSS</title>
<summary type="html">&lt;p&gt;I once taught a workshop on &lt;acronym title='Cascading Style Sheets'&gt;CSS&lt;/acronym&gt; and in the process compiled a list of essential reading for people interested learning &lt;span class='caps'&gt;CSS&lt;/span&gt;. I&#8217;ve revamped the list below adding a few additional articles and reorganizing it a bit. Most of the articles are from &lt;a href='http://alistapart.com'&gt;&lt;em&gt;A List Apart&lt;/em&gt;&lt;/a&gt;, but the volume of articles at &lt;em&gt;A List Apart&lt;/em&gt; can can be overwhelming to people just to getting started. Consider this a pocket guide to the best of &lt;em&gt;A List Apart&lt;/em&gt; with a few additional links thrown in to spice it up a bit.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;I once taught a workshop on &lt;acronym title='Cascading Style Sheets'&gt;CSS&lt;/acronym&gt; and in the process compiled a list of essential reading for people interested learning &lt;span class='caps'&gt;CSS&lt;/span&gt;. I&#8217;ve revamped the list below adding a few additional articles and reorganizing it a bit. Most of the articles are from &lt;a href='http://alistapart.com'&gt;&lt;em&gt;A List Apart&lt;/em&gt;&lt;/a&gt;, but the volume of articles at &lt;em&gt;A List Apart&lt;/em&gt; can can be overwhelming to people just to getting started. Consider this a pocket guide to the best of &lt;em&gt;A List Apart&lt;/em&gt; with a few additional links thrown in to spice it up a bit.&lt;/p&gt;
&lt;h4&gt;The Basics&lt;/h4&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/doctype/'&gt;Fix Your Site with the Right &lt;span class='caps'&gt;DOCTYPE&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/sizematters/'&gt;&lt;span class='caps'&gt;CSS&lt;/span&gt; Design: Font Size Matters&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/practicalcss/'&gt;Practical &lt;span class='caps'&gt;CSS&lt;/span&gt; Layout Tips, Tricks, &#38; Techniques&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.nypl.org/styleguide/'&gt;&lt;span class='caps'&gt;NYPL&lt;/span&gt; Online Style Guide&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/betterliving/'&gt;Better Living Through &lt;span class='caps'&gt;XHTML&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h4&gt;The Power of Floats and Backgrounds&lt;/h4&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/fauxcolumns/'&gt;Faux Columns&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/negativemargins/'&gt;Creating Liquid Layouts with Negative Margins&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://wellstyled.com/css-2col-fluid-layout.html' title='Fluid'&gt;Two Column Tableless Layout&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/customcorners/'&gt;&lt;span class='caps'&gt;CSS&lt;/span&gt; Design: Creating Custom Corners &#38; Borders&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/mountaintop/'&gt;Mountain Top Corners&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;span class='caps'&gt;CSS&lt;/span&gt; Drop Shadows (&lt;a href='http://www.alistapart.com/articles/cssdropshadows/'&gt;1&lt;/a&gt;, &lt;a href='http://www.alistapart.com/articles/cssdrop2/'&gt;2&lt;/a&gt;, and &lt;a href='http://www.alistapart.com/articles/onionskin/'&gt;3&lt;/a&gt;)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h4&gt;Print Stylesheets &#38; Cross-Browser Compatibility&lt;/h4&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/goingtoprint/'&gt;&lt;span class='caps'&gt;CSS&lt;/span&gt; Design: Going to Print&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/printyourway/'&gt;Print It Your Way&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/alternate/'&gt;Alternative Style: Working With Alternate Style Sheets&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.bluerobot.com/web/css/fouc.asp' title='FOUC'&gt;Flash of Unstyled Content&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.positioniseverything.net/explorer/doubled-margin.html'&gt;The IE Doubled Float-Margin Bug&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/emen/' title='and Other Shady Characters'&gt;The Trouble With EM ’n EN&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.tantek.com/CSS/Examples/boxmodelhack.html'&gt;The Box Model Hack&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.positioniseverything.net/'&gt;Position Is Everything&lt;/a&gt; has fixes to bugs in &lt;a href='http://www.positioniseverything.net/explorer.html'&gt;IE&lt;/a&gt;, &lt;a href='http://www.positioniseverything.net/op-omnibus.html'&gt;Opera&lt;/a&gt;, and &lt;a href='http://www.positioniseverything.net/gecko.html'&gt;Firefox&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h4&gt;Lists, Rollovers, &#38; Image Replacement Techniques&lt;/h4&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href='http://alistapart.com/articles/taminglists/'&gt;Taming Lists&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.simplebits.com/notebook/2003/06/29/icon_styled_headings.html'&gt;Icon Styled Headings&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://alistapart.com/articles/sprucemaps/'&gt;Spruced-Up Site Maps&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/dropdowns/'&gt;Suckerfish Dropdowns&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.stopdesign.com/articles/replace_text/'&gt;Using Background-Image to Replace Text&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/fir/'&gt;Facts and Opinion About Fahrner Image Replacement&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.digital-web.com/articles/in_defense_of_fahrner_image_replacement/'&gt;In Defense of Fahrner Image Replacement&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h4&gt;Secrets of Absolute Positioning&lt;/h4&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href='http://stopdesign.com/articles/absolute/'&gt;Making Absolute Relative&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.wpdfd.com/editorial/wpd0904news.htm#feature'&gt;Absolutely Relative&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/flexiblelayouts/'&gt;Flexible Layouts with &lt;span class='caps'&gt;CSS&lt;/span&gt; Positioning&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h4&gt;Additional Resources&lt;/h4&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href='http://www.ilovejackdaniels.com/css/css-cheat-sheet/'&gt;&lt;span class='caps'&gt;CSS&lt;/span&gt; Cheat Sheet&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.csszengarden.com/'&gt;&lt;span class='caps'&gt;CSS&lt;/span&gt; Zen Garden&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://thenoodleincident.com/tutorials/box_lesson/boxes.html'&gt;Box Lessons&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/slashdot/'&gt;Retooling Slashdot with Web Standards&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/separationdilemma/'&gt;Separation: The Web Designer’s Dilemma&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://www.alistapart.com/articles/separation/'&gt;Separation Anxiety: The Myth of the Separation of Style from Content&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2006-12-13:106</id>
    <published>2006-12-13T21:09:00Z</published>
    <updated>2007-03-17T03:00:36Z</updated>
    <category term="Articles"/>
    <link href="http://wiseheartdesign.com/2006/12/13/the-terralien-crew" rel="alternate" type="text/html"/>
    <title>The Terralien Crew</title>
<content type="html">
            &lt;p&gt;&lt;a href='http://terralien.com/'&gt;&lt;img class='float-right' src='http://wiseheartdesign.com/assets/2006/12/1/terralien-com.png' alt='' /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Nathaniel Talbott (of &lt;a href='http://ruby-doc.org/stdlib/libdoc/test/unit/rdoc/index.html'&gt;Test::Unit&lt;/a&gt; fame) has put together an unbelievable crew that may be just what you need for your next Ruby on Rails project. Crew members include such notables as:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;&lt;a href='http://wiseheartdesign.com/portfolio/'&gt;Myself&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;&lt;a href='http://codefluency.com/'&gt;Bruce Williams&lt;/a&gt;&lt;/strong&gt; (a popular blogger, programmer, and designer)&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;&lt;a href='http://mattmccray.com/'&gt;Matt McCray&lt;/a&gt;&lt;/strong&gt; (the author of &lt;a href='http://comatose.rubyforge.org/'&gt;Comatose &lt;span class='caps'&gt;CMS&lt;/span&gt;&lt;/a&gt; and the &lt;a href='http://www.mattmccray.com/pivot/archive.php?c=Theme_Support'&gt;Rails Theme Support Plugin&lt;/a&gt;)&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;&lt;a href='http://blog.codora.com/'&gt;Duff O&#8217;Melia&lt;/a&gt;&lt;/strong&gt; (the creator of &lt;a href='http://soapadoo.com'&gt;Soapadoo&lt;/a&gt;)&lt;/li&gt;
		&lt;li&gt;&lt;a href='http://terralien.com/about/people/'&gt;And others&#8230;&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Terralien is a network of designers and programmers who specialize in developing Web applications with Ruby on Rails. We have a reputation for being able to deliver quality code on a deadline through rapid prototyping and incremental release cycles. Read more about the crew on the &lt;a href='http://terralien.com/'&gt;Terralien  Web site&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2006-12-07:103</id>
    <published>2006-12-07T16:57:00Z</published>
    <updated>2007-03-17T03:00:50Z</updated>
    <category term="Articles"/>
    <link href="http://wiseheartdesign.com/2006/12/7/introducing-feedchamp" rel="alternate" type="text/html"/>
    <title>Introducing FeedChamp: A Camping RSS Feed Aggregator</title>
<content type="html">
            &lt;p&gt;&lt;a href='http://code.whytheluckystiff.net/camping/'&gt;&lt;img class='float-right no-border' src='http://code.whytheluckystiff.net/camping/chrome/site/images/camping-small.png' alt='' /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;I went &lt;a href='http://code.whytheluckystiff.net/camping/'&gt;camping&lt;/a&gt; last night and decided to see how easy it would be to create an &lt;span class='caps'&gt;RSS&lt;/span&gt; feed aggregator. After just a short time I had a working app and with some additional tweaking it became FeedChamp:&lt;/p&gt;


	&lt;p&gt;&lt;a href='http://wiseheartdesign.com/svn/public/feedchamp/trunk/'&gt;http://wiseheartdesign.com/svn/public/feedchamp/trunk/&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Have a look if you can. And if you want to help with its development I&#8217;ll gladly give you commit rights to the subversion repository.&lt;/p&gt;


	&lt;p&gt;It&#8217;s not much right now, but perhaps with a little love from a few others it will turn into a nice app. For more info see the &lt;a href='http://wiseheartdesign.com/svn/public/feedchamp/trunk/README'&gt;&lt;span class='caps'&gt;README&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2006-12-06:99</id>
    <published>2006-12-06T21:37:00Z</published>
    <updated>2006-12-07T21:04:03Z</updated>
    <category term="Articles"/>
    <link href="http://wiseheartdesign.com/2006/12/6/rails-needs-something-better-than-engines" rel="alternate" type="text/html"/>
    <title>Rails Needs Something Better Than Engines</title>
<summary type="html">&lt;p&gt;I need to apologize for exploiting a title like the above to introduce an article like this. The &lt;a href='http://rails-engines.org/'&gt;Rails Engine&lt;/a&gt; guys have &lt;a href='http://rails-engines.org/news/2006/08/30/apparently-engines-are-still-evil/'&gt;taken a lot of flack&lt;/a&gt; for the work that they have done to make it easy to share code between applications and I don&#8217;t want to add to their misery. Instead, I&#8217;d like to use the issue to put the focus on something else.&lt;/p&gt;


	&lt;p&gt;The traditional argument against Rails Engines (as I understand it) is that prepackaged components are a pipe-dream. Components, particularly the way Rails Engines implements them are just too big. Every application will require something custom, and Rails Engines are too generic. Sure, they work well for getting you up and running, but what about down the road when you need to tweak something that the engine author hasn&#8217;t thought about yet? And after all, Rails is so easy to use why not take the agile approach and only develop what you need when you need it?&lt;/p&gt;


	&lt;p&gt;I&#8217;m interested in the Rails Engine argument because I think it exposes something about the philosophy that is driving Rails which may not be extremely obvious to those of us on the sidelines who are just trying to use Rails to build better Web sites and applications. That is that &lt;strong&gt;Rails is primarily designed for building completely custom green-field Web applications&lt;/strong&gt; and it shows. When it comes to sharing code between applications the best thing Rails has to offer is generators. So instead of offering a login engine Rails offers a login generator.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;I need to apologize for exploiting a title like the above to introduce an article like this. The &lt;a href='http://rails-engines.org/'&gt;Rails Engine&lt;/a&gt; guys have &lt;a href='http://rails-engines.org/news/2006/08/30/apparently-engines-are-still-evil/'&gt;taken a lot of flack&lt;/a&gt; for the work that they have done to make it easy to share code between applications and I don&#8217;t want to add to their misery. Instead, I&#8217;d like to use the issue to put the focus on something else.&lt;/p&gt;


	&lt;p&gt;The traditional argument against Rails Engines (as I understand it) is that prepackaged components are a pipe-dream. Components, particularly the way Rails Engines implements them are just too big. Every application will require something custom, and Rails Engines are too generic. Sure, they work well for getting you up and running, but what about down the road when you need to tweak something that the engine author hasn&#8217;t thought about yet? And after all, Rails is so easy to use why not take the agile approach and only develop what you need when you need it?&lt;/p&gt;


	&lt;p&gt;I&#8217;m interested in the Rails Engine argument because I think it exposes something about the philosophy that is driving Rails which may not be extremely obvious to those of us on the sidelines who are just trying to use Rails to build better Web sites and applications. That is that &lt;strong&gt;Rails is primarily designed for building completely custom green-field Web applications&lt;/strong&gt; and it shows. When it comes to sharing code between applications the best thing Rails has to offer is generators. So instead of offering a login engine Rails offers a login generator.&lt;/p&gt;
&lt;p&gt;Now don&#8217;t get me wrong here, generators are great for getting people up and running quickly. At first glance they offer &lt;strong&gt;exactly&lt;/strong&gt; what Rails engines offer in that they allow you to get up and running quickly with prepackaged code and the added bonus that you can &lt;strong&gt;completely customize&lt;/strong&gt; the generated code. But where they fall down is that they encourage rampant code duplication.&lt;/p&gt;


	&lt;p&gt;Take the login generator for example. How many of us use the generated login code nearly &lt;strong&gt;unmodified&lt;/strong&gt; in application after application? Even if we customize the generated code is it not true that we often perform the same modifications again and again as we move from one application to another?&lt;/p&gt;


	&lt;p&gt;Folks we need something better. In a nutshell we need standard way to share views, models, controllers, and URLs between applications.&lt;/p&gt;


	&lt;h3&gt;Of Snakes and Rubies&lt;/h3&gt;


	&lt;p&gt;On December 3rd of last year I helped organize a debate between David Heinemeier Hansson and Adrian Holovaty (the creator of &lt;a href='http://www.djangoproject.com/'&gt;Django&lt;/a&gt;). We dubbed the event &lt;em&gt;Snakes and Rubies&lt;/em&gt; and the video and audio from it are available &lt;a href='http://www.djangoproject.com/snakesandrubies/'&gt;here&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Even though I am an avid Rails user I was favorably impressed by Adrian&#8217;s presentation on Django and I must say that I am sad to see that more of the ideas in Django have not gained greater traction in the Rails community.&lt;/p&gt;


	&lt;p&gt;One of the things that Django does better than Rails at the moment is that it encourages you to subdivide your application according to components. In Django terms you don&#8217;t just create an &#8220;application&#8221; you create a Django &#8220;project&#8221; which contains multiple &#8220;apps&#8221;. An app is a full slice of the application and contains models, views, and controllers (actually in Django terms it contains &#8220;models&#8221;, &#8220;templates&#8221;, and &#8220;views&#8221;, but it is essentially the same thing).&lt;/p&gt;


	&lt;p&gt;Django&#8217;s model is perfect for Web sites because you can have mini apps for the admin, blog, and forum, and maybe one for that extremely custom event registration system that you have. Of course the great thing about this is that you can share these little mini apps across applications.&lt;/p&gt;


	&lt;p&gt;As I was working on this article I wrote Adrian Holovaty to ask him about this very point. He wrote back:&lt;/p&gt;


&lt;blockquote&gt;This was a big design goal when we were first putting together Django, because at our Web operation, we managed several sites&#8212;all of which used bits and pieces of the same functionality, but always a different mix. Indeed, as you point out, Django has a &#8220;batteries included&#8221; philosophy and ships with some apps that you can choose to use in your own projects.&lt;/blockquote&gt;

	&lt;p&gt;And how easy is it to use another Django mini app in your own project? All you need to do is include it in the &lt;span class='caps'&gt;INSTALLED&lt;/span&gt;_APPS configuration variable. Here&#8217;s a small configuration snippet from the &lt;a href='http://www.djangoproject.com/documentation/tutorial1/'&gt;Django tutorial&lt;/a&gt;:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
INSTALLED_APPS = (
  'django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.sites',
  'mysite.polls'
)
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;There are four little mini apps there that are installed by default for the standard Django project: auth, contenttypes, sessions, and sites (I&#8217;ll bet you can guess what they do). Django also provides a rather powerful admin mini app that automatically creates an admin interface for your models. This is extremely helpful in that it allows you to concentrate on the Web site part of your application while leaving the admin part to Django. To see all of this in action check out the &lt;a href='http://www.throwingbeans.org/django_screencasts.html'&gt;Django Screencast&lt;/a&gt; at throwingbeans.org.&lt;/p&gt;


	&lt;h3&gt;Can Rails Take a Page from the Django Playbook?&lt;/h3&gt;


	&lt;p&gt;I&#8217;m interested in all of this because of my work on Radiant (the content management system I developed for the &lt;a href='http://ruby-lang.org'&gt;Ruby Web site&lt;/a&gt;). Over the past several months I have been working on an extension system for Radiant that will allow others to develop mini rails apps that plug straight into a Radiant application. A Radiant extension is like a Rails plugin except that it supports additional models, views, and controllers (much like Rails Engines do, but with added benefits). The directory structure for a Radiant extension looks like this:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
vendor/extensions/
  my_extension/
    app/
      controllers/
      helpers/
      models/
      views/
    lib/
    test/
    my_extension.rb
    Rakefile
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;The benefit that Radiant Extensions offer over something like Rails Engines is that they integrate into the Radiant administration system. Right now that integration is a little rough, but we hope to make it easier in the future. Even so, the progress that we have made is encouraging. Here&#8217;s a snippet which demonstrates adding a custom tab to the Radiant administration system:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
class AssetManagerExtension &amp;lt; Radiant::Extension
  version &quot;1.0&quot; 
  description &quot;Provides asset management support for Radiant.&quot; 

  define_routes do |map|
    map.connect 'admin/assets/:action', :controller =&amp;gt; 'admin/asset'
  end

  def activate
    admin.tabs.add &quot;Assets&quot;, &quot;/admin/assets&quot;, :after =&amp;gt; &quot;Layouts&quot; 
  end

  def deactivate
    admin.tabs.remove &quot;Assets&quot; 
  end 
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now the work on the Radiant extension system has been difficult. Rails doesn&#8217;t make it easy to allow views to reside in multiple places (there is only one template_root). Nor does it provide support for defining routes in multiple locations. Model reloading through the dependencies mechanism is also a difficult issue. Time and again I find myself twisting Rails&#8217; arm to let me do what I want to do. I&#8217;ve had to hook into the Rails internals on multiple occasions (just like the Rails Engines people did).&lt;/p&gt;


	&lt;p&gt;I can&#8217;t help looking beyond Radiant though to wonder if built in support for this kind of thing would not be a benefit to the Rails community at large? I know &lt;a href='http://techno-weenie.net/'&gt;Rick Olson&lt;/a&gt; is working on something like the Radiant extension system for &lt;a href='http://mephistoblog.com'&gt;Mephisto&lt;/a&gt; and I can see that other apps could be benefited by something similar. We&#8217;ve already seen Rails Engines and now there is also &lt;a href='http://wiki.pluginaweek.org/Appable_plugins/'&gt;Appable Plugins&lt;/a&gt;. How many other approaches are necessary before the Rails community is able to settle on a standard?&lt;/p&gt;


	&lt;p&gt;As the Rails-Core team is looking towards Rails 2.0, perhaps it&#8217;s time to start thinking about restructuring Rails applications to take a more modular approach? Maybe there really is something to be learned from Django after all.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://wiseheartdesign.com/">
    <author>
      <name>jlong</name>
    </author>
    <id>tag:wiseheartdesign.com,2006-12-01:92</id>
    <published>2006-12-01T02:13:00Z</published>
    <updated>2006-12-01T02:29:08Z</updated>
    <category term="Articles"/>
    <link href="http://wiseheartdesign.com/2006/12/1/now-on-mephisto" rel="alternate" type="text/html"/>
    <title>Now Using Mephisto!</title>
<summary type="html">&lt;p&gt;&lt;img title='Mephisto!' src='http://wiseheartdesign.com/assets/2006/12/1/mephisto-badge.png' alt='Mephisto!' /&gt;&lt;/p&gt;


	&lt;p&gt;It may come a surprise to some of you that the author of &lt;a href='http://radiantcms.org/'&gt;Radiant&lt;/a&gt; is now using &lt;a href='http://mephistoblog.com/'&gt;Mephisto&lt;/a&gt; for his Weblog, but I&#8217;ve decided to give it a shot while Radiant is still under development. True blogging support is a couple of months away for Radiant so I figured it would be good to scope out the &#8220;competition&#8221; in the meantime.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;&lt;img title='Mephisto!' src='http://wiseheartdesign.com/assets/2006/12/1/mephisto-badge.png' alt='Mephisto!' /&gt;&lt;/p&gt;


	&lt;p&gt;It may come a surprise to some of you that the author of &lt;a href='http://radiantcms.org/'&gt;Radiant&lt;/a&gt; is now using &lt;a href='http://mephistoblog.com/'&gt;Mephisto&lt;/a&gt; for his Weblog, but I&#8217;ve decided to give it a shot while Radiant is still under development. True blogging support is a couple of months away for Radiant so I figured it would be good to scope out the &#8220;competition&#8221; in the meantime.&lt;/p&gt;
&lt;p&gt;Rick and Justin have done a phenomenal job on Mephisto. It&#8217;s simple, the interface is well designed (very professional), and the code underneath is beautiful. The closest thing I can compare it to is &lt;a href='http://textpattern.com'&gt;Textpattern&lt;/a&gt; from the &lt;span class='caps'&gt;PHP&lt;/span&gt; world&#8212;and it is much better. Asset management and theme support put it head and shoulders above Textpattern.&lt;/p&gt;


	&lt;p&gt;As to the Radiant vs. Mephisto argument. I&#8217;d say that Mephisto is &lt;strong&gt;&lt;i&gt;much better for blogging and probably always will be.&lt;/i&gt;&lt;/strong&gt; Radiant will eventually add support for blogging, but it&#8217;s focus will continue to be content management. I want Radiant to be a light-weight &lt;span class='caps'&gt;CMS&lt;/span&gt;, with a blogging engine feel, but blogging will always take second place to content management. This is good news for the Rails community because I think Mephisto&#8217;s goal is to be a great blogging engine first and after that a light-weight content management system.&lt;/p&gt;


	&lt;p&gt;My hat is off to Rick and Justin. Mephisto is definitely a &lt;a href='http://typosphere.org'&gt;Typo&lt;/a&gt; killer.&lt;/p&gt;
          </content>  </entry>
</feed>
