[gvtools] Re: AddLayer implemetation alternative

  • From: Fernando González <fergonco@xxxxxxxxx>
  • To: gvtools@xxxxxxxxxxxxx
  • Date: Mon, 10 Dec 2012 10:11:22 +0100


On Mon, Dec 10, 2012 at 10:03 AM, Victor Gonzalez
<victor.gonzalez@xxxxxxxxxx> wrote:
> Hi,
> I think it is important to keep the current behavior for the Add Layer
> functionality: a panel with different tabs that can be extended by plugins.
> However, we can use the geotools widgets on some tabs. For example, we can
> use the JFileDataChooser [1] for files, or try to extract the Postgis panel
> shown in [2].

I agree on this.

> Also, we might consider to build again the Add Layer extension (almost) from
> scratch, just like the TOC, since it has bad design, bad class naming and
> that kind of things. I think we are going to find this issue a lot of times,
> so maybe it's necessary to set some guidelines as part of the methodology to
> determine when to discard the previous code and when not.

In the long term it is always better to replace crap by good code but
in the short term we should focus our efforts in just one thing. I
attach to this[1] statement in the developer guide.

So, for me, bad design and bad class naming are not enough to rebuild
some UI code because that means rebuilding almost everything.

So summarizing, do whatever you want, but get that dialog running as
soon as possible.

I'm building TOC from scratch because I started to migrate the current
code and found that it was very hard. It was faster, even in the short
term, to rebuild it from scratch.

[1] Our first priority is integrating Geotools. Please don't try to
fix the extension code in main. While following the previous method
you will see some things that can easily be fixed. Please don't.
You'll realize that there are many of these and fixing them will keep
you from the real aim, which is the integration. Let's try to do only
minimal changes to the code that goes to main.

> Cheers,
> Víctor.
> -----
> [1]
> http://docs.geotools.org/latest/userguide/unsupported/swing/dialog.html#jfiledatastorechooser
> [2]
> http://docs.geotools.org/latest/userguide/unsupported/swing/wizard.html#jdatastorewizard
> 2012/12/10 Fernando González <fergonco@xxxxxxxxx>
>> Víctor.
>> It may be worth taking a look at this[1] before recovering all the
>> AddLayer functionality, even if it is an unsupported module.
>> Indeed, I've implemented a CRS selection panel, and there is one
>> already there :|
>> I wouldn't worry much if usability is not very good or the result is
>> not very nice (as if gvSIG was ever nice or usable).
>> See u.
>> [1] http://docs.geotools.org/latest/userguide/unsupported/swing/index.html

Other related posts: