Contenu connexe Similaire à Zepplin_Pronko_Magento_Festival Hall 1_Final Similaire à Zepplin_Pronko_Magento_Festival Hall 1_Final (20) Zepplin_Pronko_Magento_Festival Hall 1_Final2. Legal Notice
Copyright © 2014 Magento, Inc. All Rights Reserved.
Magento®, eBay Enterprise™ and their respective logos are trademarks, service marks,
registered trademarks, or registered service marks of eBay, Inc. or its subsidiaries. Other
trademarks or service marks contained in this presentation are the property of the respective
companies with which they are associated.
This presentation is for informational and discussion purposes only and should not be construed
as a commitment of Magento, Inc. or GSI Commerce, Inc. d/b/a eBay Enterprise (“eBay
Enterprise”) or of any of their subsidiaries or affiliates. While we attempt to ensure the accuracy,
completeness and adequacy of this presentation, neither Magento, Inc., eBay Enterprise nor any
of their subsidiaries or affiliates are responsible for any errors or will be liable for the use of, or
reliance upon, this presentation or any of the information contained in it. Unauthorized use,
disclosure or dissemination of this information is expressly prohibited.
6. Magento 2 Platform Goals
• Update Technology Stack
• Streamline Customization Process
• Enable Easier Upgrades
• Improve Performance and Scalability
• Maintain High Quality
• Closely Engage with Community
14. Before you install…
1. local.xml file shouldn’t exist
2. Writable directories:
– pub/media
– pub/static
– var
3. Create database
$
mysql>
create
database
magento2;
16. Magento 2 Installation Tool
<magento>/dev/shell/install.php
Install Application example:
$
php
-‐f
install.php
-‐-‐
[-‐-‐<install_option_name>
<option_value>,
...]
Uninstall Application example:
$
php
-‐f
install.php
-‐-‐
-‐-‐uninstall
Display Available install options:
$
php
-‐f
install.php
-‐-‐
-‐-‐show_install_options
19. Your Development Environment
• Xdebug PHP extension:
– stack and function traces in error messages
– memory allocation
– code coverage analysis
– … and more
• Apache mod_env module
20. Your Development Environment
• Developer mode
• Magento Profiler (csv, firebug, html)
<VirtualHost
*:80>
SetEnv
MAGE_MODE
"developer"
SetEnv
MAGE_PROFILER
“firebug"
</VirtualHost>
<magento>/.htaccess
file
21. Application Mode
Default Developer Production
• Not optimized
• Static files
materialization
• Errors in var/report
• Exception is
displayed in output
• System logging
• Optimized
• Disabled fallback
mechanism for view
files
• Errors in var/report
22. Magento 2 Coding Standards
PHP
• PSRs
• Zend Framework
• PHPMD and PMD
JavaScript
• Google JavaScript Style Guide
23. PHP Standard Recommendation
PSR-0: Autoloader
Standard
PSR-1: Basic Coding
Standard
PSR-2: Coding Style
• Top level namespace
“Vendor Name”
• Lower and upper cases
for names
• File <?php or <?=
tags only
• UTF-8 for PHP code
• StudlyCaps class
names
• UPPER_CASE
constants
• camelCase method
names
• Spaces
• Line length
• Opening braces
• Method and
properties visibility
• Opening parenthesis
25. PSR-1 and PSR-2
namespace
MagentoFrameworkApp;
class
Area
implements
AreaInterface
{
const
AREA_FRONTEND
=
‘frontend’;
public
function
detectDesign($request
=
null)
{
if
($this-‐>_code
==
self::AREA_FRONTEND)
{
$isDesignException
=
$request
&&
$this-‐>_apply($request);
if
($isDesignException)
{
$this-‐>_design-‐>loadChange(
$this-‐>_scopeResolver-‐>getScope()-‐>getId()
);
}
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
26. Documentation Blocks Coding Standard
http://www.phpdoc.org
Magento Coding Standard for Documentation Blocks
Developer's Guide / Coding Standards
/**
* Short description
*
* @param string $argument
* @return bool
* @link http://example.com
*/
27. Magento 2 Product Documentation
Guides
Product Updates
Webinars
Backwards Incompatible Changes
http://wiki.magento.com
29. We are going to production
Testing
Deployment
Preparation
Production
Mode
31. Running tests
• Bulk run
• Test suite
$
php
-‐f
dev/tools/tests.php
-‐-‐
type::all
$
phpunit
dev/tests/<test_type>/
testsuite
34. Magento Testing Framework
git
clone
https://github.com/magento/mtf
Magento Testing Framework Guidelines
Developer's Guide / Testing
magento/mtf
36. Internalization – I18n Tool
2 columns CSV-file example
"Add to Cart","Zum Warenkobrn hinzufügen"
"Add to Compare","Hinzufügen um zu vergleichen"
Files location
<magento>/app/code/Magento/Checkout/i18n/pt_BR.csv
<magento>/app/design/frontend/magento_demo/i18n/pt_BR.csv
<magento>/dev/tools/Magento/Tools/I18n/
37. Internalization – I18n Tool
Recover phrases from source code
$
php
–f
generator.php
-‐-‐
-‐d
page/to/Magento/source/code
>
generated.csv
<magento>/dev/tools/Magento/Tools/I18n/
$
php
-‐f
pack.php
-‐-‐
-‐l
de_DE
-‐p
/path/to/target/directory
-‐s
generated.csv
Result: de_DE.csv
Create language package
39. View Files Deployment Tool
• Templates
• Locale files
• Static files
Library
Modules
Themes
adminhtml
frontend
install
System View Files pub/static directory
Materializes
$
php
deploy.php
-‐-‐
-‐-‐help
<magento>/dev/tools/Magento/Tools/View/
40. Class Map Generator Tool
Class Map Generators
Log-based File system-based
array('MagentoClass'
=>
'app/code/Magento/Class.php')
<magento>/var/classmap.ser
$
php
-‐f
fs_generator.php
./app
>
./var/classmap.ser
<magento>/dev/tools/Magento/Tools/classmap/
Generate class map command example:
42. M2 Public GitHub Repository Status
Pull
requests
159
Issues
257
Processed, overall Average, month
12+