Page 1
MOBILE SHOPPING ASSISTANT
ELABORATED BY:
Meriem HARZALLAH & Rihab BEN RHOUMA
SUPERVISED BY:
Mrs Leila JEMNI BEN AYED
DESIGN AND DEVELOPMENT PROJECT2011-2012
MINISTRY OF HIGHER EDUCATION AND SCIENTIFIC RESEARCH
UNIVERSITY OF MANNOUBA
NATIONAL SCHOOL OF COMPUTER SCIENCE
Page 2
OUTLINE
▲ Overview
▲ General Concepts
▲ Requirements Specification
▲ Design
▲ Implementation
▲ Conclusion
2
Page 3
OVERVIEW
▲ Mobility
▲ Movement and motion
▲ Mobile devices, Smartphones
▲ Shopping
▲ Select and/or purchase articles
Mobile Shopping
3
Page 4
OVERVIEW
▲ Existing applications
▲ Previous problem encountered
▲ Indoor positioning
▲ Available solutions
▲GPS, 3G, RFID, Bluetooth, Wifi, …
4
Wifi Access Points
▲ Restrictions
▲ Expensive
▲ Necessity to include a hardware
▲ Weak signal
Page 5
OVERVIEW
▲ Advantages of using Wifi Access Points
▲ Reachable over 40 meters
▲ Mature and widely spread technology
▲ Low cost
▲ Offers useful localisation information
5
Page 6
OUTLINE
▲ Overview
▲ General Concepts
▲ Requirements Specification
▲ Design
▲ Implementation
▲ Conclusion
6
Page 7
GENERAL CONCEPTS
▲ Advantages of Android
mobile development
▲ Free and open source (SDK
and source code)
▲ Marketshare in quick rise
▲ Light and easy
▲ Intuitive GUI
58%
18%
6%
18%
Marketshare of mobile OS - 2012
Android
IOS
Windows Phone
Others(Symbian, Blackberry, …)
Source: Digitimes. http://www.globalnerdy.com/
7
Page 8
GENERAL CONCEPTS
▲ Assets of web services
▲ Remotely processing
▲ Interoperability between
softwares working on
different platform
▲ Based on HTTP protocol
8
Page 9
OUTLINE
▲ Overview
▲ General Concepts
▲ Requirements Specification
▲ Design
▲ Implementation
▲ Conclusion
9
Page 10
REQUIREMENTS SPECIFICATION
10
Functionnal Requirements
Add a manager
Delete a manager
Insert product info into the DB
Get authenticated
<<include>>
<<include>>
<<include>>
DB Administrator
Page 11
REQUIREMENTS SPECIFICATION
11
Functionnal Requirements
Add a product
Delete a product
Update product info
Get authenticated
<<include>>
<<include>>
<<include>>
Shopping Mall Manager
Page 12
REQUIREMENTS SPECIFICATION
12
Functionnal Requirements
Search product info
View nearby products
Scan product’s barcode
Rate product
<<extend>>
<<extend>>
<<extend>>
Customer
View shopping mall map
Page 13
REQUIREMENTS SPECIFICATION
13
Non Functionnal Requirements
MSA
Security
Usability
Reliability
Performance
Supportability
Deployment
Page 14
REQUIREMENTS SPECIFICATION
14
Principal scenarios
Add a manager (administrator)
Check
Add successful
Enter parameters
Form to fi l l in
Add a manager request
Admin
System
Check
Add successful
Enter parameters
Form to fi l l in
Add a manager request
Page 15
REQUIREMENTS SPECIFICATION
15
Principal scenarios
Add a product (manager)
Check
Enter product's informations
Product added sucessfully
Form to fi l l in
Request to add a product
Supermarket Manager
System
Check
Enter product's informations
Product added sucessfully
Form to fi l l in
Request to add a product
Page 16
REQUIREMENTS SPECIFICATION
16
Principal scenarios
Look up product information (customer)
CheckShow product information
Select a product
List of products
Specify preferences
Form to fi l l in
Search product request
Customer
System
CheckShow product information
Select a product
List of products
Specify preferences
Form to fi l l in
Search product request
Page 17
OUTLINE
▲ Overview
▲ General Concepts
▲ Requirements Specification
▲ Design
▲ Implementation
▲ Conclusion
17
Page 18
DESIGN
▲ Architecture choice for the mobile client : SOA
18
Architecture
Page 19
DESIGN
▲ Architecture choice for the web client : 3-tier
19
Architecture
Page 20
DESIGNGlobal Architecture Pattern : MVC
20
Page 21
DESIGNDatabase Schema : Entity-Relationship Model
21
.
.
.
.
.
.
.
using
..
< contains
< has a.
.
< has a
.
Relation_22
.
< buy
.
.
.
.
.
.
Product
Manager
Administrator
Shopping mall
Aisle
Customer
Wifi AP
Discount
put discount
add/delete/view/update info
add/delete/view
Map
show mall map
navigates around
view on smartphone
store information in DB
is located in
is composed of
Page 22
DESIGNDatabase Design : Relational Schema
22
FK_MANAGER_REFERENCE_SHOPPING
FK_SHOPPING_REFERENCE_MANAGER
FK_DISCOUNT_REFERENCE_PRODUCT
FK_AISLE_REFERENCE_WIFI
FK_CUSTOMER_REFERENCE_SHOPPING
FK_PRODUCT_REFERENCE_SHOPPING
FK_PRODUCT_REFERENCE_AISLE
FK_PRODUCT_REFERENCE_ADMINIST
FK_MAP_REFERENCE_SHOPPING
FK_MAP_REFERENCE_WIFI
Product
pidmall_idaisle_idaidbarcodemanufacturerpricespecificationsratingimage...
VARCHAR(10)VARCHAR(10)VARCHAR(10)VARCHAR(10)BLOBVARCHAR(255)DOUBLE PRECISIONLONG VARCHARINTBLOB
<pk><fk1><fk2><fk3>
manager
midmall_idloginemailpassword...
VARCHAR(10)VARCHAR(10)VARCHAR(25)VARCHAR(45)VARCHAR(15)
<pk><fk>
administrator
aidloginemailpassword...
VARCHAR(10)VARCHAR(25)VARCHAR(45)VARCHAR(15)
<pk>
customer
cidmall_idposition...
VARCHAR(10)VARCHAR(10)FLOAT
<pk><fk>
shopping mall
mall_idmidname_malladress...
VARCHAR(10)VARCHAR(10)VARCHAR(30)VARCHAR(255)
<pk><fk>
wifi
ssidrssibssidlatlng...
VARCHAR(255)INTVARCHAR(10)FLOATFLOAT
<pk>
aisle
aisle_idtagssid...
VARCHAR(10)VARCHAR(40)VARCHAR(255)
<pk>
<fk>
discount
percentagebegin_end_pid...
INTDATEDATEVARCHAR(10)
<pk><pk><pk,fk>
Map
mall_idssididurl...
VARCHAR(10)VARCHAR(255)INTVARCHAR(255)
<fk1><fk2>
Page 23
DESIGNClass Diagram: mobile client
1..1
0..*
1..1
0..*
1..1
1..1
0..1 0..*
0..1
0..**
0..1
Menu
++++++
productcustomershowMapshowNearbyProdshowProdscanBarcode
: Product: Customer: ShowMap: ShowNearbyProds: ShowProd: ScanBarcode
++
<<Getter>><<Getter>>
getCustomer ()getProduct ()...
: Customer: Product
Customer
# position : Map
+++
<<Getter>><<Setter>>
navigate ()getPosition ()setPosition (Map newPosition)...
: Menu: Map: void
Product
#+##+#
product namePricemanufacturerbarcodespecificationsaisle
: String: Double: String: byte: String: String
++++
search ()scan ()view ()show_nearby ()...
: ShowProd: ScanBarcode: ShowProd: ShowNearbyProds
Show prod
+ product : Product
+ <<Getter>> getProduct ()...
: Product
scan barcode
+ product : int
+ <<Getter>> getProduct ()...
: int
show nearby prods
++++
productmapapcustomer
: Product: Map: WifiAp: Customer
+++
<<Getter>><<Getter>><<Getter>>
getProduct ()getMap ()getAp ()...
: Product: Map: WifiAp
showMap
++++
mapcustomerapproduct
: Map: Customer: WifiAp: Product
++++
<<Getter>><<Getter>><<Getter>><<Getter>>
getCustomer ()getMap ()getAp ()getProduct ()...
: Customer: Map: WifiAp: Product
Map
--
latittudelongitude
: double: double
+ show ()...
: ShowMap
Shopping Mall
######
nameaislessidmapcustomerproduct
: String: String: int: Map: Customer: Product
classScan
- product : Product
++
<<Getter>><<Setter>>
getProduct ()setProduct (Product newProduct)...
: Product: void
classShow
----
productcustomermapap
: Product: Customer: Map: WifiAp
++++++++
<<Getter>><<Setter>><<Getter>><<Setter>><<Getter>><<Setter>><<Getter>><<Setter>>
getProduct ()setProduct (Product newProduct)getCustomer ()setCustomer (Customer newCustomer)getMap ()setMap (Map newMap)getAp ()setAp (WifiAp newAp)...
: Product: void: Customer: void: Map: void: WifiAp: void
classShowMap
----
productcustomermapap
: Product: Customer: Map: WifiAp
++++++++
<<Getter>><<Setter>><<Getter>><<Setter>><<Getter>><<Setter>><<Getter>><<Setter>>
getCustomer ()setCustomer (Customer newCustomer)getProduct ()setProduct (Product newProduct)getMap ()setMap (Map newMap)getAp ()setAp (WifiAp newAp)...
: Customer: void: Product: void: Map: void: WifiAp: void
wifi_ap
-----
ssidrssibssidlatlng
: String: int: String: Float: Float
++++++++++
<<Getter>><<Setter>><<Getter>><<Setter>><<Getter>><<Setter>><<Getter>><<Setter>><<Getter>><<Setter>>
getSsid ()setSsid (String newSsid)getRssi ()setRssi (int newRssi)getBssid ()setBssid (String newBssid)getLat ()setLat (Float newLat)getLng ()setLng (Float newLng)...
: String: void: int: void: String: void: Float: void: Float: void
23
Page 24
DESIGNClass Diagram: web client
1..10..*
1..1
1..1
1..1
1..1
0..1
0..*
1..1
0..*
Menu
++
productmanager
: Product: Manager
++
<<Getter>><<Getter>>
getManager ()getProduct ()...
: Manager: Product
Login
++
usernamepassword
: String: String
++
get_username ()get_password ()...
: String: String
Manager
##-
usernameemailpassword
: String: String: String
+++++++
<<Getter>><<Setter>><<Getter>><<Setter>>
manager ()login ()navigate ()getUsername ()setUsername (String newUsername)getPassword ()setPassword (String newPassword)...
: Manager: Login: Menu: String: void: String: void
Product
#+##+#
product namePricemanufacturerbarcodespecificationsaisle
: String: Double: String: byte: String: String
++++
update ()add ()delete ()view ()...
: Update: String: Delete: View
Admin
++-
usernameemailpassword
: String: String: String
+++++++
<<Getter>><<Setter>><<Getter>><<Setter>>
admin ()login ()navigate ()getPassword ()setPassword (String newPassword)getUsername ()setUsername (String newUsername)...
: Admin: Login: Menu: String: void: String: void
View
++
productmanager
: Product: Manager
++
<<Getter>><<Getter>>
getManager ()getProduct ()...
: Manager: Product
Add
++
productmanager
: int: int
++
<<Getter>><<Getter>>
getProduct ()getManager ()...
: int: int
Delete
++
productmanager
: Product: Manager
++
<<Getter>><<Getter>>
getProduct ()getManager ()...
: Product: Manager
Update
++
productmanager
: Product: Manager
++
<<Getter>><<Getter>>
getManager ()getProduct ()...
: Manager: Product
classLogin
--
usernamepassword
: string: string
++++
<<Getter>><<Setter>><<Getter>><<Setter>>
getUsername ()setUsername (string newUsername)getPassword ()setPassword (string newPassword)...
: string: void: string: void
Map
--
latittudelongitude
: double: double
+ show ()...
: void
Shopping Mall
######
nameaislessidmapmanagerproduct
: String: String: int: Map: Manager: Product
classAdd
--
productmanager
: Product: Manager
++++
<<Getter>><<Setter>><<Getter>><<Setter>>
getProduct ()setProduct (Product newProduct)getManager ()setManager (Manager newManager)...
: Product: void: Manager: void
classDelete
--
productmanager
: Product: Manager
++++
<<Getter>><<Setter>><<Getter>><<Setter>>
getProduct ()setProduct (Product newProduct)getManager ()setManager (Manager newManager)...
: Product: void: Manager: void
classView
--
productmanager
: Product: Manager
++++
<<Getter>><<Setter>><<Getter>><<Setter>>
getManager ()setManager (Manager newManager)getProduct ()setProduct (Product newProduct)...
: Manager: void: Product: void
classUpdate
--
productmanager
: Product: Manager
++++
<<Getter>><<Setter>><<Getter>><<Setter>>
getManager ()setManager (Manager newManager)getProduct ()setProduct (Product newProduct)...
: Manager: void: Product: void
24
Page 25
OUTLINE
▲ Overview
▲ General Concepts
▲ Requirements Specification
▲ Design
▲ Implementation
▲ Conclusion
25
Page 26
IMPLEMENTATIONHardware Environment
26
Asus• Processor Intel® Core™ i5-2450M CPU @ 2.50GHz
2.50GHz• RAM 4.00 Go• Operating System: Windows 7 Ultimate, SP1, 32bits• Hard Disk: 500 Go
Qosmio• Processor Intel® Core™2 Duo CPU P8700 @2.53Ghz 2,53
Ghz• RAM 4.00 Go• Operating System: Windows 7 Ultimate, SP1, 32bits• Hard Disk: 300 Go
Page 27
IMPLEMENTATION
27
Eclipse IDE
WAMP server
MySQL
Android SDK
Software Environment
Page 28
IMPLEMENTATIONArchitectural Design
28
Page 29
IMPLEMENTATION
29
Main Screen Captures of the Mobile Application
Product Manual SearchShow MapProducts ListProduct Information
Page 30
IMPLEMENTATIONMain Screen captures of the Web Application
Welcome screen
30
Page 31
IMPLEMENTATIONMain Screen captures of the Web Application
Login
31
Page 32
IMPLEMENTATIONMain Screen captures of the Web Application
DB Administrator Profile
32
Page 33
IMPLEMENTATIONMain Screen captures of the Web Application
Supermarket Manager Profile
33
Page 34
IMPLEMENTATIONMain Screen captures of the Web Application
View Products
34
Page 35
IMPLEMENTATIONMain Screen captures of the Web Application
Add a product (manager)
35
Page 36
IMPLEMENTATIONMain Screen captures of the Web Application
View list of managers
36
Page 37
IMPLEMENTATIONGenerating the Shopping Mall Map with Ericsson Labs Map Studio
37
Page 38
OUTLINE
▲ Overview
▲ General Concepts
▲ Requirements Specification
▲ Design
▲ Implementation
▲ Conclusion
38
Page 39
CONCLUSION
▲ Needed requirements successfully implemented
▲ Sample likely be sold to hypermarkets as a prototype
▲ Possibility of improvements
▲ More features
▲ Security level
▲ Implementation on other mobile phone operating systems
39