ClickAider
You are currently browsing the Bogle’s Blog weblog archives.

Brad Neuberg: Bookmark and Back buttons support in Ajax applications

In Alex Bosworth’s list of “Ajax Mistakes”:http://sourcelabs.com/ajb/archives/2005/05/ajax_mistakes.html, breaking the back button and breaking bookmarks are two of the worst.

There’s progress afoot. Brad Neuberg presents an “open source Javascript library”:http://www.onjava.com/pub/a/onjava/2005/10/26/ajax-handling-bookmarks-and-back-button.html that


brings bookmarking and back button support to AJAX applications. By the end of this tutorial, developers will have a solution to an AJAX problem that not even Google Maps or Gmail possesses: robust, usable bookmarking and back and forward behavior that works exactly like the rest of the Web.

Sadly, he found it impossible to find a technique that worked with Safari. What a step it would be if the browser makers got their heads together and built a reliable, unified platform for AJAX applications.

Ruby On Spring

At Jobster, we are currently developing a rapid prototyping package that integrates the JRuby dynamic language with the Spring application framework. This post provides an introduction via examples.

The goals of the project are to permit rapid innovation and iteration, full reuse of our existing Spring and Hibernate business logic and objects, and a smooth transition from prototype to production code.

We were inspired by many of the benefits and philosophy of Ruby on Rails, including avoiding configuration files and compilation. Make a change, and you’ll see it immediately. At the same time, if you’re already commited to Spring, the package doesn’t require you to learn a new framework or abandon your existing investment in Spring. The total size of the package is less than a 1000 lines, so it’s small and easily integrated into existing projects.

The key part of the system is a Spring controller that instantiates a JRuby script engine and executes a JRuby script to define the controller and the model. The view is provided by a standard JSP file. If the JRuby controller is replaced by a Java one, the view can be used as-is with no changes.

Hello World

The simplest possible example consists of a JRuby script “hello.rb” which returns a model object and a JSP view “hello.jsp” which uses that model. To try the example, I just need to drop these two files into the “rad” directory on my Tomcat server. No compilation, configuration files, or server restarts are required.

hello.rb
{ ‘greeting’ => ‘Hello world’}

hello.jsp
<html> ${command[’greeting’]} </html>
Notice that rather than defining an explicit controller class, the script simply returns a model object. This is a shortcut for rapid prototyping. Equivilantly, we could have explicitly defined a controller object as follows:

hello.rb
class DemoController
   def getModel(request)
     { ‘greeting’ => ‘Hello world’}
   end
end

DemoController.new()

Reusing Spring Beans

Here’s a more interesting example that reuses business logic from a Spring bean implemented in Java. ($context represents the Spring application context.) Thanks to the magic of JRuby, we can interact and create Java objects just as easily as Ruby ones.

location.rb
locationCalculator = $context.getBean(’locationCalculator’)
{’locations’ => locationCalculator.getPointMatches(’seattle’)}

Hibernate Queries

The package also supports Hibernate. The follow example uses Hibernate to fetch a list of company objects starting with a given letter. Note that the query returns full fledged Java objects with behavior, not just data.

hibernate.rb
s = $request.getParameter(’s’)
companies = $helper.queryHibernate(”from jobster.model.Company where name>=?”, [s])
{’companies’ => companies, ‘label’ => “Companies starting with #{s}”}
The corresponding JSP view uses standard Spring conventions and could be used without changes with a Java controller.

hibernate.jsp
<div class=”left pad”>
<div class=”bold”>Companies: ${command.label}</div>
<ol>
<c:forEach var=”company” items=”${command.companies}”>
<li> ${company.name} <br />
</li></c:forEach>
</ol>
</div>

onSubmit Handlers

Our final example is a simple calculator controller. It implements an onSubmit handler to run business logic (computing the calculation) when the user submits the form and choose a new result view.

calculator.rb
class CalculatorController
   def getModel(request)
     {’x’ => 2, ‘y’ => 2}
   end

   def onSubmit(request, response, form, errors)
     form[’total’] = form[’x'].to_i + form[’y'].to_i
     form[’viewName’] = ‘/rad/calculator_results’
   return form
   end
end

CalculatorController.new()

Download

Read More and Download

I’m switching

In my home, it’s now farewell Windows, hello Mac Mini.

I ordered the high end 80GB/512MB version on Ebay for under $470 including shipping. PC Connection seems to have a lot of good deals on nearly new Macs going these days.

My tipping point was the spyware that I spent weeks scraping off of the PC. The price/performance of the Mini is hard to beat; it’s beautiful, easy to use, Unix based, yada yada yada.

There are two perhaps more ironic factors that contribute to my switch. The first is the effectiveness of terminal server and broadband. If I’m working on a Windows PC, often as not it’s one at work through a terminal services connection.

The second is the ubiquity of Windows notebooks. If I need Windows at home, and for some reason Virtual PC for Mac isn’t enough, I can always use my notebook.

I’m looking forward to the chance to develop some Mac applications for fun; I’ll have to find more about the developer tools that people are using.

Kid friendly and cool: Opus Hotel in Vancouver

I was expecting the Opus Hotel in Vancouver and the surrounding Yaletown neighboard to be cool and lively, but I was pleasantly surprised by their kid friendliness.  (We have two daughters, 3 and 5.) They happily gave us an extended checkout time of 2:30, secluded seating at dinner (for which we were very thankful!), and in general were friendly and welcoming of our children.

The surrounding neighborhood is pedestrian friendly, and has a good grocery store (the urban market) as well as great restaurants and shops. You see lots of families with kids and strollers.

The view of the False Creek waterfront is beautiful and there is an extensive set of walking and biking paths as well as parks and playgrounds.

The Roundhouse community center features a historic steam locomotive which kids love; it was the first locomotive to cross Canada.
Steam Engine

Nearby is Stanley Park and the “Vancouver Aquarium”:http://www.vanaqua.org/home/, which puts the Seattle Aquarium to shame with its exhibits.

Tagging and Search History in the Google Toolbar: coming soon?

If you haven’t seen it yet, you should give “Google Personalized Search”:http://www.google.com/psearch/help.html a try.

I believe Google is likely combine Google Personalized Search with new Google Tolbar and Google Desktop search features to compete with the “Flock”:http://www.flock.com value proposition.

The race is on to push more and more browser state out into the cloud from the PC, and to more seamlessly blur browsing, tagging, and authoring.

Personalized Search remembers everything you’ve searched for and every hit you’ve clicked on. You can bookmark clicked hits and add “labels” (essentially tags) for bookmarks. Both bookmarks and labels are roaming and available on any PC you log in on.

The shortcoming of Google personalized search is that only things that you do in Google are available for bookmarking or tagging. Google is almost certain address these shortcomings via the Google Toolbar.

I could also imagine Google extending their existing “Blog This” button with something like Flock’s shelf. If they do so, they’d better add support for something other than Blogger. This is high on my list of borderline evil, Microsoftish sorts of things that Google does.

It will be interesting to see how Google’s effort stacks up against a new client app like Flock. The Achilles heel of Flock could be that they can’t track the Firefox releases quickly enough– think of all the security updates they have to follow. Also, Flock could be big and complex enough that they have too many bugs or too many security issues of their own to be nimble.

Berry 411 Local Search in the UK

I’ve added beta support in “Berry 411″:http://thebogles.com.Berry411.htm for UK addresses. To make this work, set your city name to be city plus postal code and your “state” to be UK.

Support is a little shaky at this point– white pages don’t work, due to limitations of Google phonebook, and driving directions aren’t reliably available– but it’s a start.

Bill Burcham on Baby Steps to Synergistic Web Apps

I have long lamented the fact that even simple things like copying and pasting addresses don’t work well in the browser. This is really symptomatic of a general issue– it’s difficult to move structured information between web applications.

Bill Burcham has a must-read post called Baby Steps to Synergistic Web Applications in which he proposes an AJAX approach to solving the “every webapp is an island” problem. He begins with the low hanging fruit of creating a “web cliboard” to facilitate information transfer across webapps

The proposed approach shifts interpretation of the cut and paste verbs to the server, and stores multiple domain specific representations of the data to be copied on the client clipboard in a simple XML format.

Just like client applications, web applications can choose the clipboard format that they best understand.

In addition to representing values, the web clipboard can include links to resources that live in the cloud, eliminating the need to copy all of the data to the client clipboard.

The part I need to understand better is to what extent if any this proposal requires browser changes– can copy and paste be intercepted in Javascript in a cross browser fashion? (I know how to do this in Internet Explorer but not in a standards compliant fashion.). In any event the changes required aren’t profound.

To push this forward we need adoption by a pair of webapps for which a web clipboard for structured data is a compelling addition. More brainstorming is needed about what these apps might be.

Flock Developer Preview is now available

Flock is now available for developer download– thanks to John for picking this up.  There are a lot of rough edges and bugs but it definitely has potential.  I’ll try to look past some of these flaws and consider the Platonic ideal of what Flock might become given great execution.

The part I’m most excited about is that they’ve integrated blog authoring into the browsing experience. Every blog post is an assemblage of quotes, links, and images from different and Flock has shelves and toolbars that make assembly much easier. The ideal Flock may never as be as fully featured as standalone editors like Rocketpost, but the deep integration with the browser could make up for this.  (Rocketpost crashed when I tried to post to my blog, and costs $150, so I don’t think I’m going there.)

Below is a collection of excepts regarding Flock’s blogging features from 13 things you can do from Flock, collected using the Shelf.

With Flock, blogging is a fully integrated part of the Web. Flock includes a blog editor that works with WordPress, Movable Type and Typepad (and shortly also Live Journal) and Blogger… The Shelf is a scrapbook for interesting web content that you want to blog about later… With
Flock, blogging Flickr pictures is easy. You can drag and drop pictures
from our integrated Flickr topbar right into your blog post… You can easily blog interesting web content with Flock, in just a few clicks.

One thing that would incredibly cool is something like the Wordpress “Edit” link which is displayed next to my posts could invoke the Flock editor instead of the wordpress page.   Given their deep  integration with the browser, Flock could make something like this work.

The other features that leap out at me are favorites that live in the cloud, built in del.icio.us tagging, and full text search integrated with favorites. There are Firefox extensions that offer similar functionality, but if these features are deeply integrated into the browser I believe they can be more compelling.

Flock comes with the open source Clucene search engine built in. Each time you visit a web page, it indexes all the content on that page so you can easily retrace your steps later.. Pages you’ve starred as Favorites float to the top when you do a History Search… Integrated Del.icio.usTagging… Flock favorites are stored online, and they’re shared, searchable, and tagged. Simply click the Star in the URL bar and you’ve flagged a page.

I wish Flock great success, though several people I’ve spoken with express some concerns regarding Flock’s business case.  Is keeping the lights on in the style of Opera enough to continue to attract the interest of VCs and top notch talent, or will Flock become a pure open source project in the style of or merged with Mozilla Foundation?  (Not that there’s anything wrong with that, of course.)

..what’s changed over the past few years is that online referral- and search-related business models have matured dramatically and in fact power big chunks of the Internet.  Huge businesses (like AOL Search) and thousands of niche online ventures alike are built around Google and Yahoo’s adword programs.  These same business models are now providing the financial footing for web browsers.  Opera’s CEO recently explained that his company was able to release the browser for free thanks to an expanded search sponsorship arrangement with Google.  The Mozilla Foundation has alluded to search related business arrangements and has created a for-profit subsidiary.  These success stories show that even simple search “distributionâ€? integration points in the browser can provide a solid financial footing for browser providers, and do so in a way that enhances the user experience (remember, the search box was added to Firefox because users needed a faster way to search online).  In sum, we’re quite comfortable that, if enough users choose our browser, we can keep the lights on here at Flock without violating user’s privacy or compromising the user experience

Gratuitious Photo Section

For no particular reason, and because Flock makes it easy, here are a few shots from last years Jobster Halloween party, which I dragged from the Flock toolbar.

Flickr Photo
Flickr Photo

Web 2.0 Business Models: Learning to love the middleman

In “Web 2.0 Needs Business Model 2.0″:http://earlystagevc.typepad.com/earlystagevc/2005/08/web_20_needs_bu.html Peter Rip argues, as have others, that the Web 1.0 business model doesn’t work in Web 2.0.


The big enabler [of Web 2.0] is the atomization of web content and the growing ability to query by machine rather than by humans…

Leaders (Google, Yahoo, MSN) in the consumer Internet have begun publishing simple procedural descriptions of how their web site can be invoked by a machine, rather than a human. And some interesting mashups have resulted.

But there is a problem and both Google and Yahoo know it. Both restrict the use of their APIs to a small number of uses per day and strictly for non-commercial purposes. …That is because the value driver is no longer the human action, at least not directly.

One action and multiple participants, some of whom I will never visit directly. The Web 1.0 business model doesn’t work in Web 2.0.

So far so good. But this absolutely does not mean Web 2.0 is entering into uncharted business territory. Every physical widget you buy in a brick and mortar store is an remarkable “mashup” of components delivered at low cost through a complex, worldwide network of suppliers, manufacturers, markets, middlemen, resellers, and retailers. Everyone gets paid at every stage, and no technical wizardry or brilliant flashes of insight are required to make this happen.

The fact that we think monetizing mashups is hard in Web 2.0 is a sign of the immaturity in the online services marketplace compared with physical marketplaces, nothing more. For example, Peter discusses the challenge of allocating revenue across the value chain for mashups.


A variation on the advertiser-pay model would be to allocate revenue from a Cost-per-X (click, action, call, etc.) event across the mashup production chain. But this still has a serious problem. The problem is one of allocation across multiple players. If a mashup has 3 websites and results in a $1.00 action, how should the $1.00 be allocated? In absolute amounts or pro rata? The absolute sum may exceed $1. The pro rata model is subject to gaming by sites setting artificially high prices.

When I buy a car or a magazine, traditional markets have no problem whatsoever allocating the purchase price across a vastly more complex value chain. It would bizarre to talk about a parts supplier “gaming the system” by charging too much for parts. Unless the supplier had a monopoly, manufacturers would go elsewhere for their parts. If the cost of the parts exceeds the whole of the revenue, then the mashup isn’t adding enough value, or the market will push the price of the parts down.

With the right information services marketplace, redistributing viable advertising revenues across information supplier would be no problem.

This immaturity of the online services marketplace takes several forms: a lack of automation for the web services commerce, a scarcity of information suppliers, and a lack of transparency of web services pricing.

Web services have been designed to participate in a high volume of information transactions, but not for a high volume of economic transactions. Imagine if an online bookseller allowed you to browse their catalog of books but then required you to call a bizdev employee every time you actually wanted to buy a book! This is how many web services work today if you want to use them for profit– even Google’s search API. (Amazon’s API, of course, is an exception, because the data helps sell their product.)

Web 2.0 needs online web services that are designed with an ecommerce model for purchasing their services. I should be able to go to a supplier of online maps, enter my credit card information, and use those maps for any reason I want in my mashup, paying per hit to the service

I should be able to choose from dozens or hundreds of different online information services for web search, maps, and so forth, versus the near monopoly power held by the key players today.

I should have transparency of prices– I should be able to go to a search engine and compare the prices and rating for different information sources.

None of this is rocket science. It just requires treating web services like a business instead of a research project, and designing them accordingly.

It also requires participants in the economy to stop trying to own the entire value chain. That approach didn’t scale in the traditional economy, and it won’t scale online.

Web 1.0 treated the middleman as something to be eliminated. Web 2.0 must learn to love middlemen and find ways to efficiently incorporate them into the online economy. This applies whether equally well whether you’re trying to revamp the online hiring marketplace or sell books.

From Pay to Post to Pay for Performance

Jason Goldbergs blogs on his “predictions for the future of online job advertising”:http://jobster.blogs.com/blog_dot_jobster_dot_com/2005/10/the_not_so_dist_2.html, predicting a shift from pay for posting to pay for performance, similar to what has happened in other areas of online advertising.

Job advertising is fundamentally different from other kinds of advertising, and requires a version of pay for performance that is technically much more sophisticated than simply counting clicks.

When you’re selling widgets, any customer’s money is good. Some percentage of clicks will statistically turn into customers, so pay per click is a decent proxy for pay for performance. By tuning the keywords it uses to sell its product, a company can maximize the conversion of clickthroughs to sales.

Jobs are totally different. Too many “buyers”– too many people inquring about the job– are a bad thing, not a good thing, especially if those applicants aren’t qualified for the job. There is a cost associated with rejecting applicants who aren’t a good fit for the company.

The challenge in the shift to a pay for performance model for job postings is that counting clicks isn’t enough– pay for performance means paying for qualified prospects. To do this successfully, a product needs to be able to predict and measure quality, a hard thing to do. It needs to be integrated into the processes and systems of companies recruiting department, so that it can successfully “close the loop” on pay for performance.

Companies spend a lot of time and money fighting resume spam and qualifying leads. The service that takes some of this load off of the company while preserving as much as possible of their existing systems and processes gets to claim a proportionate share of this spend.