Feb 22

Drinking the Ribena rather than Koolaid

Ruby, Tech, Web Frameworks 341 Comments »

There is yet another blog discussion about Ruby on Rails vs. Java web frameworks.

I think you find this type of discussion all over with the generic version being:

Technology X is simpler than Y so it either:

  • Is too slow
  • Is TOO simple
  • It doesn’t scale
  • It’s dad got beaten up by my dad

We are getting some of that at the moment. David Geary of JavaServer Faces fame (and fellow NoFluffer), and Matt Raible started on the rants.

Then the Rails creator, David Hannson came back at them.

It is interesting that David isn’t sure that showing the scaffolding piece in his demo was a good thing. Scaffolding lets you do a quick “there is my database, give me active record access to it now please”. You will end up with actions/views for your model at this point, which is nice for getting started / prototyping, or for simple “Naked Object” access for admins. Even David admits thats it probably shouldn’t be used in ‘real projects’.

So, my view on this?

Is Rails too simple?

It is simple in a good way. You can get started very quickly. You can incrementally tweak your architecture and extend Rails where needed BUT NOT BEFORE. I can start with scaffolding and then move to handling the model more myself. Basically everything is there for you to hook in.

Is Rails too slow?

Although I haven’t had the pleasure in deploying a Rails solution to a high end site, I have never had any problems, sites that run it are speedy and consistent, and there is NO REASON why Rails would force a slow application. Of course, a badly developed application that uses Rails could easily be slow (as with everything).

Can Rails Scale?

Web sites can easily scale as long as you have written your application in a way that can handle scalability. Ruby, and/or Rails, has nothing implicit about it which says “this can’t scale”. I know that the Java camp tends to think that it is the only scalable solution for “enterprise” apps, but it isn’t ;)

Rails isn’t the be all and end all of web frameworks. There are always going to be pro’s and con’s between two frameworks. I personally sometimes like rich components (a la tapestry), although there is nothing stopping you from building these components that you could reuse in Rails.

Feb 22

Are you technosexual?

Tech 1 Comment »

Are you technosexual?

Dictionary

technosexual (tek.noh.SEK.shoo.ul) n. A male with a strong aesthetic sense and a love of technology.

Feb 22

Are you technosexual?

Tech 1 Comment »

Are you technosexual?

Dictionary

technosexual (tek.noh.SEK.shoo.ul) n. A male with a strong aesthetic sense and a love of technology.

Feb 21

Struts Flow: Continations come to Struts

Java, Tech, Web Frameworks 6 Comments »

Wow, Struts is a huge project:

Today, Struts is comprised of nine subprojects: Core, Taglib, Tiles, El, Faces, Scripting, Applications, Shale, and (now) Flow.

The Struts team just announced Struts Flow which brings a continuations based approach to web flows.

This is interesting stuff, and we have seen continuations popup in other communities such as Ruby, Perl, and Smalltalk.

Seaside was the first web framework that I saw with continuations, and it intrigued me from the beginning. It really does make sense to have the users ’session’ to be the core. In fact, on our projects, we put a lot of functionality there (even if it just ties into the business layers etc).

It will be interesting to see how Struts Flow gets adopted.

Take a look at an example of putting the logic in one workflow, even though web pages are being sent around to get input from the user:

function main() {

var random =  Math.round( Math.random() * 9 ) + 1;
var hint = "No hint for you!"
var guesses = 0;

while (true) {

// send guess page to user and wait for response
forwardAndWait("failure",
{ "random"  : random,
"hint"    : hint,
"guesses" : guesses} );

// process user's guess
var guess = parseInt( getRequestParams().guess );
guesses++;
if (guess) {
if (guess > random) {
hint = "Nope, lower!"
}
else if (guess < random) {
hint = "Nope, higher!"
}
else {
// correct guess
break;
}
}
}

// send success page to user
forwardAndWait("success",
{"random"  : random,
"guess"   : guess,
"guesses" : guesses} );
}

View the Announcement

The Apache Struts team is pleased to announce the adoption of its latest subproject, Struts Flow, a continuations-based approach to complex web workflows. Struts Flow originated at the struts.sf.net project and has been formally adopted now as a Struts subproject. Struts Flow is a port of Apache Cocoon's Control Flow to Struts to allow complex workflow, like multi-form wizards, to be easily implemented using continuations-capable Javascript and eventually Java.

Today, Struts is comprised of nine subprojects: Core, Taglib, Tiles, El, Faces, Scripting, Applications, Shale, and (now) Flow. Struts Flow is different from Struts Scripting/BSF as where Scripting brings any BSF-supported scripting language to Struts Actions, Struts Flow works on redefining the traditional Model 2 state-driven workflow into simplified scripts whose execution spans multiple requests. Currently, the Rhino engine, a Javascript implementation, is used to provide continuations support, but with the maturation of Jakarta Commons Javaflow - http://jakarta.apache.org/commons/sandbox/javaflow - a Java-based continuations implementation, Java will soon be supported as well.

For more information, visit the Struts Flow website at:
- http://struts.apache.org/flow
Feb 21

Amazon Prime: Subscription for Shipping

Tech 5 Comments »

Amazon has come up with Amazon Prime, which is a yearly subscription to a program which gives you:

  • Free Two-Day Shipping on over a million in-stock items
  • Overnight Shipping for only $3.99 per item
Feb 21

Browing Flickr on TiVo

Tech, TiVo No Comments »

TiVo has always been good at cultivating the hacker community. They took it to another level when they released the Java SDK with the Home Media Engine.

Already really cool software is coming up, including a way to browse Flickr (the photo sharing site).

As interesting extensions like this come about, I will be able to spend more time using TiVo as the interface, and hence more time on my TiVo.

Feb 21

CharSequence: one of those quiet gems

Java, Tech No Comments »

When is a String not a String?. Simon Harris has brought up the nice CharSequence interface that both Strings and StringBuffers implement.

This means that we can pass around the interface and let us give the implementation later.

Maybe it would be nice to have had ‘String’ be an interface itself, and when you coded: String foo = “bar” it would create an ImmutableString which implements String. Then we could come up with crazy implementations of String :)

However, we would run into a lot of security concerns, as people could sneak in BackdoorStringWhichEmailsMeYourPassword.

Anyway, CharSequence has been a very useful interface for me too, for those cases where I really do want to encapsulate multiple impls.

Feb 21

CharSequence: one of those quiet gems

Java, Tech No Comments »

When is a String not a String?. Simon Harris has brought up the nice CharSequence interface that both Strings and StringBuffers implement.

This means that we can pass around the interface and let us give the implementation later.

Maybe it would be nice to have had ‘String’ be an interface itself, and when you coded: String foo = “bar” it would create an ImmutableString which implements String. Then we could come up with crazy implementations of String :)

However, we would run into a lot of security concerns, as people could sneak in BackdoorStringWhichEmailsMeYourPassword.

Anyway, CharSequence has been a very useful interface for me too, for those cases where I really do want to encapsulate multiple impls.

Feb 21

Eclipzilla: Taking on the world

Tech 4 Comments »

It is always interesting to see the ‘Emacs effect’. I fell under this spell myself with emacs back in the day. It slowly assimilated all of the applications that I used, until I checked email with it (GNUS), read news with it, ran my shell within it, and washed my dishes with it.

I see a little of this happening with two other guys on the block. When you look at Mozilla, you are definitely starting to see a platform. It isn’t “just a browser”. You have email, calendar, address book, FTP client, Chat client, weather watcher, etc etc.

Then there is Eclipse, which mimics Emacs, in the sense that its birth was from an IDE. Although the plugins seem to be mainly around development, they are growing and growing into other areas.

When will see Mozilla Eclipse (the mozilla extension for eclipse) or Eclipse Mozilla (the eclipse plugin for mozilla). Then there will be one tool to rule them all ;)

Feb 19

GMail released to all. Now time for IMAP? :)

Google, Tech 4 Comments »

Google has finally released GMail to the masses.

There are aspects about it that I really like (and have talked about before). The main feature is the simple tagging. Folders got taken from the file system, and really break down with email (or with the file system in some cases… hence WinFS).

One frustration is just that I wish there was a rich client, and my email was stored offline. One simple way to get around that is to use their POP access, and use a rich client on that when needed (e.g. on a plane).

This is a bit of a pain, as you are using two systems now. What would be really cool, is to be able to have a smart IMAP integration on their end, so tags became folders. Then, with smart filters on the server side tagging mail, the imap client gets a nice view on things!

Oh, and I *really* want to be able to set the From: address so I can use gmail with my own domain…. a la Y! Mail Plus