Friday, October 31, 2008

My Merb DevX article is online

I really like developing with Rails but for some types of web applications Merb is a very good fit. The Merb framework is much smaller than Rails and you have a lot of choices for ORM, template engines, etc.

My DevX Merb article was just published this evening and provides a simple example: rewriting my RubyPlanet.net Ruby news filtering web application.

I find Merb to be complementary to Rails so if you like developing with Rails I think that you will like Merb also.

Wednesday, October 29, 2008

Charming and useful: Tim O'Reilly's conversation with Yossi Vardi

I live in a remote area (2 1/2 hours from the nearest large airport) so I am always on the lookout for great online conference videos to watch - avoid travel and expense when possible. So far, my favorite online video from the European Web2Expo is the conversation with Yossi Vardi who was the founder of ITC and as O'Reilly says is "the godfather of Israeli venture capitalists."

Vardi's business model seems to be choose people who he likes and have a passion for something, and invest in them, treating them fairly. I liked his comment that "business plans are a sub-genera of science fiction", meaning that although you need a long term goal and basic business ideas, you need to be adaptive in how you reach your goals. O'Reilly and Vardi also had good thoughts on the cultural stigma of failure and how that can affect entrepreneurship.

A question from the audience addressed when a web 2.0 company might want to transition from free to paid-for use. Their advice was good: if you can get millions of users then free is a good business model. As Yossi Vardi said, you only then need one paying customer: the person who buys your company. Tim O'Reilly pointed out that new businesses can not count on having a huge number of customers so a good metric is how much real value a web application provides users. I also liked what they had to say about bootstrapping and using money efficiently. Good stuff!

Wednesday, October 22, 2008

Cool: OS X version of Mono 2.0 released

Why would I care? If you read my blog you know that I mostly enjoy developing in Ruby, Lisp, and Java. That said, I tend to get small consulting jobs using a wide range of programming languages and this is one thing that I like so much about OS X: good support for Python, Perl, PHP, Prolog, and yes, now C#. So we all have our favorite programming languages but computer science is mostly about algorithms, understanding operating systems, infrastructure software, etc.

I converted RubyPlanet.net to Ruby + Merb

As I mentioned in my last post, I am making the rewrite of my Java-based RubyPlanet.net web site in Ruby and Merb the subject of a DevX article. I just pushed the code to my server that I use for Ruby and Common Lisp web deployments. By default the site shows recent Ruby news but the more interesting way to use it is to filter the results (for example just show web blog entries containing "JRuby", etc.)

An interesting thing was that both the Java + JSP (which I did about 3 years ago) and the Ruby + Merb versions took about the same amount of time to implement and deploy (about 3 to 4 hours).

Sunday, October 19, 2008

Wow, Merb really is fast

I am re-writing a quick one or two evening hack from 3 years ago (RubyPlanet.net) in Ruby + Merb. I originally wrote this web site in Java - humorous since it is a Ruby blog feed aggregator :-)

I am also using this as the example program for a DevX article on Merb that I am working on. I just did a very quick first cut at the example program for the article (i.e., what soon will be the new RubyPlanet.net) and without doing any caching and hitting a database a lot, I was surprised to see that
ab -n 5 http://localhost:4000/
showed 44 page requests per second. My goal is to get 100 to 200 page requests handled per second (depending on the number of blog entries on the main page) using a single process on my MacBook, and that looks like it may be easy. Deployed on a very low cost VPS with a bunch of other applications, this web app may not be all that fast "out in the field" but I want that to be a limitation of the server, not the code.

Tuesday, October 14, 2008

MerbCamp 2008 wrapup

I am back home after attending MerbCamp in San Diego last weekend. Merb is sort of like a micro-kernel architecture version of Rails: a small core with many plugins (and also complete "slice" mini-apps) that (hopefully) do not depend on each other. The idea is that you only add in what you need. Right now is probably not the time to try Merb for the first time: the developers are working right now to release version 1.0 RC1 (with version 1.0 to follow as quickly as possible). I am currently using Merb 0.9.9 and I am not going to update until I can do a "gem update merb" to move up to the 1.0 APIs. As announced at MerbCamp, the developers want to stabilize the APIs for version 1.0 and then continually work with minor 1.x releases for about one year, then release 2.0 that is likely to not be very backwards compatible with 1.0. Also, 1.x releases will be backwards compatible with 1.0 but not necessarily other 1.y releases. I think that this is a good plan, and matches the way I have used Rails for the last three years: I tend to freeze individual projects against a specific version of Rails, and only do security updates. I plan on using Merb for a semantic web project, and I will probably just stick with 1.0 and not follow the API changes during the 1.x path towards 2.0.

Saturday, October 11, 2008

MerbCamp 2008

I am at MerbCamp - so far an enjoyable conference. Merb is a more modular and more efficient version of Rails. As you might expect, Merb does not yet have the easy 'out of the box' experience that Rails provides. That said, I will probably start to use Merb instead of Rails on some new projects because of performance (run time and much less memory required) reasons.

Monday, October 06, 2008

Swi-Prolog and the Semantic Web

A long time ago, my first useful experiments with using RDF were based on (after trying other tools) using Swi-Prolog's semantic web libraries. Since then, I have also been using other tools (mostly Sesame, some Jena, and some Franz's commercial AllegroGraph product - which I am planning on writing a short 'applications' book on, BTW, after I finish my Java AI book).

I noticed (see linked PDF paper) this morning that the RDFizing and Interlinking the EuroStat Data Set Effort (riese) architecture (diagram) uses Swi-Prolog on the back end. Very cool. The riese web site itself is interesting: human readable web pages with embedded RDFa for semantic web software agents. (Make sure you view page source on your browser.)

Friday, October 03, 2008

Trying to find a single Java web application framework

While I like using Rails for many types of web applications I still look to the Java platform for applications requiring higher run time efficiency and to take advantage of deployment tools and environments.

The problem I am having is that I would very much like to settle on a single framework in order to reduce the effort of staying on top of too many tools and frameworks. In the past I have used JSP, my own custom JSP tag libraries, other people's JSP tag libraries, struts, various ORMs, some work with GWT, some work with Spring, and some with Wicket. I used to use the full J2EE stack, but largely gave that up about 5 years ago.

I would like to be able to invest at most 100 hours of study time, and get back up to speed on a single framework, but I am not sure which to choose. GWT is very tempting but GWT does not cover all of the types of web applications and services that I am likely to be contracted to build. Seam looks good as an integrated framework, but I need to set aside a long weekend to give it a good preliminary evaluation.

Many different frameworks and tools leads to a healthy software ecosystem, but for an individual developer it really is best to choose a small subset of tools to use for business and to set aside a relatively small amount of time (usually evenings and weekends) to keep up with new stuff. I mostly perform many small and medium size development projects for customers, and choosing a single framework like Rails (in the Ruby development space) really helps me stay focused and not waste "spin up" time. I would like to be in the same place in the Java development space.

Wednesday, October 01, 2008

Odd but fun: online avatars

About a year ago a customer asked me to do a quick demo avatar for their Rails-based web site. We decided to use a trial license of OddCast.com's avatar toolkit. The demo was a lot of fun and very simple to implement (a few hours) but my customer decided to not buy the service. Anyway, I just received an OddCast newsletter that contained this link - make sure that you try uploading a picture of a face to animate; also move the mouse cursor around: OddCast avatars act like the old "X eyes" program, looking at the cursor. I used to do development work for both Disney and Nintendo, and the lesson I took away was to make things fun - entertainment is an end to itself. While browser based entertainment has a hard time right now competing with rich clients like World of Warcraft, browser entertainment experiences will keep getting better with JIT compiled Javascript, FLEX, Silverlight, etc.