[OpenLayers-Dev] Independent UI Controls

Volker Mische volker.mische at gmail.com
Wed Feb 17 06:43:18 EST 2010

Hi Tim,

thanks for replying :)

On Wed, Feb 17, 2010 at 1:06 AM, Tim Schaub <tschaub at opengeo.org> wrote:
> Regardless of which you think has more utility (using OpenLayers syntax
> and delegating to the widget framework for the UI vs. using widget
> framework syntax and delegating to OpenLayers for the mapping), both
> approaches could potentially benefit from changes to OpenLayers.
> I like the idea of starting to develop OpenLayers controls that don't
> add any redundancy or extra overhead (think dom elements and event
> listeners) when another widget framework is in use.

Can you get a bit more concrete how this could look like? Would it be
similar what I've done (though my way adds extra overhead (lots of
callbacks and passing on values)?

> Whatever we do, I don't see the sense in working on anything that limits
> folks to the lowest common denominator of all (supported) widget frameworks.

Agreed. Do you see such a problem with my approach?

> Interested to hear what others think.
Me too.


> Volker Mische wrote:
>> Dropping some code into the wild doesn't seem to be the right way to
>> start a discussion. But hopefully this mail will.
>> I've updated the example at [1] a bit. It now shows the usage of
>> jQuery and Dojo. Especially interesting is the code of the
>> OpenLayers.Control.ZoomSlider [2], it's an implementation that
>> resembles the GeoExt.ZoomSlider.
>> The question is: Is it a good idea to create OpenLayers controls that
>> are independent of the underlying JavaScript library? This would push
>> OpenLayers into the framework direction. You would embed functionality
>> from a JavaScript lib into Openlayers. Or would it be better to leave
>> OpenLayers (as it was meant to be) as a library and every JavaScript
>> lib creates its own widgets and embeds OpenLayers. If the library-way
>> is prefered, should devs even be discouraged from creating new
>> controls based on raw JavaScript/OpenLayers and not on a lib?
>> Creating JavaScript lib independent controls would be a chance to
>> collaborate accros libs (how great would it be to team up the GeoExt
>> ppl with the jQuerz fanboys). But I'm well aware that GeoExt is
>> already going down the other way, and based on the maturity it already
>> has, it seems almost impossible to change the direction.
>> Cheers,
>>   Volker
>> [1] http://dev.openlayers.org/sandbox/vmx/ui/examples/jq-zoom.html
>> [2] http://dev.openlayers.org/sandbox/vmx/ui/lib/geojq/olui.js
>> On Thu, Feb 11, 2010 at 12:43 AM, Volker Mische <volker.mische at gmail.com> wrote:
>>> Hi,
>>> at the FOSS4G 2009 at the OpenLayers BoF we discussed a bit that it
>>> would be cool to have an easier way for integrating controls that are
>>> based on other JavaScript libraries like jQuery, Dojo or ExtJs. At the
>>> code sprint we (ahocevar, rdewit and I) got a bit more specific at the
>>> whiteboard. No I finally managed to get some code done.
>>> Please have a look at my sandbox at an example:
>>> http://dev.openlayers.org/sandbox/vmx/ui/examples/jq-zoom.html
>>> The buttons at the top could be OpenLayers ones, the others below are
>>> jQuery UI ones. The important bits are at
>>> http://dev.openlayers.org/sandbox/vmx/ui/lib/geojq/olui.js
>>> It's only a rough cut, but you should get the basic idea. The idea is to
>>> separate the visualisation/representation of a control from the
>>> functionality.
>>> What do you think about it? BTW: There are no changes to OpenLayers code
>>> base.
>>> Cheers,
>>>  Volker
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
> --
> Tim Schaub
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev

More information about the Dev mailing list