The Future of Magento Extensibility | Imagine 2013 Technology | Christopher O’Toole

475 views
428 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
475
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

The Future of Magento Extensibility | Imagine 2013 Technology | Christopher O’Toole

  1. 1. Insert photo of speakerhere891 pixels h x 688 pixels wNew PresentationTier in MagentoEugene TulikaSoftware EngineerMagento
  2. 2. Insert photo of speakerhere891 pixels h x 688 pixels wService IDLWebhooksSoftware EngineerMagentoChristopher O’Toole
  3. 3. Rethinking the extensions framework in Magento• Efficient, secure, easy to use• Focus: Upgradability and Compatibility• We are introducing new concepts and gathering feedback torefine the ideas
  4. 4. Services• Encapsulates the access to the business logic• Provides access to the data needed in templates• Have well defined interfaces, which allows exposing thelogic via API• Keeps access to business logic consistent for all clients:SOAP, internal, etc
  5. 5. Twig templates• Template is populated with data• Restricts view layer from complex business logic and dataaccess scenarios• Focused on data rendering• Development of templates become easier without risk ofchanging the business logic• Allows building a secure view layer• Automatic output encoding• Magento provides custom functions and filters to access thelayout functionality within a templateNo more SQL queries in Templates!
  6. 6. Twig on Her Majesty’s Secret Service
  7. 7. Access to the Service from viewServicesConfigurableServiceCallsPresentation tierBusiness logic
  8. 8. Define the service call configuration
  9. 9. Make a reference to the service call from the layoutDisplay service data in the Twig
  10. 10. Data from service call can be used in layout
  11. 11. Blocks encapsulation• Just generic blocks are needed• Each block has its own data• Parent block doesn’t share data with child• Layout elements can be easily repositioned
  12. 12. Configurable dropdown options• via service call• via constants• via configuration
  13. 13. Service?• Interface toBusinesslogic• PHP Code• RemoteEndpointIDL will be acombinationof PHPannotationsandexternalschemasService IDL
  14. 14. The PHP function receives anassociative array reflecting thestructure described by the annotationIDL Annotations
  15. 15. Input Data is defined in XML SchemaIDL Input Schema
  16. 16. Expected Output is defined in XML SchemaIDL Output Schema
  17. 17. WebhooksWhat?– Like Event Observers over HTTP– Eliminates need for polling– Supports real-time data integrations– Asynchronous
  18. 18. Webhook Config
  19. 19. Webhook Listener
  20. 20. Parsing Event Data
  21. 21. Extension points where callbackresults influence Magento behavior(synchronous)Callback Extension Points
  22. 22. • Define your shipping config• Use the provided callback serviceShipping Extension Config
  23. 23. What was that <subscriber> tag all about?Callback Subscriber
  24. 24. Shipping EndpointInput defined in the IDL
  25. 25. {"shippingMethods": [{"carrier": “acme","carrierTitle": “ACME Shipping","method": "ground","methodTitle": “ACME Ground","price": 3.75}]}Endpoint Response
  26. 26. It Works!
  27. 27. FeedbackInitialImpressionsQuestionsCommentsSourcehttps://github.com/magento/magento2Documentationhttp://magento.github.io/magento2-developer-docs/Feedbackhttps://getsatisfaction.com/magento-2-prereleaseEugene Tulika evgeniy.tulika@ebay.com Twitter: @vrannChristopher O’Toole otoolec@ebay.com Twitter: @frostmagus

×