售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Magento Extensions Development
Table of Contents
Magento Extensions Development
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
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
Downloading the color images of this book
Errata
Piracy
Questions
1. Introduction to Extension Development
Getting started
Creating an extension
The files that handle our extension
Creating a helper
Creating a controller
Digging into these simple files
You can now test by yourself!
Managing our work with Git source control
Bitbucket registration
Committing our work
Discovering other Git servers!
Registering dependencies
Discovering Composer
Discovering packagist
Designing TicketBlaster – the backend
Creating the table for the events
Creating the backend view to list the events
Summary
2. Deeper Extension Development
Creating the backend forms to manage events
Designing the TicketBlaster module's frontend
Declaring the layouts
Creating a template file
Creating the block files
How layouts and templates work
Summary
3. Best Practices and Scaling for the Web
Creating a new product type
Designing our extension for speed
Enabling developer mode
Enabling the profiler
Enabling the debug logs
What are logs?
The PSR-3 standard
The Monolog library and Magento 2
How Monolog complies with PSR-3
Channels and handlers
How to use the Magento 2 logging system
In a model
In a controller
In a block
How to make your own custom handler and channel
Enabling your browser's debug panel
Get the ultimate profiler tool
Write clean and efficient code
Don't load any model
Getting only really necessary data
Don't write code twice
Use helpers
Use layouts
Security first
Five secure coding practices
Validate input as strictly as possible
Use parameterized queries in your database requests
Escape user input
Use synchronized token pattern
Security headers
Summary
4. Magento and Test-driven Development
Why perform testing in Magento?
Types of test
Testing in Magento
How Magento integrates PHPUnit
Write unit tests with PHPUnit
Assertions
DataProvider
Test Double
How do we create and use stubs and mocks?
Expectations and matchers
Matchers
The will method
The with method
Magento Test Framework
Writing unit tests for TicketBlaster
How to run unit tests
Writing a timed checkout
Writing a unit test
Writing a timed checkout
Executing the unit test
Summary
5. Internationalization
The EAV approach
Store relation table
Creating the new table
Adding the new input to the edit form
Saving the new data in the new table
Showing the store views in the admin grid
Modifying the frontend event list
Restricting the frontend access by store view
Differentiating the guests and registered users' interface
Adding the isLoggedIn() method
Restricting access in the template file
Restricting direct access to the Details page
Translation of template interface texts
Translation of e-mail templates: creating and translating the e-mails
Testing our code by sending the e-mail
Summary
6. Optimizing for Speed and Measuring Conversion Rates
Performance indicators
Slow websites are not SEO-friendly
Best practices
Editing the .htaccess file for compression
Full page cache
Minify and merge CSS/JavaScript files
Configuring a CDN server
Redis and Memcached
How to measure your speed optimization
New Relic
Overviewing the dashboard
Tracking transactions
External services monitoring
Configuring customized alerts
Service Level Agreement reports
Browser
Quanta monitoring
Web scenarios
Application profiling
Google Analytics
YSlow
GTMetrix
Summary
7. Module Creation Etiquette
The possible attacks
SQL injection
Cross-site scripting
Non-persistent
Persistent
Cross-site request forgeries
The Payment Card Industry Data Security Standard
Protecting stored cardholder data
Encrypt transmissions
Developing your own payment method
Implementing the method
Software considerations
PHP
Installing PHP
Configuring PHP
Configuring nginx
PSR-1 to PSR-7
OWASP
Stay tuned
Summary
8. Optimization for Teamwork Development
Version control and code management
Feature branch workflow
Master branch
Develop branch
Feature branches
Release branches
Hotfix branch
Deployment and backups
Backup strategy
Compressing your backup
Peer programming
Developing standards and code review
Project management methodology
Communicating in a developer team
Team awareness of workflow
Slack
Summary
9. Magento Marketplace
The new Connect is called Marketplace
The end of the existing Connect website
A new business model
A specific submission workflow
The Magento Extension Distribution and Service Agreement
Coding standards
Branding
Pricing and licensing
Packaging and submitting the extension
The product profile
Your personal and company profiles
Technical review
Marketing review
Selling extensions by ourselves
The downloadable product
Managing versions with downloadable information
Selling additional services
Having a store is not enough
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜