You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devicemap.apache.org by Volkan Yazıcı <vo...@gmail.com> on 2015/04/20 20:38:20 UTC
Polyglot JVM Clients
Hello,
One of the things I like most about Apache DeviceMap is its simple API:
*DeviceMapClient client = new DeviceMapClient(...);*
*Map<String, String> attributes = client.classify(userAgent);*
Simply intuitive. Given the fact that I really enjoy coding Scala in my
daily job, I do not think we need to have a particular support for any
other JVM languages except Java itself. That is, see the same code in Scala:
*val client = new DeviceMapClient(...)*
*val attributes = client.classify(userAgent)*
You know that it will 99% look the same in Groovy, Clojure, Kotlin, Ceylon,
etc. Hence, exposing and maintaining a separate code base for making no
functional revenue at all will be waste of resources, I believe.
Best.
Re: Polyglot JVM Clients
Posted by Reza Naghibi <re...@naghibi.com>.
I think thats a good point. However... im open to allowing different
clients as long as they dont cause too much confusion when being released,
used, etc. Who knows, some JVM dialects may offer features others dont.
That being said, its on my 2.0 todo list to define the process regarding
how clients gets voted into the 2.0 code base. I think that process will be
open to clients of all languages and platforms. But it will avoid
duplication and potential conflict.
Im very confident 2.0 will be a really nice platform and we need a solid
process to drive its evolution!
On Mon, Apr 20, 2015 at 2:38 PM, Volkan Yazıcı <vo...@gmail.com>
wrote:
> Hello,
>
> One of the things I like most about Apache DeviceMap is its simple API:
>
> *DeviceMapClient client = new DeviceMapClient(...);*
> *Map<String, String> attributes = client.classify(userAgent);*
>
>
> Simply intuitive. Given the fact that I really enjoy coding Scala in my
> daily job, I do not think we need to have a particular support for any
> other JVM languages except Java itself. That is, see the same code in
> Scala:
>
> *val client = new DeviceMapClient(...)*
> *val attributes = client.classify(userAgent)*
>
>
> You know that it will 99% look the same in Groovy, Clojure, Kotlin, Ceylon,
> etc. Hence, exposing and maintaining a separate code base for making no
> functional revenue at all will be waste of resources, I believe.
>
> Best.
>
Re: Polyglot JVM Clients
Posted by Werner Keil <we...@gmail.com>.
I guess the gentleman who did this for Ruby showed, it doesn't have to be
restricted to the JVM, though.
There is also a Clojure wrapper around a certain version of the Java
Classifier/client: https://github.com/timgalebach/clj-devicemap that's of
course affected by wrong, missing our outdated content on
http://devicemap-vm.apache.org/data/latest/ while the Ruby port thanks to
its Gem caching is pretty immune;-)
Which may relatively easy work at least for the common JVM languages or
even some DSLs like Eclipse Xtext (if they have a need for device
recognition somewhere)
Cheers,
Werner
On Mon, Apr 20, 2015 at 8:38 PM, Volkan Yazıcı <vo...@gmail.com>
wrote:
> Hello,
>
> One of the things I like most about Apache DeviceMap is its simple API:
>
> *DeviceMapClient client = new DeviceMapClient(...);*
> *Map<String, String> attributes = client.classify(userAgent);*
>
>
> Simply intuitive. Given the fact that I really enjoy coding Scala in my
> daily job, I do not think we need to have a particular support for any
> other JVM languages except Java itself. That is, see the same code in
> Scala:
>
> *val client = new DeviceMapClient(...)*
> *val attributes = client.classify(userAgent)*
>
>
> You know that it will 99% look the same in Groovy, Clojure, Kotlin, Ceylon,
> etc. Hence, exposing and maintaining a separate code base for making no
> functional revenue at all will be waste of resources, I believe.
>
> Best.
>