Slide 1

Slide 1 text

Building ! ! in RubyMotion #SydInMotion 20140415 @matthewsinclair

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

What is ?

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

lets customers use their smartphone to scan and buy goods in store. ! It’s Retail. Without the Till. www.tillless.com

Slide 6

Slide 6 text

6 Sarah starts the Tillless Shopper App on her phone which automatically locates itself at Mary’s Store. Mary can directly scan items using their barcodes, or pick from the products in the store’s product catalog. Sarah is able to easily scan products via barcode or QR- code using her phone’s built-in camera. The process is quick and easy, and requires no extra hardware or software other than the Tillless Shopper app. Sarah adds the products that she wishes to purchase to her shopping bag. She can see the running total of her shopping bag as she shops. To check out, Sarah taps ‘Pay’ and enters her payment PIN. The payment PIN locks her cards to her device, and without the payment PIN and this specific device, no- one is able to use her payment details. The Tillless back-end processes the shopping bag and presents Sarah with the authorisation screen. Tapping ‘pay’ here completes the purchase, charging Sarah’s credit card. Once payment has been processed, Sarah is presented with a receipt. This receipt can be shown to an in-store representative with the Tillless Merchant app for validation. Mary sees that Sarah is ready to validate her payment. Mary can also scan Sarah’s QR-code receipt directly from the Tillless Merchant app on her smartphone to quickly jump to purchase validation. In a busy store, this process can be done by a gatekeeper who simply scans receipts and validates the shopper’s items. Once the gatekeeper reviews the items in the Shopper’s bag, tapping ‘validate’ completes the purchase process. The gatekeeper is then free to move on to help other customers. As soon as Sarah’s purchase is validated, the Tillless Shopper app lets her know with a validated stamp, and she is free to leave the store with her items. Tillless sends Sarah an email receipt with details of the purchase. Simple, Fast and Secure Shopping ! Shopping in a Tillless-enabled store is super fast and super simple. Shoppers can scan a barcode or pick items from the Store’s product catalog and pay with their credit card using their phone. ! Tillless uses bank-grade security to handle the Shopper’s payment PIN and all card details are stored securely with the payment gateway (not within the app). ! Tillless lets shoppers avoid the queues and bottlenecks at the register, speeding up and improving their experience. ! Shopping with Tillless. It’s simple, fast and secure. for Shoppers

Slide 7

Slide 7 text

7 Increased Sales and Satisfaction ! With Tillless running in an event or retail store, Merchants can reduce the likelihood that customers walk away unsatisfied and without a purchase, because of long lines and queuing. ! Customer satisfaction, particularly in high-traffic retail environments like concerts and large events, is dramatically improved when customers can purchase items directly with their own phone without having to queue to pay. ! Selling with Tillless. Satisfied customers mean increased sales. Once the gatekeeper reviews the items in the Shopper’s bag, tapping ‘validate’ completes the purchase process. The gatekeeper is then free to move on to help other customers. As soon as Sarah’s purchase is validated, the Tillless Shopper app lets her know with a validated stamp, and she is free to leave the store with her items. Mary can configure the product catalog directly from the Tillless Merchant app. The product catalog shows the list of products available for purchase in the current store. She can edit the product RRP, description and UPC, as well as set up an image for the product. Mary accesses her store configuration from the Tillless Merchant app. From here, she can edit store details such as the name of the store and its location, as well as the default currency and tax rates. Mary’s Store is one of a number of stores run by Hanno Retailers. Once payment has been processed, Sarah is presented with a receipt. This receipt can be shown to an in-store representative with the Tillless Merchant app for validation. Mary scans Sarah’s QR-code receipt directly from the Tillless Merchant app on her smartphone to quickly jump to purchase validation. In a busy store, this process can be done by a gatekeeper who simply scans receipts and validates the shopper’s items. for Merchants

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

What problem(s) does . solve?

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

2% 98% Waiting Paying Source: WAGNER

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

What problem(s) does the . app need to solve?

Slide 19

Slide 19 text

Concerns

Slide 20

Slide 20 text

Why did we chose RubyMotion for ?

Slide 21

Slide 21 text

This is your brain …

Slide 22

Slide 22 text

… on Objective-C:

Slide 23

Slide 23 text

But seriously… ✓ ! ✓ Minimum Viable MVP ==

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

Iteration #1

Slide 26

Slide 26 text

s/camelCase/snake_case/g

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Iteration #2

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

Iteration #3

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Iteration #4

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

25%„

Slide 37

Slide 37 text

2% 98% Crap Not Crap

Slide 38

Slide 38 text

Architecture

Slide 39

Slide 39 text

Tillless API Resources Shell Looks after the front-end’s view of the domain model and handles interactions with the back end via RESTful API Provides a unified “app shell” for each of the front-end apps Tillless Shopper Tillless Merchant Tillless Payments

Slide 40

Slide 40 text

Resources

Slide 41

Slide 41 text

Shell

Slide 42

Slide 42 text

Shopper

Slide 43

Slide 43 text

Merchant

Slide 44

Slide 44 text

Payments

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

https://github.com/rubymotion/BubbleWrap Positives: 1. Pretty hard to do without this now as there are so many convenience categories that I’ve forgotten what’s in BW and what’s not Gotchas: 1. Keep clear of BubbleWrap::HTTP and stick with AFNetworking. BW::HTTP will be deprecated very soon

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

https://github.com/rubymotion/sugarcube

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

https://github.com/rubymotion/teacup

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

https://github.com/clearsightstudio/ProMotion/ Positives: 1. Support from GitHub maintainers is absolutely fantastic 2. You need much less code for boilerplate type screens Gotchas: 1. Watch out for animation completion as ProMotion currently does not allow for a completion handler following an animation 2. There’s an outstanding question in my mind as to whether:
 s/viewWillAppear/will_appear/g
 etc is really worth it

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

https://github.com/clayallsopp/formotion Positives: 1. Really, really easy to make forms and table screens. I mean, really easy. 2. Can be relatively easily extended to support new row types. Gotchas: 1. Does the simple stuff really well, but can be problematic for more complex things.

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

https://github.com/AFNetworking/AFNetworking Positives: 1.It’s awesome. You need to use it. ! Gotchas: 1.None

Slide 58

Slide 58 text

http://zbar.sourceforge.net/iphone/ Positives: 1.Works for most 1d and 2d barcode types ! Gotchas: 1.Not actively supported, at least, not to the extent that other pods are 2.Can be tricky to customise without resorting to hacking the Objective-C 3.Underlying scanning is very complicated and mostly written in C - not for the faint hearted

Slide 59

Slide 59 text

https://github.com/card-io Positives: 1.This is about as close to magic as you will find. 2.Free. 3.Did I mention it’s free? ! Gotchas: 1.None

Slide 60

Slide 60 text

https://github.com/abury/ABPadLockScreen Positives: 1.Excellent! ! Gotchas: 1.They recently changed the delegate protocol slightly which caused my app to crash until I worked out what had changed.

Slide 61

Slide 61 text

Does anyone want to see the source code?

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

There is a RubyGem or a CocoaPod for just about anything you will ever need to do* *And in many cases, there are multiple gems or pods for the same task. Often, the most difficult thing to worry about is which one to pick.

Slide 65

Slide 65 text

You can’t avoid learning Objective-C and the Cocoa Frameworks* *Notwithstanding my antipathy to Objective-C, the Cocoa frameworks in iOS are nothing short of amazing so don’t avoid them, embrace them willingly. s/ / /g

Slide 66

Slide 66 text

Functional / user acceptance testing is an absolute nightmare rspec ✓ frank ! *It’s actually MacBacon *

Slide 67

Slide 67 text

We spent a lot of time early on trying to get unified model code between the front- and back-ends. Ultimately, it failed because there’s just enough difference in RubyMotion- flavoured Ruby to make things tricky* *This is almost certainly a byproduct of my incompetence than anything inherent in RubyMotion, Ruby, Rails or anything else in this stack, and I’d love to explore this idea more in the future.

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

Much To Do About Nothing* 1. Refactor model classes to make use of CDQ 2. Improve table paging and infinite scrolling 3. Generate purchase receipts for PassBook 4. Add support for push notifications 5. Design refresh 6. Android version of Shopper, Merchant & Payments apps 7. Add (many!) more unit and integration tests 8. Improve functional tests (Frank?, Other options?) *For very large values of nothing

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

Thanks! @matthewsinclair