You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrey Razumovsky (JIRA)" <ji...@apache.org> on 2009/10/22 09:40:59 UTC

[jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler

    [ https://issues.apache.org/jira/browse/CAY-762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768592#action_12768592 ] 

Andrey Razumovsky commented on CAY-762:
---------------------------------------

FYI
JGraph has moved to BSD since 5.13:
http://www.jgraph.com/jgraphlog.html

I assume this means we can now use it? The library seems to be quite promising

> ERDiagram for Object Entities in Cayenne Modeler
> ------------------------------------------------
>
>                 Key: CAY-762
>                 URL: https://issues.apache.org/jira/browse/CAY-762
>             Project: Cayenne
>          Issue Type: New Feature
>          Components: CayenneModeler GUI
>    Affects Versions: 3.0
>            Reporter: Ahmed Mohombe
>            Assignee: Andrus Adamchik
>
> Please add an ER Diagram to the Cayenne Modeler. This is the feature that I miss the most from WebObjects.
> For start it would be even enough to have  an ER Diagram View (so no interactive activities) - just display and layout of entities.
> I think this would help allot and would increase the productivity with CM - most people think visually.
> I don't think that it would be complicated to implement, the most complicated question to answer is what graph library is allowed to use, due to the restrictive "license compatibility" of the Apache license.
> Thanks in advance,
> Ahmed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)

Posted by Michael Gentry <mg...@masslight.net>.
On Mon, Nov 2, 2009 at 4:55 AM, Andrus Adamchik <an...@objectstyle.org> wrote:
> For all its undeniable advantages, IMO the main usability issue with
> CayenneModeler is the fact that it is separate from an IDE. This "gap"
> results in the following problems:
>
> 1. Losing work context when switching between the apps:
> You have to often jump between the IDE and the Modeler. When switching, you
> lose your work context. E.g. click on a Java class name within some code,
> the class opens... Then you'd like to see its Cayenne mapping. To do that,
> you have to go to a different application, type something in a search box,
> open the entity, then tab between attributes/relationships, then look for
> DbEntity, tab between attributes/relationships again. It is too far away
> from the original Java class. I'd like to see Java/XML/Modeler
> representations of the same entity in the same view.

For me, and others here, this isn't a big deal.  We are used to having
a separate modeler (EOModeler).  Almost everyone here has two monitors
and it is nice having Eclipse on one monitor and the modeler on the
other.  Sure, you can open up multiple windows in Eclipse, but Eclipse
is a heavy weight.  We also use the WOLips plugin for our WebObjects
projects.  That modeler still isn't as nice as EOModeler (no offense
to the WOLips people -- they are doing a great job) and part of me
thinks it is because it just doesn't feel right inside Eclipse (I know
-- hard to quantify a feeling).  Also, with a separate modeler, it is
easier to give the model to our DBAs and business users to look at
instead of having to configure Eclipse for them.

I distinctly remember you not liking the idea of an Eclipse plugin in
the past, but you are entitled to change your mind.  :-)

> 2. Manual Refresh
> When the model is saved, you have to refresh files in IDE to pick up the
> change.

I'm not convinced this is a big enough issue.  I have Eclipse's
workspace set to refresh automatically and it seems relatively OK.

> 3. Class Generation:
> You need to generate classes manually on model change, then refresh files in
> the IDE. For Maven/Eclipse users cgen problem is somewhat addressed, as you
> can tie cgen to Maven, and Maven to Eclipse, so classes are generated on
> refresh. Still you have to do refresh, and then a second refresh (first
> refresh for xml, second for the generated classes - totally annoying).

I've gotten into the pattern of making model changes (saving
frequently) and then generating the schema changes (or manually
updating the DB) and then regenerating the classes.  If the classes
are automatically generated, they are potentially out-of-sync with the
DB.  Also, frameworks like Tapestry 5 will not automatically pick up
the class changes (live class reloading) for Cayenne changes.  To me,
this feature is a wash.  It saves a little bit of effort, but not a
significant amount to me.

> The best way to address the gap is to write an IDE plugin replacing the
> Modeler. There's a bunch of advantages and disadvantages to that:
>
> [good]
>
> * everything is integrated

Only if you use Eclipse.

> * Eclipse environment provides lots of built in services that we can take
> advantage of (most notably it has a built in project model), including graph
> capabilities.
>
> [bad]
>
> * not everybody's using Eclipse (e.g. Kevin mentioned he's an IDEA user).
> Supporting multiple IDE's is not realistic for us. I guess this can be
> addressed by packaging it into a standalone SWT app.

How easy is it to generate a standalone SWT application?  (I'm
relatively ignorant of SWT.)

> * we'll have to support multiple versions of Eclipse, and will be dependent
> on Eclipse API evolution.
>
> [ugly]
>
> * the time we invested in the Modeler. Reproducing that in Eclipse would be
> non-trivial.

Indeed.  Would it be worth the time?  If re-doing it, would it be
better to do it in SWT?  Netbeans (Matisse GUI Builder)?  FX?  SwiXML
and kin?  I think before that can really be decided, we really need to
know where we want the modeler to go.  It is the critical interface
into Cayenne.  It is what pulls people in.  The underlying ORM needs
to be solid/stable, but the GUI is the window into it.

> Or we can go with some hybrid approach of having an Eclipse plugin
> exchanging events with the Modeler. Not sure if we can make the user
> experience as nice, we'll have to support 2 tools instead of 1, and we'll
> have to support an extra messaging layer. But this is probably less work
> overall...
>
> Or we can write an Eclipse plugin in parallel with the Modeler and provide
> both as independent tools... Such internal competition will be a resource
> drain though.
>
> So nothing is free, and these are some hard choices... I am sort of in favor
> of the last one, as even an initial plugin prototype will show whether we
> can have significant usability improvements, without being a full Modeler
> replacement.
>
> Andrus

Re: Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Nov 2, 2009, at 12:53 PM, Bob Schellink wrote:

>  Preferences > General > Workspace > Refresh Automatically

Haven't tried it, but looks like something that would cause race  
conditions, conflicting with command line builds, git updates, etc.

Andrus


Re: Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)

Posted by Bob Schellink <sa...@gmail.com>.
You guys probably know this already but Eclipse does have support for refreshing files outside the 
IDE. It uses polling though, so it far from perfect:

   Preferences > General > Workspace > Refresh Automatically

Not sure about IDEA but Netbeans also supports this feature.

kind regards

bob

Andrus Adamchik wrote:
> 
> On Nov 2, 2009, at 12:17 PM, Andrey Razumovsky wrote:
> 
>> Once again, I'm all for Cayenne-Eclipse plugin, but I'm sceptical 
>> about its
>> future in current state of Cayenne community
> 
> I agree with this assessment.
> 
> On the other hand there is a chance that starting a prototype will cause 
> interest in the community and we'll get dedicated participants. This is 
> a case of "build it and they'll come". E.g. Apache Click project has a 
> simple Cayenne plugin. Maybe we can collaborate with them somehow. So 
> there's hope (and there's also Summer of Code next year ;-)).
> 
> I am no Eclipse platform guru either, and have very little time, but I 
> am interested enough to start poking and prototype a plugin that does 
> something that Modeler doesn't. So that it will be a nice-to-have plugin 
> for Cayenne users, even though it does not substitute the Modeler. This 
> may generate some interest (or not).
> 
> But yeah, I agree with you, and let's step carefully and try not to 
> overcommit ourselves to something that we can't deliver.
> 
> Andrus
> 
> 


Re: Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)

Posted by Andrey Razumovsky <ra...@gmail.com>.
In the meanwhile, I'll continue my research with JGraph. Nobody knows, what
will come out of this plugin idea. After all, provided it is constanly
improved, CM can become a "studio" that plugin will never be

2009/11/2 Andrus Adamchik <an...@objectstyle.org>

>
> On Nov 2, 2009, at 12:17 PM, Andrey Razumovsky wrote:
>
>  Once again, I'm all for Cayenne-Eclipse plugin, but I'm sceptical about
>> its
>> future in current state of Cayenne community
>>
>
> I agree with this assessment.
>
> On the other hand there is a chance that starting a prototype will cause
> interest in the community and we'll get dedicated participants. This is a
> case of "build it and they'll come". E.g. Apache Click project has a simple
> Cayenne plugin. Maybe we can collaborate with them somehow. So there's hope
> (and there's also Summer of Code next year ;-)).
>
> I am no Eclipse platform guru either, and have very little time, but I am
> interested enough to start poking and prototype a plugin that does something
> that Modeler doesn't. So that it will be a nice-to-have plugin for Cayenne
> users, even though it does not substitute the Modeler. This may generate
> some interest (or not).
>
> But yeah, I agree with you, and let's step carefully and try not to
> overcommit ourselves to something that we can't deliver.
>
> Andrus
>
>


-- 
Andrey

Re: Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Nov 2, 2009, at 12:17 PM, Andrey Razumovsky wrote:

> Once again, I'm all for Cayenne-Eclipse plugin, but I'm sceptical  
> about its
> future in current state of Cayenne community

I agree with this assessment.

On the other hand there is a chance that starting a prototype will  
cause interest in the community and we'll get dedicated participants.  
This is a case of "build it and they'll come". E.g. Apache Click  
project has a simple Cayenne plugin. Maybe we can collaborate with  
them somehow. So there's hope (and there's also Summer of Code next  
year ;-)).

I am no Eclipse platform guru either, and have very little time, but I  
am interested enough to start poking and prototype a plugin that does  
something that Modeler doesn't. So that it will be a nice-to-have  
plugin for Cayenne users, even though it does not substitute the  
Modeler. This may generate some interest (or not).

But yeah, I agree with you, and let's step carefully and try not to  
overcommit ourselves to something that we can't deliver.

Andrus


Re: Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)

Posted by Andrey Razumovsky <ra...@gmail.com>.
Hi,

In ideal world, it is surely better to rewrite modeler with SWT. But CM is
too big application to do it in a couple of weekends. My main question is:
who will be doing the work? Personally I am weak with SWT and most likely
will not participate.
Moreover, it is obvious that such plugin will be buggy at the start. So
we'll need to support both CM and SWT-CM at the same time.

I agree that such unusability as refreshing the model is user-unfriendly.
But, until we find Cayenne&SWT guru with a lot of free time, improving
modeler usability seems to be the only realistic goal for us. E.g. add
ability to generate classes automatically etc..

Once again, I'm all for Cayenne-Eclipse plugin, but I'm sceptical about its
future in current state of Cayenne community

2009/11/2 Aristedes Maniatis <ar...@maniatis.org>

> On 2/11/09 8:19 PM, Andrus Adamchik wrote:
>
>> That would've been ideal, but likely won't work. IIRC Mike from WOLips
>> commented on that at one point, saying it is not possible to have a
>> single tool for both Cayenne and EOF. I think he looked at the Modeler
>> initially (or maybe even used some of the code?) but couldn't keep it as
>> a common library due to lots of "small" differences. Still probably
>> worth pinging WOLips community to get some feedback on the idea.
>>
>
> There are four options:
>
> 1. Keep Cayenne Modeler as a Swing app as it is today.
> 2. Write a whole new Eclipse plugin from scratch
> 3. Fork the WOLips code as a starting point for writing a Cayenne Eclipse
> plugin
> 4. Work together with WOLips to have one multi-purpose modeler
>
> It sounds like (4) may be difficult: I am sure it would be since there are
> competing goals and needs. And (3) might benefit us, but give nothing back
> to WoLips, so there will be no incentive for them to work together on new
> improvements. But still (3) might be easier than starting from nothing:
> surely easier than (2).
>
>
> Ari
>
>
> --
>
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>



-- 
Andrey

Re: Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)

Posted by Aristedes Maniatis <ar...@maniatis.org>.
On 2/11/09 8:19 PM, Andrus Adamchik wrote:
> That would've been ideal, but likely won't work. IIRC Mike from WOLips
> commented on that at one point, saying it is not possible to have a
> single tool for both Cayenne and EOF. I think he looked at the Modeler
> initially (or maybe even used some of the code?) but couldn't keep it as
> a common library due to lots of "small" differences. Still probably
> worth pinging WOLips community to get some feedback on the idea.

There are four options:

1. Keep Cayenne Modeler as a Swing app as it is today.
2. Write a whole new Eclipse plugin from scratch
3. Fork the WOLips code as a starting point for writing a Cayenne Eclipse plugin
4. Work together with WOLips to have one multi-purpose modeler

It sounds like (4) may be difficult: I am sure it would be since there are competing goals and needs. And (3) might benefit us, but give nothing back to WoLips, so there will be no incentive for them to work together on new improvements. But still (3) might be easier than starting from nothing: surely easier than (2).


Ari

-- 

-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Re: Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Nov 2, 2009, at 11:07 AM, Aristedes Maniatis wrote:
>>
> Well, there already is an ugliness that quite a bit of Modeler  
> specific code lives in the main Cayenne jar. So pulling that out  
> into a ui-core library is probably the first step. Should the main  
> Cayenne jar even know how to *write* the model into an XML file?

Agree. We can have a cayenne-project module (i.e. something not  
belonging to either GUI or runtime).

> Is there a possibility to work with the WOlips people on this? And  
> they are sure to chip in on the idea of writing a GUI ERDiagram  
> tool. But is EOF just too different to make it work?

That would've been ideal, but likely won't work. IIRC Mike from WOLips  
commented on that at one point, saying it is not possible to have a  
single tool for both Cayenne and EOF. I think he looked at the Modeler  
initially (or maybe even used some of the code?) but couldn't keep it  
as a common library due to lots of "small" differences. Still probably  
worth pinging WOLips community to get some feedback on the idea.

Andrus

Re: Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Nov 2, 2009, at 2:42 PM, Kevin Menard wrote:

>  At that point, you'd be much better off
> building it as an RCP app and then looking to integrate that with
> Eclipse.

That's what I was thinking about.

Andrus


Re: Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)

Posted by Kevin Menard <ni...@gmail.com>.
> I too like the basic concept of an Eclipse based tool. Sure we'll annoy a
> bunch of IDEA/Netbeans users, but they can still fire up Eclipse to use the
> modeler. Maybe it is 120Mb larger than CayenneModeler, but it still would
> work.

This, to me, would not be an acceptable solution.  I just wouldn't
bother with the modeler any more, unless you provided me built
assemblies that set everything up.  But, if I don't use Eclipse, I'm
not going to fool around with setting up a plugin source, installing
that plugin, and then hoping it works outside the context of a project
I'm not using Eclipse for.  At that point, you'd be much better off
building it as an RCP app and then looking to integrate that with
Eclipse.

-- 
Kevin

Re: Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)

Posted by Aristedes Maniatis <ar...@maniatis.org>.
On 2/11/09 7:55 PM, Andrus Adamchik wrote:
> Or we can go with some hybrid approach of having an Eclipse plugin
> exchanging events with the Modeler. Not sure if we can make the user
> experience as nice, we'll have to support 2 tools instead of 1, and
> we'll have to support an extra messaging layer. But this is probably
> less work overall...

Well, there already is an ugliness that quite a bit of Modeler specific code lives in the main Cayenne jar. So pulling that out into a ui-core library is probably the first step. Should the main Cayenne jar even know how to *write* the model into an XML file?

> Or we can write an Eclipse plugin in parallel with the Modeler and
> provide both as independent tools... Such internal competition will be
> a resource drain though.
>
> So nothing is free, and these are some hard choices... I am sort of in
> favor of the last one, as even an initial plugin prototype will show
> whether we can have significant usability improvements, without being
> a full Modeler replacement.

My thought is that it is just so much work to maintain two, that one will always be inferior and eventually die.

Is there a possibility to work with the WOlips people on this? And they are sure to chip in on the idea of writing a GUI ERDiagram tool. But is EOF just too different to make it work?

I too like the basic concept of an Eclipse based tool. Sure we'll annoy a bunch of IDEA/Netbeans users, but they can still fire up Eclipse to use the modeler. Maybe it is 120Mb larger than CayenneModeler, but it still would work.

Ari Maniatis

-- 

-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Eclipse vs. Swing (Re: [jira] Commented: (CAY-762) ERDiagram for Object Entities in Cayenne Modeler)

Posted by Andrus Adamchik <an...@objectstyle.org>.
Here is one of those "big strategy" emails that tend to have negative  
impact on things that we can do here and now, instead of doing the  
"right" thing some time later. So no intent to discourage CAY-762  
implementation, just a somewhat related issue that we may discuss in  
parallel.

For all its undeniable advantages, IMO the main usability issue with  
CayenneModeler is the fact that it is separate from an IDE. This "gap"  
results in the following problems:

1. Losing work context when switching between the apps:
You have to often jump between the IDE and the Modeler. When  
switching, you lose your work context. E.g. click on a Java class name  
within some code, the class opens... Then you'd like to see its  
Cayenne mapping. To do that, you have to go to a different  
application, type something in a search box, open the entity, then tab  
between attributes/relationships, then look for DbEntity, tab between  
attributes/relationships again. It is too far away from the original  
Java class. I'd like to see Java/XML/Modeler representations of the  
same entity in the same view.

2. Manual Refresh
When the model is saved, you have to refresh files in IDE to pick up  
the change.

3. Class Generation:
You need to generate classes manually on model change, then refresh  
files in the IDE. For Maven/Eclipse users cgen problem is somewhat  
addressed, as you can tie cgen to Maven, and Maven to Eclipse, so  
classes are generated on refresh. Still you have to do refresh, and  
then a second refresh (first refresh for xml, second for the generated  
classes - totally annoying).

The best way to address the gap is to write an IDE plugin replacing  
the Modeler. There's a bunch of advantages and disadvantages to that:

[good]

* everything is integrated
* Eclipse environment provides lots of built in services that we can  
take advantage of (most notably it has a built in project model),  
including graph capabilities.

[bad]

* not everybody's using Eclipse (e.g. Kevin mentioned he's an IDEA  
user). Supporting multiple IDE's is not realistic for us. I guess this  
can be addressed by packaging it into a standalone SWT app.
* we'll have to support multiple versions of Eclipse, and will be  
dependent on Eclipse API evolution.

[ugly]

* the time we invested in the Modeler. Reproducing that in Eclipse  
would be non-trivial.

Or we can go with some hybrid approach of having an Eclipse plugin  
exchanging events with the Modeler. Not sure if we can make the user  
experience as nice, we'll have to support 2 tools instead of 1, and  
we'll have to support an extra messaging layer. But this is probably  
less work overall...

Or we can write an Eclipse plugin in parallel with the Modeler and  
provide both as independent tools... Such internal competition will be  
a resource drain though.

So nothing is free, and these are some hard choices... I am sort of in  
favor of the last one, as even an initial plugin prototype will show  
whether we can have significant usability improvements, without being  
a full Modeler replacement.

Andrus




On Oct 22, 2009, at 10:40 AM, Andrey Razumovsky (JIRA) wrote:
>    [ https://issues.apache.org/jira/browse/CAY-762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768592 
> #action_12768592 ]
>
> Andrey Razumovsky commented on CAY-762:
> ---------------------------------------
>
> FYI
> JGraph has moved to BSD since 5.13:
> http://www.jgraph.com/jgraphlog.html
>
> I assume this means we can now use it? The library seems to be quite  
> promising
>
>> ERDiagram for Object Entities in Cayenne Modeler
>> ------------------------------------------------
>>
>>                Key: CAY-762
>>                URL: https://issues.apache.org/jira/browse/CAY-762
>>            Project: Cayenne
>>         Issue Type: New Feature
>>         Components: CayenneModeler GUI
>>   Affects Versions: 3.0
>>           Reporter: Ahmed Mohombe
>>           Assignee: Andrus Adamchik
>>
>> Please add an ER Diagram to the Cayenne Modeler. This is the  
>> feature that I miss the most from WebObjects.
>> For start it would be even enough to have  an ER Diagram View (so  
>> no interactive activities) - just display and layout of entities.
>> I think this would help allot and would increase the productivity  
>> with CM - most people think visually.
>> I don't think that it would be complicated to implement, the most  
>> complicated question to answer is what graph library is allowed to  
>> use, due to the restrictive "license compatibility" of the Apache  
>> license.
>> Thanks in advance,
>> Ahmed.
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>