You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Michael Gentry <mg...@masslight.net> on 2009/08/20 16:33:09 UTC

Modeler thoughts ...

I'm finally getting to use Cayenne again at work and a few others here
are either looking at using it or have even done a little
experimenting with it.  Yesterday a few of us had a conversation on
CM.  These are people who are experienced with ORMs, but essentially
new to Cayenne.  Some have EOF experience and some have Hibernate.
I'll try to summarize some of their key thoughts shortly and maybe we
can have a small discussion about what new users initially see when
starting to use Cayenne.  Also, having used the modeler relatively
extensively the past couple weeks, I have a few of my own.

Thanks,

mrg

Re: Modeler thoughts ...

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Aug 21, 2009, at 4:13 PM, Michael Gentry wrote:

>>>
>>> [8] E - "I can't figure out how to flatten a relationship."  I had  
>>> to
>>> fess up and tell him that I didn't know, either.
>>
>> Cayenne is different from EOF in having separate DB and object  
>> layers of
>> metadata, so naturally the process will be different. Use inspector  
>> button
>> on the ObjRelationship panel to set a db path (current trunk also  
>> includes
>> support for attribute flattenning via a similar UI).
>
> I can talk to him again, but he even went to the online docs and tried
> to figure it out and still wasn't able to do the mapping.

Could be also 2.0 vs. 3.0 thing. 3.0 Modeler is so much better...

Andrus


Re: Modeler thoughts ...

Posted by Michael Gentry <mg...@masslight.net>.
On Fri, Aug 21, 2009 at 3:00 AM, Andrus Adamchik<an...@objectstyle.org> wrote:
> Hi Michael,
>
> thanks for this list. Always good to see how the end users view things vs.
> your own assumptions about how it should work.
>
> On Aug 20, 2009, at 10:56 PM, Michael Gentry wrote:
>>
>> [1] E/H - Found creating a new model confusing.
>
> Could be a valid concern especially for people who have to unlearn stuff.
> The existing tutorial should help, but of course it is not built in the
> Modeler. I recommend the new users to spend half an hour on the tutorial.
> This usually answers all these questions.

I think if there was a wizard style create project, they'd be happier.
 If nothing else, create the DataDomain, DataMap, DataNode for them
(ask for the values and explain what each is used for).  Maybe ask a
few things like PK generation strategy, etc, too.


>> [2] E - Wanted the OS X concept of a wrapper/bundle for the model
>> files.  Essentially, he wanted to be able to name his model file
>> (something other than cayenne.xml), but as we talked more he wanted a
>> bundle that he can name ("MyProject" -> MyProject.cayenne directory)
>> and then the cayenne.xml, etc files would be under there.
>
> Somewhat related to that, there's a plan to allow multiple mappings from
> unrelated projects to get merged in runtime, so better modularity can be
> achieved. As for placing mappings in a folder, we've had this discussion
> before. I don't see much point to it.

Yeah, I know we've talked about it before, but I'm not the only one
that likes the idea.  :-)


>> [3] H - One guy used Cayenne quite a bit, but eventually ditched the
>> modeler and edited the XML by hand.  "It's not intuitive.  I was
>> confused.  I remember having so many problems setting up the correct
>> path so when files were generated they had the right path and package
>> names."  I'm not sure which version of the modeler he was using, but
>> probably 2.x.
>
> This was a long standing bug. It is fixed in 3.0M6. But if his only problem
> was class generation, I don't understand why he ditched the Modeler? I use
> the Modeler for all work *except* class generation, for which I'd use
> Ant/Maven.

I got that information second-hand and can try to glean more details
later as to why he ditched the modeler.  If some people are just
naturally wired to want to edit XML by hand, we can't do much about
that.  However, if there were deeper issues, it'll be good to know
them.  I'll try to find out more and report back.


>> [4] M/E/H - Allow multiple projects to be open at the same time.  The
>> EOF guy considered this a bug.
>
> +1.
>
>> [5] H - More useful validation.  "When it is validating the mapping
>> file, I dont find its output useful at all.  Since the mapping works
>> despite the warnings raised in the modeler, I question the value of
>> those warnings."  I think he was probably using 2.x then.
>
> Not sure what he means. Some examples would be helpful. Warnings are very
> useful to me at least. All of them are important.

I'll ask him for examples.


>> [8] E - "I can't figure out how to flatten a relationship."  I had to
>> fess up and tell him that I didn't know, either.
>
> Cayenne is different from EOF in having separate DB and object layers of
> metadata, so naturally the process will be different. Use inspector button
> on the ObjRelationship panel to set a db path (current trunk also includes
> support for attribute flattenning via a similar UI).

I can talk to him again, but he even went to the online docs and tried
to figure it out and still wasn't able to do the mapping.

>> [10] M - If you select an ObjEntity and look at the attributes, then
>> resize a column (say, Java Type) so you can read everything in the
>> column, then select something else, then come back to that same
>> ObjEntity, the column doesn't retain the size you had set.  I suspect
>> this applies to more than just the attributes tab (too lazy to go try
>> the others right now).
>
> +1. There's a Jira being implemented right now that would memorize the
> column width for all tables.
>
> Andrus


Thanks!

mrg

Re: Modeler thoughts ...

Posted by Andrus Adamchik <an...@objectstyle.org>.
Hi Michael,

thanks for this list. Always good to see how the end users view things  
vs. your own assumptions about how it should work.

On Aug 20, 2009, at 10:56 PM, Michael Gentry wrote:
> [1] E/H - Found creating a new model confusing.

Could be a valid concern especially for people who have to unlearn  
stuff. The existing tutorial should help, but of course it is not  
built in the Modeler. I recommend the new users to spend half an hour  
on the tutorial. This usually answers all these questions.

> [2] E - Wanted the OS X concept of a wrapper/bundle for the model
> files.  Essentially, he wanted to be able to name his model file
> (something other than cayenne.xml), but as we talked more he wanted a
> bundle that he can name ("MyProject" -> MyProject.cayenne directory)
> and then the cayenne.xml, etc files would be under there.

Somewhat related to that, there's a plan to allow multiple mappings  
from unrelated projects to get merged in runtime, so better modularity  
can be achieved. As for placing mappings in a folder, we've had this  
discussion before. I don't see much point to it.

> [3] H - One guy used Cayenne quite a bit, but eventually ditched the
> modeler and edited the XML by hand.  "It's not intuitive.  I was
> confused.  I remember having so many problems setting up the correct
> path so when files were generated they had the right path and package
> names."  I'm not sure which version of the modeler he was using, but
> probably 2.x.

This was a long standing bug. It is fixed in 3.0M6. But if his only  
problem was class generation, I don't understand why he ditched the  
Modeler? I use the Modeler for all work *except* class generation, for  
which I'd use Ant/Maven.

> [4] M/E/H - Allow multiple projects to be open at the same time.  The
> EOF guy considered this a bug.

+1.

> [5] H - More useful validation.  "When it is validating the mapping
> file, I dont find its output useful at all.  Since the mapping works
> despite the warnings raised in the modeler, I question the value of
> those warnings."  I think he was probably using 2.x then.

Not sure what he means. Some examples would be helpful. Warnings are  
very useful to me at least. All of them are important.

> [8] E - "I can't figure out how to flatten a relationship."  I had to
> fess up and tell him that I didn't know, either.

Cayenne is different from EOF in having separate DB and object layers  
of metadata, so naturally the process will be different. Use inspector  
button on the ObjRelationship panel to set a db path (current trunk  
also includes support for attribute flattenning via a similar UI).

> [10] M - If you select an ObjEntity and look at the attributes, then
> resize a column (say, Java Type) so you can read everything in the
> column, then select something else, then come back to that same
> ObjEntity, the column doesn't retain the size you had set.  I suspect
> this applies to more than just the attributes tab (too lazy to go try
> the others right now).

+1. There's a Jira being implemented right now that would memorize the  
column width for all tables.

Andrus



Re: Modeler thoughts ...

Posted by John Armstrong <si...@siberian.org>.
Number 2 is really interesting actually. As an option to "Generating
Classes" it would be really neat if it would 'Generate a Maven
Project' or 'Build Library' and create self-contained data libraries.
We distribute a maven dependancy for our data layer to multiple
projects that depend on it.

Ok, but maybe thats just how I work ;) If that is interesting to
anyone else I'd love to take a look at working on it. But if its only
interesting to me then I'll let it sit.

In general I tend to start at the database, build my tables and
foreign keys and then reverse engineer it back to the modeler for name
changes, query building and class generation. Once I do the bulk setup
I then use the modeler for minor changes, only going back to SQL (and
migration) for new tables/relationships.

I guess it depends on what your comfortable with and this is the
beauty of Cayenne to me. GUI person? Use the modeler on its own. XML
person? Generate it by hand. SQL guy, reverse engineer into Cayenne. I
love that optionality.

John-

On Thu, Aug 20, 2009 at 12:56 PM, Michael Gentry<mg...@masslight.net> wrote:
> Just to add some context, I'll use this legend:
>
> M = Me
> E = EOF guys
> H = Hibernate/Spring guys
>
> Meh.  Something like that.
>
> [1] E/H - Found creating a new model confusing.  Especially since they
> weren't familiar with the concepts of DataDomain, etc.  Basically,
> they get a blank window and have no idea where to start, even though
> they are familiar with ORM modeling techniques.  "I hate to be the
> typical Windows user, but some kind of wizard would be nice." (Said by
> a guy developing on OS X.)  Even I recall being a little confused by
> what domains, maps, and nodes were when I first started coming from
> EOF.
>
> [2] E - Wanted the OS X concept of a wrapper/bundle for the model
> files.  Essentially, he wanted to be able to name his model file
> (something other than cayenne.xml), but as we talked more he wanted a
> bundle that he can name ("MyProject" -> MyProject.cayenne directory)
> and then the cayenne.xml, etc files would be under there.
>
> [3] H - One guy used Cayenne quite a bit, but eventually ditched the
> modeler and edited the XML by hand.  "It's not intuitive.  I was
> confused.  I remember having so many problems setting up the correct
> path so when files were generated they had the right path and package
> names."  I'm not sure which version of the modeler he was using, but
> probably 2.x.
>
> [4] M/E/H - Allow multiple projects to be open at the same time.  The
> EOF guy considered this a bug.
>
> [5] H - More useful validation.  "When it is validating the mapping
> file, I dont find its output useful at all.  Since the mapping works
> despite the warnings raised in the modeler, I question the value of
> those warnings."  I think he was probably using 2.x then.
>
> [6] E - After generating DB schema, menu bar gets blitzed.  I told him
> this was due to a recent OS X update and hopefully Apple will fix it
> soon.
>
> [7] M - If you rename a DB attribute, it doesn't change the name in
> the ObjEntity even if you remember to sync the class.
>
> [8] E - "I can't figure out how to flatten a relationship."  I had to
> fess up and tell him that I didn't know, either.
>
> [9] M - Recent projects list.  When launching CM, I see a nice list
> with "/Volumes/Macintosh_HD/Users/mgentry/Projects/Eclipse/Works..."
> This fills up my recent projects list and I can't tell what is what.
>
> [10] M - If you select an ObjEntity and look at the attributes, then
> resize a column (say, Java Type) so you can read everything in the
> column, then select something else, then come back to that same
> ObjEntity, the column doesn't retain the size you had set.  I suspect
> this applies to more than just the attributes tab (too lazy to go try
> the others right now).
>
> [11] M - Generate Classes should probably show the entities first,
> then the code generator.  Perhaps put both in the same window so it is
> obvious what is being done.  The text "One entity selected" is a
> little too easy to ignore at the bottom of the window.
>
> [12] M - Generate Database Schema has similar problems to the Generate
> Classes, but is also inconsistent.  In GC, if you select the Map it
> will generate all classes by default, but if you select an ObjEntity
> it'll just generate that one class.  In GDS it doesn't matter which
> you select, it will do ALL tables.  Of course, you might easily miss
> this as the tables tab isn't the first thing selected and the GDS
> window doesn't tell you how many are selected (unlike GC).  Or you
> might get conditioned by the GC dialog and when doing a GDS assume it
> works the same way and end up dropping all of your tables (that
> happened to me the other day).  Also, the Uncheck All Tables toggle
> doesn't work right.
>
>
> OK, a dozen is a good number for now.  I've asked the others to pass
> on any other things if they think of it, but I wanted to try to
> kickstart a discussion about the future of CM.
>
> Thanks!
>
> mrg
>

Re: Modeler thoughts ...

Posted by Michael Gentry <mg...@masslight.net>.
Just to add some context, I'll use this legend:

M = Me
E = EOF guys
H = Hibernate/Spring guys

Meh.  Something like that.

[1] E/H - Found creating a new model confusing.  Especially since they
weren't familiar with the concepts of DataDomain, etc.  Basically,
they get a blank window and have no idea where to start, even though
they are familiar with ORM modeling techniques.  "I hate to be the
typical Windows user, but some kind of wizard would be nice." (Said by
a guy developing on OS X.)  Even I recall being a little confused by
what domains, maps, and nodes were when I first started coming from
EOF.

[2] E - Wanted the OS X concept of a wrapper/bundle for the model
files.  Essentially, he wanted to be able to name his model file
(something other than cayenne.xml), but as we talked more he wanted a
bundle that he can name ("MyProject" -> MyProject.cayenne directory)
and then the cayenne.xml, etc files would be under there.

[3] H - One guy used Cayenne quite a bit, but eventually ditched the
modeler and edited the XML by hand.  "It's not intuitive.  I was
confused.  I remember having so many problems setting up the correct
path so when files were generated they had the right path and package
names."  I'm not sure which version of the modeler he was using, but
probably 2.x.

[4] M/E/H - Allow multiple projects to be open at the same time.  The
EOF guy considered this a bug.

[5] H - More useful validation.  "When it is validating the mapping
file, I dont find its output useful at all.  Since the mapping works
despite the warnings raised in the modeler, I question the value of
those warnings."  I think he was probably using 2.x then.

[6] E - After generating DB schema, menu bar gets blitzed.  I told him
this was due to a recent OS X update and hopefully Apple will fix it
soon.

[7] M - If you rename a DB attribute, it doesn't change the name in
the ObjEntity even if you remember to sync the class.

[8] E - "I can't figure out how to flatten a relationship."  I had to
fess up and tell him that I didn't know, either.

[9] M - Recent projects list.  When launching CM, I see a nice list
with "/Volumes/Macintosh_HD/Users/mgentry/Projects/Eclipse/Works..."
This fills up my recent projects list and I can't tell what is what.

[10] M - If you select an ObjEntity and look at the attributes, then
resize a column (say, Java Type) so you can read everything in the
column, then select something else, then come back to that same
ObjEntity, the column doesn't retain the size you had set.  I suspect
this applies to more than just the attributes tab (too lazy to go try
the others right now).

[11] M - Generate Classes should probably show the entities first,
then the code generator.  Perhaps put both in the same window so it is
obvious what is being done.  The text "One entity selected" is a
little too easy to ignore at the bottom of the window.

[12] M - Generate Database Schema has similar problems to the Generate
Classes, but is also inconsistent.  In GC, if you select the Map it
will generate all classes by default, but if you select an ObjEntity
it'll just generate that one class.  In GDS it doesn't matter which
you select, it will do ALL tables.  Of course, you might easily miss
this as the tables tab isn't the first thing selected and the GDS
window doesn't tell you how many are selected (unlike GC).  Or you
might get conditioned by the GC dialog and when doing a GDS assume it
works the same way and end up dropping all of your tables (that
happened to me the other day).  Also, the Uncheck All Tables toggle
doesn't work right.


OK, a dozen is a good number for now.  I've asked the others to pass
on any other things if they think of it, but I wanted to try to
kickstart a discussion about the future of CM.

Thanks!

mrg

Re: Modeler thoughts ...

Posted by Michael Gentry <mg...@masslight.net>.
I'm using M6.  I'm not sure what they were using at the time, but I'll
ask that, too.

mrg


On Thu, Aug 20, 2009 at 10:50 AM, Andrus Adamchik<an...@objectstyle.org> wrote:
> Cool. Make sure you are using the trunk version (or at least M6). There's
> lots of recent changes.
>
> Andrus
>
> On Aug 20, 2009, at 5:33 PM, Michael Gentry wrote:
>
>> I'm finally getting to use Cayenne again at work and a few others here
>> are either looking at using it or have even done a little
>> experimenting with it.  Yesterday a few of us had a conversation on
>> CM.  These are people who are experienced with ORMs, but essentially
>> new to Cayenne.  Some have EOF experience and some have Hibernate.
>> I'll try to summarize some of their key thoughts shortly and maybe we
>> can have a small discussion about what new users initially see when
>> starting to use Cayenne.  Also, having used the modeler relatively
>> extensively the past couple weeks, I have a few of my own.
>>
>> Thanks,
>>
>> mrg
>>
>
>

Re: Modeler thoughts ...

Posted by Andrus Adamchik <an...@objectstyle.org>.
Cool. Make sure you are using the trunk version (or at least M6).  
There's lots of recent changes.

Andrus

On Aug 20, 2009, at 5:33 PM, Michael Gentry wrote:

> I'm finally getting to use Cayenne again at work and a few others here
> are either looking at using it or have even done a little
> experimenting with it.  Yesterday a few of us had a conversation on
> CM.  These are people who are experienced with ORMs, but essentially
> new to Cayenne.  Some have EOF experience and some have Hibernate.
> I'll try to summarize some of their key thoughts shortly and maybe we
> can have a small discussion about what new users initially see when
> starting to use Cayenne.  Also, having used the modeler relatively
> extensively the past couple weeks, I have a few of my own.
>
> Thanks,
>
> mrg
>