devicemap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Keil <werner.k...@gmail.com>
Subject Re: How to get the DDRSimpleAPI source code? (was: Does the build work?)
Date Fri, 09 Jan 2015 14:06:39 GMT
Unfortunately it's not that simple at least for builders (a file which even
classifier can't do without at the moment)
Class references like
"org.apache.devicemap.simpleddr.builder.device.DesktopOSDeviceBuilder"
control builder "injection" very much like e.g. Spring does, so the file
referenced by the properties used by W3C ServiceFactory has to be a valid
class name, otherwise it makes no sense and the W3C implementation can't
instantiate any builders.

However, that's the nice thing being highly modular, I don't think we had
to "factor out" builders and some other modules, since they contain
absolutely no reference to W3C DDR.
import org.apache.devicemap.simpleddr.builder.Builder;
import org.apache.devicemap.simpleddr.model.UserAgent;
import org.apache.devicemap.simpleddr.model.browser.Browser;
//NO org.w3c here;-)
public class DefaultBrowserBuilder implements Builder {
...
This Builder pattern was introduced and applied by OpenDDR and donated to
DeviceMap. So a W3C implementation could use not only data but also these
builders from DeviceMap without breaking the current data file. Should
builders no longer be part of a 2.x data format, then either a wrapper like
Reza drafted (all of that refers to W3C, it's a minimalistic approach to
mainly the "model" package and a few other classes in the Simple DDR
module) could be compatible with a new data file or builders defined
outside Aapache in a separate XML definition. As mentioned, the DI
mechanism for Builders could in future be redesigned to use a DI framework
like CDI/DeltaSpike, Spring or Guice.

Werner



On Fri, Jan 9, 2015 at 2:41 PM, Bertrand Delacretaz <bdelacretaz@apache.org>
wrote:

> Hi,
>
> On Fri, Jan 9, 2015 at 2:13 PM, Werner Keil <werner.keil@gmail.com> wrote:
> > ...Thus something like let's call it "OpenDDR.next" that does not fall
> under
> > Apache requirements could use "devicemap-data" and "w3c.jar" together
> > without problems?...
>
> Yes no problem, if you guys do this outside of DeviceMap you can do
> whatever, as long as the project and package names are different from
> this project to avoid confusion.
>
> That doesn't prevent collaborating on data collection, structure and
> tests here and you wouldn't have to comply with Apache requirements on
> that project, which probably makes things easier.
>
> -Bertrand
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message