Skip to main content

simple data binding to a Collection?

23 replies [Last post]
shahbaz
Offline
Joined: 2005-01-16
Points: 0

It seems there are several data models, with many interfaces/abstract classes up and down the JDNC heirarchy. But I haven't been able to find how to take a Collection and use that as a table/data model.
Couldn't a JNTable, at its simplest, be made to understand a simple Collection since we have all the basic information we need:
number of rows,
number of columns (get an object from the collection, find the number of 'getters' using reflection, cache that information and you have your 'default' number of columns).

Basically I don't want to have to maintain two different data structures (the main collection containing my data and a data model for display) and at the same time I don't want to use one of the provided data models as my base data structure since existing collection implementations are much more flexible.

By the way, good job so far :)

Shahbaz

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Hani Suleiman

I'd strongly recommend AGAINST going with the apache approach.

Talk to any project leads there, or any of the higher up java folks
(rather than the 'apache' folks), and you'll hear many complaints about
how the broken voting process they have often results in nothing being
done, and much more time spent voting and dealing with voting issues
than actually doing the work.

On Aug 19, 2004, at 7:22 PM, Adrian Sutton wrote:

>> Perhaps you can give us some insight into how decisions are made in
>> other OSS projects? Apache seems to have something to say about this
>> process and I think this seems like a reasonable policy to adopt (see
>> "Decision Making"):
>>
>> http://www.apache.org/foundation/how-it-works.html#management
>
> For the record, I'm a small-time Apache committer (the Jakarta Commons
> HTTPClient project) and am a member of the Jakarta Project Management
> Committee. (Please note that I speak on behalf of myself and not
> Apache) I'm fairly certain that there would be a number of people who
> would be willing to share their experiences with Apache and it's
> community building processes, however Jakarta has a fairly strong
> focus on server-side work so most of them wouldn't have paid much
> attention to the JDNC project. If it would be beneficial I can
> forward questions on to the appropriate Apache mailing lists to gather
> answers.
>
> Naturally I wouldn't expect JDNC to work the same way as Apache and I
> don't mean to suggest that Apache does everything right either - just
> wanted to make people aware of the potential for collaboration.
>
>> --Mark
>
> Regards,
>
> Adrian Sutton.
>
> ----------------------------------------------
> Intencha "tomorrow's technology today"
> Ph: 38478913 0422236329
> Suite 8/29 Oatland Crescent
> Holland Park West 4121
> Australia QLD
> www.intencha.com

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

Amy Fowler

Adrian Sutton wrote:
>
> Naturally I wouldn't expect JDNC to work the same way as Apache and I
> don't mean to suggest that Apache does everything right either - just
> wanted to make people aware of the potential for collaboration.

We hold Apache in the highest esteem and consider it the
quintessential open source project worth emulating. Obviously,
there are differences rooted in our lineage to java.net, but where
we have latitude, we'd like to learn from the apache experience.

Aim

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

Patrick Wright

Hello

A slightly less hystrionic mail than yesterday's--sorry if it was
over-the-top.

> For me, one of the biggest issues is the ability to make a difference
quickly. I think that if people come around here and make suggestions
and
> those thoughts or discussions trail off then they may well get
> disappointed and leave. Usually people show up with a handful of things
they care about. The trick is to get their help as quickly and
efficiently
> as possible before they get bored.

Well put.

I've seen different approaches for sharing information/discussion/code
related to open software development. My sense is that they tend to solve
slightly different problems, and each has particular strengths.

I follow the JEdit (editor) mailing list for users and dev, and have
contributed a few minor things (2 plugins with macros). They have several
mechanisms for sharing:
- post to the list as attachment (e.g. a script in beanshell)
- post as inline text (also usually BSH)
- post diff to the list (very rare)
- post new plugin/macro to personal website
- post same to community website "beta" area
- check into CVS (if you have permission)

If there is a plugin you want to help fix or extend, you usually contact
the owner/maintainer directly by email, which may result in exchange of
code. Unless the plugin is abandoned (the core is actively maintained),
the owner/maintainer has final say over what goes it.

You can request access to CVS but can also stay outside that process and
just shuttle things around via FTP or email.

I personally feel mailing lists are ideal for extended discussions on
design, and as far as code, good for sharing very small pieces of
glue-code, how to initialize something, what a particular call looks like.

Longer pieces of code sent to a mailing list are problematic if they are
not perfect the first time, and get modified over several responses, and
also not great because searching mailing lists tends to be pretty low-tech
and imprecise.

To summarize: JDNC has a need to accept suggestions for
patches/fixes/extensions to the core through its own special review/legal
process, I have no problem with that. But there should also be a
low-overhead, easily accessible way of sharing small code ideas or samples
that may never make it to the core because of lack of generality,
simplicity, they are a workaround, etc. The latter case may end up in a
FAQ or a tutorial at some point, but in the meantime they belong on a
community bulletin board or shared webspace.

Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

Adrian Sutton

> Perhaps you can give us some insight into how decisions are made in
> other OSS projects? Apache seems to have something to say about this
> process and I think this seems like a reasonable policy to adopt (see
> "Decision Making"):
>
> http://www.apache.org/foundation/how-it-works.html#management

For the record, I'm a small-time Apache committer (the Jakarta Commons
HTTPClient project) and am a member of the Jakarta Project Management
Committee. (Please note that I speak on behalf of myself and not
Apache) I'm fairly certain that there would be a number of people who
would be willing to share their experiences with Apache and it's
community building processes, however Jakarta has a fairly strong focus
on server-side work so most of them wouldn't have paid much attention
to the JDNC project. If it would be beneficial I can forward questions
on to the appropriate Apache mailing lists to gather answers.

Naturally I wouldn't expect JDNC to work the same way as Apache and I
don't mean to suggest that Apache does everything right either - just
wanted to make people aware of the potential for collaboration.

> --Mark

Regards,

Adrian Sutton.

----------------------------------------------
Intencha "tomorrow's technology today"
Ph: 38478913 0422236329
Suite 8/29 Oatland Crescent
Holland Park West 4121
Australia QLD
www.intencha.com
[PGP.sig]

Mark Davidson

On 08/19/2004 04:22 PM, Adrian Sutton wrote:
> For the record, I'm a small-time Apache committer (the Jakarta Commons
> HTTPClient project) and am a member of the Jakarta Project Management
> Committee. (Please note that I speak on behalf of myself and not
> Apache) I'm fairly certain that there would be a number of people who
> would be willing to share their experiences with Apache and it's
> community building processes, however Jakarta has a fairly strong focus
> on server-side work so most of them wouldn't have paid much attention to
> the JDNC project. If it would be beneficial I can forward questions on
> to the appropriate Apache mailing lists to gather answers.

This would be great!

> Naturally I wouldn't expect JDNC to work the same way as Apache and I
> don't mean to suggest that Apache does everything right either - just
> wanted to make people aware of the potential for collaboration.

I have nothing but the utmost respect for the Apache foundation. I have
always found the software to be extremely high quality and projects seem
to move forward as a reasonable clip. I would like to beg, borrow or
steal from their development and management practices rather than invent
our own.

Thanks,

--Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

rbair
Offline
Joined: 2003-07-08
Points: 0

> I'll file an enhancement request for Collection
> support for JavaBeanDataModel/DataModel.

Ok, so if I had code that I wanted to contribute on this, how would I go about it? I can't find any way to add notes, code, etc to an RFE.

And the JCA is forthcoming (you may find it tomorrow morning).

Amy Fowler

jdnc-interest@javadesktop.org wrote:

> You're right that the JDNC code does not currently support collections "out of the box", but this has more to do with the current implementation of DefaultDataModel (or JavaBeanDataModel, or whatever its called :)). The current implementation wraps a single object instead of a collection, for no real reason other than, I suppose, the time to code up the full implementation.
>
> I've actually written an implementation that handles collections, and if I had somewhere to put it I would. Its pretty trivial, though, so anybody could crank one out in a few hours.

You don't have to wait for the incubator to make such contributions.
If you've signed the JCA you can submit code diffs (ideally inside
an issue report) and if the change is a fairly obvious improvement
(such as the one you mention above), then we'll try to integrate it
into the jdnc codebase quickly. Folks who repeatedly submit such
contributions over time are the likely candidates to gain future
"Developer" status.....(meritocrasy).

If the change is more controvercial, then it may require some forum
discussion first. All in all, if the community voices favor over
such changes, we'll adopt them.

Aim

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

Amy Fowler

jdnc-interest@javadesktop.org wrote:

> It seems there are several data models, with many interfaces/abstract classes up and down the JDNC heirarchy. But I haven't been able to find how to take a Collection and use that as a table/data model.
> Couldn't a JNTable, at its simplest, be made to understand a simple Collection since we have all the basic information we need:
> number of rows,
> number of columns (get an object from the collection, find the number of 'getters' using reflection, cache that information and you have your 'default' number of columns).
>
> Basically I don't want to have to maintain two different data structures (the main collection containing my data and a data model for display) and at the same time I don't want to use one of the provided data models as my base data structure since existing collection implementations are much more flexible.

I agree that we should make it easier to plug-in collections.
The primary problem with using the existing collections classes as
data models is that they do not emit events on value or structure
changes. Obviously we could wrap the collections to do so, but it
would be nice if there were standard versions which provided such
notification. [I'd been meaning to talk about this with Josh Bloch
for sometime]

Aim

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

shahbaz
Offline
Joined: 2005-01-16
Points: 0

Ok, here's a simple implementation. There are two classes: ListDataModel which is both a list and a tablemodel. You have to pass in your own List (I suppose there could be a default Vector or ArrayList there) and a ColumnModelDefiner which gets information from within a data object (although I'm sure there are better implementation).
Once again, this is just a quick test. There may be several problems with it (concurrency, firetable...change too costly versus firetable...insert/delete/update?, etc.)
Actually I wish Lists had built-in events for updating, inserting, deleting, etc. so it could be used directly in a jlist/jtable, etc.
Any way, on to other problems...in different threads :)
(btw, if this is actually useful, please do with it what you will)

Shahbaz

-----------------------
/*
* Created on Aug 16, 2004
*
*/

/**
* @author shahbaz
*
*/
public interface ColumnModelDefiner {
public int getColumnCount();
public Object getValuetAt(int column);
public String getColumnName(int column);
public Class getColumnClass(int column);

}
------------------------
/*
* Created on Aug 16, 2004
*
*/

import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;

import javax.swing.table.AbstractTableModel;

import org.jdesktop.swing.data.MetaData;

/**
* @author shahbaz
*
*/
public class ListDataModel extends AbstractTableModel implements List {

private List list;
private ColumnModelDefiner definer;

private ListDataModel(){
super();
}

public ListDataModel(List lst,ColumnModelDefiner cmd){
super();
list=lst;
definer=cmd;
}

/* (non-Javadoc)
* @see javax.swing.table.TableModel#getColumnCount()
*/
public int getColumnCount() {
return definer.getColumnCount();
}
/* (non-Javadoc)
* @see javax.swing.table.TableModel#getRowCount()
*/
public int getRowCount() {
return list.size();
}
/* (non-Javadoc)
* @see javax.swing.table.TableModel#getValueAt(int, int)
*/
public Object getValueAt(int rowIndex, int columnIndex) {
return ((ColumnModelDefiner)list.get(rowIndex)).getValuetAt(columnIndex);
}

//List delegate methods

/**
* @param index
* @param element
*/
public void add(int index, Object element) {
list.add(index, element);
this.fireTableRowsInserted(index,index);
}
/**
* @param o
* @return
*/
public boolean add(Object o) {
//this.fireTableRowsInserted(list.size()-1,list.size()-1);
this.fireTableDataChanged();
return list.add(o);
}
/**
* @param index
* @param c
* @return
*/
public boolean addAll(int index, Collection c) {
this.fireTableDataChanged();
//this.fireTableRowsInserted(index,list.size()-1);
return list.addAll(index, c);
}
/**
* @param c
* @return
*/
public boolean addAll(Collection c) {
this.fireTableDataChanged();
//this.fireTableRowsInserted(list.size(),list.size()-1+c.size()-1);
return list.addAll(c);
}
/**
*
*/
public void clear() {
this.fireTableDataChanged();
//this.fireTableRowsDeleted(0,list.size()-1);
list.clear();
}
/**
* @param o
* @return
*/
public boolean contains(Object o) {
return list.contains(o);
}
/**
* @param c
* @return
*/
public boolean containsAll(Collection c) {
return list.containsAll(c);
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals(Object obj) {
return list.equals(obj);
}
/**
* @param index
* @return
*/
public Object get(int index) {
return list.get(index);
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
return list.hashCode();
}
/**
* @param o
* @return
*/
public int indexOf(Object o) {
return list.indexOf(o);
}
/**
* @return
*/
public boolean isEmpty() {
return list.isEmpty();
}
/**
* @return
*/
public Iterator iterator() {
return list.iterator();
}
/**
* @param o
* @return
*/
public int lastIndexOf(Object o) {
return list.lastIndexOf(o);
}
/**
* @return
*/
public ListIterator listIterator() {
return list.listIterator();
}
/**
* @param index
* @return
*/
public ListIterator listIterator(int index) {
return list.listIterator(index);
}
/**
* @param index
* @return
*/
public Object remove(int index) {
this.fireTableDataChanged();
//this.fireTableRowsDeleted(index,index);
return list.remove(index);
}
/**
* @param o
* @return
*/
public boolean remove(Object o) {
this.fireTableDataChanged();
//this.fireTableRowsDeleted(list.size()-1,list.size()-1);
return list.remove(o);
}
/**
* @param c
* @return
*/
public boolean removeAll(Collection c) {
this.fireTableDataChanged();
//this.fireTableRowsDeleted(0,list.size()-1);
return list.removeAll(c);
}
/**
* @param c
* @return
*/
public boolean retainAll(Collection c) {
this.fireTableDataChanged();
return list.retainAll(c);
}
/**
* @param index
* @param element
* @return
*/
public Object set(int index, Object element) {
this.fireTableDataChanged();
//this.fireTableRowsUpdated(index,index);
return list.set(index, element);
}
/**
* @return
*/
public int size() {
return list.size();
}
/**
* @param fromIndex
* @param toIndex
* @return
*/
public List subList(int fromIndex, int toIndex) {
return list.subList(fromIndex, toIndex);
}
/**
* @return
*/
public Object[] toArray() {
return list.toArray();
}
/**
* @param a
* @return
*/
public Object[] toArray(Object[] a) {
return list.toArray(a);
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
public String toString() {
return list.toString();
}
}

Joshua Marinacci

This looks great. A default Collections aware data model strikes me as
exactly the kind of thing we should include in the library. There's a
lot of simple but annoying boilerplate here, and it would be really nice
if we could provide this by default.

- Joshua

jdnc-interest@javadesktop.org wrote:

> Ok, here's a simple implementation. There are two classes: ListDataModel which is both a list and a tablemodel. You have to pass in your own List (I suppose there could be a default Vector or ArrayList there) and a ColumnModelDefiner which gets information from within a data object (although I'm sure there are better implementation).
> Once again, this is just a quick test. There may be several problems with it (concurrency, firetable...change too costly versus firetable...insert/delete/update?, etc.)
> Actually I wish Lists had built-in events for updating, inserting, deleting, etc. so it could be used directly in a jlist/jtable, etc.
> Any way, on to other problems...in different threads :)
> (btw, if this is actually useful, please do with it what you will)
>
> Shahbaz
>
> -----------------------
> /*
> * Created on Aug 16, 2004
> *
> */
>
> /**
> * @author shahbaz
> *
> */
> public interface ColumnModelDefiner {
> public int getColumnCount();
> public Object getValuetAt(int column);
> public String getColumnName(int column);
> public Class getColumnClass(int column);
>
> }
> ------------------------
> /*
> * Created on Aug 16, 2004
> *
> */
>
> import java.util.Collection;
> import java.util.Iterator;
> import java.util.List;
> import java.util.ListIterator;
>
> import javax.swing.table.AbstractTableModel;
>
> import org.jdesktop.swing.data.MetaData;
>
> /**
> * @author shahbaz
> *
> */
> public class ListDataModel extends AbstractTableModel implements List {
>
> private List list;
> private ColumnModelDefiner definer;
>
> private ListDataModel(){
> super();
> }
>
> public ListDataModel(List lst,ColumnModelDefiner cmd){
> super();
> list=lst;
> definer=cmd;
> }
>
> /* (non-Javadoc)
> * @see javax.swing.table.TableModel#getColumnCount()
> */
> public int getColumnCount() {
> return definer.getColumnCount();
> }
> /* (non-Javadoc)
> * @see javax.swing.table.TableModel#getRowCount()
> */
> public int getRowCount() {
> return list.size();
> }
> /* (non-Javadoc)
> * @see javax.swing.table.TableModel#getValueAt(int, int)
> */
> public Object getValueAt(int rowIndex, int columnIndex) {
> return ((ColumnModelDefiner)list.get(rowIndex)).getValuetAt(columnIndex);
> }
>
> //List delegate methods
>
> /**
> * @param index
> * @param element
> */
> public void add(int index, Object element) {
> list.add(index, element);
> this.fireTableRowsInserted(index,index);
> }
> /**
> * @param o
> * @return
> */
> public boolean add(Object o) {
> //this.fireTableRowsInserted(list.size()-1,list.size()-1);
> this.fireTableDataChanged();
> return list.add(o);
> }
> /**
> * @param index
> * @param c
> * @return
> */
> public boolean addAll(int index, Collection c) {
> this.fireTableDataChanged();
> //this.fireTableRowsInserted(index,list.size()-1);
> return list.addAll(index, c);
> }
> /**
> * @param c
> * @return
> */
> public boolean addAll(Collection c) {
> this.fireTableDataChanged();
> //this.fireTableRowsInserted(list.size(),list.size()-1+c.size()-1);
> return list.addAll(c);
> }
> /**
> *
> */
> public void clear() {
> this.fireTableDataChanged();
> //this.fireTableRowsDeleted(0,list.size()-1);
> list.clear();
> }
> /**
> * @param o
> * @return
> */
> public boolean contains(Object o) {
> return list.contains(o);
> }
> /**
> * @param c
> * @return
> */
> public boolean containsAll(Collection c) {
> return list.containsAll(c);
> }
> /* (non-Javadoc)
> * @see java.lang.Object#equals(java.lang.Object)
> */
> public boolean equals(Object obj) {
> return list.equals(obj);
> }
> /**
> * @param index
> * @return
> */
> public Object get(int index) {
> return list.get(index);
> }
> /* (non-Javadoc)
> * @see java.lang.Object#hashCode()
> */
> public int hashCode() {
> return list.hashCode();
> }
> /**
> * @param o
> * @return
> */
> public int indexOf(Object o) {
> return list.indexOf(o);
> }
> /**
> * @return
> */
> public boolean isEmpty() {
> return list.isEmpty();
> }
> /**
> * @return
> */
> public Iterator iterator() {
> return list.iterator();
> }
> /**
> * @param o
> * @return
> */
> public int lastIndexOf(Object o) {
> return list.lastIndexOf(o);
> }
> /**
> * @return
> */
> public ListIterator listIterator() {
> return list.listIterator();
> }
> /**
> * @param index
> * @return
> */
> public ListIterator listIterator(int index) {
> return list.listIterator(index);
> }
> /**
> * @param index
> * @return
> */
> public Object remove(int index) {
> this.fireTableDataChanged();
> //this.fireTableRowsDeleted(index,index);
> return list.remove(index);
> }
> /**
> * @param o
> * @return
> */
> public boolean remove(Object o) {
> this.fireTableDataChanged();
> //this.fireTableRowsDeleted(list.size()-1,list.size()-1);
> return list.remove(o);
> }
> /**
> * @param c
> * @return
> */
> public boolean removeAll(Collection c) {
> this.fireTableDataChanged();
> //this.fireTableRowsDeleted(0,list.size()-1);
> return list.removeAll(c);
> }
> /**
> * @param c
> * @return
> */
> public boolean retainAll(Collection c) {
> this.fireTableDataChanged();
> return list.retainAll(c);
> }
> /**
> * @param index
> * @param element
> * @return
> */
> public Object set(int index, Object element) {
> this.fireTableDataChanged();
> //this.fireTableRowsUpdated(index,index);
> return list.set(index, element);
> }
> /**
> * @return
> */
> public int size() {
> return list.size();
> }
> /**
> * @param fromIndex
> * @param toIndex
> * @return
> */
> public List subList(int fromIndex, int toIndex) {
> return list.subList(fromIndex, toIndex);
> }
> /**
> * @return
> */
> public Object[] toArray() {
> return list.toArray();
> }
> /**
> * @param a
> * @return
> */
> public Object[] toArray(Object[] a) {
> return list.toArray(a);
> }
> /* (non-Javadoc)
> * @see java.lang.Object#toString()
> */
> public String toString() {
> return list.toString();
> }
> }
> ---
> [Message sent by forum member 'shahbaz' (Shahbaz)]
>
> http://www.javadesktop.org/forums/thread.jspa?messageID=23148&#23148
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
> For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

rbair
Offline
Joined: 2003-07-08
Points: 0

You're right that the JDNC code does not currently support collections "out of the box", but this has more to do with the current implementation of DefaultDataModel (or JavaBeanDataModel, or whatever its called :)). The current implementation wraps a single object instead of a collection, for no real reason other than, I suppose, the time to code up the full implementation.

I've actually written an implementation that handles collections, and if I had somewhere to put it I would. Its pretty trivial, though, so anybody could crank one out in a few hours.

Rich

Mark Davidson
Offline
Joined: 2006-02-17
Points: 0

I think that models contstructed from Collections is a great idea. I like the idea of a grand unified model (sort of like DataModel) which is a model abstraction that can be plugged into any visual component. The visual component can present the set/sub-set of information contained in the model.

I agree with Shahbaz that JNTable (and other components) should have methods which take a Collection and construct a suitable model as it's implementation.

> You're right that the JDNC code does not currently
> support collections "out of the box", but this has
> more to do with the current implementation of
> DefaultDataModel (or JavaBeanDataModel, or whatever
> its called :)). The current implementation wraps a
> single object instead of a collection, for no real
> reason other than, I suppose, the time to code up the
> full implementation.

JavaBeanDataModel was constructed as a way to encapsulate web service types (which are usually a JavaBean instance) in a web service demo that uses the JDNC form. See https://j2se-webservice-blueprint.dev.java.net/.

I didn't think beyond the specific use from the ws demo but I felt that having a generic JavaBean model would be a good idea. I think it would be a great idea to extend it to take/use a Collection as a backing store. I always felt that the setJavaBean()/getJavaBean() methods were a little clumsey. I think it would be more elegant to utilize the DataModel.set/getRecordIndex methods instead.

I'll file an enhancement request for Collection support for JavaBeanDataModel/DataModel.

Thanks,

--Mark

rbair
Offline
Joined: 2003-07-08
Points: 0

Sorry Mark, I keep forgetting about those RFE's. In previous OSS projects I've worked on everything was done via mailing lists, so I keep wanting a way to post code in the forums. I'm going to go through all of the changes I've made to my local copy of JDNC and start filing requests -- hopefully it'll help.

I do wonder where decisions get made, because often we've talked about solutions to things in these forums but never hear what the final is (sometimes we do, and I wonder if that means all of the other times nothing was decided at all?).

Richard

Mark Davidson

Hi Richard,

On 08/17/2004 07:49 PM, jdnc-interest@javadesktop.org wrote:
> Sorry Mark, I keep forgetting about those RFE's. In previous OSS
> projects I've worked on everything was done via mailing lists, so I
> keep wanting a way to post code in the forums. I'm going to go
> through all of the changes I've made to my local copy of JDNC and
> start filing requests -- hopefully it'll help.

We are still getting our heads around the OSS project management and so
here are still a lot of holdover processes from J2SE land. In J2SE we
get a lot of feedback from all over the world on the various aliases,
customers and systems/sales engineers and if this doesn't turn into an
RFE in a database with an owner then it will possibly never make it into
the code base. Perhaps this is too heavyweight for an OS project but for
me, the issues list is a way to prioritize tasks and make sure that
issues/bugs/rfes are tracked.

We are interested in seeing the code changes to the code base to
implement features or fix bugs. I think the best way to get the changes
is to generate cvs diffs and send them. Ideally, we should have a review
mechanism - either on the email list or privately - and then the
submitter could check in the changes when they get approved.

> I do wonder where decisions get made, because often we've talked
> about solutions to things in these forums but never hear what the
> final is (sometimes we do, and I wonder if that means all of the
> other times nothing was decided at all?).

Perhaps you can give us some insight into how decisions are made in
other OSS projects? Apache seems to have something to say about this
process and I think this seems like a reasonable policy to adopt (see
"Decision Making"):

http://www.apache.org/foundation/how-it-works.html#management

--Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

rbair
Offline
Joined: 2003-07-08
Points: 0

Hey Mark,

> We are still getting our heads around the OSS project
> management and so
> here are still a lot of holdover processes from J2SE
> land. In J2SE we
> get a lot of feedback from all over the world on the
> various aliases,
> customers and systems/sales engineers and if this
> doesn't turn into an
> RFE in a database with an owner then it will possibly
> never make it into
> the code base. Perhaps this is too heavyweight for an
> OS project but for
> me, the issues list is a way to prioritize tasks and
> make sure that
> issues/bugs/rfes are tracked.

For me, one of the biggest issues is the ability to make a difference quickly. I think that if people come around here and make suggestions and those thoughts or discussions trail off then they may well get disappointed and leave. Usually people show up with a handful of things they care about. The trick is to get their help as quickly and efficiently as possible before they get bored.

> Perhaps you can give us some insight into how
> decisions are made in
> other OSS projects? Apache seems to have something to
> say about this
> process and I think this seems like a reasonable
> policy to adopt (see
> "Decision Making"):
>
> http://www.apache.org/foundation/how-it-works.html#man
> agement

I'm going to have to check that link out. My experience for the most part has been with log4j & postgres (hackers mailing list), and to a much less extent James.

Log4j did most everything in the mailing lists. Folks would discuss ideas and submit patches on the list, and committers would then take those ideas and act on them. During the time that I frequented log4j-dev log4j was pretty stable, so there weren't that many threads going on at any given time, so there wasn't a big organizational headache.

A couple of guys were starting the rewrite of chainsaw at that time and did an awful lot of collaboration off-line which kind of torqued some folks, and it was decided to do it all via the mailing list so everybody could provide input (no point having it be open source if the developement and decision processes aren't open too!).

The postgres hackers list is quite another story. They also tend to do everything (it appears) over the mailing list including submitting patches via the mailing list. They're a lot more aggressive than any other group I've tracked (not a real feel-good group. They kind of say it like it is). They have 25-50 posts every day -- especially since they just went to 8.0 beta.

It seems with these different projects that the preferred mode of communication is the mailing list with attachments for code discussions, and then they continue the conversation until a committer puts it up to a vote and then it gets implemented.

I don't know how it goes with other projects, most notably I haven't a clue what the process is like on the kernel hackers list.

Rich

rbair
Offline
Joined: 2003-07-08
Points: 0

Really, the forum approach works pretty well, I think. A few new "features" ;-) and it'd be a better solution than email in a lot of ways.

If each forum post allowed for the attachment of files, then we'd have a much cleaner way to view/discuss code than pasting it inline.

A "vote" feature where from the main forum view you could tell that a thread was under vote might be cool.

Rich

shahbaz
Offline
Joined: 2005-01-16
Points: 0

Patrick,
Setting up a sandbox is a good idea. I'm new to this forum (new to Swing actually) so I'm not sure what has been discussed (other than the basic search I did for my specefic problem). For me at least, such a 'scratch pad' won't help much without some more documentation on the extended API. Right now I'm just trying to figure out:
1. the relationship between datamodel, tablemodel and their many derivitives,
2. good explanation of the difference between JXTable and JNTable,
3. how the extended column model (with visibility attribute) works with table model (is there even a relation?)
4. why the filtering mechanism is available from JNTable rather than the underlying model (if i have a chart and a table showing the same table, filter on the table should reflect changes in the chart as well)
etc., etc., etc.
In any case, this project has kept me from jumping to .NET for data intensive GUIs :)

Patrick Wright

Suggestion: this sounds like a good idea, but rather than wait for the
JDNC team to discuss it and add it, it seems these ideas should be posted
to a public sandbox, which can be immediately browsed for code, and
periodically scanned for good ideas to integrate into the main APIs.
Basically, don't let normal, healthy and cautious decision making by the
main team stop the larger community from trying new ideas.

There was talk of setting up a sandbox for this purpose...but was that
'real soon now', or is it available?

If not, we can set up a project to this end on Sourceforge or Savannah.

Patrick

> It seems there are several data models, with many interfaces/abstract
> classes up and down the JDNC heirarchy. But I haven't been able to find
> how to take a Collection and use that as a table/data model.
> Couldn't a JNTable, at its simplest, be made to understand a simple
> Collection since we have all the basic information we need:
> number of rows,
> number of columns (get an object from the collection, find the number of
> 'getters' using reflection, cache that information and you have your
> 'default' number of columns).
>
> Basically I don't want to have to maintain two different data structures
> (the main collection containing my data and a data model for display) and
> at the same time I don't want to use one of the provided data models as my
> base data structure since existing collection implementations are much
> more flexible.
>
> By the way, good job so far :)
>
> Shahbaz
> ---
> [Message sent by forum member 'shahbaz' (Shahbaz)]
>
> http://www.javadesktop.org/forums/thread.jspa?messageID=22900奴
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
> For additional commands, e-mail: jdnc-help@jdnc.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

Amy Fowler

Patrick Wright wrote:

> Suggestion: this sounds like a good idea, but rather than wait for the
> JDNC team to discuss it and add it, it seems these ideas should be posted
> to a public sandbox, which can be immediately browsed for code, and
> periodically scanned for good ideas to integrate into the main APIs.
> Basically, don't let normal, healthy and cautious decision making by the
> main team stop the larger community from trying new ideas.
>
> There was talk of setting up a sandbox for this purpose...but was that
> 'real soon now', or is it available?

The person tasked with setting this up has just come back from
vacation, so we'll try to make this a priority.

>
> If not, we can set up a project to this end on Sourceforge or Savannah.

I think you'll find that our core team is pretty receptive to ideas,
suggestions, code, so it would be ideal if folks would attempt to work
these ideas within the community before forking a new one, thereby
diluting the value of this project.

We're a small core team, so part of the battle is just getting to
implementing all the great ideas, changes, etc. We already have
a lot of good things in the queue due to community suggestions.
The easier you make it for us to include your idea (hint: code diffs
that compile & work with current cvs tree), the faster we're likely
to get to it. You must have signed & faxed back the JCA (we've fixed
the bug in the routing, so they will get to us now).

In the meantime, we'll get that incubator set up too, because I agree
that we don't want to be a bottleneck for exploring good ideas.

Aim

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

Patrick Wright


>> If not, we can set up a project to this end on Sourceforge or Savannah.
>
> I think you'll find that our core team is pretty receptive to ideas,
> suggestions, code, so it would be ideal if folks would attempt to work
> these ideas within the community before forking a new one, thereby
> diluting the value of this project.

Fair enough--but can the JDNC team clarify (when time allows) what this
sandbox will be like, e.g. rules for use, posting, etc.? I would prefer if
there was some part of it where any developer could post a small code
sample as a suggestion for people to try out, even if it is not intended
for a change to the JDNC core--AND allow developers to post that without
signing the JCA--basically, I would like to have a portion of the
incubator that is LGPL (or compatible) pure and simple...this is slightly
different than the goal of submitting patches to the JDNC core.

My suggestion of Sourceforge or Savanna was *not* about forking JDNC core,
but allowing a low-overhead, completely open forum for posting code
snippets, ideas, etc. related to using the JDNC libraries. Navigate to
site/Post/paste code in form text area (or upload), fill out a couple of
fields, submit. Just make it easy for people to share...enforce code
quality through pride of ownership, not through oversight (in this
case)...or have a voting mechanism.

Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

rbair
Offline
Joined: 2003-07-08
Points: 0

> I would prefer if
> there was some part of it where any developer could
> post a small code
> sample as a suggestion for people to try out, even if
> it is not intended
> for a change to the JDNC core--AND allow developers
> to post that without
> signing the JCA--basically, I would like to have a
> portion of the
> incubator that is LGPL (or compatible) pure and
> simple...this is slightly
> different than the goal of submitting patches to the
> JDNC core.

I'm interested in seeing if this would pass muster with Sun's lawyers. I mean, if somebody posted copyrighted code to the sandbox and we liked what we saw (not knowing, of course, that it was copyrighted) and put it into JDNC core we'd be toast. So if we have ways of allowing people to post code without the JCA or some other protection then there needs to be a formal way to keep track of who posted what so we could go back and get formal approval before posting to JDNC proper.

>
> My suggestion of Sourceforge or Savanna was *not*
> about forking JDNC core,
> but allowing a low-overhead, completely open forum
> for posting code
> snippets, ideas, etc. related to using the JDNC
> libraries. Navigate to
> site/Post/paste code in form text area (or upload),
> fill out a couple of
> fields, submit. Just make it easy for people to
> share...

I know I for one have been longing for a proper dev mailing list for the same reasons. It allows for discussion of actual code, posting of code, etc without the overhead of somebody maintaining another source tree or having anarchy. Assuming anarchy carries overhead :-). Just another option.

Rich

Patrick Wright

>> I would prefer if there was some part of it where any developer could
>> post a small code sample as a suggestion for people to try out, even if
>> it is not intended for a change to the JDNC core--AND allow developers
>> to post that without signing the JCA--basically, I would like to have a
>> portion of the incubator that is LGPL (or compatible) pure and
>> simple...this is slightly different than the goal of submitting patches
to the JDNC core.
>
> I'm interested in seeing if this would pass muster with Sun's lawyers. I
> mean, if somebody posted copyrighted code to the sandbox and we liked what
> we saw (not knowing, of course, that it was copyrighted) and put it into
> JDNC core we'd be toast. So if we have ways of allowing people to post
> code without the JCA or some other protection then there needs to be a
> formal way to keep track of who posted what so we could go back and get
> formal approval before posting to JDNC proper.

I realize that Sun, or maybe this wing of the Java development team, might
be treading new ground with this whole JDNC/LGPL project. I appreciate,
honestly, the JDNC licensing, the fact that we have this mailing list,
that there is intelligent and open participation by the Sun/JDNC
team...that all seems great, and I think JDNC will benefit from it.

One way or another people are going to share with each other. You will
find people who don't want to, don't have time or interest to, sign the
JCA. And if they need to fax in the JCA to be able to post a code snippet
to the JDNC sandbox, they will leave. They will go to other sites to post
in that case--there are Java forums all over the net. Or they will write
for Javaworld, or post to their own site...and we are back to state of the
union 2004, a million interested Swing developers and many untended roots
of code.

There are some very bright people (and I'm not one of them) who would love
to improve Java's capabilities. Doesn't mean that Sun has to agree with
any, all, or most of them. But some of the work out there is
mind-boggling--I mean--just to point out one piece of work--check out
http://buoy.sourceforge.net/. Public domain. Complete toolkit on top of
Swing to facilitate creating apps in Swing. With tutorials, API docs, etc.
Don't you want this guy on your side?

There should be some way to bring these people into the fold while still
allowing them their independence, freedom of mind, purpose, etc., and
allowing Sun to market and develop Java to its own advantage.

Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

rameshgupta
Offline
Joined: 2004-06-04
Points: 0

> One way or another people are going to share with
> each other. You will find people who don't want to,
> don't have time or interest to, sign the JCA. And if
> they need to fax in the JCA to be able to post a code
> snippet to the JDNC sandbox, they will leave. They will
> go to other sites to post in that case--
> there are Java forums all over the net.
> Or they will write for Javaworld, or post to their own
> site...and we are back to state of the union 2004,
> a million interested Swing developers and
> many untended roots of code.

I was in a JCA/opensource meeting where I brought up this issue specifically, and the unequivocal word from Sun was that the JCA is "not negotiable". Having said that, some clarification is in order.

The JCA is only required for code that is expected to make it to the JDNC codebase in one form or another. In other words, signing the JCA is a prerequisite for checking the code into the CVS repositories, not for posting to the forum -- assuming, of course, that you otherwise have the legal authority to share the code in a public forum.

Also, someone in the meeting pointed out that Sun's JCA is actually more liberal than GNU and Apache, both of which require an outright copyright assignment (not Joint) if you want to see you code under the GNU or Apache banner. Roughly, this translates into developers having more of their inidividual rights preserved under JCA than under GNU or Apache.

>
> There are some very bright people (and I'm not one of
> them) who would love to improve Java's capabilities.
>
[snip]
>
> There should be some way to bring these people into
> the fold while still allowing them their independence,
> freedom of mind, purpose, etc., and allowing Sun to
> market and develop Java to its own advantage.
>
> Patrick

That's the motivation behind opensourcing JDNC and the "JOINT" copyright assignment.

Ramesh