Is this the correct approach to design a shopping cart Android application? [closed]
I have a requirement to develop a shopping cart Android application.
The features should include
- Ability for any customer to register
- Ability to login with his credentials
- Search and select products
- View history about his previous purchases
- 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
Design Android application with an Activity to allow customers to register themselves.
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?)
Provide customers the ability to search and select desired products (use above created unique token for further interaction with server).
Provide customers the ability to view his history of purchases.
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.
精彩评论