Rails & Instiki vs. Dreamweaver

Posted on Tuesday 12 July 2005

I know, silly comparison. They’re entirely different tools. They both, however, are used to create web sites. And with both tools at my disposal, I’m surprising myself with ways I can use Rails to make my life easier.

One client somewhat regularly has me create little mini-sites for departments on their corporate intranet. They’re usually mostly “static” HTML, which is rarely as static as people think. So then it becomes my problem that they don’t have a proper content management system because I end up with the grunt work of typing stuff in and making small copy edits and updating links, which I am not good at.

When the next one came along, I cringed at the thought of noodling with text and HTML in Dreamweaver. I already had the design done, I just need some more pages with different text, and the text was bound to change once I had it all laid out. After some initial beating around the bush and with some new Rails skills under my belt, I decided to try hacking into Instiki to make it look like their intranet so I could use that for proofs. It ended up taking less time than my initial beating around the bush. I guess had forgot that Instiki was a Rails app, everything I was concerned with was in the view. All I needed to change was the pretty much the default template.

I took a screenshot of their intranet and used it for the background, used display:none to hide the Instiki header and the edit links on the bottom (so I could still edit with the keyboard shortcuts). Included their stylesheets and added some appropriate ids to parent divs. Now it looked like their intranet with the new content on it. But once I got this far I realized it was also an easy thing to take that content and wrap it in their intranet’s ASP template. I copied the ‘export_html’ to make ‘export_client_html’, which now spits out all the pages wrapped in an ASP template ready for installation into their testing environment.

Now text edits are easy, for me and the client. I can export then entire mini-site with completed ASP files at anytime. Future changes will be easy. Basically all the benefits of having a content management system without the client having one. The content is naturally separated from the layout. And even if you can code beautiful XHTML, Markdown and Textile are easier to write, more readable and more accurate. (Textile is easier to write, Markdown is easier to read.) With Markdown reference link syntax I can see the link text, the alt text, and the URL all at the same time in their full length. Makes for fewer of those mistakes to which I am prone.

But then you also get some added benefit with Rails. For one, Ruby is just fun and pliable. And with Rails you can say things like, this is how to construct the title for all the pages; all pages get this same layout except this one, which differs only here; now take all that and wrap it in this to make it look right for now, but for the final output use this layout. All of it live and version controlled. I can’t do that stuff in easily Dreamweaver.

One thing I haven’t figured out how to do yet is use a specific wiki page as repeated content, such as a navigation bar that’s repeated on each page. Anyone got any thoughts? It also would be nice to have the automatic table of contents that MediaWiki has, but I couldn’t find any documentation on their template files. It looked a little scary.


Related Posts

1 Comment for 'Rails & Instiki vs. Dreamweaver'

  1.  
    ShovelThis
    July 16, 2005 | 11:36 am
     

    Instiki does provide a method to include content on multiple pages using the [[ !include ]] call. However, it carries one major caveat. The pages that have the included content do not automatically update when you change the content in the include. To get those pages to update with the new include, you must create a new revision of the page. Yeah, it sucks. There is also a performance hit with includes. The insitki site uses an include for the sidebar nav.

Leave a comment

(required)

(required)


Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed.

Use the buttons below to customise your comment. HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


RSS feed for comments on this post | TrackBack URI