2. Agenda
• Introduction
• Increasing the effectiveness of websites
development
1. Preview template changes instantly
2. Optimize ModuleVersionHandlers
3. Use OCM libraries for writing business logic
code
3. About Devexperts
We create
professional financial software
for Brokerage and Exchanges
since 2002
4. About Devexperts
Headquarters Devexperts Japan www.devexperts.com
197110, 10/1 Barochnaya st. 169-0075東京都新宿区
Saint Petersburg, Russia 高田馬場1-33-15-402
+7 812 438 16 26 +81 3 6233 7460
mail@devexperts.com inquire@devexperts.co.jp
5. Project architecture
Desktop
application
3rd party
services
Magnolia CMS
3 websites Application
HTML pages for other apps servers
Cloud
services Jackrabbit
6. Project environment
• Weekly releases
• 2-3 intermediate builds per week
• Aggressive schedule
• Up to 5 developers working on the same
Magnolia project module
Project is in closed beta-testing stage
7. Project environment
Integration
platform
Subversion
QA Production
platform platform
9. Problems
• Editing of website templates is slow
• Changes made in Magnolia CMS need to
be synchronized with module source files
• Magnolia CMS restart is required to pick
up changes made in module source files
10. Solution: dx-sync-module
• Synchronizes external files with Magnolia
CMS resources instantly
– JavaScript
– CSS
– DMS files
– JSP and Freemarker templates
– Groovy scripts and classes
11. dx-sync-module approach
Project files under
version control
Version
control
Magnolia CMS
Up and running
Changes in source files are instantly
propagated to Magnolia CMS
13. dx-sync-module: benefits
• Instant preview of changes in source files
• Reduced number of actions when working
with AdminCentral
• Decreased number of Magnolia CMS
restarts
– Using Groovy may decrease number of
restarts further
• Developed for large project, helps with
small projects
15. Problems
• 2 execution flows: one for install and one
for update
• Easy to forget to update module version
handler when a file or XML resource is
changed
• Version handlers become very large for
intensively developing module
16. A new approach to
ModuleVersionHandlers
Idea: forget about deltas
Describe module configuration as it should be
Configuration is ‘synchronized’, not ‘updated’
20. DxModuleVersionHandler
Takes care of:
• Exported XML files
• Resources (CSS, JavaScript)
• Templates (Freemarker, JSP)
• Groovy (classes and scripts)
• Module servlets
• Module files
Just put a file to the right place and it will be
updated next time Magnolia CMS starts
21. DxModuleVersionHandler: benefits
• The same configuration mechanism is used
for both install and update
• Less code
• Significantly reduced number of bugs
Increases developers efficiency
27. dx-magnolia-ocm
• Doesn’t depend on Magnolia
– May be used to read Magnolia Jackrabbit
database from other applications
• Type safe
• Library, not a module
• Configuration via annotations
– Keep all information at the same place
28. dx-magnolia-ocm - links
• Documentation
http://code.devexperts.com/display/DXMGNL/dx-magnolia-ocm
• JIRA and Maven
coming very soon
• Questions, suggestions and feedback
avasiliev@devexperts.com