100 likes | 279 Views
DDI & Model-View-Controller: An Architectural Perspective. Dennis Wegener , Matthäus Zloch, Thomas Bosch (GESIS) Dagstuhl , 23.10.2012. Overview Architecture Missy/ StarDat. Presentation. MVC. Business Logic. Abstract Persistence. Persistence. Software Management - Maven & GIT.
E N D
DDI & Model-View-Controller: An ArchitecturalPerspective Dennis Wegener, Matthäus Zloch, Thomas Bosch (GESIS) Dagstuhl, 23.10.2012
Overview Architecture Missy/StarDat Presentation MVC Business Logic Abstract Persistence Persistence
Software Management - Maven & GIT • Apache Maven • software project management and comprehension tool • Maven Modules fordatamodelling in ourprojects: • Abstract modulefor DDI (based on DDI ontology) • Concretemodulesforeachprojectthat • Inheritfromabstractddimodule • Add project-specificdatafields • Sharing via VersionControlSystem • Project sources in internal VCS (GESIS-SVN) • Data Module sharedexternally (GIT) • https://github.com/missy-project/ddi-model DDI model DDI model + StarDatExtensions DDI model + Missy Extensions
Data model & presentation - MVC • MVC design pattern • Model • Domain classes • Attributes • Relations • View • Representation • JSP, Velocity, XML, JSON, … • Controller • Commands • RESTfulinterface
RESTfulinterface • Well-defined interface based on HTTP • With few basic methods: GET, POST, PUT, DELETE • Response codes (e.g. 200 OK, 404 Not Found) • Data supported described by MIME types (e.g. text/xml, application/json) • Resources are identified using URIs • CollectionURI (like http://missy.org/studies) • Element URI (like http://missy.org/studies/studyZA1000) • Resources couldmaptodomainclasses / entitiesofthe DDI ontology
Data model & persistance – API • Onceyouhavethemodelyoucan… • Generateviews / userinterfaces • Generatestoragemodel (in RDB via hibernate) • Abstract persistance API • Tobepublished … • Concrete Implementations • Relational DB • DDI XML files • …
Missy Example • Question: • DDI Ontology: classQuestion, fieldslikedcterms_identifier, …, fieldquestiontext • Variable: • DDI Ontology: classVariable,fieldslikedcterms_identifier,… • Missy: inheritsclassVariable, addsfieldsvariable name, variable label, classification, … • Relation: • Variable * hasQuestion 1 Question • Definedatlevelof DDI Ontology
Missy Extension DDI Ontology
Key Messages & Questions • DDI modelimplementedasabstractdatamodelin OO programminglanguage • Accordingto MVC - domainclasseswithattributes & relations • Do weneed a standard REST interface? • DDI modelnot directlybased on XML representation • „Data model vs. Data format“ • Export mechanismsfor XML basedrepresentation • DDI modelintegratedintoproject‘sarchitectures • Doesitmake sense tocreate a referencearchitecture? • Reuseofsoftwaremodulesispossible • Wealreadysharemodules/codebetweeninternalprojects Missy & StarDat • Isanyoneelseinterested in sharing?