<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.intridea.com/~d/styles/atom10full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.intridea.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <title>Intridea - Blog</title>
  <id>tag:www.intridea.com,2008:mephisto/blog</id>
  <generator version="0.8.0" uri="http://mephistoblog.com">Mephisto Drax</generator>
  
  <link href="http://www.intridea.com/blog" rel="alternate" type="text/html" />
  <updated>2008-10-09T20:14:38Z</updated>
  <link rel="self" href="http://feeds.intridea.com/intridea" type="application/atom+xml" /><entry xml:base="http://www.intridea.com/">
    <author>
      <name>Chris</name>
    </author>
    <id>tag:www.intridea.com,2008-10-06:1537</id>
    <published>2008-10-06T00:48:00Z</published>
    <updated>2008-10-09T20:14:38Z</updated>
    <category term="Blog" />
    <category term="barcamp" />
    <category term="community" />
    <category term="conference" />
    <category term="event" />
    <category term="rails" />
    <category term="Rails" />
    <category term="rubydcamp" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/412328460/intridea-in-the-community-2" rel="alternate" type="text/html" />
    <title>Intridea in the Community</title>
<content type="html">
            &lt;p&gt;Intridea believes in supporting the local tech community and will be sponsoring and participating in several upcoming conferences, events, and competitions in October and November.&lt;/p&gt;


	&lt;h3&gt;Ruby DCamp&lt;/h3&gt;


	&lt;p&gt;&lt;a href="http://rubydcamp.org"&gt;&lt;img src="http://intridea.com/assets/2008/10/6/hack_sponsor.png"&gt;&lt;/a&gt;Intridea is proud to be a platinum sponsor of the first &lt;a href="http://rubydcamp.org"&gt;RubyDCamp&lt;/a&gt; , an OpenSpace Ruby Conference to be held October 11-12 just outside of Washington DC in Arlington, VA.  Ruby DCamp will be a weekend full of Ruby learning, teaching, and hacking and should be a great event for Rubyists of all abilities.&lt;/p&gt;


	&lt;h3&gt;Ignite Baltimore&lt;/h3&gt;


	&lt;p&gt;&lt;a href="http://ignitebaltimore.com/"&gt;&lt;img src="http://intridea.com/assets/2008/10/6/ignite_baltimore.jpg"&gt;&lt;/a&gt;On October 16th, Intridea will be sponsoring &lt;a href="http://ignitebaltimore.com"&gt;Ignite Baltimore&lt;/a&gt;, a high-energy event where 16 of the area’s most interesting people give short 5-minute talks.  With topics varying from technology to culture to business to philosophy, it’ll definitely be a night to remember!&lt;/p&gt;


	&lt;h3&gt;BarCamp &lt;span class="caps"&gt;DC2&lt;/span&gt;&lt;/h3&gt;


	&lt;p&gt;&lt;a href="http://barcamp.org/BarCampDC2"&gt;BarCamp &lt;span class="caps"&gt;DC2&lt;/span&gt;&lt;/a&gt; is another OpenSpace event Intridea is happy to be sponsoring.  At a BarCamp, attendees self-organize to determine the topics they are interested in hearing.  Everyone is required to help lead a session or participate in a panel.  BarCamp &lt;span class="caps"&gt;DC2&lt;/span&gt; will be held on October 18th.&lt;/p&gt;


	&lt;h3&gt;South Carolina Ruby Conference&lt;/h3&gt;


	&lt;p&gt;Also on October 18th, Chris and Adam will be speaking in Columbia, SC about becoming a more blissful developer at the &lt;a href="http://scrubyconf.colaruby.org"&gt;South Carolina Ruby Conference&lt;/a&gt; .  The talk is titled “Remove the Suck – On How to Become a Blissful Developer.”&lt;/p&gt;


	&lt;h3&gt;Rails Rumble&lt;/h3&gt;


	&lt;p&gt;&lt;a href="http://railsrumble.com/"&gt;&lt;img src="http://intridea.com/assets/2008/10/6/RailsRumbleBadge_90_1.png"&gt;&lt;/a&gt;To make the October 18-19 weekend even busier, Intridea will be sponsoring the &lt;a href="http://railsrumble.com"&gt;2008 Rails Rumble&lt;/a&gt;, as well as entering three teams.  The Rails Rumble is a weekend event where teams of up to 4 people design, develop, and deploy a working Rails app within 48 hours.&lt;/p&gt;


	&lt;h3&gt;Social Dev Camp East&lt;/h3&gt;


	&lt;p&gt;&lt;a href="http://barcamp.org/SocialDevCampEast"&gt;SocialDevCampEast&lt;/a&gt; is a place for east coast developers and technology business leaders to come together for a thoughtful discussion of the ideas and technologies that will drive the future of the social web.  Intridea is looking forward to sponsoring and being part of the discussion.  SocialDevCampEast will be held on November 1st.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Michael Bleigh will be giving the talk “Hacking the Mid-End: Advanced Rails UI Techniques” at the &lt;a href="http://greatlakesrubybash.org/speakers.html"&gt;Great Lakes Ruby Bash&lt;/a&gt; on October 11, 2008. If you didn’t get a chance to make it all the way to Berlin for RailsConf Europe, catch the talk again in a longer format!&lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/412328460" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/10/6/intridea-in-the-community-2</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>pradeep</name>
    </author>
    <id>tag:www.intridea.com,2008-09-21:1436</id>
    <published>2008-09-21T16:39:00Z</published>
    <updated>2008-09-21T16:44:16Z</updated>
    <category term="Blog" />
    <category term="hacking" />
    <category term="rails internals" />
    <category term="railsconf europe" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/399034364/slides-code-from-rails-internals-tutorial" rel="alternate" type="text/html" />
    <title>Slides &amp; Code from Rails Internals Tutorial</title>
<content type="html">
            &lt;p&gt;Better late than never—here are the slides and the code from the &lt;a href="http://en.oreilly.com/railseurope2008/public/schedule/detail/3582"&gt;The Renegades Guide to Hacking Rails Internals&lt;/a&gt;, the RailsConf Europe 2008 Tutorial given by Pradeep Elankumaran &amp; Michael Bleigh.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://intridea.com/assets/2008/9/21/renegades_guide_to_rails_internals.zip"&gt;Click here to download&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Sorry about the delay—the files have also been uploaded to the &lt;a href="http://en.oreilly.com/railseurope2008/public/schedule/proceedings"&gt;RailsConf Europe website&lt;/a&gt;, though we are not sure when that site will be updated.&lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/399034364" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/9/21/slides-code-from-rails-internals-tutorial</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>Chris</name>
    </author>
    <id>tag:www.intridea.com,2008-09-19:1558</id>
    <published>2008-09-19T17:19:00Z</published>
    <updated>2008-10-09T18:21:16Z</updated>
    <category term="Blog" />
    <category term="lone star ruby" />
    <category term="railsconf" />
    <category term="railsconf europe" />
    <category term="speaking" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/415968573/conference-comparison" rel="alternate" type="text/html" />
    <title>Conference Comparison</title>
<content type="html">
            &lt;p&gt;Last week, along with a few of my Intridea colleagues, I had the opportunity to experience two entirely different Ruby-related conferences.  The first was RailsConf Europe, an international Ruby on Rails conference in Berlin Germany.  After giving our &lt;span class="caps"&gt;RCE&lt;/span&gt; talks, Pradeep and I got on planes and flew to Austin, TX for the Lone Star Ruby Conference, where Intridea presented a full-day training session.  Both conferences had their own unique feel, and it was interesting to compare the community eco-systems inherent in each.&lt;/p&gt;


	&lt;p&gt;At RailsConf Europe, Intridea had two talks accepted – Michael and Pradeep gave a tutorial on Rails Internals, and Michael and I presented a talk and coding session on Mid-End Rails Development.  For our talk, the crowd was attentive, but very quiet.  Generally when speaking in a packed room, there will be a quiet rumble as attendees comment on the ongoing presentation.  The entire event had more of a formal feeling to it.  This could perhaps be due to the language barrier brought on by attendees from all over Europe, the US, and the world coming together – but it was a departure from my other presentation experiences.&lt;/p&gt;


	&lt;p&gt;Likely related to the varied backgrounds, the RailsConf Europe crowd did not seem to be very cohesive – there appeared to be fewer hallway hack sessions and in-depth discussion that you often find at similar events. The venue also contributed to lack of cohesion.  The hotel did not offer breakfast, so attendees didn’t have that early morning mingling that usually occurs.  Being held in a hotel in downtown Berlin, there were also many potential distractions.  A quick nap in the room, a run out to the street corner bratwurst vendor, a wide variety of local pubs – there were many opportunities to be drawn away from the conference.&lt;/p&gt;


	&lt;p&gt;Because of the variety of backgrounds, along with the number of distractions, the community feel seemed to be a bit lacking.&lt;/p&gt;


	&lt;p&gt;The Lone Star Ruby Conference was an entirely different experience, I think a large part due to the venue.  At &lt;span class="caps"&gt;LSRC&lt;/span&gt;, the venue was not attached to a hotel, all meals were provided, events were scheduled from morning until night, and there was not a great deal to do within walking distance of the venue – not to mention it was almost too hot to go outside!  All of these contributed to a more cohesive group that grew even stronger as the event went on.&lt;/p&gt;


	&lt;p&gt;Adam, Pradeep, and I presented our full-day training – Rails Refactoring: Triage, Prevention, and Performance – to a great group of developers.  Having just come from &lt;span class="caps"&gt;RCE&lt;/span&gt;, where people were from all over, it was different to have a class full of people mostly from the same geographic area (Texas).  Perhaps the nature of a training vs a session, but there was much more communication going on between attendees and instructors. The vibe was definitely more laid back.&lt;/p&gt;


	&lt;p&gt;That vibe extended to the rest of the event – there were lots of hallway hacking sessions, people helping other developers with code problems, and many in-depth technical discussions outside of the actual talks.&lt;/p&gt;


	&lt;p&gt;Overall, both events offered some great technical talks and the opportunity to meet some great Ruby/Rails minds – but for a community feel, Lone Star wins hands-down.&lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/415968573" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/9/19/conference-comparison</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>Michael Bleigh</name>
    </author>
    <id>tag:www.intridea.com,2008-09-16:1350</id>
    <published>2008-09-16T14:23:00Z</published>
    <updated>2008-09-22T13:43:34Z</updated>
    <category term="Blog" />
    <category term="announcement" />
    <category term="launch" />
    <category term="presently" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/394257628/present-ly-launches" rel="alternate" type="text/html" />
    <title>Present.ly Launches</title>
<content type="html">
            &lt;p&gt;We have officially opened Present.ly to the public!&lt;/p&gt;


&amp;lt;center&gt;&lt;a href="http://www.presentlyapp.com"&gt;&lt;img src="http://intridea.com/assets/2008/9/11/presently.png" /&gt;&lt;/a&gt;&amp;lt;/center&gt;

	&lt;p&gt;You can sign up for an account at the &lt;a href="http://presentlyapp.com/plans"&gt;plans page&lt;/a&gt;. All accounts come with 60-day trials (you don’t even need a credit card), so what are you waiting for? Get in the Present.ly!&lt;/p&gt;


	&lt;p&gt;If you still need a little more information about what Present.ly is and how it works, we have just added a &lt;a href="http://presentlyapp.com/video"&gt;videos page with a new screencast&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Thanks for your interest, and we look forward to seeing many of you as users in the near future.&lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/394257628" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/9/16/present-ly-launches</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>Michael Bleigh</name>
    </author>
    <id>tag:www.intridea.com,2008-09-11:1325</id>
    <published>2008-09-11T17:28:00Z</published>
    <updated>2008-09-11T17:44:57Z</updated>
    <category term="Blog" />
    <category term="presently" />
    <category term="products" />
    <category term="tc50" />
    <category term="techcrunch" />
    <category term="yammer" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/389877102/congratulations-yammer-but-get-ready-to-rumble" rel="alternate" type="text/html" />
    <title>Congratulations, Yammer, But Get Ready To Rumble!</title>
<content type="html">
            &lt;p&gt;Last night when &lt;a href="http://www.yammer.com/"&gt;Yammer&lt;/a&gt; &lt;a href="http://www.techcrunch.com/2008/09/10/yammer-takes-techcrunch50s-top-prize/"&gt;won the TechCrunch50&lt;/a&gt;, our interest was more than a little piqued. Today we’re officially taking the wraps off of &lt;a href="http://present.ly"&gt;Present.ly&lt;/a&gt;, our “Twitter for Businesses” product that we’ve been working on in stealth mode for the last several months and are launching on September 16 at the &lt;a href="http://ny.web2expo.com/"&gt;Web 2.0 Expo&lt;/a&gt; in New York.&lt;/p&gt;


	&lt;p&gt;It’s great to see that short-form communication for businesses is so promising as to win top honors at such a competitive conference. We’re extremely passionate about the field because it has the potential to really transform how people communicate inside an organization. So congratulations are in order to the Yammer team for bringing so much exposure to the field.&lt;/p&gt;


	&lt;p&gt;One of the reasons that we were so surprised to see Yammer among the &lt;a href="http://www.techcrunch50.com/"&gt;TechCrunch50&lt;/a&gt; is because Present.ly was submitted to be included as well! Unfortunately, we never got the chance to demo our product for the &lt;span class="caps"&gt;TC50&lt;/span&gt; experts (something that was supposed to be part of the process). We didn’t receive a clear response back as to why, but it would have been great to have the chance to go head-to-head with Yammer in the preliminaries of TechCrunch50 or on stage at the conference.&lt;/p&gt;


	&lt;h3&gt;It’s Still On, Though&lt;/h3&gt;


	&lt;p&gt;Be that as it may, it’s certainly been a shot of adrenaline for our team to have a surprise competitor mere days before we are set to launch. We’ve had some time to examine Yammer, and we’re ready for some competition! So how do they stack up against each other?&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Security and Control:&lt;/strong&gt; Present.ly is built to be an official means of communication for a business, rather than an ad-hoc network of employees. User accounts on Present.ly are created only through administrator invitations, and accounts are secured using &lt;span class="caps"&gt;SSL&lt;/span&gt; encryption.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Collaboration:&lt;/strong&gt; Present.ly has hash tags, like Yammer. But it also has groups, private messaging, and media/file sharing built in. We built Present.ly from the ground up to have powerful features tailored specifically for business use. Present.ly accounts can also be extended beyond a single e-mail domain, allowing you to include clients, consultants and other collaborators effortlessly.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Platform Approach:&lt;/strong&gt; Starting from day one Present.ly has an &lt;abbr title="Application Programming Interface"&gt;&lt;span class="caps"&gt;API&lt;/span&gt;&lt;/abbr&gt; that is fully compatible with the &lt;a href="http://apiwiki.twitter.com/REST+API+Documentation"&gt;Twitter &lt;span class="caps"&gt;REST API&lt;/span&gt;&lt;/a&gt;. This means that existing Twitter applications can work instantly with Present.ly with almost no modification. Through the &lt;span class="caps"&gt;API&lt;/span&gt;, Present.ly can easily integrate with all parts of your business.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;The Power of Context:&lt;/strong&gt; Present.ly automatically analyzes each post for context, automatically separating out questions, replies, and urgent messages. Our robust notifications system allows you to receive updates via E-Mail, &lt;span class="caps"&gt;SMS&lt;/span&gt;, and IM based on this context.&lt;/p&gt;


	&lt;p&gt;We’re really proud of &lt;a href="http://present.ly"&gt;Present.ly&lt;/a&gt; and think that it can enable great new things for companies of all sizes, from 5 employees to 50,000. On September 16, get ready to start using the &lt;strong&gt;&lt;span class="caps"&gt;REAL&lt;/span&gt;&lt;/strong&gt; Twitter for Business.&lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/389877102" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/9/11/congratulations-yammer-but-get-ready-to-rumble</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>barg</name>
    </author>
    <id>tag:www.intridea.com,2008-09-06:1283</id>
    <published>2008-09-06T00:01:00Z</published>
    <updated>2008-09-22T15:08:56Z</updated>
    <category term="Blog" />
    <category term="buzz" />
    <category term="conference" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/384614615/intridea-world-tour-berlin-texas-and-dc" rel="alternate" type="text/html" />
    <title>Intridea World Tour: Berlin, Texas, and DC</title>
<content type="html">
            &lt;p&gt;It’s been a busy week at Intridea.  Michael, Pradeep, and Chris presented a couple of talks in &lt;a href="http://intridea.com/2008/9/1/greetings-from-berlin"&gt;Berlin&lt;/a&gt;.  Then, Chris and Pradeep met up with Adam in &lt;a href="http://intridea.com/2008/9/5/updates-from-lonestar-rubyconf-2008"&gt;Austin, Texas&lt;/a&gt; for a full-day training session.   Back in our DC headquarters, I was one of the panelists for the &lt;a href="http://www.potomactechwire.com/seminar50.html"&gt;Future of Software&lt;/a&gt; event organized by Potomac Tech Wire.  Japan and China next year?  We are definitely getting our name around. &lt;/p&gt;

&lt;p&gt;The Future of Software event was attended by over 200 tech executives in the area.  The discussion revolved around technology trends, business model implications, and funding software companies.   There was a lot of discussion on open-source and software as service (SaaS) models destroying the lucrative, traditional perpetual license models.  I was really surprised by how much discussion we had on Ruby On Rails (and I didn’t even have to start it!), both among the panelists and the audience.  It’s nice to know that ROR is hot in this area flooded with defense contractors.&lt;/p&gt;

&lt;p&gt;Here are some of my thoughts I prepared for the meeting:&lt;/p&gt;

&lt;h3&gt;Three Software Trends&lt;/h3&gt;
&lt;p&gt;Cheap, easy-to-use consumer software will continue to make in-roads into the business world. Google Apps in the enterprise will fundamentally change the way we collaborate inside the companies as well as personal life (e.g. Gmail, Calendar, GChat, Apps, Sites, etc)&lt;/p&gt;
&lt;p&gt;Building applications on top of open platforms with existing user bases will continue (e.g. iPhone Apps, OpenSocial, Facebook apps, Linkedin).  Innovation and the killer apps come from the development community rather than the platform companies.  It’s still hard to make money on these platforms.&lt;/p&gt;
&lt;p&gt;Software as Service is finally taking off (Salesforce, Google Apps, Basecamp, ...).  Even small companies can buy enterprise software.&lt;/p&gt;

&lt;h3&gt;Commoditization &amp; Business Models&lt;/h3&gt;
&lt;p&gt;Commoditization is inevitable.  Companies will need to aggressively focus on customer value and innovate more rapidly.&lt;/p&gt;
&lt;p&gt;Software as Service is finally taking off (Salesforce, Google Apps, Basecamp, ...).  Even small companies like us can buy enterprise software like SalesForce.&lt;/p&gt;
&lt;p&gt;The freemium model is also popular on the web.  You attract the users with the free version and then upsell them through value-added features.&lt;/p&gt;
&lt;p&gt;Servicing open-source apps is great way for new companies to compete with the large companies.  Even using this approach you need lot of energy to promote the technology, build a multi-vendor eco-system, and convert the leads into sales.&lt;/p&gt;

&lt;h3&gt;Fate of big software companies (Microsoft, Oracle and SAP, etc) in 10 years:&lt;/h3&gt;

&lt;p&gt;Ten years is a long time in software business.   Probably a couple of players will be still very strong.  Probably 25% will fail.  The remaining players will not be so dominant.  They will continue to survive through acquisition of innovative companies.  New leaders will emerge.  Second comings like Apple are going to be rare. &lt;/p&gt;


&lt;h3&gt;Advice to new startups:&lt;/h3&gt;

&lt;p&gt;Don't under-estimate the need for marketing and sales.  After your initial beta launch, the interest will wane.   You have to promote the product pretty heavily to get the traction you wanted.  It will take time to succeed.   Ideas are cheap and execution is hard.  &lt;/p&gt;
&lt;p&gt;Find a business partner.  Start-ups can be a roller coaster ride, it helps to have someone to brainstorm ideas and to share the ups and downs.  &lt;/p&gt;
&lt;p&gt;I think entrepreneurship is the best way to compete in the global marketplace.  &lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/384614615" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/9/6/intridea-world-tour-berlin-texas-and-dc</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>pradeep</name>
    </author>
    <id>tag:www.intridea.com,2008-09-05:1261</id>
    <published>2008-09-05T15:51:00Z</published>
    <updated>2008-09-05T23:10:33Z</updated>
    <category term="Blog" />
    <category term="austin" />
    <category term="conference" />
    <category term="lonestar rubyconf" />
    <category term="matz" />
    <category term="refactoring" />
    <category term="rubyconf" />
    <category term="tutorial" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/384298538/updates-from-lonestar-rubyconf-2008" rel="alternate" type="text/html" />
    <title>Updates from Lone Star RubyConf 2008</title>
<content type="html">
            &lt;p&gt;Greetings from blazing hot Austin, TX where Chris, Adam &amp; I are attending &lt;a href="http://lonestarrubyconf.com"&gt;Lone Star RubyConf 2008&lt;/a&gt;. We gave the &lt;a href="http://lonestarrubyconf.com/speakers.html#rrtpp"&gt;Rails Refactoring—Triage, Prevention &amp; Performance&lt;/a&gt; tutorial yesterday to about 25 attendees of the conference, which was quite exciting and enjoyable.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3201/2831267138_86d41a71c6.jpg" /&gt;&lt;/p&gt;


	&lt;p&gt;Personally, I really like the small regional-conference feel of Lone Star RubyConf. The ambiance is much more laid-back than the two Railsconfs and networking is effortless. It doesn’t hurt that the conference is located in Austin, which is a real foodie heaven (especially barbeque), with a very cool and friendly Ruby/Rails community.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3077/2830434001_50c08dfff4.jpg" /&gt;&lt;/p&gt;


	&lt;p&gt;This year, the conference seems to have attracted a good set of speakers—I saw many prominent Rubyists walking the halls, and talking to many of the speakers was quite informative. &lt;a href="http://en.wikipedia.org/wiki/Yukihiro_Matsumoto"&gt;Matz&lt;/a&gt; is here, and we’ve taken to thanking him for Ruby every time we’ve run into him in the hallway, which is honestly the least we could do without feeling like stalkers.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://intridea.com/assets/2008/9/5/photo.jpg" width="500" /&gt;&lt;/p&gt;


	&lt;p&gt;Highly recommended if you’re thinking of attending next year.&lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/384298538" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/9/5/updates-from-lonestar-rubyconf-2008</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>Michael Bleigh</name>
    </author>
    <id>tag:www.intridea.com,2008-09-03:1128</id>
    <published>2008-09-03T10:36:00Z</published>
    <updated>2008-09-03T18:11:55Z</updated>
    <category term="Blog" />
    <category term="berlin" />
    <category term="railsconf europe" />
    <category term="talks" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/382219253/railsconf-europe-2008-hacking-the-mid-end" rel="alternate" type="text/html" />
    <title>RailsConf Europe 2008: Hacking the Mid-End</title>
<content type="html">
            &lt;p&gt;Michael Bleigh and Chris Selmer gave a talk at &lt;a href="http://www.railsconfeurope.com/"&gt;RailsConf Europe 2008&lt;/a&gt; entitled “Hacking the Mid-End: Advanced Rails UI Techniques.” If you had a chance to attend, please take a moment to &lt;a href="http://en.oreilly.com/railseurope2008/public/schedule/detail/3545"&gt;evaluate the session&lt;/a&gt;. If not, hopefully this post will help you understand a bit of what you missed!&lt;/p&gt;


	&lt;p&gt;This talk was aimed at being an introduction to the role of a mid-end developer; someone who facilitates the back-end and front-end developers and also writes the javascript interaction layer using Unobtrusive Scripting. You can view the slides embedded below, or you can &lt;a href="http://intridea.com/assets/2008/9/3/midend_slides.pdf"&gt;download the slide deck directly&lt;/a&gt;.&lt;/p&gt;


&lt;div&gt;&amp;lt;object height="355" width="425"&gt;&amp;lt;param /&gt;&amp;lt;param /&gt;&amp;lt;param /&gt;&amp;lt;embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=midendslides-1220464783309852-9&amp;amp;#38;stripped_title=hacking-the-midend-advanced-rails-ui-techniques-presentation" height="355" width="425"&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;/div&gt;

	&lt;p&gt;The Rails app that we developed during the talk is &lt;a href="http://github.com/intridea/talk-midend"&gt;available on GitHub&lt;/a&gt; with all of the completed code. If you have any questions or comments, we’d love to hear from you. Thanks to everyone who came and saw the talk!&lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/382219253" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/9/3/railsconf-europe-2008-hacking-the-mid-end</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>pradeep</name>
    </author>
    <id>tag:www.intridea.com,2008-09-03:1117</id>
    <published>2008-09-03T05:26:00Z</published>
    <updated>2008-10-05T23:33:10Z</updated>
    <category term="Blog" />
    <category term="2008" />
    <category term="berlin" />
    <category term="lonestar" />
    <category term="railsconf europe" />
    <category term="refactoring" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/382052562/berlin-updates-lonestar-rubyconf" rel="alternate" type="text/html" />
    <title>Railsconf Europe 2008 Updates + Lonestar RubyConf</title>
<content type="html">
            &lt;p&gt;&lt;a href="http://flickr.com/photos/mistac/2820582683/"&gt;&lt;img src="http://intridea.com/assets/2008/9/3/2820582683_f1aa6475e5.jpg"&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Greetings from still sunny Berlin, where Michael &amp; I wrapped up our &lt;a href="http://en.oreilly.com/railseurope2008/public/schedule/detail/3582"&gt;Hacking Rails Internals&lt;/a&gt; talk yesterday. We would love to hear comments from those who attended—we are actively working on getting the slides and demo code to you as soon as possible. Please &lt;a href="http://en.oreilly.com/railseurope2008/public/schedule/detail/3582"&gt;rate&lt;/a&gt; our session if you did attend, so that we can get some constructive feedback.&lt;/p&gt;


	&lt;p&gt;Today, Chris &amp; Michael will be presenting &lt;a href="http://en.oreilly.com/railseurope2008/public/schedule/detail/3545"&gt;Hacking the Mid-End : Unobtrusive Scripting &amp; Advanced UI Techniques in Rails&lt;/a&gt;. This 45-minute talk will be a discussion of the “Mid-End”—advanced user interface problems that don’t fit the traditional ‘back-end’ and ‘front-end’ categorization. You can find more details on the &lt;a href="http://en.oreilly.com/railseurope2008/public/schedule/detail/3545"&gt;RailsConf site&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://mp.intridea.com/mp/get?mpsrc=https%3A%2F%2Fs3.amazonaws.com%2Fintridea-presently-production%2Fintridea%2Fassets%2F33%2FIMG_0322.JPG" width="500" /&gt;&lt;/p&gt;


	&lt;p&gt;Chris &amp; I will also be flying out today from Berlin to Austin, TX for the &lt;a href="http://lonestarrubyconf.com/"&gt;Lonestar RubyConf&lt;/a&gt;. Along with Adam Bair, we’re giving a &lt;a href="http://lonestarrubyconf.com/speakers.html#rrtpp"&gt;6-hour mid-level training session&lt;/a&gt; on refactoring Rails apps. We will be talking about how to effectively rescue horrid codebases, prevent your codebase from turning into a monster and performance issues—we’re quite excited.&lt;/p&gt;


	&lt;p&gt;While we’re sad to leave Berlin so quickly—we got the chance to checkout some excellent street food in the city. Next time you’re in Berlin, give yourself a break for one night from expensive restaurants and indulge in Doner Kababs and Bratwurst (usually found with a few blocks of your hotel). Highly recommended. We also saw some yellow watermelon, but that’s not much of a story.&lt;/p&gt;


	&lt;p&gt;Michael will be here in Berlin till the end of the conference on Thursday—please come say hello if you can at either conference!&lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/382052562" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/9/3/berlin-updates-lonestar-rubyconf</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>pradeep</name>
    </author>
    <id>tag:www.intridea.com,2008-09-01:1028</id>
    <published>2008-09-01T16:40:00Z</published>
    <updated>2008-09-02T14:22:37Z</updated>
    <category term="Blog" />
    <category term="internals" />
    <category term="michael bleigh" />
    <category term="pradeep elankumaran" />
    <category term="railsconf 2008 europe" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/380609168/greetings-from-berlin" rel="alternate" type="text/html" />
    <title>Greetings from Berlin!</title>
<content type="html">
            &lt;p&gt;&lt;img src="http://intridea.com/assets/2008/9/2/IMG_0326.JPG" width="500" /&gt;&lt;/p&gt;


	&lt;p&gt;Chris, Michael &amp; I are at sunny/rainy Berlin, Germany at Railsconf Europe 2008. This year, the conference is being held at the Maritim proArte Hotel right in the middle of Downtown Berlin. Great food and interesting people around—we’re looking forward to speaking at the conference tomorrow and the day after.&lt;/p&gt;


	&lt;p&gt;If you’re attending the RailsConf tutorials, come see Michael &amp; I speak tomorrow (Sept. 2, 2008) about hacking and tweaking the Rails internals for your project’s benefits. We have a nice mixup of slides and livecoding sessions ready, and will be running through some hardcore Rails internals material including the Rails class loader and the ever-confusing Routes implementation.&lt;/p&gt;


	&lt;p&gt;Chris &amp; I will be attending Bratwurst on Rails, so if you would like to meetup, find us there. &lt;a href="http://www.bratwurst-on-rails.com/"&gt;Bratwurst On Rails&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Stay tuned for more coverage of Railsconf Europe and Lonestar RubyConf!&lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/380609168" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/9/1/greetings-from-berlin</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>Chris</name>
    </author>
    <id>tag:www.intridea.com,2008-08-31:990</id>
    <published>2008-08-31T18:06:00Z</published>
    <updated>2008-10-05T23:34:13Z</updated>
    <category term="Blog" />
    <category term="railsconf" />
    <category term="railsconf europe" />
    <category term="speaking" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/379813737/intridea-at-railsconf-europe-and-lone-star-ruby" rel="alternate" type="text/html" />
    <title>Intridea at RailsConf Europe and Lone Star Ruby</title>
<content type="html">
            &lt;p&gt;Intridea will be speaking at two Ruby/Rails conferences this week.  If you're attending either conference, make sure you come by and say hi!&lt;/p&gt;


&lt;h3&gt;RailsConf Europe&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.railsconfeurope.com"&gt;
&lt;img title="RailsConf Europe 2008" src="http://intridea.com/assets/2008/8/31/railseurope2008_spk_125x125.gif" height="125" alt="RailsConf Europe 2008" width="125" /&gt;
&lt;/a&gt;
Pradeep Elankumaran and Michael Bleigh will be presenting their RailsConf Europe tutorial: The Renegade's Guide to Hacking Rails Internals, on September 2nd.&lt;/p&gt;
&lt;blockquote&gt;
This far-reaching tutorial will give Intermediate and Advanced Rails developers a crash course in hacking and extending Rails internals. The topics covered will include: Ruby Meta-programming Techniques; Rails Abstractions, Idioms &amp; Mixins; Rails Structure &amp; Initialization; A Tour of the Rails Class Loader; Plugin Locators and Loaders; Codebase Modularization using Rails Plugins; Extending ActionView Form Builders; Site-wide Settings; and much more…
&lt;/blockquote&gt;

&lt;br /&gt;

&lt;p&gt; Michael Bleigh and Chris Selmer will be presenting a RailsConf Europe talk: Hacking the Mid-End: Unobtrusive Scripting and Advanced UI Techniques in Rails, on September 3rd.  Here's the talk overview:&lt;/p&gt;
&lt;blockquote&gt;
As web application development advances beyond the static page, a whole new field of development is emerging. In the Javascript behavior layer and markup abstracting helpers lie the ’Mid-End’: advanced user interface problems that don’t fit traditional ‘back-end’ and ‘front-end’ models. Explore this new field with case studies and real code such as usage of Lowpro Javascript behaviors to keep the behavior separate from the markup. Learn how to give back-end developers the tools to create simple, repeatable, quality markup through block-accepting helpers. Discuss the methods that allow for rapid development of complex interactions in new and exciting ways and see real examples. Finally, look into the future of the Mid-End and what lies ahead for user interface development.
&lt;/blockquote&gt;
&lt;br /&gt;&lt;br /&gt;

&lt;h3&gt;The Lone Star Ruby Conference&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://lonestarrubyconf.com/"&gt;&lt;img src="http://intridea.com/assets/2008/8/31/LSRC_2008_presenter.png" /&gt;&lt;/a&gt;Adam Bair, Pradeep Elankumaran, and Chris Selmer will be leading a training on the first day of the LSRC.  The training is titled: Rails Refactoring: Triage, Prevention, and Performance.  And the overview:&lt;p&gt;
&lt;blockquote&gt;
Maybe you inherited a mess of a Rails project – or perhaps your own codebase is poorly-tested, not very DRY, or just generally confusing. Worse yet, maybe your Rails site has slowed down to a crawl or even stopped working entirely. Whatever the reason, it’s time to consider refactoring these rough spots and boosting your site’s performance.&lt;br /&gt;&lt;br /&gt;

In the first half of the day we’ll go through real-life examples of (shameful) code we’ve written and refactored, give tips on how and when to start, and show you how to avoid the need for a future refactor. In the second half, we’ll introduce common Rails performance pitfalls, how to diagnose them, and how to solve them. We’ll also talk about other ways to speed up your app.
&lt;/blockquote&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/379813737" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/8/31/intridea-at-railsconf-europe-and-lone-star-ruby</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>Michael Bleigh</name>
    </author>
    <id>tag:www.intridea.com,2008-08-18:753</id>
    <published>2008-08-18T15:43:00Z</published>
    <updated>2008-08-18T15:43:41Z</updated>
    <category term="Blog" />
    <category term="color" />
    <category term="colorist" />
    <category term="colorization" />
    <category term="gem" />
    <category term="open-source monday" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/368199604/colorist-color-manipulation-for-webheads" rel="alternate" type="text/html" />
    <title>Colorist: Color Manipulation For WebHeads</title>
<content type="html">
            &lt;p&gt;While writing color customization code for a recent project, I once again ran into the fact that the existing color gems for Ruby seem to be built for vastly different purposes. To that end, I decided to write a new library for dead-simple manipulation of colors with an emphasis on ease-of-use and being useful for web developers.&lt;/p&gt;


	&lt;h3&gt;Installation&lt;/h3&gt;


&lt;pre&gt;&lt;code&gt;gem install colorist&lt;/code&gt;&lt;/pre&gt;

	&lt;h3&gt;The Basics&lt;/h3&gt;


	&lt;p&gt;To instantiate a color in &lt;strong&gt;Colorist&lt;/strong&gt;, you use a number of methods:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;require 'colorist'
include Colorist

red = Color.new(0xff0000)
red = 0xff0000.to_color
red = "red".to_color
red = "#f00".to_color
red = Color.from_rgb(255,0,0)&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I &lt;code&gt;include&lt;/code&gt; Colorist in these examples, but there’s no reason you can’t leave it namespaced i.e. &lt;code&gt;Colorist::Color&lt;/code&gt; instead.&lt;/p&gt;


	&lt;p&gt;The idea is to give maximum flexibility without making it complicated. Once you’ve instantiated a color, you can figure out a few tidbits about it and perform some basic operations:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;red.brightness # =&amp;gt; 0.299
red.r # =&amp;gt; 255
red.invert # =&amp;gt; #&amp;lt;Color #00ffff&amp;gt;
red.text_color # =&amp;gt; #&amp;lt;Color #ffffff&amp;gt;
red.to_s # =&amp;gt; "#ff0000" 
red.to_s(:rgb) # =&amp;gt; "1.000, 0.000, 0.000"&lt;/code&gt;&lt;/pre&gt;

	&lt;h3&gt;Operations&lt;/h3&gt;


	&lt;p&gt;The real value of Colorist comes in comparison and addition. You can use normal operators with the colors to add them together, subtract them, and compare them based on brightness. You can also do this with the string or numeric representations of colors:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;red = 0xff0000.to_color
green = 0x00ff00.to_color
yellow = red + green
yellow = "red".to_color + "green" 
yellow.to_s # =&amp;gt; "#ffff00" 
red - 0.2 # =&amp;gt; #&amp;lt;Color #cc0000&amp;gt;&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Comparisons work off of the brightness of a given color. You can also calculate the contrast between two colors using the &lt;span class="caps"&gt;W3C&lt;/span&gt;’s formula:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;red = "red".to_color
red &amp;gt; "black".to_color # =&amp;gt; true
red &amp;gt; "white".to_color # =&amp;gt; false
red.contrast_with("green".to_color) # =&amp;gt; 0.500653594771242&lt;/code&gt;&lt;/pre&gt;

	&lt;h3&gt;Get Coloring!&lt;/h3&gt;


	&lt;p&gt;That’s most of the basic functionality, for all of the details you can &lt;a href="http://colorist.rubyforge.org/"&gt;view the RDoc on RubyForge&lt;/a&gt;. The &lt;a href="http://github.com/mbleigh/colorist"&gt;source is available on GitHub&lt;/a&gt; and there is a &lt;a href="http://mbleigh.lighthouseapp.com/projects/15686-colorist"&gt;Lighthouse project&lt;/a&gt; for any bugs or feature requests. Enjoy!&lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/368199604" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/8/18/colorist-color-manipulation-for-webheads</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>Michael Bleigh</name>
    </author>
    <id>tag:www.intridea.com,2008-07-28:680</id>
    <published>2008-07-28T18:45:00Z</published>
    <updated>2008-07-29T14:36:55Z</updated>
    <category term="Blog" />
    <category term="actioncontroller" />
    <category term="fetches" />
    <category term="fetching" />
    <category term="open-source monday" />
    <category term="plugins" />
    <category term="rails" />
    <category term="Rails" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/348675206/fetches-bringing-your-actioncontroller-its-slippers" rel="alternate" type="text/html" />
    <title>Fetches: Bringing Your ActionController its Slippers</title>
<content type="html">
            &lt;p&gt;There is a piece of code that shows up more than 80% of the controllers that I write, and it goes a little something like this:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;class UsersController &amp;lt; ApplicationController
  def user
    @user ||= User.find(params[:id])
  end
  helper_method :user
end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;A simple memoization method to allow me to easily grab the parameter-referred user in all of my actions. If I’m using nested routes, that means I can write two, maybe three of these methods into a controller. I’m basically using slight variations on the same code 20 different times in an application. Since we live in a world that loves to be &lt;span class="caps"&gt;DRY&lt;/span&gt;, I thought, “I can do better.”&lt;/p&gt;


	&lt;h3&gt;Fetches: Memoizing Your Parameter Record Retrieval&lt;/h3&gt;


	&lt;p&gt;Fetches is a simple extension to ActionController that lets you simply define those kinds of fetch methods on a one-line command. For the example above, I can rewrite it like so:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;class UsersController &amp;lt; ApplicationController
  fetches :user
end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;That’s pretty useful! Not only can I call the “&lt;code&gt;user&lt;/code&gt;” method from the controller, but it’s automatically helperized so that I can use the same call in my views. Of course, there are times when more advanced fetching is called for, say using a method other than &lt;code&gt;find&lt;/code&gt; or storing to a different variable name. Let’s take a look at a slightly more complex example:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;# assuming a route like /users/:user_id/articles/:id
class ArticlesController &amp;lt; ApplicationController
  fetches :user, :as =&amp;gt; :author, :from =&amp;gt; :user_id, :using =&amp;gt; :find_by_login
  fetches :article
end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now if I were to call “&lt;code&gt;author&lt;/code&gt;” in any of my controller actions, it would be equivalent to &lt;code&gt;User.find_by_login(params[:user_id])&lt;/code&gt;. Similarly, calling “&lt;code&gt;article&lt;/code&gt;” is equivalent to &lt;code&gt;Article.find(params[:id])&lt;/code&gt;. The “from” option can also take a Proc in case your fetching is not simply a parameter key:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;class UsersController &amp;lt; ApplicationController
  fetches :user, :from =&amp;gt; Proc.new{ |c| c.params[:user_id] || c.params[:id] }
end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;The main advantages to &lt;strong&gt;fetches&lt;/strong&gt; are brevity, clarity and DRYness. I’ve found that this method covers every use case for parameter-based fetching that I’ve needed, and as such provides a much simpler, more readable, and shorter way to fetch models for use in your controller and views.&lt;/p&gt;


	&lt;h3&gt;Installation&lt;/h3&gt;


	&lt;p&gt;Fetches is available as a gem as well as in traditional plugin format. To install
as a gem, add this to your environment.rb:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;config.gem 'mbleigh-fetches', :source =&amp;gt; 'http://gems.github.com', :lib =&amp;gt; "fetches"&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;To install it as a traditional plugin:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;script/plugin install git://github.com/mbleigh/fetches.git&lt;/code&gt;&lt;/pre&gt;

	&lt;h3&gt;Resources&lt;/h3&gt;


	&lt;p&gt;The source is &lt;a href="http://github.com/mbleigh/fetches"&gt;available on GitHub&lt;/a&gt;, the &lt;a href="http://actsascommunity.com/projects/fetches"&gt;Acts As Community project&lt;/a&gt; is there for general discussion, and &lt;a href="http://mbleigh.lighthouseapp.com/projects/14793-fetches/overview"&gt;the Lighthouse&lt;/a&gt; is there for bugs and feature suggestions.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;:&lt;/strong&gt; A commenter requested that the plugin be able to handle creation of new records in addition to fetching existing records. I have added in the &lt;code&gt;:initialize&lt;/code&gt; option to do just this. Examples:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;fetches :user, :initialize =&amp;gt; true # initialize from params[:user]
fetches :user, :initialize =&amp;gt; :author # initialize from params[:author]
fetches :user, :initialize =&amp;gt; Proc.new{ |c| {:login =&amp;gt; c.params[:login], :email =&amp;gt; c.params[:email]} }&lt;/code&gt;&lt;/pre&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/348675206" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/7/28/fetches-bringing-your-actioncontroller-its-slippers</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>Michael Bleigh</name>
    </author>
    <id>tag:www.intridea.com,2008-07-23:665</id>
    <published>2008-07-23T15:05:00Z</published>
    <updated>2008-07-23T15:19:39Z</updated>
    <category term="Blog" />
    <category term="ajax" />
    <category term="error handling" />
    <category term="exceptions" />
    <category term="http" />
    <category term="rails" />
    <category term="Rails" />
    <category term="status codes" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/343653873/using-http-status-codes-for-rails-ajax-error-handling" rel="alternate" type="text/html" />
    <title>Using HTTP Status Codes for Rails AJAX Error Handling</title>
<content type="html">
            &lt;p&gt;A problem that often arises in &lt;span class="caps"&gt;AJAX&lt;/span&gt;-based web applications is how to handle it when things go wrong. The user should be informed of the problem in a descriptive manner, but obviously the internal workings of the application should not be revealed. A generic and useful way to handle this problem is to use &lt;span class="caps"&gt;HTTP&lt;/span&gt; Status Codes to indicate the type of failure, and use the javascript to cope appropriately.&lt;/p&gt;


	&lt;p&gt;In this example I will be using jQuery, but the principles behind are just as applicable to Prototype or any other Javascript library.&lt;/p&gt;


	&lt;h3&gt;Your Friends 403 and 500&lt;/h3&gt;


	&lt;p&gt;Anyone who’s built a Rails site is familiar with the 500 error. That’s the generic exception code thrown whenever something goes wrong in your application. Users should, hopefully, never ever see this when they’re using the site. However, oftentimes there are exceptions or errors that users should experience just as result of improperly filling out fields, permissioning, etc. So how do we differentiate?&lt;/p&gt;


	&lt;p&gt;The Rails &lt;code&gt;render&lt;/code&gt; method has the ability to render out an arbitrary &lt;span class="caps"&gt;HTTP&lt;/span&gt; Status Code (i.e. 500 for error, 404 for not found, and &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"&gt;many more&lt;/a&gt;). The “403 Forbidden” code means that the server understood the request made of it, but is refusing to complete it. This sounds like an apt description for typically “caught” exceptions. So let’s use the 403 code to intelligently handle the exceptions that we &lt;strong&gt;want&lt;/strong&gt; to be seen by the user.&lt;/p&gt;


	&lt;h3&gt;In the controller&lt;/h3&gt;


	&lt;p&gt;Let’s take the simplest example, an invalid record. If you are creating a record via &lt;span class="caps"&gt;AJAX&lt;/span&gt;, a &lt;code&gt;flash[:error]&lt;/code&gt; with a &lt;code&gt;render :action =&amp;gt; "new"&lt;/code&gt; is not going to suffice. Let’s try something like this instead:&lt;/p&gt;


&lt;pre&gt;&lt;code class="ruby"&gt;class ItemsController &amp;lt; ApplicationController
  def create
    Item.create!(params[:item])
    # continue on your merry way if it works
  rescue ActiveRecord::RecordInvalid =&amp;gt; e
    respond_to do |format|
      format.html { 
        flash.now[:error] = "There was a problem creating the item." 
        render :action =&amp;gt; "new" 
      }
      # Render out the validation failed message with a
      # 403 status code.
      format.js { render :text =&amp;gt; e.message, :status =&amp;gt; 403 }
    end
  end
end&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;All right, now that we’ve got it handled on the controller side, it’s time to work some Javascript magic on our &lt;span class="caps"&gt;AJAX&lt;/span&gt; call.&lt;/p&gt;


&lt;pre&gt;&lt;code class="javascript"&gt;
$('a#ajax_link').click(function() {
  $.ajax({
    url: '/items', 
    success:function(data, textStatus) {
      // do success things
    },
    error:function(request, textStatus, errorThrown) {
      // Use the specific message for a 403, but
      // a generic failure message for a 500
      var message = (request.status == 403) ? 
        request.responseText : "An unknown error occurred. Support has been contacted.";
      // Simple alert for example, but you can handle
      // however you want, such as populating an error message
      // div and making it appear.
      alert(message);
    }
    return false;
  });
});
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now when your &lt;span class="caps"&gt;AJAX&lt;/span&gt; request fails, it will render a user-friendly error message if it’s an ‘expected’ error or a generic message if the request fails with an unexpected exception.&lt;/p&gt;


	&lt;p&gt;This is a simple example, but by building a general framework for error expectations you can make it much easier to provide user-friendly error handling that gives them all of the information they need without revealing any of your internal processes.&lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/343653873" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/7/23/using-http-status-codes-for-rails-ajax-error-handling</feedburner:origLink></entry>
  <entry xml:base="http://www.intridea.com/">
    <author>
      <name>Brendan Lim</name>
    </author>
    <id>tag:www.intridea.com,2008-07-21:658</id>
    <published>2008-07-21T16:20:00Z</published>
    <updated>2008-09-21T20:16:24Z</updated>
    <category term="Blog" />
    <category term="blackberry" />
    <category term="iphone" />
    <category term="mobile" />
    <category term="open-source monday" />
    <category term="plugins" />
    <category term="rails" />
    <category term="Rails" />
    <category term="styles" />
    <link href="http://feeds.intridea.com/~r/intridea/~3/341679977/mobilize-your-rails-application-with-mobile-fu" rel="alternate" type="text/html" />
    <title>Mobilize Your Rails Application with Mobile Fu</title>
<content type="html">
            &lt;p&gt;
Let's face it, iPhone interfaces are awesome, but they can only cater to a fraction of the mobile market.   What are you to do if you want to satisfy the rest of the mobile world?  Mobile Fu helps to make this job much easier by automatically detecting mobile devices that access your Rails application. People can access your site from a Palm, Blackberry, iPhone, Nokia, etc. and it will automatically adjust the format of the request from :html to :mobile.  
&lt;/p&gt;
&lt;h3&gt;Learn Mobile Fu&lt;/h3&gt;
&lt;p&gt;
First off, just install the &lt;a href="http://github.com/brendanlim/mobile-fu/tree/master"&gt;Mobile Fu&lt;/a&gt; plugin into your Rails application.
&lt;/p&gt;
&lt;pre&gt;&lt;code class="ruby"&gt;script/plugin install git://github.com/brendanlim/mobile-fu.git 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Start by adding this one line to your ApplicationController.&lt;/p&gt;

&lt;pre&gt;&lt;code class="ruby"&gt;class ApplicationController &amp;lt; ActionController::Base
  has_mobile_fu
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
Once this is in place, any request that comes from a mobile device will be be set as :mobile format. It is up to you to determine how you want to handle these requests by creating the .mobile.erb versions of your views that are to be requested.  Also, I recommend that you setup a before_filter that will redirect to a specific page depending on whether or not it is a mobile request.  How can you check this? 
&lt;/p&gt;

&lt;pre&gt;&lt;code class="ruby"&gt;is_mobile_device? # =&gt; Returns true or false depending on the device
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
You can also determine which format is currently set in by calling the method below.
&lt;/p&gt;

&lt;pre&gt;&lt;code class="ruby"&gt;in_mobile_view? # =&gt; Returns true or false depending on current req. format&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
If you want the ability to allow a user to switch between ‘mobile’ and ‘standard’ format (:html), you can just adjust the mobile_view session variable in a custom controller action.  
&lt;/p&gt;
&lt;pre&gt;&lt;code class="ruby"&gt;session[:mobile_view] # =&gt; Set to true if request format is :mobile and false
                           if set to :html
&lt;/pre&gt;&lt;/code&gt;

&lt;br /&gt;

&lt;h3&gt;What About Custom Mobile Styling?&lt;/h3&gt;

&lt;p&gt;
Different devices need different styling. Don’t worry though, we’ve got this baked in to Mobile Fu (thanks to Intridea's own Michael Bleigh, who created &lt;a href="http://www.intridea.com/2007/12/9/announcing-browserized-styles "&gt;Browserized Styles&lt;/a&gt; for letting me modify his code).  If you are including a css or sass file via stylesheet_link_tag, all you have to do is add _device to the name of one of your files to override your styling for a certain device. The stylesheet that is loaded is dependant on which device is making the request. 
&lt;/p&gt;

&lt;p&gt;
Supported stylesheet override device extensions at the moment are:   &lt;i&gt;blackberry, iphone, mobileexplorer, nokia, palm&lt;/i&gt;
&lt;/p&gt;

&lt;pre&gt;&lt;code class="ruby"&gt;e.g., Accessing a page from a Blackberry.

&amp;lt;%= stylesheet_link_tag 'mobile.css' %&gt;  

Ends up loading mobile.css, and mobile_blackberry.css if the file exists.
&lt;/pre&gt;&lt;/code&gt;
&lt;br /&gt;
&lt;h3&gt;Feature Requests&lt;/h3&gt;
&lt;p&gt;You can check out Mobile Fu's very own project page at &lt;a href="http://actsascommunity.com/projects/mobile-fu/profile"&gt;Acts As Community&lt;/a&gt;.  If you have any problems or would like me to add a certain feature, please create a ticket at &lt;a href="http://blim.lighthouseapp.com/projects/14490-mobile-fu/overview"&gt;http://blim.lighthouseapp.com/projects/14490-mobile-fu/&lt;/a&gt;.  Also, feel free to fork Mobile Fu and make any enhancements you please from its GitHub location at: &lt;a href="http://github.com/brendanlim/mobile-fu/tree/master"&gt;http://github.com/brendanlim/mobile-fu/tree/master&lt;/a&gt;
&lt;/p&gt;
          &lt;img src="http://feeds.intridea.com/~r/intridea/~4/341679977" height="1" width="1"/&gt;</content>  <feedburner:origLink>http://www.intridea.com/2008/7/21/mobilize-your-rails-application-with-mobile-fu</feedburner:origLink></entry>
</feed>
