Re: [android-developers] Thoughts on the AQuery library?

2013-01-16 Thread Kristopher Micinski
It looks perhaps useful because it has lightweight options which allow
you to prototype things quickly, but it's not really the same kind of
"killer" JQuery is.  JQuery is really nice because:
  - JQuery gives you (essentially) one way to do things, if you want
something else you get a plugin.
  - JQuery wins in part because of the more exotic features of
JavaScript: prototypical inheritance, duck typing, method chaining,
and specifiers just seem to reduce syntax and make things more
succinct in JavaScript.
  - An explicit goal of JQuery is to hide you from browser specific
configuration hell.  Android doesn't have (nearly as much of) this.

I'd say in general that Android apps (versus JavaScript apps) feel
closer to the older production style, where you write more code but
get to specify things more.  I don't think this library is bad, it
seems nice to prototype things with, but Android doesn't have the hell
that JS has to begin with: so I don't think it would "take over the
(Android) world" like JQuery with JS.

For example:

aq.id(R.id.button).text("Click Me").clicked(this,
"buttonClicked");

While this is slightly slicker syntax, the code to do this wouldn't be
too bad to begin with.  By the way, that last method better not be
using reflection: JavaScript JITs can handle that, but I don't believe
that Android's does.  (I was going to look into it, but didn't really
have the time..)

kris


On Wed, Jan 16, 2013 at 6:01 PM, gloesch  wrote:
> I'm curious to know if there's a general consensus about the Android Query
> (AQuery) library, particularly for async calls. Has anyone out there used it
> in a production environment?
>
> http://code.google.com/p/android-query/wiki/API
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Thoughts on the AQuery library?

2013-01-17 Thread gloesch
Thanks! Yeah, I agree that AQuery doesn't seem near as powerful as jQuery. 
I do know that this library uses reflection in certain instances, 
particularly for callbacks in network calls. This doesn't seem to cause 
issues though I just started using it.

I liked in particular the lack of boilerplate code for asynchronous calls 
(http://code.google.com/p/android-query/wiki/AsyncAPI). It seems like a 
really nice wrapper to what I'd assume to be AsyncTask. 

Anyone else have thoughts on this library?

On Wednesday, January 16, 2013 10:15:08 PM UTC-5, Kristopher Micinski wrote:
>
> It looks perhaps useful because it has lightweight options which allow 
> you to prototype things quickly, but it's not really the same kind of 
> "killer" JQuery is.  JQuery is really nice because: 
>   - JQuery gives you (essentially) one way to do things, if you want 
> something else you get a plugin. 
>   - JQuery wins in part because of the more exotic features of 
> JavaScript: prototypical inheritance, duck typing, method chaining, 
> and specifiers just seem to reduce syntax and make things more 
> succinct in JavaScript. 
>   - An explicit goal of JQuery is to hide you from browser specific 
> configuration hell.  Android doesn't have (nearly as much of) this. 
>
> I'd say in general that Android apps (versus JavaScript apps) feel 
> closer to the older production style, where you write more code but 
> get to specify things more.  I don't think this library is bad, it 
> seems nice to prototype things with, but Android doesn't have the hell 
> that JS has to begin with: so I don't think it would "take over the 
> (Android) world" like JQuery with JS. 
>
> For example: 
>
> aq.id(R.id.button).text("Click Me").clicked(this, 
> "buttonClicked"); 
>
> While this is slightly slicker syntax, the code to do this wouldn't be 
> too bad to begin with.  By the way, that last method better not be 
> using reflection: JavaScript JITs can handle that, but I don't believe 
> that Android's does.  (I was going to look into it, but didn't really 
> have the time..) 
>
> kris 
>
>
> On Wed, Jan 16, 2013 at 6:01 PM, gloesch > 
> wrote: 
> > I'm curious to know if there's a general consensus about the Android 
> Query 
> > (AQuery) library, particularly for async calls. Has anyone out there 
> used it 
> > in a production environment? 
> > 
> > http://code.google.com/p/android-query/wiki/API 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Android Developers" group. 
> > To post to this group, send email to 
> > android-d...@googlegroups.com 
> > To unsubscribe from this group, send email to 
> > android-developers+unsubscr...@googlegroups.com  
> > For more options, visit this group at 
> > http://groups.google.com/group/android-developers?hl=en 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Thoughts on the AQuery library?

2013-01-17 Thread Kristopher Micinski
On Thu, Jan 17, 2013 at 10:19 AM, gloesch  wrote:
> Thanks! Yeah, I agree that AQuery doesn't seem near as powerful as jQuery. I
> do know that this library uses reflection in certain instances, particularly
> for callbacks in network calls. This doesn't seem to cause issues though
> I just started using it.
>

It won't hurt you until you use it a little more.  Reflective code
runs pretty slow compared to statically compiled code.

> I liked in particular the lack of boilerplate code for asynchronous calls
> (http://code.google.com/p/android-query/wiki/AsyncAPI). It seems like a
> really nice wrapper to what I'd assume to be AsyncTask.

Probably, or another kind of thread pool based facility.  FYI there
are good frontends to AsyncTask, and I'm not sure how much control
this really gives you over AsyncTask's parameters.  (Since Java uses
templates for parametric polymorphism versus being a duck typed
language, you're not going to get the succinctness of JQuery with a
Java library, because you'd have to infer type parameters to the
template..)

kris

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Thoughts on the AQuery library?

2013-04-03 Thread gloesch
I ended up ditching the library. I ran into an issue where every once in 
awhile, the callback would never get called. I switched to my own custom 
wrapping AsyncTask wrapper. Also it seems 
that http://loopj.com/android-async-http/ would have been a better choice. 

On Thursday, January 17, 2013 11:05:30 AM UTC-5, Kristopher Micinski wrote:
>
> On Thu, Jan 17, 2013 at 10:19 AM, gloesch > 
> wrote: 
> > Thanks! Yeah, I agree that AQuery doesn't seem near as powerful as 
> jQuery. I 
> > do know that this library uses reflection in certain instances, 
> particularly 
> > for callbacks in network calls. This doesn't seem to cause issues 
> though 
> > I just started using it. 
> > 
>
> It won't hurt you until you use it a little more.  Reflective code 
> runs pretty slow compared to statically compiled code. 
>
> > I liked in particular the lack of boilerplate code for asynchronous 
> calls 
> > (http://code.google.com/p/android-query/wiki/AsyncAPI). It seems like a 
> > really nice wrapper to what I'd assume to be AsyncTask. 
>
> Probably, or another kind of thread pool based facility.  FYI there 
> are good frontends to AsyncTask, and I'm not sure how much control 
> this really gives you over AsyncTask's parameters.  (Since Java uses 
> templates for parametric polymorphism versus being a duck typed 
> language, you're not going to get the succinctness of JQuery with a 
> Java library, because you'd have to infer type parameters to the 
> template..) 
>
> kris 
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.