The Artima Developer Community
Sponsored Link

Java Community News
Gavin King on Being Explicit

18 replies on 2 pages. Most recent reply: Sep 27, 2007 10:29 AM by Morgan Conrad

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 18 replies on 2 pages [ « | 1 2 ]
James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Impedance Mismatch and Dual Schemas Posted: Sep 26, 2007 8:23 AM
Reply to this message Reply
Advertisement
> Firstly - Rails is a good framework. If it wasn't so many
> people wouldn't be using it. It solves a problem in a way
> that people want it to be solved.

This is not a valid conclusion. The implicit argument is that any framework that many people use is good. I know of at least one framework that many people used that was not good (IMO): EJB 1-2. EJB 3 is too new to make a call on.

This isn't to say that Rails isn't good. Personally I think it will take a little time to really tell whether Rails and it's approach is going to be proven out in the long term.

> What people have to realize is that not everyone wants the
> problem solved that way.

I think that many people view Rails with suspicion because many experienced developers have been badly burned by tools that made everything easy at first but became a burden over time.

nes

Posts: 137
Nickname: nn
Registered: Jul, 2004

Re: Gavin King on Being Explicit Posted: Sep 27, 2007 9:20 AM
Reply to this message Reply
>
> Another issue with auto creating your objects from a DB is
> that the DB tables, usually, aren't particularly OO. So
> the resultant auto-created objects tend to be only
> minimally OO. Depending on your needs and philosophies,
> the ease of creating them may or not be worth the issues
> working with them.

You are of course 100% correct on that. If you care about the model being "pure" OO (for some definition of "pure") while operating on a relational database you will need to create some kind of mapping. On the other hand, if you just create objects that are verbatim copies of the database schema, as it is often done, you are just creating boilerplate. The particular example given by Gavin does not seem to make that good of a case for the former.

nes

Posts: 137
Nickname: nn
Registered: Jul, 2004

Re: Impedance Mismatch and Dual Schemas Posted: Sep 27, 2007 9:24 AM
Reply to this message Reply
>
> This isn't to say that Rails isn't good. Personally I
> think it will take a little time to really tell whether
> Rails and it's approach is going to be proven out in the
> long term.
I think Rails sits in a sweep spot somewhere between the simplicity of PHP templates operating on database tables and the monster that is J2EE with EJB. In a year or so I foresee people criticizing Rails for its limitations as they criticize PHP today, but for creating personal home pages on the web with some server side scripting PHP is even today a pretty nice tool. It just one of the cycles of underengineering and overengineering solutions that the industry goes through.

Morgan Conrad

Posts: 307
Nickname: miata71
Registered: Mar, 2006

"Ruby-like" Java Posted: Sep 27, 2007 10:29 AM
Reply to this message Reply
I've never actually used Ruby, but I did write a little fun Java project as follows: (note - there were some exception to the rules below, but for the most part they held up o.k.)

Most of the classes were immutable. Where they were mutable, it was usually in a Collection.

So the actual fields were declared public final. No accessors were written.

XStream and DB4O were used for persistance. So no persistance code was written.

The actual code consisted of a constructor, equals and hashcode (if needed), and the actual domain logic.


For the record, it looked very "un-Java-like" and some of my co-workers were appalled.

Flat View: This topic has 18 replies on 2 pages [ « | 1  2 ]
Topic: New Meta-Programming APIs in Groovy 1.1 Previous Topic   Next Topic Topic: Actuate Sponsors BIRT Developer Exchange

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use