September 18, 2014. Modular development in Magento 2. Igor Miniailo Magento

Similar documents
Paul Boisvert. Director Product Management, Magento

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

Building Hyper-Scale Platform-as-a-Service Microservices with Microsoft Azure. Patriek van Dorp and Alex Thissen

Customer Bank Account Management System Technical Specification Document

Creating Value through Innovation MAGENTO 1.X TO MAGENTO 2.0 MIGRATION

Moving from EAI to SOA An Infosys Perspective

SOA and BPO SOA orchestration with flow. Jason Huggins Subject Matter Expert - Uniface

Research Article. ISSN (Print) *Corresponding author Lili Wang

The Rules 1. One level of indentation per method 2. Don t use the ELSE keyword 3. Wrap all primitives and Strings

Foundations for Systems Development

COMP5426 Parallel and Distributed Computing. Distributed Systems: Client/Server and Clusters

Open Source Development with the Elastic Path Ecommerce Platform

Case Study. Data Governance Portal Brainvire Infotech Pvt Ltd Page 1 of 1

Definition of SOA. Capgemini University Technology Services School Capgemini - All rights reserved November 2006 SOA for Software Architects/ 2

Magento Content API Technical Overview

Creating Models. Rob Allen, June 2014

SOACertifiedProfessional.Braindumps.S90-03A.v by.JANET.100q. Exam Code: S90-03A. Exam Name: SOA Design & Architecture

CERN Summer Student Program 2013 Report

Service Oriented Architecture and the DBA Kathy Komer Aetna Inc. New England DB2 Users Group. Tuesday June 12 1:00-2:15

2 (18) - SOFTWARE ARCHITECTURE Service Oriented Architecture - Sven Arne Andreasson - Computer Science and Engineering.

Commercial Database Software Development- A review.

MS Designing and Optimizing Database Solutions with Microsoft SQL Server 2008

Settlers of Catan Phase 1

Enterprise SOA Strategy, Planning and Operations with Agile Techniques, Virtualization and Cloud Computing

Logicify Fact Sheet. We bring logic to the software systems and development processes. We call this process to logicify.

Software Design. Design (I) Software Design Data Design. Relationships between the Analysis Model and the Design Model

Quality Analysis with Metrics

Domain-Driven Design

SERVICE-ORIENTED MODELING FRAMEWORK (SOMF ) SERVICE-ORIENTED SOFTWARE ARCHITECTURE MODEL LANGUAGE SPECIFICATIONS

ITDUMPS QUESTION & ANSWER. Accurate study guides, High passing rate! IT dumps provides update free of charge in one year!

A SERVICE ORIENTED ARCHITECTURE FOR DATA-DRIVEN DECISION SUPPORT SYSTEMS. Ian James Cottingham A THESIS. Presented to the Faculty of

Preparing Your Business for Magento 2.0

Legal. Copyright 2016 Magento, Inc.; All Rights Reserved.

Virtual Machine in Data Center Switches Huawei Virtual System

Inside the Digital Commerce Engine. The architecture and deployment of the Elastic Path Digital Commerce Engine

Government's Adoption of SOA and SOA Examples

Information Systems Analysis and Design CSC John Mylopoulos. Software Architectures Information Systems Analysis and Design CSC340

The Integration Between EAI and SOA - Part I

INTRODUCTION TO CLOUD COMPUTING CEN483 PARALLEL AND DISTRIBUTED SYSTEMS

Virtualization s Evolution

Code Qualities and Coding Practices

Core J2EE Patterns, Frameworks and Micro Architectures

Azure Scalability Prescriptive Architecture using the Enzo Multitenant Framework

ATV Data Link Simulator: A Development based on a CCSDS Layers Framework

SDN Architecture Overview. Version 1.1 November, 2014 ONF TR-504

Integrated Development of Distributed Real-Time Applications with Asynchronous Communication

2311A: Advanced Web Application Development using Microsoft ASP.NET Course 2311A Three days Instructor-led

Point of Sale - Bridge Your professional POS SAP Add-on

APPLICATION NOTE. Elastic Scalability. for HetNet Deployment, Management & Optimization

Using OSGi as a Cloud Platform

WHITEPAPER M&M Application Platform for WPF

Pattern. seconda parte. Types of patterns. ...other good guidance... some GRASP. design patterns (software design) Types of software patterns

9 Research Questions Resolved

Business Integration Architecture for Next generation OSS (NGOSS)

Client-server 3-tier N-tier

A Data Centric Approach for Modular Assurance. Workshop on Real-time, Embedded and Enterprise-Scale Time-Critical Systems 23 March 2011

IT Architecture Review. ISACA Conference Fall 2003

See the Sample Scenario Section at the end of this document for a description of when these components are applied.

Enhancing your Web Experiences with ASP.NET Ajax and IIS 7

D6 INFORMATION SYSTEMS DEVELOPMENT. SOLUTIONS & MARKING SCHEME. June 2013

Engineering Process Software Qualities Software Architectural Design

Agile Business Suite: a 4GL environment for.net developers DEVELOPMENT, MAINTENANCE AND DEPLOYMENT OF LARGE, COMPLEX BACK-OFFICE APPLICATIONS

Physical Security Information Management: A Technical Perspective

Manufacturer cuts costs and gains global insight with business management solution

Reducing Technical Debt Using Maintainability Index

CONSUL AS A MONITORING SERVICE

Real Time Remote Monitoring over Cellular Networks. Wayne Chen Marketing Specialist

Service Oriented Architecture: A driving force for paperless healthcare system

How To Understand The Benefits Of An Oss Architecture

Using Library Dependencies for Clustering

Tutorial on Client-Server Architecture

Chapter 3 Chapter 3 Service-Oriented Computing and SOA Lecture Note

Case Study on the Development of Inventory Interface Standards. Implementing NGOSS with MTOSI

Talking your Language. E-WorkBook 10 provides a one-platform, single source of truth without adding complexity to research

White Paper. Optimizing the Performance Of MySQL Cluster

Service-Oriented Architectures

Transport SDN Toolkit: Framework and APIs. John McDonough OIF Vice President NEC BTE 2015

Security Domain Separation as Prerequisite for Business Flexibility. Igor Furgel T-Systems

Advanced Web Application Development using Microsoft ASP.NET

IaaS Federation. Contrail project. IaaS Federation! Objectives and Challenges! & SLA management in Federations 5/23/11

1. Stem. Configuration and Use of Stem

The EMSX Platform. A Modular, Scalable, Efficient, Adaptable Platform to Manage Multi-technology Networks. A White Paper.

Enterprise Digital Identity Architecture Roadmap

Transcription:

September 18, 2014 Modular development in Magento 2 Igor Miniailo Magento

Agenda 1 Magento 2 goals 2 Magento 1 modules 3 Decoupling techniques 4 Magento 2 is it getting better? 5 Modularity examples

Magento 2 Goals Modern tech stack Improved performance and scalability Streamline customizations Simplify external integrations Easy installation and upgrades High code quality and tests

Modules. Definition Modules serve as named containers for domain object classes that are highly cohesive with one another. The goal should be low coupling between the classes that are in different Modules

2 Magento 1 Modules.

Magento 1 Modules While Magento has always had a modular architecture, the current module boundaries are not always ideal.

3 Decoupling techniques.

Relationship between an interface and its implementation. An implementation depends on its interface but not vice versa. In particular, any caller of an interface depends only on the interface, even if a separate module implements it.

Defining an interface in a module that a separate module intends to implement is a fundamental way to break dependencies and reduce coupling.

Some more techniques Dependency injection Interceptors (ability to observe public/protected method calls in application) Tell, don t ask Law Of Demeter CQS and CQRS

Dependency injection Dependency Injection achieves Decoupling using Inversion of Control. * Constructor injection It s the technique of passing objects dependencies to its constructor. ** Note that the constructor accepts an interface and not concrete object.

Interceptors

Tell, don t ask Procedural code gets information then makes decisions. Object-oriented code tells objects to do things. Alec Sharp * To make decisions outside the object violates its encapsulation ** The fundamental principle of Object Oriented programming is the unification of methods and data. Splitting this up inappropriately gets you right back to procedural programming

Law of Demeter Only talk to your immediate friends. You can play with yourself. You can play with your own toys (but you can't take them apart), You can play with toys that were given to you. And you can play with toys you've made yourself. * Never call a method on an object you got from another call nor on a global object.

CQS / CQRS - command query separation To ask is a query, to tell is a command * Getters must not change state of the object Command Query Responsibility Segregation (CQRS) applies the CQS principle by using separate Query and Command objects to retrieve and modify data respectively.

Simple rules for module design: Ensuring that Modules are largely independent of others has the same benefit as loosely coupled classes. This will make it easier to maintain and refactor code inside the module. Do strive for acyclic dependencies on Modules where coupling is necessary. Just unidirection

4 Magento 2 Modules. Is it getting better?

Framework vs Modules Isolate the expression of the domain model and the business logic from underlying infrastructure layer. Partition a complex program into layers. Develop a design within each layer that is cohesive and that depends only on the layers below. Conclusion: The core framework functionality should be in the framework, not mixed in with modules.

Framework. Usage of 3 rd party components in Core - Zend Modules layer Framework Layer External component Layer

Framework magento2/lib/internal/magento/framework/*

Module.xml

5 Modularity examples.

Modularity Examples. Configuration Problem: Store Config Model Coupling on Store (Core module)

Modularity Configuration. Solution

Modularity Example. Shipping carriers Problem: All shipping carriers are delivered in one module

Modularity Shipping carriers. Solution

Magento 2 Decoupling

Documentation https://wiki.magento.com/display/mage2doc/magento+1.x+to+2.x+backwards-incompatible +Changes https://wiki.magento.com/display/mage2doc/modularity%3a+core+components+moved+from +the+application+to+framework+layer https://wiki.magento.com/display/mage2doc/modularity%3a+core+components+moved+to +Store+Module

Last notice Don t forget Unit test your code, because the essence of Unit test to reveal coupling