Posts

Issues with Active Scaffold and Rails 2.1, Solved

If you are looking to upgrade to Rails 2.1 and you are using Active Scaffold , be aware it still has a few rough edges. Make sure you install the Rails 2.1 branch of Active Scaffold: git clone git://github.com/activescaffold/active_scaffold cd active_scaffold git branch -r (just lists the branches) git checkout origin/rails-2.1 (Check out the full thread for Rails 2.1 and Active Scaffold compatibility ) Second, I had to patch vendor/plugins/active_scaffold/lib/extensions/generic_view_path.rb . On line 53, make it look like this: if !@template.controller.is_a?(ActionMailer::Base) && @template.controller.class.uses_active_scaffold? I had to add !@template.controller.is_a?(ActionMailer::Base) && All my tests are now passing! I still love Active Scaffold, even though it's a bit behind the times.

Scalable Counters for Web Applications

So you need to provide a count or counter for your web application, but you want it to scale. The naive approach would be to simply select count(*) from table . That will fail under load because it requires scanning your entire collection. The first question you need to ask is, Do you need exact counts or will approximate counts be good enough? I bet in many situations, an approximate count will be perfectly reasonable. Think about the use case of tracking web hits. When you're talking about millions of hits, what is the difference between 1,000,000 and 1,000,001? Of course, only your business expert will know if approximate or exact answers are required. The decision, though, is crucial because it's the difference between an easy implementation and a hard (costly) implementation. Let's say, for the purposes of this article, that you'll need very close to accurate counts, plus you need to scale a lot . The first step is to pre-calculate the count, and cache the ...

Announcing Whatever Is Fine With Me, The Easiest Friend Polling Site

World , meet Whatever Is Fine With Me . I think you two will really hit it off. Whatever Is Fine With Me is a easy, quick polling or voting application that you can use to find an answer to a question faster than you can sing the Canadian national anthem. The site was created after we found it difficult to make ad hoc decisions among our group of friends. Most famous is "where are we going to lunch?" Of course, the most common answer to that is: "whatever is fine with me." I wanted to create a site that is task focused, fast to use, and with as close to a zero barrier of entry as possible. I am sick of creating accounts on sites, so my first rule was banish account signups. It's still fairly secure, as each page is identified by a very hard to guess URI. Why use Whatever Is Fine With Me? No login required for you or your friends Extremely fast and easy Totally and completely free I'd love to hear feedback, please post any comments to the Whatever Is Fi...

Proposed Enhancements For Web Browsers

I was listening to Muxtape (quite possibly the best user interface for a web application). I use Firefox and I have lots of tabs open. Muxtape is playing the background, in another tab. Sometimes a song comes up on Muxtape that I don't like and wish I could skip, however, I'm in "the flow" and don't want to leave my current tab or application. I'd like to propose an enhancement for web browsers to simplify the interaction with tabs in the background. Web applications should be able to specify a small menu of commands which can be executed from the tab without having to pull that tab into the foreground. I'd love to be able to right-click on the tab and see options such as "Skip", "Pause", "Back", or "Repeat". This context relative menu is specific to each tab, and by clicking on any of the options, a Javascript function would be called. I envision this as easily specified as part of the larger effort of HTML 5...

Google’s App Engine To Force Me To Learn Django

Google App Engine was just announced. Scalable, integrated applications hosted on Google's cloud. I'm particularly interested in the Datastore . Take that, Amazon SimpleDB , Datastore supports ordering result sets! After a tour through the examples, it's safe to say that App Engine is not a direct competitor to Amazon's general purpose cloud offerings, such as EC2 and S3. App Engine is targeted directly at request/response web applications. Amazon's offerings are much more generic, allowing you to run whatever you want on EC2. App Engine's data store is closer to a traditional database than Amazon's SimpleDB. With App Engine, you have a query language that looks and smells familiar. SimpleDB is a distributed hash. Both technologies are useful, but if you're comfortable with SQL, you'll find App Engine's Datastore more friendly. Also interesting is that App Engine has direct support for Google Accounts. Don't want to write Yet Anothe...

Nest Those Rails Resources Or Make Baby Semantic Web Cry

Proper web architecture dictates that a you should " Assign distinct URIs to distinct resources ." And Cool URIs for the Semantic Web states that: There should be no confusion between identifiers for Web documents and identifiers for other resources. URIs are meant to identify only one of them, so one URI can't stand for both a Web document and a real-world object. So we know that a URI should refer to one and only one resource. (Of course, you may have many URIs all referring to the same resource.) So why do so many web sites have URIs like http://www.example.org/myaccount ? That same URI is used to refer to any account in the system, depending on who is logged in. And that makes Baby Semantic Web cry. Why is the baby sobbing? A generic URI like http://www.example.com/myaccount isn't useful on the semantic web, because it's very difficult to make meaningful statements about that URI. Let's go and try. http://www.example.com/myaccount is the account ...

The Semantic Web in Action Article From Scientific American Online and Free

The Semantic Web in Action , originally published in the December 2007 issue of Scientific American , is now online and free. The original article published in the May 2001 issue of Scientific American was certainly due for an update. The original article made a lot of grand promises, while the December 2007 article details current efforts at applying semantic web technologies to real life problems. Check it out if you're interested in how companies are building the semantic web today .