SlideShare a Scribd company logo
Puppies & Ecommerce as
       an Engine
            Steph Skardal




  All photos Copyright Steph Skardal
Outline

● Traditional
  Monolithic
  Ecommerce
● Ecommerce
  as an Engine
● Rails Goodness
● Example Code
● Piggybak
● Cute puppies

                   I'm cute!
TME: Traditional Monolithic
Ecommerce:
Assumptions made:
● shopping cart & checkout
● products, product attributes
● product navigation
● product features: cross-sell, upsell, reviews
● admin: various features
● access control: admin, users
Problems with TME:
● Heavy on assumptions can make it difficult
  to customize
● Add-on features are not always maintained
● Heavily dependent on direction of platform




         Feeling Trapped?
TME Positives:
● Can get a site up and running quickly
● For a simple site with minimal customization,
  assumptions made by TME may be
  acceptable




      It's not
      all bad.
How do we make things easier?
● Ecommerce as an Engine



  But what does
  that mean?
What are Rails Engines?
● Rails 3 introduced a major rewrite in
  Engines, allowing mountability of mini-
  applications.
                              Engine #1

    Rails application         Engine #2

                              Engine #3


● A Rails engine contains models, views,
  controllers, modules, and routes that plug-in
  to the main application
Why is Rails a good fit?
● And Rails also now has some powerful
  Admin tools (RailsAdmin, ActiveAdmin)
  comparable to Django's core.

● Generally, Rails is a good framework to be
  doing efficient development on (as are other
  MVC frameworks). "Mountability" may be a
  trickier thing to accomplish in Perl, but may
  be possible in catalyst.
Ecommerce as an Engine
● Assumptions of shopping cart and checkout
● Items are added to the cart, which contain a
  quantity, description, subtotal
● Standard order and line item data model
No Product Model

There is no product model. This is important.
Why is there no product model?
● mountability: turn existing models into products
● TMEs tend to overengineer and bloat
  assumptions built around the product model
● In custom sites, products tend to be piled on
  with custom attributes that don't apply to all
  products, adding cruft
Variants Table


● variants table: with polymorphism
 id   item_id item_type               qty   ...
 1    1       Book                    10
 2    1       CompactDisc             4

● Variant.find(1).item = Book.find(1)
● Variant.find(2).item = CompactDisc.find(1)
The "Guts"

class Book < ActiveRecord::Base
 acts_as_variant
end

acts_as_variant does two things:
● has_one :variant, :as => "item", :class_name
   => "::Piggybak::Variant"
● accepts_nested_attributes_for :variant, :
   allow_destroy => true
The "Guts"

class CompactDisc < ActiveRecord::Base
 acts_as_variant
end
The "Guts"
Cart Form and Cart
● included as Rails partial view (include)




● passes variant id and quantity to cart
Line Item Structure
● Order has many line_items:
  id qty variant_id description price total
  1   1    1          Book Title   3.00 3.00
  2   2    2          CD Title     3.00 6.00

● Line item copies description and price at the
  time order is created to preserve product
  information at the time of purchase
● Cart and order logic exercises inventory
  management if specified per variant
Photo Break

 Stop! Tell me it's Almost Over!!
Checkout

● Checkout doesn't care what item types are in
  the cart
● Shipping, Tax, and Payments have common
  APIs for calculating to cover cost of line
  items
Authorize.NET
class AuthorizeNet
 KEYS = ["login", "password"]
 KLASS = ::ActiveMerchant::Billing::AuthorizeNetGateway
end

ActiveMerchant: A popular open-source gem released by
Shopify.com that includes Payment gateway support for
40+ popular payment gateways.

Integration: Payment method directly integrates with
ActiveMerchant, but specifies required payment gateway
key value pairs that are stored in a table that maps to
payment method.
USPS Shipping
class Usps Shipping
 KEYS = ["login", "password", "service_name"]
 def self.request_rates(method, order)
   #returns rate
 end
 def self.available?(method, order)
   #returns boolean
 end
 def self.rate(method, order)
   #returns rate for order
 end
end
USPS Shipping
What does this all mean?

● No assumptions made on:
  ○ product attributes, features
  ○ taxonomy
  ○ access control
● Works for:
  ○ highly customized sites in need of flexibility
  ○ sites with multiple product types, where the
     data model of the product types varies
● Doesn't work for:
  ○ any sites that can evaluate the assumptions
     of TME to be more valuable than custom
     development
Piggybak
● This "Ecommerce as an Engine" philosophy
  is the foundation of Piggybak

               ff on s!
              o ti
            ke mp
         ha su
       S s
           a
        se
    tho
Phunk says:
phunk: I might hit this high level idea a little
harder: "rails engines are pluggable modules of
functionality, and Piggybak is an engine, so that
allows someone to plug this in and easily add
the ecommerce part"

                              Engine #1

    Rails application          Piggybak

                              Engine #3
The Future

● More Piggybak work:
  ○ testing
  ○ implementation for more clients
  ○ line items rearchitecture (?)
     ■ treat everything as a line item
     ■ challenge with this is the admin interface
  ○ support for ActiveAdmin (?)
  ○ keep up with Rails "trends"


● Continue growing the Piggybak baby with
  testing, client implementation, minimal
  features.
Questions?




/me eyes
glaze over

More Related Content

Viewers also liked

C 6
C 6C 6
Woldehanna Agri-food sector, education and occupation choice of young people ...
Woldehanna Agri-food sector, education and occupation choice of young people ...Woldehanna Agri-food sector, education and occupation choice of young people ...
Woldehanna Agri-food sector, education and occupation choice of young people ...
futureagricultures
 
Дживаноблисс
ДживаноблиссДживаноблисс
Дживаноблисс
Елена Шальнова
 
Take part in research to combat atherosclerosis
Take part in research to combat atherosclerosisTake part in research to combat atherosclerosis
Take part in research to combat atherosclerosis
Xplore Health
 
04 03 wh_chris_walker
04 03 wh_chris_walker04 03 wh_chris_walker
04 03 wh_chris_walker
ChristopherAWalker
 
Question 3
Question 3Question 3
Question 3
JackMeadows
 
Pastoralism and livestock marketing at the margins
Pastoralism and livestock marketing at the marginsPastoralism and livestock marketing at the margins
Pastoralism and livestock marketing at the margins
futureagricultures
 
Question 1
Question 1Question 1
Question 1
JackMeadows
 
The film industry
The film industryThe film industry
The film industry
NShuttle
 
UNDP Round Table on Indigenous Trade and Development
UNDP Round Table on Indigenous Trade and DevelopmentUNDP Round Table on Indigenous Trade and Development
UNDP Round Table on Indigenous Trade and Development
Wayne Dunn
 
Education Project Brief
Education Project BriefEducation Project Brief
Education Project Brief
Mosharaf Hossain
 
Бальямен
БальяменБальямен
Бальямен
Елена Шальнова
 
Lifestyle unit 6
Lifestyle unit 6Lifestyle unit 6
Lifestyle unit 6
Les Davy
 
Lesson 3
Lesson 3Lesson 3
Lesson 3
pichulin1
 
Social media strategy essentials
Social media strategy essentialsSocial media strategy essentials
Social media strategy essentials
Rather Inventive
 
Gestão de Canais de Distribuição
Gestão de Canais de DistribuiçãoGestão de Canais de Distribuição
Gestão de Canais de Distribuição
Angela Halat Portugal
 

Viewers also liked (18)

C 6
C 6C 6
C 6
 
Woldehanna Agri-food sector, education and occupation choice of young people ...
Woldehanna Agri-food sector, education and occupation choice of young people ...Woldehanna Agri-food sector, education and occupation choice of young people ...
Woldehanna Agri-food sector, education and occupation choice of young people ...
 
Дживаноблисс
ДживаноблиссДживаноблисс
Дживаноблисс
 
Take part in research to combat atherosclerosis
Take part in research to combat atherosclerosisTake part in research to combat atherosclerosis
Take part in research to combat atherosclerosis
 
Purely practical data structures
Purely practical data structuresPurely practical data structures
Purely practical data structures
 
Tarea4
Tarea4Tarea4
Tarea4
 
04 03 wh_chris_walker
04 03 wh_chris_walker04 03 wh_chris_walker
04 03 wh_chris_walker
 
Question 3
Question 3Question 3
Question 3
 
Pastoralism and livestock marketing at the margins
Pastoralism and livestock marketing at the marginsPastoralism and livestock marketing at the margins
Pastoralism and livestock marketing at the margins
 
Question 1
Question 1Question 1
Question 1
 
The film industry
The film industryThe film industry
The film industry
 
UNDP Round Table on Indigenous Trade and Development
UNDP Round Table on Indigenous Trade and DevelopmentUNDP Round Table on Indigenous Trade and Development
UNDP Round Table on Indigenous Trade and Development
 
Education Project Brief
Education Project BriefEducation Project Brief
Education Project Brief
 
Бальямен
БальяменБальямен
Бальямен
 
Lifestyle unit 6
Lifestyle unit 6Lifestyle unit 6
Lifestyle unit 6
 
Lesson 3
Lesson 3Lesson 3
Lesson 3
 
Social media strategy essentials
Social media strategy essentialsSocial media strategy essentials
Social media strategy essentials
 
Gestão de Canais de Distribuição
Gestão de Canais de DistribuiçãoGestão de Canais de Distribuição
Gestão de Canais de Distribuição
 

Similar to Ecommerce as an Engine

26 story slicing techniques for any scrum team
26 story slicing techniques for any scrum team26 story slicing techniques for any scrum team
26 story slicing techniques for any scrum team
agilebin
 
Silverstripe Ecommerce
Silverstripe EcommerceSilverstripe Ecommerce
Silverstripe Ecommerce
Nicolaas Francken
 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engine
WO Community
 
Lizards & Pumpkins Catalog Replacement at mm17de
Lizards & Pumpkins Catalog Replacement at mm17deLizards & Pumpkins Catalog Replacement at mm17de
Lizards & Pumpkins Catalog Replacement at mm17de
vinaikopp
 
Meet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir KalashnikauMeet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir Kalashnikau
Amasty
 
Simplifi commerce oracle atg commerce & endeca training
Simplifi commerce   oracle atg commerce & endeca trainingSimplifi commerce   oracle atg commerce & endeca training
Simplifi commerce oracle atg commerce & endeca training
Lokesh Kumar
 
SimplifiCommerce - Oracle ATG Commerce & Endeca Training - N
SimplifiCommerce - Oracle ATG Commerce & Endeca Training - NSimplifiCommerce - Oracle ATG Commerce & Endeca Training - N
SimplifiCommerce - Oracle ATG Commerce & Endeca Training - N
Lokesh Kumar
 
Simplifi commerce oracle atg commerce & endeca training - n
Simplifi commerce   oracle atg commerce & endeca training - nSimplifi commerce   oracle atg commerce & endeca training - n
Simplifi commerce oracle atg commerce & endeca training - n
Lokesh Kumar
 
Improving Performance on Magento 1*
Improving Performance on Magento 1*Improving Performance on Magento 1*
Improving Performance on Magento 1*
David Z. Lerner
 
A differnt Type of Supermarket Delivery
A differnt Type of Supermarket DeliveryA differnt Type of Supermarket Delivery
A differnt Type of Supermarket Delivery
Thoughtworks
 
Migration of a high-traffic E-commerce website from Legacy Monolith to Micros...
Migration of a high-traffic E-commerce website from Legacy Monolith to Micros...Migration of a high-traffic E-commerce website from Legacy Monolith to Micros...
Migration of a high-traffic E-commerce website from Legacy Monolith to Micros...
Pavel Pratyush
 
openERP- How to connect OpenERP with external Systems, AkretionAkretion base...
openERP-  How to connect OpenERP with external Systems, AkretionAkretion base...openERP-  How to connect OpenERP with external Systems, AkretionAkretion base...
openERP- How to connect OpenERP with external Systems, AkretionAkretion base...
Odoo
 
Magento live eCommerce demo tutorial for beginners by Magento Universe
Magento live eCommerce demo tutorial for beginners by Magento UniverseMagento live eCommerce demo tutorial for beginners by Magento Universe
Magento live eCommerce demo tutorial for beginners by Magento Universe
Magento Universe
 
Magento Live eCommerce Demo Tutorial for Beginners » Magento Universe
Magento Live eCommerce Demo Tutorial for Beginners » Magento UniverseMagento Live eCommerce Demo Tutorial for Beginners » Magento Universe
Magento Live eCommerce Demo Tutorial for Beginners » Magento Universe
Puneet Parashar
 
Evolve13 cq-commerce-framework
Evolve13 cq-commerce-frameworkEvolve13 cq-commerce-framework
Evolve13 cq-commerce-framework
Paolo Mottadelli
 
EVOLVE'13 | Enhance | Ecommerce Framework | Paolo Mottadelli
EVOLVE'13 | Enhance | Ecommerce Framework | Paolo MottadelliEVOLVE'13 | Enhance | Ecommerce Framework | Paolo Mottadelli
EVOLVE'13 | Enhance | Ecommerce Framework | Paolo Mottadelli
Evolve The Adobe Digital Marketing Community
 
AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...
AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...
AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...
Amazon Web Services
 
Alexandr Vronskiy "Evolution of Ecommerce Application"
Alexandr Vronskiy "Evolution of Ecommerce Application"Alexandr Vronskiy "Evolution of Ecommerce Application"
Alexandr Vronskiy "Evolution of Ecommerce Application"
Fwdays
 
Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!
Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!
Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!
Parth Lawate
 
Drupal Commerce 2 for Drupal 8 - Drupal camp Antwerp 2017
Drupal Commerce 2 for Drupal 8 - Drupal camp Antwerp 2017Drupal Commerce 2 for Drupal 8 - Drupal camp Antwerp 2017
Drupal Commerce 2 for Drupal 8 - Drupal camp Antwerp 2017
Iztok Smolic
 

Similar to Ecommerce as an Engine (20)

26 story slicing techniques for any scrum team
26 story slicing techniques for any scrum team26 story slicing techniques for any scrum team
26 story slicing techniques for any scrum team
 
Silverstripe Ecommerce
Silverstripe EcommerceSilverstripe Ecommerce
Silverstripe Ecommerce
 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engine
 
Lizards & Pumpkins Catalog Replacement at mm17de
Lizards & Pumpkins Catalog Replacement at mm17deLizards & Pumpkins Catalog Replacement at mm17de
Lizards & Pumpkins Catalog Replacement at mm17de
 
Meet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir KalashnikauMeet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir Kalashnikau
 
Simplifi commerce oracle atg commerce & endeca training
Simplifi commerce   oracle atg commerce & endeca trainingSimplifi commerce   oracle atg commerce & endeca training
Simplifi commerce oracle atg commerce & endeca training
 
SimplifiCommerce - Oracle ATG Commerce & Endeca Training - N
SimplifiCommerce - Oracle ATG Commerce & Endeca Training - NSimplifiCommerce - Oracle ATG Commerce & Endeca Training - N
SimplifiCommerce - Oracle ATG Commerce & Endeca Training - N
 
Simplifi commerce oracle atg commerce & endeca training - n
Simplifi commerce   oracle atg commerce & endeca training - nSimplifi commerce   oracle atg commerce & endeca training - n
Simplifi commerce oracle atg commerce & endeca training - n
 
Improving Performance on Magento 1*
Improving Performance on Magento 1*Improving Performance on Magento 1*
Improving Performance on Magento 1*
 
A differnt Type of Supermarket Delivery
A differnt Type of Supermarket DeliveryA differnt Type of Supermarket Delivery
A differnt Type of Supermarket Delivery
 
Migration of a high-traffic E-commerce website from Legacy Monolith to Micros...
Migration of a high-traffic E-commerce website from Legacy Monolith to Micros...Migration of a high-traffic E-commerce website from Legacy Monolith to Micros...
Migration of a high-traffic E-commerce website from Legacy Monolith to Micros...
 
openERP- How to connect OpenERP with external Systems, AkretionAkretion base...
openERP-  How to connect OpenERP with external Systems, AkretionAkretion base...openERP-  How to connect OpenERP with external Systems, AkretionAkretion base...
openERP- How to connect OpenERP with external Systems, AkretionAkretion base...
 
Magento live eCommerce demo tutorial for beginners by Magento Universe
Magento live eCommerce demo tutorial for beginners by Magento UniverseMagento live eCommerce demo tutorial for beginners by Magento Universe
Magento live eCommerce demo tutorial for beginners by Magento Universe
 
Magento Live eCommerce Demo Tutorial for Beginners » Magento Universe
Magento Live eCommerce Demo Tutorial for Beginners » Magento UniverseMagento Live eCommerce Demo Tutorial for Beginners » Magento Universe
Magento Live eCommerce Demo Tutorial for Beginners » Magento Universe
 
Evolve13 cq-commerce-framework
Evolve13 cq-commerce-frameworkEvolve13 cq-commerce-framework
Evolve13 cq-commerce-framework
 
EVOLVE'13 | Enhance | Ecommerce Framework | Paolo Mottadelli
EVOLVE'13 | Enhance | Ecommerce Framework | Paolo MottadelliEVOLVE'13 | Enhance | Ecommerce Framework | Paolo Mottadelli
EVOLVE'13 | Enhance | Ecommerce Framework | Paolo Mottadelli
 
AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...
AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...
AWS re:Invent 2016: How Fulfillment by Amazon (FBA) and Scopely Improved Resu...
 
Alexandr Vronskiy "Evolution of Ecommerce Application"
Alexandr Vronskiy "Evolution of Ecommerce Application"Alexandr Vronskiy "Evolution of Ecommerce Application"
Alexandr Vronskiy "Evolution of Ecommerce Application"
 
Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!
Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!
Techjoomla Infrastructure Extensions - Adding an Enterprise Layer to Joomla!
 
Drupal Commerce 2 for Drupal 8 - Drupal camp Antwerp 2017
Drupal Commerce 2 for Drupal 8 - Drupal camp Antwerp 2017Drupal Commerce 2 for Drupal 8 - Drupal camp Antwerp 2017
Drupal Commerce 2 for Drupal 8 - Drupal camp Antwerp 2017
 

Recently uploaded

Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 

Recently uploaded (20)

Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 

Ecommerce as an Engine

  • 1. Puppies & Ecommerce as an Engine Steph Skardal All photos Copyright Steph Skardal
  • 2. Outline ● Traditional Monolithic Ecommerce ● Ecommerce as an Engine ● Rails Goodness ● Example Code ● Piggybak ● Cute puppies I'm cute!
  • 3. TME: Traditional Monolithic Ecommerce: Assumptions made: ● shopping cart & checkout ● products, product attributes ● product navigation ● product features: cross-sell, upsell, reviews ● admin: various features ● access control: admin, users
  • 4. Problems with TME: ● Heavy on assumptions can make it difficult to customize ● Add-on features are not always maintained ● Heavily dependent on direction of platform Feeling Trapped?
  • 5. TME Positives: ● Can get a site up and running quickly ● For a simple site with minimal customization, assumptions made by TME may be acceptable It's not all bad.
  • 6. How do we make things easier? ● Ecommerce as an Engine But what does that mean?
  • 7. What are Rails Engines? ● Rails 3 introduced a major rewrite in Engines, allowing mountability of mini- applications. Engine #1 Rails application Engine #2 Engine #3 ● A Rails engine contains models, views, controllers, modules, and routes that plug-in to the main application
  • 8. Why is Rails a good fit? ● And Rails also now has some powerful Admin tools (RailsAdmin, ActiveAdmin) comparable to Django's core. ● Generally, Rails is a good framework to be doing efficient development on (as are other MVC frameworks). "Mountability" may be a trickier thing to accomplish in Perl, but may be possible in catalyst.
  • 9. Ecommerce as an Engine ● Assumptions of shopping cart and checkout ● Items are added to the cart, which contain a quantity, description, subtotal ● Standard order and line item data model
  • 10. No Product Model There is no product model. This is important. Why is there no product model? ● mountability: turn existing models into products ● TMEs tend to overengineer and bloat assumptions built around the product model ● In custom sites, products tend to be piled on with custom attributes that don't apply to all products, adding cruft
  • 11. Variants Table ● variants table: with polymorphism id item_id item_type qty ... 1 1 Book 10 2 1 CompactDisc 4 ● Variant.find(1).item = Book.find(1) ● Variant.find(2).item = CompactDisc.find(1)
  • 12. The "Guts" class Book < ActiveRecord::Base acts_as_variant end acts_as_variant does two things: ● has_one :variant, :as => "item", :class_name => "::Piggybak::Variant" ● accepts_nested_attributes_for :variant, : allow_destroy => true
  • 13. The "Guts" class CompactDisc < ActiveRecord::Base acts_as_variant end
  • 15. Cart Form and Cart ● included as Rails partial view (include) ● passes variant id and quantity to cart
  • 16. Line Item Structure ● Order has many line_items: id qty variant_id description price total 1 1 1 Book Title 3.00 3.00 2 2 2 CD Title 3.00 6.00 ● Line item copies description and price at the time order is created to preserve product information at the time of purchase ● Cart and order logic exercises inventory management if specified per variant
  • 17. Photo Break Stop! Tell me it's Almost Over!!
  • 18. Checkout ● Checkout doesn't care what item types are in the cart ● Shipping, Tax, and Payments have common APIs for calculating to cover cost of line items
  • 19. Authorize.NET class AuthorizeNet KEYS = ["login", "password"] KLASS = ::ActiveMerchant::Billing::AuthorizeNetGateway end ActiveMerchant: A popular open-source gem released by Shopify.com that includes Payment gateway support for 40+ popular payment gateways. Integration: Payment method directly integrates with ActiveMerchant, but specifies required payment gateway key value pairs that are stored in a table that maps to payment method.
  • 20. USPS Shipping class Usps Shipping KEYS = ["login", "password", "service_name"] def self.request_rates(method, order) #returns rate end def self.available?(method, order) #returns boolean end def self.rate(method, order) #returns rate for order end end
  • 22. What does this all mean? ● No assumptions made on: ○ product attributes, features ○ taxonomy ○ access control ● Works for: ○ highly customized sites in need of flexibility ○ sites with multiple product types, where the data model of the product types varies ● Doesn't work for: ○ any sites that can evaluate the assumptions of TME to be more valuable than custom development
  • 23. Piggybak ● This "Ecommerce as an Engine" philosophy is the foundation of Piggybak ff on s! o ti ke mp ha su S s a se tho
  • 24. Phunk says: phunk: I might hit this high level idea a little harder: "rails engines are pluggable modules of functionality, and Piggybak is an engine, so that allows someone to plug this in and easily add the ecommerce part" Engine #1 Rails application Piggybak Engine #3
  • 25. The Future ● More Piggybak work: ○ testing ○ implementation for more clients ○ line items rearchitecture (?) ■ treat everything as a line item ■ challenge with this is the admin interface ○ support for ActiveAdmin (?) ○ keep up with Rails "trends" ● Continue growing the Piggybak baby with testing, client implementation, minimal features.