cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Senecal <sene...@apple.com>
Subject Re: basic tutorial
Date Mon, 24 Dec 2012 00:26:20 GMT
Actually I have well over 100 tables in the model I use with EOF (similar to Cayenne). Most
of these tables join to other tables in a complex graph of connections. As with Cayenne I've
never had to worry about SQL or editing the configuration by hand. It just works with no effort
on my part. It has been a huge time saver, allowing a small team to work wonders of complex
coding. We can concentrate on the logic of what we want to do and spend time on getting the
data into and out of the database.

Joe

On Dec 23, 2012, at 3:00 PM, Michael Jaruska <michael.jaruska@gmail.com> wrote:

> i now it but i think there is one big misunderstanding: orm's hasn't been created for
> to make life better but for better abstraction.
> 
> think: try to code db with 100 tables into your code with pure sql and jdbc and try the
> same with orm. yes, you can lead in orm annotation hell but you do it just one time and
> than it just works. with jdbc there should be continuous hell throught all coding.
> 
> orm is good for abstraction, this way it do life better.
> 
> 
> 
> On 23.12.2012 17:23, Richard Frovarp wrote:
>> On 12/22/2012 05:31 PM, Michael Jaruska wrote:
>>> hmm, i was in hope not to make spam but instead of (short) point to some notes
>>> about using cayenne without modeler but just hand-editing xml files there was
rubbish
>>> about xml and editing them by hand. i'm editing xml by hand for more than 10
years
>>> without problems and there's more efective formats for machines than xml.
>>> 
>>> btw: in cayenne i'm beginner, hibernate, ibatis etc i'm using for years and
>>> yes, i (and in fact all my colleagues) am editing xml's by hand.
>>> 
>>> from this point of view, programmers of modeler are programming in wrong way...
>>> 
>> 
>> I used to edit SQL by hand for years. I've even hand created mapping from SQL results
into objects. I'm sure we all have. The whole point of ORMs is to make
>> life easier. I believe the Cayenne community takes a different approach to all of
this than many other systems. I haven't seen this explicitly state, but this
>> is the general feeling I get.
>> 
>> There's a famous talk about how ORMs suck. One of my sys admins sent it to me a couple
of years ago, but I can't find it now. In it, the speakers goes off on a
>> rant about how ORMs were supposed to make life better, easier for the developer.
Then he shows some annotation hell from Hibernate, and asks at what point did
>> we decide that those annotations were better than straight SQL?
>> 
>> With Cayenne we get to skip the SQL, we get to skip writing code (as it is generated),
and we get to skip the horrible annotations (it doesn't use them). That
>> leaves us with the XML document to generate the code, to do our SQL. Honestly, I
think I would rather do straight SQL than have to generate the XML. That's what
>> you have to do in Torque. On of the things that makes Cayenne stand apart is that
modeler. The modeler is accurate and quick. I can get in, do what I need to
>> do, and get on with more interesting parts of my code.
>> 
>> In this way the developers of the modeler has done exactly what I want, something
quick, simple, and less error prone than doing SQL, annotations, or XML directly.
>> 
>> Like others have said, if you want to do it by hand, use the modeler as a tutorial.
You can quickly figure out what it is doing by diffing your changes as you
>> go. There are times when editing by hand is advantageous, with the modeler providing
validation. Other developers can pick up your changes in commit messages
>> fairly well.


Mime
View raw message