2. About me
✓ 8 years of web
development
✓ 4 years of magento
development
✓ CTO in Speroteck
company
3. Context
✓ Web development
✓ Magento
✓ Team development (6m+)
✓ Quality (automation)
✓ Project (Not Product) development
✓ Enterprise level in terms of complexity
4. What is “Application”?
It’s a Code which receives Input Data,
produces Output Result and executed on
particular Environment.
6. What is Data Consistency?
Physical meaning. Process of keeping
information uniform as it moves across a
network and between various applications.
Semantic meaning. Process of keeping
information expected as it moves inside of
the application.
7. Data and application context.
Significant data.
✓ Configuration data
✓ Application data
✓ Input data
8. What’s the problem?
1. How to store and share data changes
between developers?
2. How to migrate data changes between
application instances?
3. How to bind Code Revision and
Application Data?
9. Use Case #1
Given: I am as a Manager of music store
should see 20 websites of the Artists I work with
and each Artist should have 4 supported languages
and Catalogs should be different for each Artist
When: I go to Admin Panel
Then: I should be able to manage them
10. Use Case #2
Given: I am as a Manager of music store
When: I go to website of Artist A
Then: I should see branded design
and see custom pages “Home”, “About Artist”,
“Concerts”, “Recent Hits”, “Contacts”
and see branded banner in the Header
and see social links of Artist A
11. Use Case #3
Given: I am as a Customer of music store
When: I am on the Product B Page of Artist A website
Then: I should be able to listen samples
and buy artist’s sign on the box
and choose free present
and choose color of the T-shirt
and customize logo on the tea-cup
and see special promotions
12. Imagine this store
1. We will use Magento Enterprise
2. Create 20 websites + 4 store views for
each website
3. Create 20 root categories and assign each
for own website
4. Add “complex” Product B to Artist A
5. Set branded design
13. Reality strikes back
✓ We work in a Team
✓ Data changes happens very frequent
✓ Client wants to see the results
✓ QA needs stable data to write tests
✓ . . .
14. Back to problems
How to Store and Share
data changes between
developers?
15. Ways to share data changes
✓ Share database
✓ $ mysqldump
✓ Migration scripts
18. $ mysqldump
− Easy to use
− Cheap changes
+ Manual work
+ Hard to track
changes
19. $ mysqldump workflow
1. Download recent database
2. Make data changes
3. Upload database and mark it as recent
20. Who use Migration scripts?
+ Consistent data
+ Easy to track
changes
− Hard to use
− Conflicts between
versions*
− No uninstall
scripts*
− No API for
complex data*
21. The holy grail of the development
Deploy application on local environment
with 1 click, make changes and push them
to the Development Center
22. Development Center
Development Center - infrastructure which
receives changes as an input and produce
stable application build as an output
24. Best practices of migrations usage
1. Create Global package
2. Use to configure store
3. Use “data” and “sql” folders right
4. Write own API to export/import data
5. Use database profiler to verify data
6. Be ready to stop usage of migrations
25. Global package
✓ Configure store
✓ Add application data
✓ Small code changes,
patches etc.
✓ Global elements and
parts
Example “social links”
26. Use to configure store
Use possibility to configure
store with the help of install
scripts. Once it will save
your ass.
27. Use “data” and “sql” folders right
“Data” folder is used to add
content data changes and
configuration changes
“Sql” folder is used to add
database changes
28. Use “data” and “sql” folders right
Move to Setup scripts as much
as possible.
29. Write own API to export/import data
✓ Don’t afraid to write
something like “Email
templates importer”
✓ Use Magento API
✓ Don’t afraid raw SQL
✓ Use ready to use solutions.
Example Cms Installer