lesscode.org


'Then they fight you...' Archives

Wait. Did he say J2EE?  4

Cat.: Then they fight you..., Rails
15. July 2005

As a side note to the last post about the Rails and J2EE article, it’s interesting that the title of that article was Ruby on Rails and J2EE: Is there room for both? when there was barely an official J2EE technology mentioned. Struts and Hibernate weren’t J2EE technologies the last time I checked - they evolved in real life hacker communities under liberal licenses, not under a vendor sanctioned expert committee. Perhaps the original comparison that used cross vendor, JCP approved specs like PO Servlets, JSP, and EJB was just too much to bare?

I’m not trying to be a troll or anything, I’m just wondering whether others find it interesting that the popular Enterprise Java technologies today aren’t part of J2EE at all.

People wonder why there’s a push for Sun to free Java, I don’t. I personally don’t give a shit what they do with it but when you see the results of one of these communities in action it’s hard to advise against it from a technical standpoint.

Rails Furthers Industry Acceptance  9

Cat.: Then they fight you..., Rails
15. July 2005

I have to admit that as a Python guy I sometimes have a hard time reporting on all the recent Rails press (and I’m doing something about that, I promise). But hey, those guys are kicking ass and have made huge advances in getting the rest of the industry to wake up to the benefits of not only dynamic languages but also some of the concepts and practices that are common to the wider community. The old walls are starting to come down and its in no small part to the Rails community. Big ups and all that.

I think its interesting that of all the really inventive material the Rails guys have thrown together (movies, books, and now a friggin podcast), you just can’t beat a public display of less code, such as the one you’ll find in this IBM developerWorks article published a few days ago by Aaron Rustad:

Hibernate (Java State of the Art)

<hibernate-mapping>
  <class name="models.Order" table="ORDERS"
         dynamic-update="true" dynamic-insert="false"
         discriminator-value="null">

    <id name="id" column="id" type="java.lang.Long" 
        unsaved-value="null">
        <generator class="identity"/>
    </id>

    <set name="items" lazy="false" inverse="false"
         cascade="none" sort="unsorted">
         <key column="id"/>
         <one-to-many class="models.Item"/>
    </set>

    <property name="name" type="java.lang.String"
              update="true" insert="true"
              access="property" column="name"/>
  </class>
</hibernate-mapping>

public class Order {
    private Set items;
    private String name;
    private Long id;

    public Long getId() { return id;}

    public void setId(Long id) { this.id = id;}

    public Set getItems() { return items;}

    public void setItems(Set items) { this.items = items; }

    public String getName() { return name; }

    public void setName(String name) { this.name = name; }
}

ActiveRecord (Rails)

class Order < ActiveRecord::Base
     has_many :items
end

That’s hard to ignore.

I just hope that with all the recent attention paid to the Rails community those guys keep in mind that we all stand on the shoulders of giants and that all roads eventually lead to Lisp <ducks>