You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Bruno J. M. Melo" <br...@gmail.com> on 2006/05/28 16:05:39 UTC

Cayenne Eclipse Plugin

Hello All!!

  As most of you know, I'm developing this project for the GSoC, and the
first step before start coding is decide about which features are relevant
in a cayenne plugin.
 Kevin commented about recent discussion in dev-list about cayenne plugin.
After read the thread I grouped all interesting features below, followed by
some other ideas:

- XML editing with content assist, validation, and etc.
- Outline view with operations (add+remove+delete fields/relations).
- Refactoring support
- Add database field to table. This should update the classes, database, and
cayenne XML files.
- Quick fixes

This can be implemented in this way...

# Edit the cayenne files using multi-editor (similar to edit plugin.xml in
PDE). Each kind of cayenne XML file (cayenne.xml, *.map.xml, *.driver.xml)
will have the appropriated multi-editor. The advantage of this approach is
the flexibility in develop either using higher-level abstraction (similar to
CayenneModeler) or edit raw XML.

# Don't have a Cayenne Project, but "an instance of" Java Project... using
decorators [1] in the same way that antlreclipse [2] do.

Your feedback are very important!! The worst thing that can happen is create
a plugin who nobody uses.

[1] http://www.eclipse.org/articles/Article-Decorators/decorators.html
[2] http://antlreclipse.sourceforge.net/
-- 
>> bruno

Re: Cayenne Eclipse Plugin

Posted by Cris Daniluk <cr...@gmail.com>.
On 5/29/06, Øyvind Harboe <oy...@zylin.com> wrote:
> More wishes:
>
> - Browse database
> - Execute Cayenne queries in database browser.
>

Just out of curiosity... if this is an Eclipse plugin, why do things
that Eclipse already can? There are a million SQL plugins out there..
QuantumDB and SQLExplorer are two good ones, for example. Similarly,
XML editing is already out there...

If we're in the modeler, some of this stuff could certainly be cool,
but if we're in an Eclipse plugin, we should take advantage of all
Eclipse has to offer. Particularly since we only have a summer's worth
of resources to work on it ;)

Cris

RE: Cayenne Eclipse Plugin

Posted by "Gentry, Michael (Contractor)" <mi...@fanniemae.com>.
I talked with Andrus and Cris recently about post-1.2 building a DBEdit style capability into the Cayenne Modeler.  For those unfamiliar with it, here is the link:

http://www.rubicode.com/Software/DBEdit/

(Even if you don't have OS X or WebObjects on Windows, you can still see the screen shots.)

In a nutshell, DBEdit reads an EOModel (similar to the Cayenne XML files) and then allows you to browse and query the database, even using dotted path notation, etc.  It is also aware of relationships and you can follow them.  You can also edit the data and insert/delete rows.

It is a great tool when doing development and production support.  I think it would be far more useful as part of CM than as an Eclipse plugin.  One of the benefits of CM is it is IDE agnostic (you can use Eclipse, NetBeans, Idea, etc).  Also, I can give CM to a business analyst and they can at least look at the schema without firing up a complete IDE tool.  If they could also browse the DB, even sweeter.

Any thoughts?

Thanks,

/dev/mrg

PS. Yes, I know this would be a pretty big project improvement effort ...


-----Original Message-----
From: Øyvind Harboe [mailto:oyvind.harboe@zylin.com] 
Sent: Monday, May 29, 2006 7:51 AM
To: cayenne-dev@incubator.apache.org
Subject: Re: Cayenne Eclipse Plugin


More wishes:

- Browse database 
- Execute Cayenne queries in database browser. 
  
Can Eclipse DTP offer anything helpful?

http://www.eclipse.org/datatools/

-- 
Øyvind Harboe
http://www.zylin.com


Re: Cayenne Eclipse Plugin

Posted by Øyvind Harboe <oy...@zylin.com>.
More wishes:

- Browse database 
- Execute Cayenne queries in database browser. 
  
Can Eclipse DTP offer anything helpful?

http://www.eclipse.org/datatools/

-- 
Øyvind Harboe
http://www.zylin.com


Re: Cayenne Eclipse Plugin

Posted by Andrus Adamchik <an...@objectstyle.org>.
+1 - a virtual focus group. I am bracing for all the Modeler bashing  
to come :-)

Andrus

On May 28, 2006, at 3:22 PM, Øyvind Harboe wrote:

> On Sun, 2006-05-28 at 15:12 -0400, Andrus Adamchik wrote:
>> On May 28, 2006, at 2:47 PM, Øyvind Harboe wrote:
>>
>>> Here are some thoughts on a Cayenne Eclipse plugin:
>>>
>>>
>>> - Try teaching Cayenne to a couple of developers who have never
>>>   looked at Cayenne and try to determine where they are struggling.
>>>
>>> - Try "videotaping" more experienced Cayenne developers and see
>>>   where time disappears or where they get frustrated.
>>
>> Good ideas, but how is this practically achievable in the open source
>> remote development model.
>
> A first approximation can be gotten simply by asking subscribers to  
> this
> list to write up what newcomers are struggling with:
>
> http://objectstyle.org/cayenne/lists/cayenne-devel/2006/05/0187.html
>
> Cayenne developers could do the same for regular Cayenne users.
>
>
>
>
> -- 
> Øyvind Harboe
> http://www.zylin.com
>
>


Re: Cayenne Eclipse Plugin

Posted by Øyvind Harboe <oy...@zylin.com>.
On Sun, 2006-05-28 at 15:12 -0400, Andrus Adamchik wrote:
> On May 28, 2006, at 2:47 PM, Øyvind Harboe wrote:
> 
> > Here are some thoughts on a Cayenne Eclipse plugin:
> >
> >
> > - Try teaching Cayenne to a couple of developers who have never
> >   looked at Cayenne and try to determine where they are struggling.
> >
> > - Try "videotaping" more experienced Cayenne developers and see
> >   where time disappears or where they get frustrated.
> 
> Good ideas, but how is this practically achievable in the open source  
> remote development model.

A first approximation can be gotten simply by asking subscribers to this
list to write up what newcomers are struggling with:

http://objectstyle.org/cayenne/lists/cayenne-devel/2006/05/0187.html

Cayenne developers could do the same for regular Cayenne users.




-- 
Øyvind Harboe
http://www.zylin.com


Re: Cayenne Eclipse Plugin

Posted by Andrus Adamchik <an...@objectstyle.org>.
On May 28, 2006, at 2:47 PM, Øyvind Harboe wrote:

> Here are some thoughts on a Cayenne Eclipse plugin:
>
>
> - Try teaching Cayenne to a couple of developers who have never
>   looked at Cayenne and try to determine where they are struggling.
>
> - Try "videotaping" more experienced Cayenne developers and see
>   where time disappears or where they get frustrated.

Good ideas, but how is this practically achievable in the open source  
remote development model.


>
> - Have a look at the Spindle for Tapestry.  Lots of good ideas.
>   http://spindle.sourceforge.net/
>
> - QuickFix support for Cayenne in the Java editor. E.g. if I have an
>   error due to a non-existing method on a Cayenne object "setFoo()",
>   then  a new Cayenne Eclipse plugin contributed QuickFix could be to
>   add that property to the Cayenne .xml files and regenerate the
>   Cayenne superclasses. The QuickFix would oftentimes be able to
>   determine the type of the new property based upon the Eclipse
>   facilities to determine that from the context the new
>   property is used.

The fact that Spindle works good for Tapestry, doesn't mean that it  
will work for Cayenne - don't forget that in Cayenne changing object  
model also results in updating a database mapping. But we can  
probably apply some defaults. Certainly worth researching of course.

Andrus

Re: Cayenne Eclipse Plugin

Posted by Øyvind Harboe <oy...@zylin.com>.
Here are some thoughts on a Cayenne Eclipse plugin:


- Try teaching Cayenne to a couple of developers who have never
  looked at Cayenne and try to determine where they are struggling.

- Try "videotaping" more experienced Cayenne developers and see
  where time disappears or where they get frustrated.

- Have a look at the Spindle for Tapestry.  Lots of good ideas.
  http://spindle.sourceforge.net/

- QuickFix support for Cayenne in the Java editor. E.g. if I have an
  error due to a non-existing method on a Cayenne object "setFoo()",
  then  a new Cayenne Eclipse plugin contributed QuickFix could be to
  add that property to the Cayenne .xml files and regenerate the
  Cayenne superclasses. The QuickFix would oftentimes be able to
  determine the type of the new property based upon the Eclipse
  facilities to determine that from the context the new
  property is used.

- If the plugin could somehow address the confusion I describe in
  this message, it would be great:

http://objectstyle.org/cayenne/lists/cayenne-devel/2006/05/0187.html

- This may not have anything to do with the Eclipse plugin for
  Cayenne as such, but the Eclipse plugin will be used in a
  context.. That said. Spindle really could do with some OGNL
  completion. Anything that the Eclipse Cayenne plugin could do
  to help out here would be great. E.g. some hotkey to press 
  from *any* text/.xml file that allowed me to get ctrl-space
  completion when typing OGNL or OGNL like expressions would
  be *great*

- See this discussion on Eclipse plugin:

http://www.objectstyle.org/cayenne/lists/cayenne-user/2005/08/0050.html


-- 
Øyvind Harboe
http://www.zylin.com


Re: Cayenne Eclipse Plugin

Posted by Øyvind Harboe <oy...@zylin.com>.
One of the great things about the Cayenne Modeler is that it
does not require Eclipse. 

If supporting a standalone app for non-Eclipse users is 
still a goal, then it might be worth considering creating an
Eclipse RCP application with only the modeler/Cayenne Eclipse plugin.


(Oh, and Andrus suggestion to decide on a doable featureset for the
first Eclipse Cayenne plugin gets my vote :-)

-- 
Øyvind Harboe
http://www.zylin.com


Re: Cayenne Eclipse Plugin

Posted by Øyvind Harboe <oy...@zylin.com>.
Query builder of sorts?

- A query builder of sorts. This could help save time when writing
  queries and save time when learning how to write Cayenne
  queries. How? Don't know... Possibly:

  - More links to documentation/better documentation?
  - Translate SQL to Java Cayenne code? 
    "SELECT * FROM Foo" -> Java code...
  - Interactive ctrl-space completion of pathSpec's?
  

-- 
Øyvind Harboe
http://www.zylin.com


Re: Cayenne Eclipse Plugin

Posted by Andrus Adamchik <an...@objectstyle.org>.
One more thing - whatever final plan you may have - try to not go  
overboard with features - this may jeopardize the delivery date and  
the quality of the plugin. Do it in small manageable pieces, one  
piece at a time, instead of trying to design a 100% solution from the  
beginning. There is a fancy term for this - "extreme programming" :-)

Andrus



On May 28, 2006, at 3:23 PM, Andrus Adamchik wrote:
> All good ideas. Here is one more (IIRC I posted this before) -  
> integration with the current Swing modeler. Then the plugin will  
> become a "Modeler Plus" right away and will be a compelling tool  
> for the users even before it implements any other features.
>
> Specifically I am thinking of a feature that would regenerate Java  
> classes in Eclipse once the Modeler saves the mapping. Cayenne  
> already has cross-JVM messaging mechanism built in, so sending  
> events between CayenneModeler and Eclipse should be fairly easy.
>
> Andrus
>
> On May 28, 2006, at 10:05 AM, Bruno J. M. Melo wrote:
>
>> Hello All!!
>>
>>  As most of you know, I'm developing this project for the GSoC,  
>> and the
>> first step before start coding is decide about which features are  
>> relevant
>> in a cayenne plugin.
>> Kevin commented about recent discussion in dev-list about cayenne  
>> plugin.
>> After read the thread I grouped all interesting features below,  
>> followed by
>> some other ideas:
>>
>> - XML editing with content assist, validation, and etc.
>> - Outline view with operations (add+remove+delete fields/relations).
>> - Refactoring support
>> - Add database field to table. This should update the classes,  
>> database, and
>> cayenne XML files.
>> - Quick fixes
>>
>> This can be implemented in this way...
>>
>> # Edit the cayenne files using multi-editor (similar to edit  
>> plugin.xml in
>> PDE). Each kind of cayenne XML file (cayenne.xml, *.map.xml,  
>> *.driver.xml)
>> will have the appropriated multi-editor. The advantage of this  
>> approach is
>> the flexibility in develop either using higher-level abstraction  
>> (similar to
>> CayenneModeler) or edit raw XML.
>>
>> # Don't have a Cayenne Project, but "an instance of" Java  
>> Project... using
>> decorators [1] in the same way that antlreclipse [2] do.
>>
>> Your feedback are very important!! The worst thing that can happen  
>> is create
>> a plugin who nobody uses.
>>
>> [1] http://www.eclipse.org/articles/Article-Decorators/ 
>> decorators.html
>> [2] http://antlreclipse.sourceforge.net/
>> -- 
>>>> bruno
>
>


Re: Cayenne Eclipse Plugin

Posted by Andrus Adamchik <an...@objectstyle.org>.
All good ideas. Here is one more (IIRC I posted this before) -  
integration with the current Swing modeler. Then the plugin will  
become a "Modeler Plus" right away and will be a compelling tool for  
the users even before it implements any other features.

Specifically I am thinking of a feature that would regenerate Java  
classes in Eclipse once the Modeler saves the mapping. Cayenne  
already has cross-JVM messaging mechanism built in, so sending events  
between CayenneModeler and Eclipse should be fairly easy.

Andrus

On May 28, 2006, at 10:05 AM, Bruno J. M. Melo wrote:

> Hello All!!
>
>  As most of you know, I'm developing this project for the GSoC, and  
> the
> first step before start coding is decide about which features are  
> relevant
> in a cayenne plugin.
> Kevin commented about recent discussion in dev-list about cayenne  
> plugin.
> After read the thread I grouped all interesting features below,  
> followed by
> some other ideas:
>
> - XML editing with content assist, validation, and etc.
> - Outline view with operations (add+remove+delete fields/relations).
> - Refactoring support
> - Add database field to table. This should update the classes,  
> database, and
> cayenne XML files.
> - Quick fixes
>
> This can be implemented in this way...
>
> # Edit the cayenne files using multi-editor (similar to edit  
> plugin.xml in
> PDE). Each kind of cayenne XML file (cayenne.xml, *.map.xml,  
> *.driver.xml)
> will have the appropriated multi-editor. The advantage of this  
> approach is
> the flexibility in develop either using higher-level abstraction  
> (similar to
> CayenneModeler) or edit raw XML.
>
> # Don't have a Cayenne Project, but "an instance of" Java  
> Project... using
> decorators [1] in the same way that antlreclipse [2] do.
>
> Your feedback are very important!! The worst thing that can happen  
> is create
> a plugin who nobody uses.
>
> [1] http://www.eclipse.org/articles/Article-Decorators/decorators.html
> [2] http://antlreclipse.sourceforge.net/
> -- 
>>> bruno