Rick Bradley
2005-Sep-21 19:03 UTC
a pictorial contrast between Java web development and Rails
I''m project manager for a large medical industry project. Due to outside collaborations we''ve had Java (+EJB+Struts+Hibernate+etc.) thrust upon us for this project. The political tides are becoming choppy and now there''s a strong political and technical case building for moving from the Java stack to Rails. Our project technical lead did a quick conversion of a vertical slice of the Java version of the project over to Rails and found a 20:1 reduction in code size. I''m a Rails fan but even I was surprised at the difference in code size. This is code written by long-time Java programmers, converted to Rails by a guy who knew a little Ruby and learned Rails over the course of a few days. Anyway, he wrote a quick commentary on his personal site that I thought some of you might find amusing, even if just because of the other Java web vs. Rails comparison he conducted -- and was able to capture for the rest of us to see: http://www.garbett.org/?q=node/25 Now that''s a savings that I haven''t heard anyone else talking about :-) (btw, thanks to Dave Thomas, Andy Hunt, DHH and the others for making this possible!) Rick -- http://www.rickbradley.com MUPRN: 599 | well specified and random email haiku | well known. File and Edit | menus, and all that.
Jarkko Laine
2005-Sep-21 19:55 UTC
Re: a pictorial contrast between Java web development and Rails
On 21.9.2005, at 22.03, Rick Bradley wrote:> > Now that''s a savings that I haven''t heard anyone else talking > about :-) > >But the Java pile clearly has scaled taller. And what''s Fowler doing in there, anyway? //jarkko _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Alex Young
2005-Sep-21 20:05 UTC
Re: a pictorial contrast between Java web development and Rails
Jarkko Laine wrote:> On 21.9.2005, at 22.03, Rick Bradley wrote: >> >> Now that''s a savings that I haven''t heard anyone else talking about :-) > > But the Java pile clearly has scaled taller.They''re both installed on a common platform. The Java pile''s just loading it more heavily. -- Alex
Rick Bradley
2005-Sep-21 20:13 UTC
Re: a pictorial contrast between Java web development and Rails
* Jarkko Laine (jarkko-k1O+Gnc6WpmsTnJN9+BGXg@public.gmane.org) [050921 15:10]:> >Now that''s a savings that I haven''t heard anyone else talking > >about :-) > > But the Java pile clearly has scaled taller. And what''s Fowler doing > in there, anyway?Ah, so there is an area where Java truly does scale easier than Ruby/Rails! As for Fowler, I''ll have to ask Shawn, but I''m betting his take is that you don''t have to implement Fowler''s various Enterprise patterns in Rails -- just read about them in the Rails book, as they''re already implemented.(?) Rick -- http://www.rickbradley.com MUPRN: 298 | you copy and paste random email haiku | the URL that the line-break | doesn''t cut the URL short.
Thomas Fuchs
2005-Sep-21 21:51 UTC
Re: a pictorial contrast between Java web development and Rails
or do: def fmtString(format,number) p format.gsub(/#/){ number.slice!(0,1) } end which produces exactly the same result as: def fmtString(format,number) format.split('''').each {|c| print(c==''#'' ? number.slice!(0,1) : c) } print "\n" end I''m sure there are even more concise ways do to that. Am 21.09.2005 um 21:03 schrieb Rick Bradley:> I''m project manager for a large medical industry project. Due to > outside collaborations we''ve had Java (+EJB+Struts+Hibernate+etc.) > thrust upon us for this project. The political tides are becoming > choppy and now there''s a strong political and technical case building > for moving from the Java stack to Rails. > > Our project technical lead did a quick conversion of a vertical > slice of > the Java version of the project over to Rails and found a 20:1 > reduction > in code size. I''m a Rails fan but even I was surprised at the > difference in code size. This is code written by long-time Java > programmers, converted to Rails by a guy who knew a little Ruby and > learned Rails over the course of a few days. > > Anyway, he wrote a quick commentary on his personal site that I > thought > some of you might find amusing, even if just because of the other Java > web vs. Rails comparison he conducted -- and was able to capture for > the rest of us to see: > > http://www.garbett.org/?q=node/25 > > Now that''s a savings that I haven''t heard anyone else talking > about :-) > > (btw, thanks to Dave Thomas, Andy Hunt, DHH and the others for making > this possible!) > > Rick > -- > http://www.rickbradley.com MUPRN: 599 > | well specified and > random email haiku | well known. File and Edit > | menus, and all that. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Rich Morin
2005-Sep-21 22:08 UTC
Re: a pictorial contrast between Java web development and Rails
At 11:51 PM +0200 9/21/05, Thomas Fuchs wrote:>I''m sure there are even more concise ways do to that.Seeing the kinds of cruft that the Perl community has endured in pursuit of ultra-terse code, I implore you not to go there... -r -- email: rdm-go8te9J4rpw@public.gmane.org; phone: +1 650-873-7841 http://www.cfcl.com - Canta Forda Computer Laboratory http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc.
Jay Levitt
2005-Sep-22 03:35 UTC
Re: a pictorial contrast between Java web development and Rails
In article <20050921201300.GQ21383@rerun>, rick- xSCPAUIMY+WN9aS15agKxg-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org says...> As for Fowler, I''ll have to ask Shawn, but I''m betting his take is that > you don''t have to implement Fowler''s various Enterprise patterns in > Rails -- just read about them in the Rails book, as they''re already > implemented.(?)Also: I''m only partway through Enterprise Patterns, but I stopped reading the Agile patterns halfway through, as there''s simply no need for the vast majority of them in Ruby. They''re just "workarounds" (adaptations, really) for the restrictions imposed by static typing and Java''s style of polymorphism. Ditto for many of the GoF patterns. I wouldn''t be surprised to find the same is true of Enterprise Patterns, as many are just aggregations of the simpler patterns. -- Jay Levitt | Wellesley, MA | I feel calm. I feel ready. I can only Faster: jay at jay dot fm | conclude that''s because I don''t have a http://www.jay.fm | full grasp of the situation. - Mark Adler
Scott Barron
2005-Sep-22 03:52 UTC
Re: a pictorial contrast between Java web development and Rails
On Sep 21, 2005, at 5:51 PM, Thomas Fuchs wrote:> or do: > > def fmtString(format,number) > p format.gsub(/#/){ number.slice!(0,1) } > endgsub taking a block is one of the most beautiful things you will ever cast your eyes upon. A thing of beauty. Watch it here in glorious action ... -- Scott Barron Lunchbox Software http://lunchboxsoftware.com http://lunchroom.lunchboxsoftware.com http://rubyi.st
David Heinemeier Hansson
2005-Sep-22 07:38 UTC
Re: a pictorial contrast between Java web development and Rails
> gsub taking a block is one of the most beautiful things > you will ever cast your eyes upon. A thing of beauty. > Watch it here in glorious action ...It''s incredibly useful for even larger things. Here''s the linkize method from the forthcoming i2 wiki: def linkize(body, existing_titles) body.gsub(Version::PAGE_LINK) do title = $1 if existing_titles.include?(title) link_to(title, page_url(:page_title => title), :class => "existingWikiWord") else content_tag("span", title + link_to("?", page_url(:page_title => title)), :class => "newWikiWord") end end end God, I love Ruby. -- David Heinemeier Hansson http://www.loudthinking.com -- Broadcasting Brain http://www.basecamphq.com -- Online project management http://www.backpackit.com -- Personal information manager http://www.rubyonrails.com -- Web-application framework