开发者

Is this the correct approach to design a shopping cart Android application? [closed]

开发者 https://www.devze.com 2023-04-10 13:43 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If y开发者_Go百科ou feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I have a requirement to develop a shopping cart Android application.

The features should include

  1. Ability for any customer to register
  2. Ability to login with his credentials
  3. Search and select products
  4. View history about his previous purchases
  5. Make payment to get the products delivered to his billing address.

I have done some analysis and below are my thoughts.

Server Side: Java web application Client Side: Android application

  1. Design Android application with an Activity to allow customers to register themselves.

  2. Design another Activity to enable customers to login to the application (authenticate customer by sending his credentials through HttpClient to a Java servlet. Once the customer is authenticated successfully, generate a unique token id at the server end store it in the database and send it to the Android client app. Is this the correct approach to remember the customer (similar to session management) for his further interactions with the application?)

  3. Provide customers the ability to search and select desired products (use above created unique token for further interaction with server).

  4. Provide customers the ability to view his history of purchases.

  5. Provide customers the ability to make payments. (Can i take customer PayPal credentials from Android app and use PayPal API to pragmatically make payments at server end? Is it correct approach?

Can someone please suggest me with correct approach / best practices and with sample code if possible?

Thanks,


If I understand you well, you only need an application that is taylored to your website needs.

You suggest to use android native code and interract with your website through HTTP worker. This provides the higher integration but is not really necessary.

Another approach is to code a WebApplication. Mainly, this is like building your application around a WebView. Think of it as an integrated web browser with cookies, javascript and session management. With this approach you can keep as much as possible on your website (using an hidden mobile-like version) and yet add standard android widgets wherever you want.

One nice point is that you can correct part of the bugs directly on the website, without asking people to download an update.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号