<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-18128273</id><updated>2011-04-21T16:31:52.370-07:00</updated><title type='text'>..It is only yourself that bends</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18128273.post-115167963748123236</id><published>2006-06-30T07:17:00.000-07:00</published><updated>2006-06-30T08:00:37.556-07:00</updated><title type='text'></title><content type='html'>Crossing over&lt;br /&gt;&lt;br /&gt;A lot of different approaches are turning up for what just started out as D/XHTML and AJAX. I've been watching over the last year and more and more 'grid bag' layouts are making they're way to the front. This, of course, leads to basically being able to write webapps like one would do on a fat app. A lot of people are excited about this.&lt;br /&gt;&lt;br /&gt;I just finished watching a &lt;a href="http://weblog.infoworld.com/udell/2005/05/25.html"&gt;TIBCO AJAX&lt;/a&gt; demo. These guys seem to have a really good solution. &lt;span style="font-weight:bold;"&gt;If&lt;/span&gt; you're a corporate developer. Corporate developers were a term I first heard when working with the BEA sales team on Weblogic 8 (I think). These were the guys that would need to crank out an &lt;span style="font-style:italic;"&gt;app&lt;/span&gt; after they're done with their usual spreadsheet duties or whatever mundane office task they were in charge of (I'm not making this up).&lt;br /&gt;&lt;br /&gt;So after even just one minute of watching the TIBCO demo I was immediately reminded of that &lt;span style="font-style:italic;"&gt;enterprise&lt;/span&gt; mindset. A gazillion features and a sales pitch. In the end, after the cash has changed hands, the &lt;span style="font-style:italic;"&gt;developer&lt;/span&gt; starts reading through a mound of manuals (mostly online to curb costs, so they're even harder to read) just to get a &lt;span style="font-style:italic;"&gt;simple&lt;/span&gt; SOAP zip code demo working (btw, SOAP is anything &lt;span style="font-weight:bold;"&gt;but&lt;/span&gt; simple).&lt;br /&gt;&lt;br /&gt;The point of this exercise seems to be all about the sale of the &lt;span style="font-style:italic;"&gt;possibilities&lt;/span&gt; to do anything with a toolkit - looking for a problem to solve in other words. In the enterprise, this is usually an ok thing just because of the layers of people and departments. Some people prefer that and are comfortable in that role and that's good for them.&lt;br /&gt;&lt;br /&gt;HTTP is a pretty light protocol. It's not perfect, but it's survived because it's easy and doesn't get in the way a lot. If you've ever worked with SOAP, you'd know that it's not lightweight or necessairly easy. It tries to accomplish a lot (and does), but at the expense of complexity. I recently worked with a client on implementing a service that uses Microsoft's MapPoint to find nearby addresses. Since they're using Java, I decide on using Axis to generate my stubs and provide the magic layer. When the stubs were done, there were over 150 classes that Axis generated and some classes were thousands of lines long. When the Axis libraries were not compatible with the app server the service was to be deployed on, I gave up and coded everything by hand. Brittle, but it worked.&lt;br /&gt;&lt;br /&gt;I know a lot of people use SOAP but I have to ask is it totally necessary? Do we need these big complex systems just to do simple things? Should I use some new whiz bang tool to generate some JS grid bag layout, or use the D/XHTML/CSS standard that already exists and augment it with JS?&lt;br /&gt;&lt;br /&gt;Working in the Internet business sector vs. consumer, there's always the driving force to offer more complexity vs. simplicity. It's a given that in business, more is better. Doesn't make for a better product, but when someone asks "ooh, and what about this?", you can pretty much, yah, we got that. Regardless if it'll ever be used or not; the kitchen sink and the kitchen.&lt;br /&gt;&lt;br /&gt;When the business world catches up with the technologies that first surfaced in the consumer space, things change. Over the last few months I've noticed more and more 'Business 2.0' terms appearing in reviews, on blogs, and even major web sites. It's definitely coming for sure and with it the need for complexity and layers. Looking back at the TIBCO demo, they pride themselves in creating an entire layer - that handles &lt;span style="font-weight:bold;"&gt;everything&lt;/span&gt; you can think over - &lt;span style="font-style:italic;"&gt;on top&lt;/span&gt; of the browser. Never mind that events in JS, form widgets, XMLHttpRequest, etc... already &lt;span style="font-style:italic;"&gt;exist&lt;/span&gt; in IE and FF. I suppose that's besides the point as there's nothing to sell in just browsers. But in another abstraction layer, there is.&lt;br /&gt;&lt;br /&gt;And ultimately that's how I view a lot of the new tech coming out on the client side. I saw it firsthand with BEA and their relentless pusing of gigantic EJB servers when all some clients really needed was maybe a small interactive site (Microsoft is guilty of this as you still had to buy into their whole stack). Comes down to the whiz bang sales pitch. AJAX apps are not hard to do. All they require is a real focus on what problem you want to solve. The pieces are already there in standardized form - D/XHTML, CSS, XML, etc... Many &lt;span style="font-style:italic;"&gt;simple&lt;/span&gt; toolkits already exist to assist in this and in a lot of cases, no JS is even required and coding with 'frameworks' like Rails or Django makes Web 2.0 apps really easy. And even fun. Imagine that in the enterprise shop.&lt;br /&gt;&lt;br /&gt;So my final point is this: watch out for the sales pitch. If it's too good to be true and does everything under the sun and you buy into it, then you probably have a lot of &lt;span style="font-weight:bold;"&gt;long&lt;/span&gt; hours trying to make an ant hill out of a mountain.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-115167963748123236?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/115167963748123236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=115167963748123236' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/115167963748123236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/115167963748123236'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2006/06/crossing-over-lot-of-different.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-114908719898049853</id><published>2006-05-31T07:46:00.000-07:00</published><updated>2006-05-31T07:53:19.000-07:00</updated><title type='text'></title><content type='html'>Gotta love this stuff.&lt;br /&gt;&lt;br /&gt;Introducing &lt;a href="http://www.rcode.net/blog/tlaurenzo/introducing-protowidget"&gt;Protowidget&lt;/a&gt;. This is the &lt;span style="font-style:italic;"&gt;real&lt;/span&gt; beginning of &lt;span style="font-style:italic;"&gt;the&lt;/span&gt; web widget set for Rails based on the prototype js lib. Yah, yah, I know, G, Y!, and others have their &lt;span style="font-style:italic;"&gt;free&lt;/span&gt; toolkits out already, but they either work best w/java or you have to work with them on more of a client scripting level, which in my view == waste of time.&lt;br /&gt;&lt;br /&gt;When I first used Rails RJS the whole web toolkit thing started really making sense. Now with this, it's not going to be long before someone integrates Protowidget + Scriptaculous + RJS. Wanna develop a rich non-flash web app in the shortest amount of time? &lt;span style="font-style:italic;"&gt;This&lt;/span&gt; will soon be the way to do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-114908719898049853?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/114908719898049853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=114908719898049853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/114908719898049853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/114908719898049853'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2006/05/gotta-love-this-stuff.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-114736317339346769</id><published>2006-05-11T08:14:00.000-07:00</published><updated>2006-05-11T08:59:33.913-07:00</updated><title type='text'></title><content type='html'>Suffer through&lt;br /&gt;&lt;br /&gt;I was reading this &lt;a href="http://www-128.ibm.com/developerworks/opensource/library/os-ecl-ajax/?ca=dgr-lnxw07Ajax-ATF"&gt;article&lt;/a&gt; over at Developerworks and it only took a few seconds before a subliminal &lt;span style="font-style: italic;"&gt;sigh&lt;/span&gt; bubbled up in my thoughts. Why? Because any web 2.0 type apps done in Java, to me, are a dead end.&lt;br /&gt;&lt;br /&gt;This isn't to say Java is not useful, it definitely is. I make my day to day using it also provides me with a source for articles to write. But the more and more I use it for various projects, the more and more I feel like I don't really want to use it anymore.&lt;br /&gt;&lt;br /&gt;I wouldn't dream of doing an Ajax based app with it ever again. Some things you are born to do and some things you aren't. I feel strongly that if you want to save time and be productive, then there is no framework nor is there any productive way to do Ajax in a Java webapp. Doesn't matter if you have the latest Eclipse plugin - it's just not meant for that. For instance, compare these two examples to just get started with some Ajax libs on your page:&lt;br /&gt;&lt;br /&gt;JSP&lt;br /&gt;----&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;script type="text/javascript" src="/prototype.js"&amp;gt; &amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;script type="text/javascript" src="/scriptaculous.js"&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;/script&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Rails&lt;br /&gt;------&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;%= javascript_include_tag 'prototype','scriptaculous' %&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is just the beginning. I haven't even started comparing tags (JSTL) which to me are not only a waste of productivity, but I really question their efficiency. Ever look a a &lt;span style="font-style: italic;"&gt;compiled&lt;/span&gt; JSP to servlet? Depending on the implementation your original JSP could balloon to 2 to 4 times the size once &lt;span style="font-style: italic;"&gt;compiled&lt;/span&gt; into servlet &lt;span style="font-style: italic;"&gt;source&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;With all this Java/JSP/web development, I feel like I've learned the hard way and I'm realizing more and more that as Java web development has &lt;span style="font-style: italic;"&gt;matured&lt;/span&gt;, it's becoming an enormous effort managing expectations and patience. I feel like unless you have some great, tested, well architected frameworks in-house (which no one seems to) that developing web apps in Java is a total waste of time.&lt;br /&gt;&lt;br /&gt;Say I want to create a quick demo to maintain a list of simple categories, I would do the following&lt;br /&gt;&lt;br /&gt; in Rails:&lt;br /&gt;-----------&lt;br /&gt;* (This assumes a db is installed and user permissions are set correctly) tell Rails the user and db I want to use&lt;br /&gt;* Create a migration that defines 1 column in the categories table: name&lt;br /&gt;* Create a controller and model using one command line&lt;br /&gt;* Modify my controller and tell it to use scaffolding support (two words)&lt;br /&gt;* Hit my controller, start adding categories&lt;br /&gt;&lt;br /&gt;The framework du jour (JSP/JSTL, Spring, Hibernate):&lt;br /&gt;------------------------------------------------------------------&lt;br /&gt;* Get Hibernate configured for a connection (which needs to be made available via some containter such as Jboss or Tomcat via JNDI)&lt;br /&gt;* Generate a mapping for the categories table and explicitly define a primary key (Rails migrations already did this for me and my schema is already versioned)&lt;br /&gt;* Configure Spring to use Hibernate (XML configs)&lt;br /&gt;* Create my Category bean and add it to Hibernate &lt;span style="font-style: italic;"&gt;and&lt;/span&gt; Spring.&lt;br /&gt;* Create a controller in Spring, add it to the bean def and also make sure the URL mapping and whatever else needs to be in the Spring xml file.&lt;br /&gt;* Don't forget to configure web.xml to use the Spring dispatcher servlet&lt;br /&gt;* Create JSPs to do CRUD functions on the Category list (I won't even go into JSTL here)&lt;br /&gt;* Matter of fact, make sure the controller supports the CRUD ops too&lt;br /&gt;* Compile&lt;br /&gt;* Deploy&lt;br /&gt;* Add categories&lt;br /&gt;&lt;br /&gt;I guarantee the above in J2EE will take 5-10x longer than the Rails steps. This also assumes you already have Ruby/Rails installed as well as Java/J2EE container and the necessary dependencies. You'll probably also see a factor of 10 or more in LOC, which doesn't matter, but does. It not only matters in time to type every single letter (if you have special macros and shortcuts in Eclipse or whatever Java IDE you use, this can be shortened, but then again, so it can also be for your Rails env, just watch the screencasts on the Rails site and you'll see this) but also when you have to go back and update/fix the code.&lt;br /&gt;&lt;br /&gt;For me, it's actually &lt;span style="font-style: italic;"&gt;fun&lt;/span&gt; to build in Ruby and Rails because I can get &lt;span style="font-style: italic;"&gt;immediate&lt;/span&gt; results and it's so much simpler (usually) than the equivalent operation in Java. I'm not saddled by the feeling of dread when I have to make a change, especially a significant one. Plus, I really like simple, direct, and terse code. Maybe it's because after programming for so long, there's not need to type out a gazillion things to get something going. Of course, perl takes this to the extreme in a pretty &lt;span style="font-style: italic;"&gt;ugly&lt;/span&gt; way, but still, I'd much rather do something like&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;for each people do |person|&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; puts p.name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;vs.&lt;br /&gt;&lt;tt&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Iterator iterator = people.iterator();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;while( iterator.hasNext() ){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; Person person = (Person)iterator.next();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; System.out.println( person.getName() );&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;Granted, I'm using pre-Java 5 collection iteration and I could have done a few more shortcuts in the code, but the idea is still there: &lt;span style="font-style: italic;"&gt;it just takes too long to do most things in Java&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;For most people and companies, this is not a problem though and now that Java is widely accepted in the enterprise, no one will get fired for using it. However, Ruby and Rails will gain more and more momentum in the coming years a make more and more inroads into the corporate environment and also in the pro services sector because they can be highly productive tools. I don't believe one will overtake the other though. There'll be room for both but I do think that the organizations that can leverage both tools in a highly productive manner will gain an advantage over their competitors.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-114736317339346769?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/114736317339346769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=114736317339346769' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/114736317339346769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/114736317339346769'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2006/05/suffer-through-i-was-reading-this.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-114408710607595610</id><published>2006-04-03T10:50:00.000-07:00</published><updated>2006-04-03T10:58:26.093-07:00</updated><title type='text'></title><content type='html'>Pay no mind....&lt;br /&gt;&lt;br /&gt;Welcome to the world of pointless idiological (of all things) l33t programming language warring over the web via blogs. Here's a taste: http://www.loudthinking.com/arc/000569.html&lt;br /&gt;&lt;br /&gt;One of the reasons I really dig Ruby/Rails is that it delivers. However, who wants to be associated with people who are constantly putting down other languages and development environments and at the same time chest thumping that &lt;span style="font-style: italic;"&gt;theirs&lt;/span&gt; (of course) is the best and is the one size fits all? Exactly - no one.&lt;br /&gt;&lt;br /&gt;Java is really great for some things and Ruby is great for others. I think people need to deploy more and stop whining about 'oh well, will it scale?'. That's such a pointless argument in my opinion. Most scripting languages will scale to hundreds of thousands and even millions of daily users at this point of the web and technology (including hardware) maturity. &lt;span style="font-style: italic;"&gt;If&lt;/span&gt; your site is not scaling when you've passed this point, then I think you should be pretty happy and can then take things to the next level.&lt;br /&gt;&lt;br /&gt;I think DHH and Gosling should realize that a tool kit is exactly that and for some things some tools work better. Get over it guys!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-114408710607595610?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/114408710607595610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=114408710607595610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/114408710607595610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/114408710607595610'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2006/04/pay-no-mind.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-114070656832729216</id><published>2006-02-23T06:21:00.000-08:00</published><updated>2006-02-23T06:56:08.476-08:00</updated><title type='text'></title><content type='html'>Why Java is still not &lt;span style="font-style: italic;"&gt;there&lt;/span&gt; for Ajax functionality.&lt;br /&gt;&lt;br /&gt;After using Rails for a few months I still haven't found a &lt;span style="font-style: italic;"&gt;fast and easy&lt;/span&gt; way to accomplish similar Ajax tricks and functionality in Java. Some of the framework extensions I have uncovered still have way too much config or the framework itself is a bit (in my opinion) convoluted.&lt;br /&gt;&lt;br /&gt;For instance, take a look at this &lt;a href="http://www.jetbrains.com/idea/training/demos/AJAX_demo.html"&gt;IntelliJ screencast&lt;/a&gt; and see how they recommend using Ajax. It's &lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;much&lt;/span&gt; different than the equivalent Rails code. Java is not a terse language. There can be tools and shortcuts that help cut this down, but it's a &lt;span style="font-style: italic;"&gt;spell-it-out&lt;/span&gt; toolbox. Ruby and Rails on the other hand, feel much more concise and adhere more to convention vs. configuration.&lt;br /&gt;&lt;br /&gt;Clearnova has an example of their &lt;a href="http://www.clearnova.com/video/jx_webinar_2005_12_06_demo/tcdemo.html"&gt;Ajax controls&lt;/a&gt;, which is where, in my opinion, corporate J2EE app development is heading. Watching this video one is reminded of app development 5+ years ago in a Windows-only shop.&lt;br /&gt;&lt;br /&gt;In my opinion, J2EE was more suited for (I'm gonna say it) Web 1.0. It's improved and since then and grown, but when things change, the only way to go w/J2EE is to add on, not &lt;span style="font-style: italic;"&gt;re-do.&lt;/span&gt; Rails has had the advantage of starting from the group up when new ideas and approaches sprouted, so Ajax was not an afterthought. And JS templates in Rails will keep it ahead of the rest of the pack for Web 2.0 development for some time. Until the next paradigm comes along.&lt;br /&gt;&lt;br /&gt;This isn't bashing J2EE. In fact, it reinforces its position which is corporate and business applications. For business web apps, Java is king. Clients will still pay good rates for contractors and as long as you're not doing a Ajax app, most Java web frameworks will suffice. Java is the new &lt;span style="font-style: italic;"&gt;you-won't-get-fired-for-using-it&lt;/span&gt; development tool. It's a safe bet and companies know this.&lt;br /&gt;&lt;br /&gt;Ruby and Rails still have a few years in this respect. My prediction will be that Ruby/Rails won't overtake the business web development market Java now commands - that's not its target. Instead,  it will be used mostly by small (and maybe some medium to large) shops who want to get something out the door in the fastest amount of time with the fewest amount of resources. This is what Ruby/Rails (in my opinion) excels at.&lt;br /&gt;&lt;br /&gt;So, recap; Ajax in J2EE, still hard, but corporate adoption will increase and hopefully the tools and approaches will get better. Ajax in Ruby/Rails, easy, but will stay more on small sites for the time being.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-114070656832729216?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/114070656832729216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=114070656832729216' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/114070656832729216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/114070656832729216'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2006/02/why-java-is-still-not-there-for-ajax.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113744089548229590</id><published>2006-01-16T11:38:00.000-08:00</published><updated>2006-01-16T11:48:15.510-08:00</updated><title type='text'></title><content type='html'>Ruby's main method&lt;br /&gt;------------------------&lt;br /&gt;&lt;br /&gt;If you're coming from the Java or C world then you're used to the &lt;span style="font-family: courier new;"&gt;main(args)&lt;/span&gt; method. Ruby does not have this and is also picky about where code is placed in a source class. Take this class for example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;test.rb&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;--------&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;class Test&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Simple enough. Defines a Test class that doesn't do anything. Now say you want to add a method that does something, but you want to have the class call itself. This approach does not work:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;class Test&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt; &lt;/span&gt;&lt;span style="font-family: courier new;"&gt;  # Create a new me and call&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;  t = Test.new&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;  t.test_it&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  def test_it&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    puts "We're testing."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  end&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;end&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The above would result in the following error:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;uninitialized constant Test (NameError)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Coming from Java/C, we'd be scratching our heads about now since everything looks fine and we're used to defining a &lt;span style="font-family: courier new;"&gt;main&lt;/span&gt; method at the top of the class. Ruby doesn't like this and the proper way is listed below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;class Test&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;  def test_it&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;    puts "We're testing."&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;  end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;  # Create a new me and call&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;  t = Test.new&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;  t.test_it&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Haven't found it specifically mentioned yet in any docs or books, but apparently any &lt;span style="font-family: courier new;"&gt;main&lt;/span&gt; type of code in a class file must be at the bottom. And now you know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113744089548229590?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113744089548229590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113744089548229590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113744089548229590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113744089548229590'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2006/01/rubys-main-method-if-youre-coming-from.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113657362244104623</id><published>2006-01-06T10:47:00.000-08:00</published><updated>2006-01-06T11:00:39.640-08:00</updated><title type='text'></title><content type='html'>Allowing empty fields in Rails dates&lt;br /&gt;&lt;br /&gt;I had a situation where I was writing a section that allows a user to create a particular content item. On this screen I had two fields, start and end date. I used the Rails &lt;span style="font-family:courier new;"&gt;datetime_select&lt;/span&gt; (they were time sensitive) to achieve this. But no where was it mentioned how to allow for blank dates as these were not required fields and I didn't want a user to submit the values, which were filled in as todays date.&lt;br /&gt;&lt;br /&gt;This issue was not very clear at first when reading thru the ActionView::Helpers::DateHelper api docs. But then I just tried the &lt;span style="font-family: courier new;"&gt;include_blank&lt;/span&gt; option like so:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;%=datetime_select 'content', 'start_date', :include_blank =&gt; true %&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So, it works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113657362244104623?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113657362244104623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113657362244104623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113657362244104623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113657362244104623'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2006/01/allowing-empty-fields-in-rails-dates-i.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113468449061173516</id><published>2005-12-15T13:59:00.000-08:00</published><updated>2005-12-15T14:08:10.633-08:00</updated><title type='text'></title><content type='html'>Kitchen sink update&lt;br /&gt;&lt;br /&gt;The good news: everything works, including RJS Templates.&lt;br /&gt;The bad news: it was kinda a pain to get straightened out.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Steps&lt;/span&gt; (OS X specific)&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Go &lt;a href="http://hivelogic.com/articles/2005/06/22/installing_ruby_on_rails_on_tiger"&gt;here&lt;/a&gt; to setup readline and ruby (I recommend using 1.8.3)&lt;/li&gt;&lt;li&gt;Go &lt;a href="http://brainspl.at/pages/rails_stack"&gt;here&lt;/a&gt; for the rest of the setup&lt;/li&gt;&lt;li&gt;For postgres, check this &lt;a href="http://wiki.rubyonrails.com/rails/pages/PostgreSQL"&gt;link&lt;/a&gt;.&lt;/li&gt;&lt;/ol&gt;I know this has been gone over a million times before, but for some reason no one site works perfectly. Anyway, the following list works:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;readline 5.0&lt;/li&gt;&lt;li&gt;Ruby 1.8.3&lt;/li&gt;&lt;li&gt;Gems .8.10&lt;/li&gt;&lt;li&gt;Postgres 8.1 (from Darwinports)&lt;/li&gt;&lt;li&gt;ruby postgres C library &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; postgres-pr&lt;/li&gt;&lt;li&gt;Rails 1.0&lt;/li&gt;&lt;li&gt;RJS Templates (to be included in Rails 1.1)&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113468449061173516?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113468449061173516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113468449061173516' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113468449061173516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113468449061173516'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2005/12/kitchen-sink-update-good-news.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113467770877184186</id><published>2005-12-15T12:11:00.000-08:00</published><updated>2005-12-15T12:15:08.810-08:00</updated><title type='text'></title><content type='html'>RJS Templates update&lt;br /&gt;&lt;br /&gt;So, turns out if you have Darwinports version of Ruby installed, all kinds of whacky things can happen. Solution: uninstall them. Argh. In my case that means all of Ruby, lighttpd (which I highly recommend over Apache and Webrick), fcgi, gems - the whole ball of wax.&lt;br /&gt;&lt;br /&gt;Since I installed Postgres thru Darwinports, I'm gonna leave that and actually, since Darwinports installs in /opt, it makes it a little easier to have different versions of different apps running side by side.&lt;br /&gt;&lt;br /&gt;You may be asking yourself &lt;span style="font-style: italic;"&gt;'is RJS Templates really worth all this trouble?!'&lt;/span&gt; and the short answer is: absolutely! Try them out and you'll see what I mean.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113467770877184186?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113467770877184186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113467770877184186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113467770877184186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113467770877184186'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2005/12/rjs-templates-update-so-turns-out-if.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113466992574548429</id><published>2005-12-15T09:52:00.000-08:00</published><updated>2005-12-15T10:07:00.196-08:00</updated><title type='text'></title><content type='html'>Rails development on OS X + RJS Templates == frown&lt;br /&gt;&lt;br /&gt;So I wanted to start using the new RJS Templates (which are &lt;span style="font-weight: bold;"&gt;really&lt;/span&gt; kick ass) available to Rails developers via &lt;a href="http://www.codyfauser.com/articles/2005/12/05/rjs-templates-plugin-subversion-repository"&gt;this&lt;/a&gt; link. After upgrading to Rails 1.0, I followed the instructions and got this message:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;orion:~/projects/workarea/biolexis/trunk/rails jason$ script/plugin discover&lt;br /&gt;/opt/local/lib/ruby/1.8/net/protocols.rb:38:in `new': SSL_CTX_new:: library has no ciphers (OpenSSL::SSL::SSLError)&lt;br /&gt;      from /opt/local/lib/ruby/1.8/net/protocols.rb:38:in `initialize'&lt;br /&gt;      from /opt/local/lib/ruby/1.8/net/http.rb:430:in `open'&lt;br /&gt;      from /opt/local/lib/ruby/1.8/net/http.rb:430:in `do_start'&lt;br /&gt;      from /opt/local/lib/ruby/1.8/net/http.rb:419:in `start'&lt;br /&gt;      from /opt/local/lib/ruby/1.8/net/http.rb:324:in `start'&lt;br /&gt;      from /opt/local/lib/ruby/1.8/open-uri.rb:544:in `proxy_open'&lt;br /&gt;      from /opt/local/lib/ruby/1.8/open-uri.rb:525:in `direct_open'&lt;br /&gt;      from /opt/local/lib/ruby/1.8/open-uri.rb:169:in `open_loop'&lt;br /&gt;       ... 12 levels...&lt;br /&gt;      from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require__'&lt;br /&gt;      from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:21:in `require'&lt;br /&gt;      from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in `require'&lt;br /&gt;      from script/plugin:3&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Worked fine on Fedora Core 3 (imagine that!) but definitely no love on Tiger via Darwinports.  Sigh. These are the sorta things I &lt;span style="font-weight: bold;"&gt;hate&lt;/span&gt;&lt;font&gt; dealing with&lt;/span&gt;. Tracking down this sorta car crash was interesting about 8 years ago. However now, it's a nuisance. And &lt;span style="font-style: italic;"&gt;why&lt;/span&gt; does the whole Rails plugin thing require SSL anyway!?&lt;br /&gt;&lt;br /&gt;Doing a little digging here and there thru various lists I find out that it's a known issue with OpenSSL .9.8 and (of course!) there's no fix yet. &lt;span style="font-style: italic;"&gt;This&lt;/span&gt; is the dark side of open source and anyone that's had to deal with building Linux or various other free libs has run into these sorta issues before. I'm not saying corporate products are any better, but this is definitely a show stopper for me - &lt;span style="font-style: italic;"&gt;if&lt;/span&gt; I want to use RJS, which.... I do.&lt;br /&gt;&lt;br /&gt;So now the big questions remains: go down the rabbit hole only to probably end up exasperated, beaten, and conquered or forget RJS for now and do without it? And the latter leads to this question: develop a &lt;span style="font-style: italic;"&gt;typical&lt;/span&gt;, nifty Rails app, or develop a &lt;span style="font-style: italic;"&gt;cool&lt;/span&gt;, ooh and aah Rails app that'll impress the masses. Oh, the quandary..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113466992574548429?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113466992574548429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113466992574548429' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113466992574548429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113466992574548429'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2005/12/rails-development-on-os-x-rjs.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113337109874482291</id><published>2005-11-30T08:31:00.000-08:00</published><updated>2005-11-30T09:18:20.480-08:00</updated><title type='text'></title><content type='html'>STI it is.&lt;br /&gt;&lt;br /&gt;So my last post regarding CTI did not work. There were still other issues below just updating and loading (which I sorta suspected). So I ported a development db over to a new STI layout. All seems well, however, it would still have been nicer to keep the CTI stuff as I now have about 33 cols in my content table - this is exactly what I wanted to avoid.&lt;br /&gt;&lt;br /&gt;The upside is queries are easier and faster; no join. Plus, it is more straight forward to just deal with the table as there's no other type table and no child tables. So in those regards, things have simplified, which is what Rails tries to do.&lt;br /&gt;&lt;br /&gt;The upside to all this is that it has made me re-think some of my db structure. I started off reading these two books:&lt;br /&gt;&lt;br /&gt;The Data Model Resource Book &lt;a href="http://www.bookpool.com/sm/0471380237"&gt;Vol 1&lt;/a&gt; and &lt;a href="http://www.bookpool.com/sm/0471353485"&gt;Vol 2&lt;/a&gt;. Of course the author loves his design and from a dba perspective, it's normalized to the farthest reaches of the galaxy. One thing I struggled with &lt;span style="font-style: italic;"&gt;from the beginning&lt;/span&gt; was the sheer complexity of my schema. Everything was fully normalized and I've always had to take more time to code to adjust to that. I kept telling myself "Well, that's what a programmer does - hides the complexity from the user. It's most important to do it &lt;span style="font-style: italic;"&gt;right&lt;/span&gt;, whatever the costs". Now I'm not too sure about that.&lt;br /&gt;&lt;br /&gt;I've spent a year working on sections of the app that, now,  don't seem to make much sense. Or, at least from a design perspective. And now I'm in between the clash of two worlds: the J2EE and Ruby/Rails. At this point, I'm leaning towards R/R.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I've spent the last 9 years working on Java apps. I ditched scripting years ago because I got tired of the dynamicity of it. Always checking for this type, that type, etc. I liked Java because it was strongly typed and I liked the OO concepts; OO Perl wasn't really around then. And that was good for then and even the next five years after. But now, I'm done with all that. Done with verbose syntax, config files (ugh!), and five billion frameworks all with their own filthy memory leaks.&lt;br /&gt;&lt;br /&gt;Building a web app in Java has become a monumental undertaking nowadays. The &lt;span style="font-style: italic;"&gt;proper&lt;/span&gt; way is to have a dba, bean coder, jsp coder and html/layout/design person. Plus, you &lt;span style="font-style: italic;"&gt;should&lt;/span&gt; be able to plug in any server at any level, so therefore, it's required that you master all aspects of said server(s) at said level of the stack. But really, who buys Oracle and then switches to MySQL? And if you do, then you must have solid reasons and porting shouldn't be too hard. So more and more I don't buy the whole &lt;span style="font-style: italic;"&gt;switchable server&lt;/span&gt; argument. Seems like it's all theory and drive for a independent vendor market.&lt;br /&gt;&lt;br /&gt;One thing I like about the Mac over Linux is that I don't have 5 billion options; I have some, but limited options. And those options &lt;span style="font-style: italic;"&gt;seem&lt;/span&gt; pretty well thought out. So instead of 10 window managers on Linux, I have one on OS X. Granted, OS X wm doesn't do some things I really liked, especially focus follows mouse, but on the most part it does 95% of everything I want (with a few add on's). &lt;span style="font-style: italic;"&gt;Plus it's fast, looks excellent and is &lt;span style="font-weight: bold;"&gt;stable&lt;/span&gt;!&lt;/span&gt; Linux can't promise the same. The problem is the same with Windows; too much junk for  junk.&lt;br /&gt;&lt;br /&gt;I feel Java is victim of the same sorta thing; too much junk. Everyone has a project on it. Some will say this makes for a richer community but I say only if the projects are of excellent quality (the quality, in my opinion, is &lt;span style="font-style: italic;"&gt;highly&lt;/span&gt; debatable too).  That all said, here's the point that everything teeters on for me: complexity. J2EE, to me, &lt;span style="font-style: italic;"&gt;is&lt;/span&gt; too complex nowadays and that, in my mind, leads to lower quality. R/R on the other hand had tried to simplify things and in their case (because of excellent design on 98% of the pieces) has led to higher quality.&lt;br /&gt;&lt;br /&gt;So now that I've reimplemented a decent chunk of my app in Rails (of course it did take 1/5th of the time, but that also has to do with the fact it's &lt;span style="font-style: italic;"&gt;always&lt;/span&gt; faster to re-implement the second time around), I'm passed the whole web stack and on to the db. I think because Rails includes the whole stack (they understand that a lot of the time the code and dba are one in the same) it's forced me (for good or bad) to re-think my data layer.&lt;br /&gt;&lt;br /&gt;Five years ago, it was sorta fringe to go Java and Tomcat with &lt;span style="font-style: italic;"&gt;x&lt;/span&gt; framework - I know cuz I worked at a consulting company where I pushed these very issues. But nowadays, things are moving faster (this same argument could be used in 2000 as well) and there are more and more companies and groups competing and developing in the same space as you or I are in now. For my development it's all about getting something out there with the least amount of resources. For me, this is one person and about 10-12 hours a day (of course this works as I basically have little social life, something that I've accepted on a &lt;span style="font-style: italic;"&gt;temporary&lt;/span&gt; basis). To do this in Java? Forget it. I've already tried that using the newest and &lt;span style="font-style: italic;"&gt;coolest&lt;/span&gt; projects. Even those seem to take too long. For me now, Rails &lt;span style="font-style: italic;"&gt;seems&lt;/span&gt; to be more and more the answer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The future.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First, the Java codebase for our app is frozen as of this week. No more new changes will be made except for the transition of our current feature set to encompass free users; basically you can register and search for companies for free now. This will run in Java until Feb 1. That date will be the cut over to the Ruby/Rails code base. Development of R/R will be finished by Jan 1. and the rest of Jan will consist of qa and optimization. After Feb 1, we will start to roll out new modules every few months, something I wanted to do originally. By this time next year, we should be at where we wanted to be this time this year.&lt;br /&gt;&lt;br /&gt;Is this delay all the fault of J2EE? No, probably not. But for me, J2EE has not simplified anything for me and it has definitely lengthened the development process. I'll still (if I have to) continue to consult using Java for the next project or two but all in all, I don't see wanting to work with it much anymore. 9 years is a long time to keep doing one thing and to keep using the same tool is a hard thing to do. It's possible we might find things for Java in the future  of our product but for now, it's all about maximizing productivity. As days wear on and more tests are done I see less Java in our app and more R/R.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113337109874482291?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113337109874482291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113337109874482291' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113337109874482291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113337109874482291'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2005/11/sti-it-is.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113279752454116686</id><published>2005-11-23T17:43:00.000-08:00</published><updated>2005-11-23T17:59:58.496-08:00</updated><title type='text'></title><content type='html'>CTI Round Two.&lt;br /&gt;&lt;br /&gt;After days of trial and error, search after search, and even reading some of the source code, I &lt;span style="font-style: italic;"&gt;think&lt;/span&gt; I might have figured out (for now) my cti issue. And behold, the nightmare:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;class ContentJob &lt; ActiveRecord::Base &lt;br /&gt; set_table_name    "content_job" &lt;br /&gt; set_primary_key   "content_id" &lt;br /&gt; belongs_to        :content,  :dependent =&gt; true,&lt;br /&gt;                   :foreign_key =&gt; "id"&lt;br /&gt;&lt;br /&gt;def after_destroy&lt;br /&gt; if self.id != nil : content.destroy end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;def before_save&lt;br /&gt; if self.id == nil : self.id=content.id end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;end&lt;/pre&gt;&lt;br /&gt;The &lt;tt&gt;after_destroy&lt;/tt&gt; and &lt;tt&gt;before_save&lt;/tt&gt; methods are the saving grace. Very simple too. However, I just wished this was mentioned somewhere. But, this is the way of some things I suppose. One thing that was neat is this line:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;if self.id == nil : self.id=content.id end&lt;/pre&gt;We're basically saying if the ContentJob object's id is null, then assign it to the Content object's id. I was tailing the test log output and I noticed that just referencing the &lt;tt&gt;content.id&lt;/tt&gt; of an unsaved object in this manner will save it. Pretty slick. It's stuff like this that I'm starting to appreciate with Rails and Ruby. A lot of implicit behavior and as long as I know what I'm doing, I like that.&lt;br /&gt;&lt;br /&gt;In my tests doing an update on the top level ContentJob object seemed to propagate fine to the linked Content object. The above methods handle all create, update, and delete actions. It's kinda neat in its simplicity really. We'll see how it fares when more things get hooked up down the road but for now, it's safe to say (hopefully) that I can turn this page.&lt;br /&gt;&lt;br /&gt;I think there becomes a point in a programmers life when you think "don't bug me with the details, get it done, and get out of my way". It's like after you've compiled the Linux kernel 50 times; after a while it's just like, screw it, gimmie the stock kernel with all the modules plugged in, I don't care anymore. Not to sound so 90's but, been there, done that - times 20.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113279752454116686?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113279752454116686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113279752454116686' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113279752454116686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113279752454116686'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2005/11/cti-round-two.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113268120538719465</id><published>2005-11-22T08:56:00.000-08:00</published><updated>2005-11-22T09:43:05.570-08:00</updated><title type='text'></title><content type='html'>STI (Single Table Inheritance) vs. CTI (CLSTI / Class Table Inheritance)&lt;br /&gt;&lt;br /&gt;One of the things I'm still a little miffed about is Rails lack of support for CTI. While fully appreciative of the effort of the Rails group, I think (and I know I've mentioned this before) this will significantly slow down future J2EE adopters.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why I like CTI&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Take this example:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;pre&gt;&lt;br /&gt;Content&lt;br /&gt;+-------------+&lt;br /&gt;| id          |&lt;br /&gt;| title       |&lt;br /&gt;| description |&lt;br /&gt;| date_added  |&lt;br /&gt;+-------------+&lt;br /&gt;&lt;br /&gt;Event&lt;br /&gt;+-------------+&lt;br /&gt;| content_id  |&lt;br /&gt;| start_date  |&lt;br /&gt;| end_date    |&lt;br /&gt;+-------------+&lt;br /&gt;&lt;br /&gt;Job&lt;br /&gt;+-------------+&lt;br /&gt;| content_id  |&lt;br /&gt;| location    |&lt;br /&gt;| job_code    |&lt;br /&gt;| contact     |&lt;br /&gt;+-------------+&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;br /&gt;Now it's easy to see that event and job have primary and foreign key to content.id. Their table's also extend content and provide their own attributes which can be modified without affecting the original content table. Plus, new content types can be added on by just adding a new table and extending the content table. For me, this is a sensible design.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why I don't like STI&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;While STI is good for some things, I don't think it's good for the above. Here's the Rails recommended way for the above problem:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;pre&gt;Content&lt;br /&gt;+-------------+&lt;br /&gt;| id          |&lt;br /&gt;| &lt;span style="font-weight: bold;"&gt;type&lt;/span&gt;        |&lt;br /&gt;| title       |&lt;br /&gt;| description |&lt;br /&gt;| date_added  |&lt;br /&gt;| content_id  |&lt;br /&gt;| start_date  |&lt;br /&gt;| end_date    |&lt;br /&gt;| content_id  |&lt;br /&gt;| location    |&lt;br /&gt;| job_code    |&lt;br /&gt;| contact     |&lt;br /&gt;+-------------+&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;br /&gt;One of the reasons the Rails guys will tell you this is good is because there are no joins. And this is absolutely true. I'm all for fast db access, but if you coded &lt;span style="font-style: italic;"&gt;everything&lt;/span&gt; from a speed perspective, then we'd all be using C or assembly. The reason we don't use those languages - or at least, assembly - is because it's way too hard to debug and maintain. And this is why I don't like STI for &lt;span style="font-style: italic;"&gt;everything&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The more successful our company becomes, the more types of content we'll have. The Rails guys suggest that I just assign a different &lt;span style="font-weight: bold;"&gt;type&lt;/span&gt; and add the columns and be done with it. However, I feel this is a little too generic and there is no time or thought given to how this will affect things later down the road. I've been there too where you have an Orders table with 40+ columns; no thanks. Any seasoned DBA would look at that and then just shake their heads.&lt;br /&gt;&lt;br /&gt;And this is what really surprises me; Rails is a very nice framework, but for some time I couldn't figure out &lt;span style="font-style: italic;"&gt;why&lt;/span&gt; they would leave CTI out. But then after using it for a bit I see why - because there are no big projects using Rails yet. Sure, the 37signals guys have churned out all their Basecamp related apps and they're &lt;span style="font-weight: bold;"&gt;very&lt;/span&gt; good. But I haven't seen anything big else outside of that using Rails. The Rails guys seem very focused on their niche: small blog or CMS apps. They declare all the time that Java/J2EE is on it's knees and Rails is about the deliver the final blow. But this is ridiculous. Like any small group, it's easy to have big hopes and aspirations and think that because your solution is gaining momentum, it's the best and therefore destined to take the crown. I don't see Rails doing that anytime soon.&lt;br /&gt;&lt;br /&gt;A few things lacking that Rails needs in order for J2EE people to &lt;span style="font-style: italic;"&gt;really&lt;/span&gt; start taking it seriously:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Transactions that span multiple models &lt;span style="font-style: italic;"&gt;without&lt;/span&gt; have to nest them as is done now&lt;/li&gt;&lt;li&gt;CTI - a &lt;span style="font-style: italic;"&gt;must &lt;/span&gt;have, otherwise, the dba will laugh at you and send you on your way. Plus it makes &lt;span style="font-weight: bold;"&gt;good design sense&lt;/span&gt;!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Clustered sessions - I know this exists, but it's still a little obscure; make it &lt;span style="font-style: italic;"&gt;easier&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;If I had the above, I'd be set. I &lt;span style="font-style: italic;"&gt;know&lt;/span&gt; the Rails guys want me to do it &lt;span style="font-style: italic;"&gt;their way&lt;/span&gt; and I &lt;span style="font-weight: bold;"&gt;really&lt;/span&gt; appreciate that. Seriously. But sooner or later, they're gonna have to realize that in order to attract more than just blog and shopping cart projects you're going to have to offer &lt;span style="font-style: italic;"&gt;a little more&lt;/span&gt;. The good news is this will probably happen. The bad? &lt;span style="font-style: italic;"&gt;When?&lt;/span&gt; implement CTI at some point and someone will probably offer some higher level support in the stack to provide transactions across many models, etc. Someone will probably But when? These seem pretty important issues to me - too important to be left out of a 1.0 release.&lt;br /&gt;&lt;br /&gt;In the mean time, I suppose &lt;font&gt;I'll have to adjust &lt;span style="font-style: italic;"&gt;my&lt;/span&gt; data layer to fit with Rails requirements of STI. &lt;span style="font-style: italic;"&gt;*Sigh*&lt;/span&gt;. The mailing list guys suggested that I hack on CTI in the source but really, if you're still learning a new language and framework, what's the chances of that happening? Yah, &lt;span style="font-weight: bold;"&gt;zero&lt;/span&gt;. Plus, I &lt;span style="font-style: italic;"&gt;don't want&lt;/span&gt; to hack on the source, I just want it to work!&lt;br /&gt;&lt;br /&gt;The Rails guys have enticed me but please, help me switch for good! Provide me with the tools that most Java/J2EE guys use and expect, not hollow blog entries of why Rails rules over Java. While they've have done some good work getting me to think of other approaches and design issues, having to abandon CTI in order to use Rails does not sit well with me. I suppose, thought,  I'll just soldier on and see what happens.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113268120538719465?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113268120538719465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113268120538719465' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113268120538719465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113268120538719465'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2005/11/sti-single-table-inheritance-vs.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113242538394657014</id><published>2005-11-19T10:35:00.000-08:00</published><updated>2005-11-19T10:36:23.960-08:00</updated><title type='text'></title><content type='html'>&lt;a href="http://www.onjava.com/pub/a/onjava/2005/11/16/hibernate-for-java-se.html"&gt;Hibernate for Java SE&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My second article is up.  Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113242538394657014?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113242538394657014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113242538394657014' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113242538394657014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113242538394657014'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2005/11/hibernate-for-java-se-my-second.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113192927171073455</id><published>2005-11-13T16:34:00.000-08:00</published><updated>2005-11-13T16:47:51.756-08:00</updated><title type='text'></title><content type='html'>Hmm, I thought, if anything, line count would go down.&lt;br /&gt;&lt;br /&gt;Today's totals as of 4:35 pm, PTD:&lt;br /&gt;&lt;br /&gt;XML totals:&lt;br /&gt;-----------&lt;br /&gt;   12754 total&lt;br /&gt;&lt;br /&gt;Java totals:&lt;br /&gt;-----------&lt;br /&gt;  111096 total&lt;br /&gt;&lt;br /&gt;JSP totals:&lt;br /&gt;-----------&lt;br /&gt;   16141 total&lt;br /&gt;&lt;br /&gt;What gives? I couldn't have coded approx. 30k lines of  code in a few weeks (hey, even I'm not &lt;i&gt;that&lt;/i&gt; good, plus I &lt;i&gt;somewhat&lt;/i&gt; have a life).  In fact, I just cut out, at least, a few hundred lines and some old deprecated classes. Bummer, I was really hoping to see how things have &lt;i&gt;'improved'&lt;/i&gt; since setting forth on my cleansing mission.&lt;br /&gt;&lt;br /&gt;AHA! So, there was an error when I was reading the totals. Since my web/ dir (where my JSPs) are kept are located at the same level as my src/ dir, my count script was picking up JSP .java source files. Heh! So, here's the  &lt;span style="font-weight: bold;"&gt;real&lt;/span&gt; count:&lt;br /&gt;&lt;br /&gt;XML totals:&lt;br /&gt;-----------&lt;br /&gt;    3133 total&lt;br /&gt;&lt;br /&gt;Java totals:&lt;br /&gt;-----------&lt;br /&gt;   61903 total&lt;br /&gt;&lt;br /&gt;JSP totals:&lt;br /&gt;-----------&lt;br /&gt;   16141 total&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That's more like it. Which makes me wonder if my first count was right...? Nice to see I've lopped off at least 10k lines of code, which is completely possible. I've been refactoring alot and have just started. I estimate I'll be down to around 30k when done.&lt;br /&gt;&lt;br /&gt;In other news, my new O'Reilly ONJava article about using Hibernate outside your web container is close to a final draft. Should be out sometime in Dec '05/Jan '06.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113192927171073455?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113192927171073455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113192927171073455' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113192927171073455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113192927171073455'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2005/11/hmm-i-thought-if-anything-line-count.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113139295600711509</id><published>2005-11-07T11:41:00.000-08:00</published><updated>2005-11-07T11:49:16.016-08:00</updated><title type='text'></title><content type='html'>Emacs CVS 11-05-2005 almost works...&lt;br /&gt;&lt;br /&gt;Actually it does work, I now have a shiny  &lt;span style="font-style: italic;"&gt;native &lt;/span&gt;Tiger x86 build. Aaaah the speed and stability. This coupled with &lt;a href="http://wiki.mozilla.org/Mac:Intel"&gt;Josh Aas's x86 Camino builds&lt;/a&gt; have made my development month. However, no joy in sharing my Emacs build as I get an error when I try to make a distributable package:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-size:85%;"&gt;gcc -c -fpascal-strings -fno-common -DMAC_OSX -I../mac/src -DHAVE_CONFIG_H -I. -I../src -I/Users/jason/projects/emacs/emacs/mac/../lib-src -I/Users/jason/projects/emacs/emacs/mac/../lib-src/../src -fpascal-strings -fno-common -DMAC_OSX -I../mac/src   -g -O2  /Users/jason/projects/emacs/emacs/mac/../lib-src/pop.c&lt;br /&gt;gcc -fpascal-strings -fno-common -DMAC_OSX -I../mac/src -DHAVE_CONFIG_H -I. -I../src -I/Users/jason/projects/emacs/emacs/mac/../lib-src -I/Users/jason/projects/emacs/emacs/mac/../lib-src/../src  -g -O2  movemail.o pop.o getopt.o getopt1.o         -o movemail&lt;br /&gt;i686-apple-darwin8-gcc-4.0.1: getopt.o: No such file or directory&lt;br /&gt;i686-apple-darwin8-gcc-4.0.1: getopt1.o: No such file or directory&lt;br /&gt;make[1]: *** [movemail] Error 1&lt;br /&gt;make: *** [lib-src] Error 2&lt;br /&gt;Make failed... Aborting make-package.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;&lt;br /&gt;Boo, frown, etc.. Well, at least I got psql compiled natively. That only leaves &lt;a href="http://www.adiumx.com"&gt;Adiumx&lt;/a&gt; and &lt;a href="http://desktopmanager.berlios.de"&gt;Desktop Manager&lt;/a&gt; in PPC mode.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113139295600711509?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113139295600711509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113139295600711509' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113139295600711509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113139295600711509'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2005/11/emacs-cvs-11-05-2005-almost-works.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113025677517023360</id><published>2005-10-25T08:44:00.000-07:00</published><updated>2005-10-25T09:59:48.950-07:00</updated><title type='text'></title><content type='html'>One week later..&lt;br /&gt;&lt;br /&gt;So it's back to the old horse. Things are getting busy so no migration today - or probably for the rest of the week.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A Rails, er, complaint.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I still plan, at some point, to get a Rails version running. However, the one thing I noticed is a little inflexibility when dealing with a migration. It seems the Rails gang and the guys the wrote the Rails agile development book have a bit of a, er, myopic view.&lt;br /&gt;&lt;br /&gt;For instance, I have an example where I have three types of content in our system: news, jobs, and events. In our db I used the &lt;a href="http://www.martinfowler.com/eaaCatalog/classTableInheritance.html"&gt;Class Table Inheritance&lt;/a&gt; pattern, which is widely known, proven, and implemented. In Hibernate, this is easily done via your mapping file and has been supported for some time. However, Rails doesn't seem to support this and when I asked the list, &lt;span style="font-style: italic;"&gt;even after I said I &lt;span style="font-weight: bold;"&gt;cannot&lt;/span&gt; change my table definitions at all&lt;/span&gt;, I got a few replies asking me to use &lt;a href="http://www.martinfowler.com/eaaCatalog/singleTableInheritance.html"&gt;Single Table Inheritance&lt;/a&gt;. ????&lt;br /&gt;&lt;br /&gt;I didn't want to voice my frustration to the list but I really couldn't understand what part of the 'I cannot change my tables' sentence they didn't understand. This led me to two realizations:&lt;br /&gt;&lt;br /&gt;1. People, obviously, didn't &lt;span style="font-style: italic;"&gt;listen&lt;/span&gt; or carefully &lt;span style="font-style: italic;"&gt;read&lt;/span&gt; my post.&lt;br /&gt;2. There is little interest - for now - in getting people to migrate.&lt;br /&gt;&lt;br /&gt;Let's expand on number two. If you read the Rails agile development book and go through their 20 min videos, etc, it all seems like a good simple way to do things. And coming from that perspective, I believe they're spot on.&lt;br /&gt;&lt;br /&gt;However it seems to me that since Java is the biggest web development language and is apparently, &lt;span style="font-style: italic;"&gt;susceptible to attack now&lt;/span&gt;, you would make migration from it as easy as possible. &lt;span style="font-style: italic;"&gt;Give people a reason or many reasons to migrate&lt;/span&gt;. I'm not saying some GUI tool or migration scripts, etc... - just a little more infrastructure to support it. I'm not talking about complicated infrastructure either - like supporting EJB or craziness like that - just common basics; stuff that people use in &lt;span style="font-style: italic;"&gt;real web apps&lt;/span&gt;. I'm convinced one of these things is CTI and I &lt;span style="font-style: italic;"&gt;know&lt;/span&gt; a lot of people are already using it with Hibernate.&lt;br /&gt;&lt;br /&gt;Another thing I noticed in the Rails camp is the drive to &lt;span style="font-style: italic;"&gt;do it their way&lt;/span&gt;. I suppose this is standard across all software projects and I know they have their vision and that's cool with me. However, when dealing with migrations you'll be hard pressed to find many that will throw their legacy stuff away and start from scratch using new methodologies. So you either try to accomidate and work with them (which the majority of people on the Rails list do pretty well) or they just won't move.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The future.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;My last stab at Rails was in early spring of this year and the coffin nail for me at that time was that the Postgres support was flaky at best. This time around, that has all been fixed and for me that's a really good thing. Now, the requirements are bubbling up through the framework and the connection/driver is no longer the issue, but instead, a part of the stack itself is. This is natural as it shows that the framework is maturing and moving forward.&lt;br /&gt;&lt;br /&gt;But I feel it still has a ways to go if you want to migrate from a J2EE web app. Not only is the CTI, I feel, a &lt;span style="font-style: italic;"&gt;critical&lt;/span&gt; issue, but the whole ActiveRecord relationships can be a bit confusing. The Rails agile development book has a few chapters on AR and all the Rails framework classes have good API docs, but it's still a little confusing trying to figure out what points to where points to where.&lt;br /&gt;&lt;br /&gt;A few times on the list some people pointed out that CTI was not a priority and that anyone is free to submit their patches to fix it. However, since most people using Rails have drank that kool-aid, they probably have no need to use CTI, which leaves it a dangling ultra-low priority in their project. And the guys (like me) that &lt;span style="font-style: italic;"&gt;really need it&lt;/span&gt; are still trying to just switch gears and catch up to Ruby and the framework itself. So, it would probably be weeks or even months before a n00b could really dive into AR and start mucking with things.&lt;br /&gt;&lt;br /&gt;But who knows, maybe someone will magically patch it soon. It will be interesting to see how many times the CTI issue comes up in the future and who it prevents from migrating. All in all, I think all the above issues are an opportunity for the Rails team to solve some interesting problems in a new way. Above all Rails seems to favor simplicity over complexity, hiding the complexity behind the curtail - in much the same way I feel a Mac does. All in all though,  it's still not there yet for our migration. Maybe sometime soon..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113025677517023360?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113025677517023360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113025677517023360' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113025677517023360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113025677517023360'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2005/10/one-week-later.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-113000280445056349</id><published>2005-10-22T09:56:00.000-07:00</published><updated>2005-10-22T10:49:00.120-07:00</updated><title type='text'></title><content type='html'>The reality begins to creep in.&lt;br /&gt;&lt;br /&gt;It's funny, there's a big difference between all the hype of watching the Rails 20 min videos and actually getting things to &lt;i&gt;work&lt;/i&gt;. Overall, I'm somwhat pleased with the conversion attempt. However, it's definitely not that easy and I can see why it's taken me so long to develop the Java site.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Menu tabs&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;For instance, we have a tabbed (typical) menu system that renders parent tabs and child sections based on a user's security role/level.&lt;br /&gt;&lt;br /&gt;a Person has Roles | Tabs have Modules which group Controllers and set access Roles&lt;br /&gt;&lt;br /&gt;At the top, this seem somewhat reasonable. A Person has one or more Roles. A typical model. And every visitor - whether they're authenticated or not - has a Role. Therefore, I'm abe to define a set of Tabs which will only render based on particular Roles. In order for the tabs to render a useful link, it must be connected to a ModuleResource, which belongs to a Module. That ModuleResource is usually a Controller, but could be many things if need be.&lt;br /&gt;&lt;br /&gt;Tag render speak: &lt;i&gt;I see a 'public role', so let's get all the Modules and their resources for that Role. I'll then ask each ModuleResource for its Controller, ControllerMethod, and ControllerParams values and render them accordingly.&lt;/i&gt; &lt;br /&gt;&lt;br /&gt;This was something I figured out at the beginning of the year, got it to work, and then moved on. It's funny, however, to re-implement it in a different language using a different framework. With Rails, you definitely feel closer to the metal, like JSPs sans the custom tags. Even though Rails does have tag &lt;i&gt;helpers&lt;/i&gt;, they just don't feel as abstracted as JSP tags do. While I haven't gottent the menu tabs to work 100%, I have made a small dent.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Models&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Another doozy if you're coming from the Java world. Somwhere in the past 8 or so years, it was considered bad to have your Model (which we'll say, wraps a table called User) passed all the way from the db level, through the controller, and then rendered straight out on a JSP. This represented &lt;i&gt;tight coupling&lt;/i&gt; and if something changed on either the front (JSP) or the back (db), then the argument was it will break.&lt;br /&gt;&lt;br /&gt;I found over the past year, I started getting rid of &lt;i&gt;form beans&lt;/i&gt; (as Struts likes to call them or Commands in Spring) and just dragging my Model from the back to the front and vice-versa. Plus, &lt;i&gt;componentization&lt;/i&gt; makes sense to me; I should be able to use a User object as part of a form or page along with an Address object and have them both validate, relate, and persist correctly. This is &lt;a href="http://wiki.rubyonrails.com/rails/pages/DRY"&gt;DRY&lt;/a&gt; in Rails-speak. So for me, it's become more and more of a time issue and not an academic one (although I do want to feel that I have done things with some &lt;i&gt;corectness&lt;/i&gt;). It seems that Rails aligns more closely with the time argument than the academic. In fact, it's encouraged, if not required, that you wrap a table in a Model and then pass that to the front. Tight coupling. No facades, wrappers, or anything else.&lt;br /&gt;&lt;br /&gt;What's the alternative though? In Struts (last I used it was 2004), this happend the following way:&lt;br /&gt;&lt;br /&gt;* User requests a Book via an id via an ActionForm or a plain GET url&lt;br /&gt;* Request coms into an Action (Dispatch, etc...) and if an ActionForm, validation fires and either succeeds or fails, or if a GET, you check manually&lt;br /&gt;* Then you (the developer) have to get that Book id, and either pass it to your Service or to your Dao&lt;br /&gt;* The DAO looks up the value in the appropriate table and constructs a new Book object based on the row it finds&lt;br /&gt;* The Action then either adds this to the Session or Request and the internals forward to the proper view&lt;br /&gt;* The view then renders the appropriate values as part of a form or as just text on the screen&lt;br /&gt;&lt;br /&gt;The Rails way (as I've so far grep'd):&lt;br /&gt;&lt;br /&gt;* User requests a book via a form or GET url&lt;br /&gt;* The Controller directly calls the Model usually via something like Book.find(id)&lt;br /&gt;* The Model has its own validation rules and will either succeed or fail&lt;br /&gt;* The Controller then either catches the exception and errors correctly or forwards to the correct view&lt;br /&gt;* The view then renders the Model or error&lt;br /&gt;&lt;br /&gt;Approximate Struts objects used in this: JSP, Form Bean, Action, Service, Dao&lt;br /&gt;Approximate Rails objects used in this: View, Controller, Model&lt;br /&gt;&lt;br /&gt;For a more complex flow, Rails also allows for Helpers to be used.&lt;br /&gt;&lt;br /&gt;This is a &lt;i&gt;rough&lt;/i&gt; and not perfect approximation. However, I think it does demonstrate the different philosophies behind the two. Neither is correct or incorrect. However, one &lt;b&gt;will&lt;/b&gt; take longer to code than the other.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Conversion&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Again, the 20 min Rails videos are great, but I feel like they are not a real world demonstration for a full blown app migration. The videos are all mostly done with clean use cases; build a blog, build a recipe list, build a list, or build a CMS. Nothing is yet out there to migrate a Java app. I think it's totally doable. In fact, you can probably convert any web app to any other language you want. When I worked in NYC, the big thing for my Java job out there was porting their money making Perl app over to Java. Took them over a year to do and in the end, through the bumps, it worked. So porting/conversion is totally possible. But it's the details that are easy to forget about. Things that work now on one system will probably need tweaking on another. &lt;br /&gt;&lt;br /&gt;Rails like objects and tables like so: &lt;b&gt;Book&lt;/b&gt; object -&gt; &lt;b&gt;books&lt;/b&gt; table. For a join table you might have something  like so:&lt;br /&gt;&lt;br /&gt;users -&gt; users_roles &lt;- roles&lt;br /&gt;&lt;br /&gt;but your tables might be named like:&lt;br /&gt;&lt;br /&gt;user -&gt; user_roles &lt;- role_types&lt;br /&gt;&lt;br /&gt;Luckily Rails does provide the option to name the table your Model corresponds to as well as the foreign key names that your realtionships use. However, it is still a bit of thinking to go from Hibernate mappings to Rails ActiveRecord mappings. The upside is the Rails mappings are much more terse as another philosophy of Rails is to hide a lot of the &lt;i&gt;magic&lt;/i&gt; so you don't have to deal with it. I like this for sure, but like anything, coming up to speed with a black box and a different approach can be a taxing experience. &lt;br /&gt;&lt;br /&gt;All in all, I'm having fun with the Rails stuff. It'll be interesting to see how long it takes me to get the home page working with the user login. I predict, another week.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-113000280445056349?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/113000280445056349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=113000280445056349' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113000280445056349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/113000280445056349'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2005/10/reality-begins-to-creep-in.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18128273.post-112991504943146807</id><published>2005-10-21T08:51:00.000-07:00</published><updated>2005-10-22T10:40:59.330-07:00</updated><title type='text'></title><content type='html'>Welcome to the fold.&lt;br /&gt;&lt;br /&gt;Hmm. So first off, I'm not a 'blogger'. I tried this in NYC years ago for about a year and just found it to be forum for complaining to my friends. Of course, I'm sure that's only because it was what I made of it, but regardless, I closed that shop down.&lt;br /&gt;&lt;br /&gt;Now however, I find myself returning for the same initial reason: to somewhat document my adventures in web development. I think this time around there will be no complaining about the day to day news or political missteps and instead focus on where I'm and  where I want to go in regards to programming.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The past.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Two plus years ago I sat in an apartment in NYC sorta lost, trying to figure out 'the next step'. I had just left, possibly, the most horrible Java position I'd ever seen in my life; the team I worked with were nice, but the VP of Technology was the absolute worst. Never in my life had I felt someone had it so wrong. (Of course, at that time I didn't have all the answers either.) Needless to say, I left that position and literally hit the streets of NYC trying to figure out what to do.&lt;br /&gt;&lt;br /&gt;For about a year I hashed out ideas with a friend and we finally settled on the industry we both love and know: lifesciences. In the fall/winter of 2003 I put finger to keyboard and started hacking away. My idea - from a technology standpoint - was not to use a full J2EE stack and thusly a complicated app server but instead to use 'lighter' tools and mix and match. Servers like Weblogic or WebSphere were enterprise powerhouses, but at the same time, they were bloated, complicated, and I didn't like where the interfaces were going. So I stuck with the usual, Tomcat.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The present.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yesterday I did a LOC count on my project:&lt;table&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;Java&lt;/td&gt;&lt;td&gt;86472 total&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;JSP&lt;/td&gt;&lt;td&gt;15986 total&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;XML&lt;/td&gt;&lt;td&gt;12952 total&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;As Hurley on Lost would say: dude, that's a lot of code.&lt;br /&gt;115,410 lines of code and config to be exact. This code is used with the following frameworks - or maybe a better way to put it is; this code is &lt;i&gt;made possible&lt;/i&gt; by the following frameworks:&lt;br /&gt;&lt;br /&gt;Spring&lt;br /&gt;Hibernate&lt;br /&gt;Struts/Tiles (only the Tiles bit)&lt;br /&gt;&lt;br /&gt;And sprinkled with a smidgen of:&lt;br /&gt;&lt;br /&gt;ActiveMQ&lt;br /&gt;Jakarta Commons&lt;br /&gt;Ant&lt;br /&gt;CGLib (from Hibernate)&lt;br /&gt;Quartz (for cron stuff)&lt;br /&gt;Rome (for RSS feed parsing)&lt;br /&gt;And a few other misc. libs..&lt;br /&gt;&lt;br /&gt;Two years and 115k lines of code from one person... That's about 55k lines a year, 4.5k a month, 1125 a week, and 150 a day - roughly speaking.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Where is all this going?!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Exactly. I believe the meaning of life is &lt;i&gt;learning&lt;/i&gt;. If we stop learning, we become rigid, stuck in the past, ignorant, and unwilling to accept the future. I know what you're thinking already; this has something to do with Java development (and if you didn't think that, well, then you can't read my mind). Yah, I think so. And where am I going? Python? Php? E-gad, back to scripting?! I think so.&lt;br /&gt;&lt;br /&gt;I've done Java/J2EE for over 8 years now. I was part of the team that built one of the biggest travel portals on the net. I've worked with Terabyte databases. Helped code a software project management system that enabled teams to work on a project all over the world, all hours of the day. I've implemented scalable, load balanced, HA systems. Done web service endpoints until I'm blue in the face. And it's been interesting. Not always fun, maybe not always necessary, sometimes (definitely) over architected. But it's always been interesting.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Enter &lt;a href="http://www.rubyonrails.org"&gt;ROR&lt;/a&gt;.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Or Ruby on Rails for short.  If you visit the Rails site, you'll see some great videos on how you can build a blog or CMS in 20 minutes or less. Wow, looks great. All the changes on the fly, no compiling, no re-starting [insert favorite app server here] the server every 20 mins due to memory leaks. Just edit, save, reload. Edit, save, reload.&lt;br /&gt;Of course, there are no videos on how to migrate your complex J2EE app over, which I don't see as a fault of nor a responsibliity of the Rails guys. But it would be nice! Of course, there's probably a simple reason for this: because it's not something you can do in a 20 min video. Nor in a 20 hour video.&lt;br /&gt;&lt;br /&gt;The Rails folks love to talk about LOC. And I tend to agree with them; less code = less time spent and more time playing. Does this mean that you'll have a clean kick ass Rails app if you try migrating your big Java project after watching one of those 20 min. videos? Mmmm, probably not. Frankly, that's the position I'm in: trying to see if it's possible to migrate a real-world, working, money making, production app. Not a quick blog or CMS via Rails Scaffold (which I find interesting none the less), but a &lt;b&gt;real &lt;i&gt;enterprise&lt;/i&gt;&lt;/b&gt; app. No script. No practice. No fricking idea.&lt;br /&gt;&lt;br /&gt;It's going to take some getting used to, like any new language. All my commands, services, and wrappers in Java are kinda gone in Rails. It's just, really, pure MVC with a sprinkle of helpers. I think I'll probably be able to migrate and come out with a Frankenstein mix of the &lt;i&gt;Rails way&lt;/i&gt; and the &lt;i&gt;Java way&lt;/i&gt;. Which, I suppose, should be interesting.&lt;br /&gt;&lt;br /&gt;So that's what this whole blog is about - the journey. From one philosophy to the other. We'll see where it goes.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Do not try and bend the spoon, that's impossible. Instead ... only try to realize the truth.&lt;br /&gt;What truth?&lt;br /&gt;There is no spoon.&lt;br /&gt;There is no spoon?&lt;br /&gt;Then you'll see that it is not the spoon that bends, it is only yourself.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18128273-112991504943146807?l=fragiledev.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fragiledev.blogspot.com/feeds/112991504943146807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18128273&amp;postID=112991504943146807' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/112991504943146807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18128273/posts/default/112991504943146807'/><link rel='alternate' type='text/html' href='http://fragiledev.blogspot.com/2005/10/welcome-to-fold.html' title=''/><author><name>Jason</name><uri>http://www.blogger.com/profile/00594431836314557679</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
