Extension framework game plan
Download
1 / 16

Extension Framework Game Plan - PowerPoint PPT Presentation


  • 32 Views
  • Uploaded on

Let’s validate and list the capabilities needed in Extension Framework through an extension which provides feature to mark a product as user’s favorite.\n

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Extension Framework Game Plan' - vinsol


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Let’s validate and list the capabilities needed in Extension Framework through an extension which provides feature to mark a product as user’s favorite.


Favorite product extension requirements
Favorite Product Extension Requirements: Extension Framework through an extension which provides feature to mark a product as user’s favorite.

Ability to mark and unmark a Product as favorite

  • a View probably showing all products with Ability to mark/unmark product as favorite

  • a controller action preparing the view

  • a route exposing the controller / view through Web

  • a controller action handling mark product as favorite

  • a route exposing the controller / view through Web


  • a controller action removing product from the list of favorites

  • a route exposing the controller / view through Web

  • a model interfacing with database to store product favorited by user

  • a migration to create join table in database

  • a join table storing product_id and user_id


Showing all products favorited by a user
Showing All Products favorited by a User favorites

  • association in User to get favorite products

  • a View showing list of Favorite Products

  • a controller preparing the view

  • a route exposing the controller / view through Web


Showing users who favorited a particular product
Showing Users who favorited a particular Product favorites

  • association in Product to get users who favorited

  • a View showing list of Users who favorited

  • a controller preparing the view

  • a Route exposing the controller / view through Web

  • Ability to test the integration of above mentioned requirements


Let s break the above requirements into two groups
Let’s break the above requirements into two groups favorites

  • Model layer changes

  • Request layer changes


Model layer changes
Model Layer Changes favorites

Ability to mark and unmark a Product as favorite

  • a model interfacing with database to store product favorited by user

  • a migration to create join table in database

  • a join table storing product_id and user_id

    Showing All Products favorited by a User

  • association in User to get favorite products

    Showing Users who favorited a particular Product

  • association in Product to get users who favorited


Translates to
translates to favorites

Ability to mark and unmark a Product as favorite

  • New Ecto Model with user_id and product_id fields

  • Ecto migration to create join table storing product_id and user_id

    Showing All Products favorited by a User

  • extending User schema to have associations as needed

  • support functions in User Model to retrieve all products favorited by a user

    Showing Users who favorited a particular Product

  • extending Product schema to have associations as needed

  • support functions in Product Model too retrieve all users who favorited a product


Request layer changes
Request Layer Changes favorites

Ability to mark and unmark a Product as favorite

  • a View probably showing all products with ability to mark/unmark product as favorite

  • a controller action preparing the view

  • a route exposing the controller / view through Web

  • a controller action handling mark product as favorite

  • a route exposing the controller / view through Web

  • a controller action removing product from the list of favorites

  • a route exposing the controllerontroller / view through Web


Showing All Products favorited by a User favorites

  • a View showing list of Products

  • a controller preparing the view

  • already route exposing the controller / view through Web

    Showing Users who favorited a particular Product

  • a View showing list of Users

  • a controller preparing the view

  • a route exposing the controller / view through Web


Translates to1
translates to favorites

Ability to mark and unmark a Product as favorite

  • a View probably showing all products with ability to mark/unmark product as favorite

  • a controller with index / create / delete action

  • a route exposingposing index / create / delete action


Showing All Products favorited by a User favorites

  • a View showing list of Products

  • a controller preparing the viewew

  • a route exposing the controller / view through Web

    Showing Users who favorited a particular Product

  • a View showing list of Users

  • a controller preparing the view

  • a route exposing throughe controller / view through Web


What we need

What we need


How we attempt to solve
How we attempt to solve favorites

  • Elixir Metaprogramming

  • Elixir umbrella app dependencies to share and reuse code among Nectar & Extensions using ExtensionManager

  • Extensions as Phoenix project leveraging NectarCommerce


Thank you
Thank you... favorites


ad