14. Features
• Generate XML schema (XSD) from annotated
Domain Models
• Serialize instances of Domain Models to XML
document
• Unserialize XML document to instances of
Domain Models
• merging of XML data with existing data from
repositories by rules
• Backend module
• Scheduler task
• No XML Namespaces yet
20. Inner Concept
• uses annotations for binding
• uses reflection for mapping
• serializing and unserializing is configurable
by typoscript
• uses DOM for XML access
21. Serializer Concept
• iterates recursively over object
• builds DOMDocument directly
=> 2 in memory representations of data
22. Unserializer Concept
• iterates recursively over DOMDocument
• maps the data to an array
• array is mapped to object by property
mapper
=> 3 in memory representations of data
23. Merger Concept
• can import/merge external data by
unserializing xml to object
• fetches domain object from repository
• compares objects and applies changes by
rules
=> 4 in memory representations of data
25. Reasons for Fail
• everything is defined global
• domain object cannot be serialized to
different xml outputs
• configuration via TS in Extbase is flawed
• massive memory consumption
• reflection is quite slow
27. Hacks to get it work
• import/merge all of a 2,2MB XML file takes
of up to 2,5GB of memory
• 2 scheduler tasks
• one that populates a jobqueue
• one that does just a single import/merge
at a time (import of 60 aggregate roots
takes 60 Minutes)
29. Concept
XML Schema
generate use
serialize serialize
XML Data Binding Object
unserialize unserialize
use generate
Classes
30. Implementation Concept
• binding will be done by a binding document instead
of annotations
=> xml and objects may have very different
structure
=> custom un-/serializers for data types
=> no global configuration anymore
• compile binding to php
=> no reflection at runtime anymore
• use xml reader/writer instead DOM
=> save memory and gain speed
31. How could the binding look like?
Example from jibx.sourceforge.net