Thx for your feedback luciano.
I was referencing the atom binding only for posting(from the client) the
shopping cart items purpose. For sure, the shopping cart total is retrieved
via JSON (no doubt about that anymore[?]).
Till now, after my researches it seems like there's not yet any native
support of atom on android.
Well, I was thinking of using just a part of Abdera as we're not going to
use so much features of it. It'll just be about building and posting an
Abdera entry to the store web "server".  The abdera-0.4.0 's jar already
weights about 1.5Mo, and it may need the referenced libraries in the its lib
folder. For a mobile platform i think it'll be nice if we have something
lightweight.

For the binding, i've seen atom-abdera in tuscany's extensions list. I then
thought it'll be more adapted as we'll be using abdera to post the
ressources.
On Tue, May 5, 2009 at 5:46 PM, Luciano Resende <[email protected]>wrote:

> On Tue, May 5, 2009 at 4:55 AM, lookman sanni <[email protected]>
> wrote:
> > Hi everyone.
> >
> >
> > I've been deeply reading the getting started with Tuscany, and i''m in
> > need of explanations on some points:
> >
> > What does the Tuscany SCA Data Collection stands for? What's the
> difference
> > between an org.apache.tuscany.sca.data.collection.Entry object  and a
> > java.util.Map object?
>
> The Tuscany Data Collection is a SPI that allow users to manipulate a
> collection of "things/data" in a way that it can be easily
> exposed/mapped as REST style services. You can see that it basically
> maps HTTP protocol operations to the SPI (e.g when you do a get
> passing a resource id, it maps to get(String id))......
>
> > In the shopping Cart implementation, is it because the component use the
> > atom binding, that put, post and delete methods are defined? What about
> the
> > keyring system key = "cart-" + UUID.randomUUID().toString(); in the post
> > method? What is it used for?
> >
>
> The cart have the CRUD operations, the only difference is that the
> method names are following the REST/ATOM PUB/HTTP names instead of
> Create, Read, Update and Delete. Again, this is to facilitate exposing
> these "things/data" in a REST way...
>
> > In order to handle the shopping cart items posting, and the shopping cart
> > total request  from the android app, I'm trying to use the Abdera
> project.
> > As it's going to be run from a mobile platform, i intend to build only
> the
> > needed part of Abdera, and export it to android as a Dex file.
> > I'll be posting the cart items like this:
> >
>
> Note that shopping cart total is using JSON-RPC and not ATOM, so you
> won't need Abdera for that.
> As for the atom support, I'd recommend two ways :
>   - Verify if there is native support for ATOM in Android (this is
> what we did for JSON)
>   - Try to use the full Abdera parser...
>
> >
> >>
> >> Abdera abdera = new Abdera();
> >>         AbderaClient client = new AbderaClient(abdera);
> >>
> >>         Entry entry = abdera.newEntry();
> >>
> >>         entry.setContent("<entry xmlns='http://www.w3.org/2005/Atom'>"
> +
> >>                 "<title>item</title>" +
> >>                 "<content type='text/xml'>" +
> >>                     "<Item xmlns='http://services/'>" +
> >>                         "<name xmlns=''>" + item.getName()+ "</name>" +
> >>                         "<price xmlns=''>" +item.getPrice()+"</price>" +
> >>             "</Item></content></entry>");
> >>
> >>         ClientResponse resp = client.post(ServiceURI,entry);
> >
> >
> > And this requires the following classes:
> >>
> >> org.apache.abdera.Abdera;
> >> org.apache.abdera.model.Entry;
> >> org.apache.abdera.model.Feed;
> >> org.apache.abdera.protocol.Response.ResponseType;
> >> org.apache.abdera.protocol.client.AbderaClient;
> >> org.apache.abdera.protocol.client.ClientResponse;
> >
> >
> > I'd like to know if there's a tool i can use to quickly and easily pack
> > those classes with their dependencies in a jar file, before sealing them
> in
> > a dex file using the android dx utility.
> >
> > Surely all this will imply a switch of the shopping cart's binding from
> atom
> > to atom-abdera.
> >
>
> There should be no changes needed here....
>
> > Apart from answers to my questions, feel free guys to post any comment or
> > helpful advice.
> >
> >
> > Cdlt;
> > --
> > Lookman SANNI;
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany, Apache PhotArk
> http://people.apache.org/~lresende
> http://lresende.blogspot.com/
>



-- 
Lookman SANNI;

<<347.png>>

Reply via email to