Online Retail with Perl - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Online Retail with Perl

Description:

Handel (basket & order processing) OpenThought (AJAX user interface) Proud to use Perl! ... Basket converted to order (Handel) POST. User Interface. Crucial to ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 17
Provided by: jona8
Category:
Tags: handel | online | perl | retail

less

Transcript and Presenter's Notes

Title: Online Retail with Perl


1
Online Retail with Perl
Jon Allen
http//perl.jonallen.info - jj_at_jonallen.info
2
Background
  • www.pennysarcade.co.uk launched November 08
  • Lots of CPAN used
  • 169 CPAN distributions (including dependencies)
  • Three key modules power the site
  • Catalyst (web framework)
  • Handel (basket order processing)
  • OpenThought (AJAX user interface)
  • Proud to use Perl! ?

3
Catalyst intro (1)
  • Very different to traditional CGI programming
  • No scripts
  • Website is a complete application
  • URL dispatch controls which methods are invoked
  • http//mysite.com/view/image/1234/square
  • MySiteViewimage(1234,square)
  • Very flexible
  • Method behaviour defined using attributes
  • Multiple methods can be called in a single request

4
Catalyst intro (2)
  • Layered architecture
  • Model (database / business logic)
  • Controller (application logic)
  • View (output)
  • Example customer receipts
  • Model data logic, delivery calculation, etc
  • Returns an order object
  • HTML View produces web page
  • PDF View produces shipping receipt

5
Why did we choose Catalyst?
  • Proven, stable technology
  • Fantastic documentation
  • Plugins
  • Session handling, access control, etc
  • Support community and commercial
  • Quick to develop in
  • Easy to install, built-in development server
  • Simple deployment
  • FastCGI application server

6
e-Commerce basics
  • SKU Stock Keeping Unit
  • Represents an individual item sold, i.e. a
    product in 2 colours and 3 sizes 6 SKUs
  • Shopping basket temporary storage
  • User browses site, adds items to basket
  • Orders the good part!
  • Basket converted to order revenue

SKUs
Baskets
Orders
7
e-Commerce basics
  • SKU Stock Keeping Unit
  • Represents an individual item sold, i.e. a
    product in 2 colours and 3 sizes 6 SKUs
  • Shopping basket temporary storage
  • User browses site, adds items to basket
  • Orders the good part!
  • Basket converted to order revenue

SKUs
Baskets
Handel
Orders
8
Handel
  • Not a complete e-Commerce package
  • Toolkit for building e-Commerce applications
  • This is a good thing
  • Manages baskets and orders
  • Object-oriented
  • Add / Remove / Update / Inspect methods
  • Catalyst model
  • Easy to subclass
  • e.g. add custom delivery calculations / data
    fields

9
Taking payments
  • Merchant account
  • Lets you accept credit / debit cards
  • Different types Internet, MOTO, Retail
  • Available from most banks or American Express
  • Small cost per transaction
  • Payment processing
  • XML over HTTPS
  • Complex security requirements PCI-DSS
  • Often easier to outsource this bit!

10
Payment process
Customer enters credit card details
Order amount in HTML form
https//yoursite/checkout
POST
https//payment/processor
Basket converted to order (Handel)
Acquiring bank (3D Secure)
https//yoursite/success
https//payment/processor
POST
https//yoursite/fail
Success or failure page displayed
11
User Interface
  • Crucial to the shopping experience
  • OpenThought AJAX transport library
  • See http//perl.jonallen.info/talks/lightweightaja
    x
  • Developed a Catalyst view for OpenThought
  • Not on CPAN yet, but will be
  • Live demo
  • Weather permitting! ?

12
Other useful things (1)
  • PDFReuse
  • Modifies existing PDF files
  • Great for printing receipts
  • Design template (e.g. in Microsoft Word)
  • Save as PDF
  • Create a Catalyst view using PDFReuse to insert
    customer details from Handel model
  • Much less work than coding the full PDF document
    by hand

13
Other useful things (2)
  • Read LĂ©ons book

14
Other useful things (2)
  • Read LĂ©ons book
  • Buy LĂ©ons book!
  • www.tickmyboxes.com
  • 100-point checklist of best practice
  • Lots of useful tips

15
Conclusion
  • Site was delivered under budget and ahead of
    schedule
  • Could not have achieved this without Perl and
    CPAN
  • Development and Operations are the easy bits
  • Marketing and Promotion is where it gets
    difficult!
  • Treat your home, treat someone special, treat
    yourself at www.pennysarcade.co.uk

16
Fin!
Thank you for listening!
Any questions? http//perl.jonallen.info/talks
Write a Comment
User Comments (0)
About PowerShow.com