Magento 2 Developer's Guide

Harness the power of Magento 2 – The most recent version of the world’s favourite e-Commerce platform for your online store

Magento 2 Developer's Guide

This ebook is included in a Mapt subscription
Branko Ajzele

2 customer reviews
Harness the power of Magento 2 – The most recent version of the world’s favourite e-Commerce platform for your online store
$10.00
$44.99
RRP $35.99
RRP $44.99
eBook
Print + eBook
Access every Packt eBook & Video for just $100
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Find Out More
 
Preview in Mapt

Book Details

ISBN 139781785886584
Paperback412 pages

Book Description

Magento is one of the most exciting, flexible, and customizable e-commerce systems. It offers you an extensive suite of powerful tools for creating and managing an online store. After years of development, Magento 2 introduces itself with a strong emphasis on modularity, Web API's, automated testing and overall new technology stack platform. The long-awaited Magento 2 release introduces a whole new e-commerce platform to develop online stores. The all new Magento 2 architecture, Web APIs, and a host of other features are equally challenging to master as much as they are exciting to use.

This book will ease the learning curve by offering step-by-step guidance on how to extend the core functionality of your Magento 2 store.

This book is your one-stop guide to build and customize a quality e-commerce website from the latest version of one of the largest, fastest growing, and most popular e-commerce platforms—Magento 2.

We start off with an introduction to the fundamental concepts of Magento to give you a foundation to work from. We then move on to configure the development and basic production environment for Magento. After this, you’ll get to grips with the major concepts and conventions that are new to the Magento 2 platform. We then delve deeper to get to the core of automated deployments, persisting data, creating your own Magento themes, writing data fixture scripts and applying various backend and frontend modifications. As we near the end of the book, you will learn to make API calls and write automated tests. Finally, you will be guided through building a full-blown helpdesk module from scratch.

By the end of this book, you will have learned a wide range of techniques to extend and customize your Magento 2 store to fit the requirements of your business.

Table of Contents

Chapter 1: Understanding the Platform Architecture
The technology stack
The architectural layers
The top-level filesystem structure
The module filesystem structure
Summary
Chapter 2: Managing the Environment
Setting up a development environment
Setting up a production environment
Summary
Chapter 3: Programming Concepts and Conventions
Composer
Service contracts
Code generation
The var directory
Coding standards
Summary
Chapter 4: Models and Collections
Creating a miniature module
Understanding the flow of schema and data scripts
Creating an install schema script (InstallSchema.php)
Creating an upgrade schema script (UpgradeSchema.php)
Creating an install data script (InstallData.php)
Creating an upgrade data script (UpgradeData.php)
Entity CRUD actions
Creating new entities
Managing collections
Summary
Chapter 5: Using the Dependency Injection
The object manager
Dependency injection
Configuring class preferences
Using virtual types
Summary
Chapter 6: Plugins
Creating a plugin
Using the before listener
Using the after listener
Using the around listener
The plugin sort order
Summary
Chapter 7: Backend Development
Cron jobs
Notification messages
Session and cookies
Logging
The profiler
Events and observers
Cache(s)
Widgets
Custom variables
i18n
Indexer(s)
Summary
Chapter 8: Frontend Development
Rendering flow
View elements
Summary
Chapter 9: The Web API
User types
Authentication methods
REST versus SOAP
Hands-on with token-based authentication
Hands-on with OAuth-based authentication
OAuth-based Web API calls
Hands-on with session-based authentication
Creating custom Web APIs
Search Criteria Interface for list filtering
Summary
Chapter 10: The Major Functional Areas
CMS management
Catalog management
Customer management
Products and customers import
The custom product types
Custom offline shipping methods
Custom offline payment methods
Summary
Chapter 11: Testing
Types of tests
Unit testing
Integration testing
Static testing
Integrity testing
Legacy testing
Performance testing
Functional testing
Writing a simple unit test
Summary
Chapter 12: Building a Module from Scratch
Module requirements
Registering a module
Creating a configuration file (config.xml)
Creating e-mail templates (email_templates.xml)
Creating a system configuration file (system.xml)
Creating access control lists (acl.xml)
Creating an installation script (InstallSchema.php)
Managing entity persistence (model, resource, collection)
Building a frontend interface
Building a backend interface
Creating unit tests
Summary

What You Will Learn

  • Set up the development and production environment of Magento 2
  • Understand the new major concepts and conventions used in Magento 2
  • Build a miniature yet fully-functional module from scratch to manage your e-commerce platform efficiently
  • Write models and collections to manage and search your entity data
  • Dive into backend development such as creating events, observers, cron jobs, logging, profiling, and messaging features
  • Get to the core of frontend development such as blocks, templates, layouts, and the themes of Magento 2
  • Use token, session, and Oauth token-based authentication via various flavors of API calls, as well as creating your own APIs
  • Get to grips with testing Magento modules and custom Magento themes, which forms an integral part of development

Authors

Table of Contents

Chapter 1: Understanding the Platform Architecture
The technology stack
The architectural layers
The top-level filesystem structure
The module filesystem structure
Summary
Chapter 2: Managing the Environment
Setting up a development environment
Setting up a production environment
Summary
Chapter 3: Programming Concepts and Conventions
Composer
Service contracts
Code generation
The var directory
Coding standards
Summary
Chapter 4: Models and Collections
Creating a miniature module
Understanding the flow of schema and data scripts
Creating an install schema script (InstallSchema.php)
Creating an upgrade schema script (UpgradeSchema.php)
Creating an install data script (InstallData.php)
Creating an upgrade data script (UpgradeData.php)
Entity CRUD actions
Creating new entities
Managing collections
Summary
Chapter 5: Using the Dependency Injection
The object manager
Dependency injection
Configuring class preferences
Using virtual types
Summary
Chapter 6: Plugins
Creating a plugin
Using the before listener
Using the after listener
Using the around listener
The plugin sort order
Summary
Chapter 7: Backend Development
Cron jobs
Notification messages
Session and cookies
Logging
The profiler
Events and observers
Cache(s)
Widgets
Custom variables
i18n
Indexer(s)
Summary
Chapter 8: Frontend Development
Rendering flow
View elements
Summary
Chapter 9: The Web API
User types
Authentication methods
REST versus SOAP
Hands-on with token-based authentication
Hands-on with OAuth-based authentication
OAuth-based Web API calls
Hands-on with session-based authentication
Creating custom Web APIs
Search Criteria Interface for list filtering
Summary
Chapter 10: The Major Functional Areas
CMS management
Catalog management
Customer management
Products and customers import
The custom product types
Custom offline shipping methods
Custom offline payment methods
Summary
Chapter 11: Testing
Types of tests
Unit testing
Integration testing
Static testing
Integrity testing
Legacy testing
Performance testing
Functional testing
Writing a simple unit test
Summary
Chapter 12: Building a Module from Scratch
Module requirements
Registering a module
Creating a configuration file (config.xml)
Creating e-mail templates (email_templates.xml)
Creating a system configuration file (system.xml)
Creating access control lists (acl.xml)
Creating an installation script (InstallSchema.php)
Managing entity persistence (model, resource, collection)
Building a frontend interface
Building a backend interface
Creating unit tests
Summary

Book Details

ISBN 139781785886584
Paperback412 pages
Read More
From 2 reviews

Read More Reviews