ผลต่างระหว่างรุ่นของ "Sw-spec/ebook"
ไปยังการนำทาง
ไปยังการค้นหา
Jittat (คุย | มีส่วนร่วม) (→Goals) |
Jittat (คุย | มีส่วนร่วม) |
||
แถว 65: | แถว 65: | ||
* '''Promotions''': | * '''Promotions''': | ||
− | == | + | == Android / technical references == |
+ | |||
+ | * How to make HTTP requests with AsyncTask | ||
+ | * ListView and ListAdapter | ||
+ | * Custom list items and how to show images |
รุ่นแก้ไขเมื่อ 03:53, 20 เมษายน 2560
In this project you will have to develop a simple e-book shop application.
เนื้อหา
Your work
- Implement the following functionalities (in phases).
- Before actual coding for each use case or feature, sketch a sequence diagram for it first.
Functions
- List available e-books
- Basic search functionality
- Basic account operations: check fund & add fund
- Buy an e-book
- Show list of user's e-books
- Refund (within 5 minutes)
- Basic book promotions
Goals
Phase 0
- List available e-books (with mock-up data repository)
- The app should show the list of all available book titles with prices (from the mock-up data repository) in a list view with no book cover preview.
- Implementation info:
- Use repository pattern.
- Create book repository class that returns mock-up data.
Phase 1
- List available e-books (real data)
- The app should make an HTTP request to get the JSON book data (see below)
- Implementation info:
- Extract book repository interface from the mock-up one.
- Create a real repository that actually makes HTTP requests. (Watch old clips on how to do that with AsyncTask)
Phase 2
- Basic search functionality
- The user should be able to search for books by parts of the titles and publication years
- The user should be able to sort the search result by titles and publication years
- Implementation info:
- The search functionality should be implemented in the repository class. It might be good to put the code in some concrete parent class that both the real and the mock-up repository classes extend.
Phase 3
- Basic account operations: check fund & add fund (all mock-up)
- Buy an e-book
- A user can add e-book to the cart
- A user can check-out all e-books in the cart. Don't forget to check if the user has enough fund in the account.
- Show list of user's e-books
Phase 4
- Show book cover
- The image URLs are in the img_url fields
Phase 5
- Basic book promotions
- Load promotion data and show promotions (see below)
- The app should only show available promotions (ones where the user can only buy--i.e., if a promotion contains books A, B, and C, but the user has already bought book B, the promotion is not available to the user).
- Buy e-books from the promotion.
Phase 6
- Refund (within 5 minutes)
Data
The book data was scraped from [1].
- Books: https://theory.cpe.ku.ac.th/~jittat/courses/sw-spec/ebooks/books.json
- Promotions:
Android / technical references
- How to make HTTP requests with AsyncTask
- ListView and ListAdapter
- Custom list items and how to show images