Magento 2 Developer's Guide
eBook - ePub

Magento 2 Developer's Guide

Branko Ajzele

Buch teilen
  1. 412 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Magento 2 Developer's Guide

Branko Ajzele

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Harness the power of Magento 2 – The most recent version of the world's favourite e-Commerce platform for your online storeAbout This Book • Set up, configure, and power up your Magento environment from development to production• Master the use of Web API to communicate with the Magento system and create custom services• Create custom modules from scratch to extend the core functionality of the Magento systemWho This Book Is For This book is intended primarily for intermediate to professional-level PHP developers who are interested in Magento development. For backend developers, several topics are covered that will enable you to modify and extend your Magento 2 store. Frontend developers will also find some coverage on how to customize the look of the site in the frontend. 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 themes, which forms an integral part of developmentIn DetailMagento 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, 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.Style and approach This book is a mix of theoretical and step-by-step approaches, explained in a conversational and easy-to-follow style. Topics are explained sequentially, giving detailed explanations of the basic and advanced features to get you working on Magento 2.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Magento 2 Developer's Guide als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Magento 2 Developer's Guide von Branko Ajzele im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Programming in PHP. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2015
ISBN
9781785889394

Magento 2 Developer's Guide


Table of Contents

Magento 2 Developer's Guide
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Understanding the Platform Architecture
The technology stack
The architectural layers
The top-level filesystem structure
The module filesystem structure
Summary
2. Managing the Environment
Setting up a development environment
VirtualBox
Vagrant
Vagrant project
Provisioning PHP
Provisioning MySQL
Provisioning Apache
Provisioning Magento installation
Setting up a production environment
Introduction to Amazon Web Services
Setting up access for S3 usage
Creating IAM users
Creating IAM groups
Setting up S3 for database and media files backup
Bash script for automated EC2 setup
Setting up EC2
Setting up Elastic IP and DNS
Summary
3. Programming Concepts and Conventions
Composer
Service contracts
Code generation
The var directory
Coding standards
Summary
4. Models and Collections
Creating a miniature module
Creating a simple model
Creating an EAV model
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
Reading existing entities
Updating existing entities
Deleting existing entities
Managing collections
Collection filters
Summary
5. Using the Dependency Injection
The object manager
Dependency injection
Configuring class preferences
Using virtual types
Summary
6. Plugins
Creating a plugin
Using the before listener
Using the after listener
Using the around listener
The plugin sort order
Summary
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
8. Frontend Development
Rendering flow
View elements
Ui components
Containers
Blocks
Block architecture and life cycle
Templates
Layouts
Themes
Creating a new theme
JavaScript
Creating a custom JS component
CSS
Summary
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
API call examples
The getById service method call examples
The getList service method call examples
The save (as new) service method call examples
The save (as update) service method call examples
The deleteById service method call examples
Search Criteria Interface for list filtering
Summary
10. The Major Functional Areas
CMS management
Managing blocks manually
Managing blocks via code
Managing blocks via API
Managing pages manually
Managing pages via code
Managing pages via API
Catalog management
Managing categories manually
Managing categories via code
Managing categories via API
Managing products manually
Managing products via code
Managing products via API
Customer management
Managing customers manually
Managing customers via code
Managing customers via an API
Managing customer address via code
Managing customers address via an API
Products and customers import
The custom product types
Custom offline shipping methods
Custom offline payment methods
Summary
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
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
Creating routes, controllers, and layout handles
Creating blocks and templates
Handling form submissions
Building a backend interface
Linking the access control list and menu
Creating routes, controllers, and layout handles
Utilizing the grid widget
Creating a grid column renderer
Creating grid column options
Creating controller actions
Creating unit tests
Summary
Index

Magento 2 Developer's Guide

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: December 2015
Production reference: 1171215
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78588-658-4
www.packtpub.com

Credits

Author
Branko Ajzele
Reviewer
Mitchell Robles, Jr
Commissioning Editor
Neil Alexander
Acquisition Editor
Vinay Argekar
Content Development Editor
Preeti Singh
Technical Editor
Gaurav Suri
Copy Editors
Vedangi Narvekar
Jonathan Todd
Project Coordinator
Shweta H. Birwatkar
Proofreader
Safis Editing
Indexer
Priya Sane
Production Coordinator
Shantanu N. Zagade
Cover Work
Shantanu N. Zagade

About the Author

Branko Ajzele is a husband, father of two, son, brother, author, and a software developer.
He has a degree in electrical engineering. A lover of all things digital, he makes a living from software development. He hopes to find enough quality time some day to seriously dive into hobby electronics; he has his eye on Arduino and Raspberry Pi.
He has years of hands-on experience with full-time software development and team management, and has specializing in e-commerce platforms. He has been working with Magento since...

Inhaltsverzeichnis