Improvements to Data Sources interface

Are you missing a feature? Request its implementation here.
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Improvements to Data Sources interface

Post by joewiz »

Currently Data Sources suffers from several problems:

1. Once a Data Source is entered and Connections are linked to it, the Data Source cannot be edited without a tedious process of deleting all associated Connections, editing the Data Source, and recreating the Connection. Request: allow Data Sources to be edited.

2. It's impossible to change a Connection's Data Source once the Connection is created. Request: allow each Connection's Data Source selection to be changed.

3. When testing different versions of software (such as eXist), I find myself creating new Connections based on old ones, with slight differences (such as port #). Request: Add a "Duplicate" button for Connections.
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Improvements to Data Sources interface

Post by adrian »

Hello,

We'll see what we can do. Needs a bit of redesign to allow that without breaking connections or opened resources from the database, etc.

I've added all your requests to our issue tracking tool.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Re: Improvements to Data Sources interface

Post by joewiz »

adrian wrote:I've added all your requests to our issue tracking tool.
Much appreciated, Adrian! I understand that this could involve quite an overhaul to this section of the preferences, so anything that's possible to improve this interface would be excellent.

Joe
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Re: Improvements to Data Sources interface

Post by joewiz »

Hello,

A related, but somewhat different request: Could the Data Sources settings be saved in project files? I would like to be able to share my Data Sources settings among different collaborators, but the setup of Data Sources for eXist requires a cumbersome set of steps be repeated on each computer. If I could share/send these settings among several machines in the same way I share other project settings, this would be ideal. I'm open to other solutions too.

Thanks,
Joe
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Improvements to Data Sources interface

Post by adrian »

Hi,

We will take your request under consideration.

The thing is, with the way passwords are kept in the options right now this would mean that the passwords from the database connections would be valid for one user and invalid for all others. So if we would allow data sources/connections in the project it would also mean that the passwords will be in clear(or very lightly hashed). So the security problem that would appear is that anyone who would have access to the project file could also have access to the passwords from that project.
There are ways to go around this(maybe a public key) but things could get very complicated.

Then there's the problem of data source drivers. Each user could have the driver in a different location on his machine. So the thing is, while in theory this would be very helpful, in practice it could cause some serious problems. Though I guess this could be avoided by placing the drivers relative to the project file.

I'll add all these to our issue tracking tool.
Let me know what are your thoughts.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Re: Improvements to Data Sources interface

Post by joewiz »

Hi Adrian,

Thanks for your reply. I see the difficulty. Is there some way that users could provide some sort of 'settings' file, that oXygen could read and use to create a Database Source? Pointing oXygen to this file would read in the settings? A username/password could be requested at this point by oXygen?

Something like:

<data-source>
<name>eXist data source</name>
<type>eXist</type>
<driver-files>
<driver-file>/Users/joe/workspace/exist/exist.jar</driver-file>
<driver-file>/Users/joe/workspace/exist/lib/core/ws-commons-util-1.0.2.jar</driver-file>
<driver-file>/Users/joe/workspace/exist/lib/core/xmldb.jar</driver-file>
<driver-file>/Users/joe/workspace/exist/lib/core/xmlrpc-client-3.1.3.jar</driver-file>
<driver-file>/Users/joe/workspace/exist/lib/core/xmlrpc-common-3.1.3.jar</driver-file>
</driver-files>
<connection>
<name>eXist on localhost 8080</name>
<URL>xmldb:exist://localhost:8080/exist/xmlrpc</URL>
<username>admin</username>
<password prompt="yes"></password>
</connection>
</data-source>

It would not be hard for individual database providers such as eXist to create utilities to generate such files using their installation paths. Then users could just drag/drop these files into oXygen.

What would you think of this?

Joe
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Improvements to Data Sources interface

Post by adrian »

Hello,

We'll consider your suggestion.

Right now you can use the Options -> Export Global Options/Import Global Options actions if you want to get the Data Source and Connections options across several Oxygen installations.

After you export the options(use .xml extension) you should open the exported options file in Oxygen and trim it a little to only contain the data sources and connections.
Look for 'database.stored.sessions1' and 'database.jdbc.drivers.1', you only need the entry elements(and all their child nodes) that contain these.
So in the end the trimmed options file should look like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<serialized version="11.2">
<map>
<entry>
<String xml:space="preserve">database.jdbc.drivers.1</String>
<jdbcDriverInfo-array>
...
</jdbcDriverInfo-array>
</entry>
<entry>
<String xml:space="preserve">database.stored.sessions1</String>
<dbSessionInfo-array>
...
</dbSessionInfo-array>
</entry>
</map>
</serialized>
Then you can import(Options -> Import Global Options) the trimmed option file on several Oxygen installations.
You will still have to re-enter the passwords for all the connections after you import them and there's the drivers location problem since it's absolute.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Re: Improvements to Data Sources interface

Post by joewiz »

Hi Adrian,

Thanks for your reply.

This global options route sounds very promising. Do these global options also include the list of Server URLs that appear in the Save to URL? I typically alternate saving between 2-3 different servers. I see save.autoconnect, save.is-user-and-password-saved, save.saved-password, save.saved-server, and save.saved-user -- but I only see 1 set of these items. Is there a provision for keeping multiple servers/accounts in the Save to URL dialog? (Or have I just created a new feature request -- for multiple servers/accounts in the Save to URL dialog?)

Thanks,
Joe
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Improvements to Data Sources interface

Post by adrian »

Hi Joe,

Unfortunately the 'Open URL'/'Save to URL' dialogs only keep the last used server, user and password(you've found the correct options tags).
I see we already have this feature request on our issue tracking tool. I'll add your vote.

Right now if you use several servers it would be best to create data connections for them(Options -> Preferences -> Data Sources, Connections). These connections can also be created directly from the 'Open URL'/'Save to URL' dialogs, use the button located just above the OK button('Click here to save and use...').

Then these connections can be used from the Data Source Explorer(Perspective -> Show View -> Data Source Explorer) side to side with the database connections. Then these will be found in the exported options in the "database.stored.sessions1" section.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Re: Improvements to Data Sources interface

Post by joewiz »

Hi Adrian,

Thanks for your reply, and for adding my vote for the Save to URL connection management feature. I know this is quite a common use case for eXist developers like myself. We'll have a local development machine, a remote production machine, and sometimes even 1+ test builds of eXist.

Your replies have been very thorough and helpful!

Thank you,
Joe
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: Improvements to Data Sources interface

Post by adrian »

Hi,

I just wanted to let you know that your original improvement requests(quoted below) have been implemented in v12.2(to be released very soon).

Regards,
Adrian
joewiz wrote:Currently Data Sources suffers from several problems:

1. Once a Data Source is entered and Connections are linked to it, the Data Source cannot be edited without a tedious process of deleting all associated Connections, editing the Data Source, and recreating the Connection. Request: allow Data Sources to be edited.

2. It's impossible to change a Connection's Data Source once the Connection is created. Request: allow each Connection's Data Source selection to be changed.

3. When testing different versions of software (such as eXist), I find myself creating new Connections based on old ones, with slight differences (such as port #). Request: Add a "Duplicate" button for Connections.
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
joewiz
Posts: 56
Joined: Fri Jun 06, 2008 8:05 pm

Re: Improvements to Data Sources interface

Post by joewiz »

Hi Adrian,

This is great news! Thank you so much for considering the request, and implementing it! I look forward to v12.2. You guys are the best.

Joe
adrian wrote:I just wanted to let you know that your original improvement requests(quoted below) have been implemented in v12.2(to be released very soon).
Post Reply