Hi all,

This is an interesting question, but a bit of background first...my company 
has been developing software for almost 30 years now.  We have always been 
a .net house, but now we're creating Android and iOS apps as well.  I don't 
want to have to write business logic and database access logic for each 
different platform, and since we're doing cloud apps, we should be able to 
call web services to get and put data into the database.

We have been using Entity Framework to communicate with SQL Server for our 
databases, and, as of late, we have been creating Single Page Applications 
using Breeze and Knockout.

We have created RESTful services using the WebAPI, but in working with 
Breeze, we like how it calls an IQueryable object.  My goal is to 
write-once, and be able to re-use for the mobile development.  

LINQ really makes things easier in that we don't have to have a specific 
API call for each entity, but I haven't found the right library, or I'm not 
using the right keywords for Google to search...I dunno, but all I'm 
finding are LINQ libraries that work on data already in memory.  That means 
I will have to bring LOTS of data to the mobile device just to work with 
it, and that's time-consuming and also will quickly eat up storage 
space...and why should I do that, when I have a powerful SQL Server that 
can get me only the data I need.

An example:

Just about every application starts out showing a list of reecords on a 
grid.  (It would require a query that returns an ID, and one or more 
descriptive fields (like first and last name).)  So we know we can create a 
RESTful API called "getCustomers()" and it would return the list for us to 
populate the grid.  Upon selection of an item, we would then want to make 
another call to the database to populate a detail screen.  We could create 
another RESTful API called getCustomer(id), for example, and it should 
return the fields that we need to populate the screen.

OR we could use the Entity Framework to create a Customers() object, and 
use LINQ to get what we want from it, just by modifying the calling 
URL....which is easy, fun, and cool in the .net environment, and would 
satisfy my requirements of using the same business code for all platforms.

So here's the question:

How do you make a call to a RESTful service that returns an iQueryable 
object from Android (Java)?  Is there a Breeze-type of library for Android? 
 What is the best way to do this - create specific RESTful APIs, or is 
there a way to use this business layer we have already created that's 
living on the server?

-- 
-- 
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.


Reply via email to