1 / 15

CDM Developer Workshop

Join our CDM Developer Workshop to learn about the Common Data Model (CDM) Library, programming language, platform, and domain model. Get hands-on experience with examples and explore the fundamentals of the CDM Library.

pbrawley
Download Presentation

CDM Developer Workshop

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CDM Developer Workshop

  2. Purpose What do you want from this workshop? General Introduction to the CDM Library i.e. programming language, platform, domain model AND / OR Show a simple example of how applications build on the CDM Library AND / OR Q & A

  3. Common Data Model (CDM) • New development covering all domains of information • Leans on existing standards / models like TDWG Ontology • Exchange format • Expandable

  4. CDM Library IO

  5. Fundamentals An application using the CDM is concerned with data that falls within the scope of the CDM i.e. primarily Taxonomy, Nomenclature, Descriptive or Specimen data (with some secondary data like literature, molecular or geographical data but primarily "Taxonomy"). Exactly what the application does, or what it looks like is not defined by the CDM Java Library - this is presumed to be specified by the developer. Instead the CDM Library provides the rather dull, but essential generic services that 95% of applications need. The advantage is that, as an application developer, you do not need to do the boring stuff yourself, but instead you can focus on delivering real value to your users.

  6. Generic features of CDM Objects • UUID - surrogate key • Audit info (created, created by, updated, updated by) • Annotations ("comments") & Markers ("flags" or "tags") • Rights (think dc:rights) & Sources (provenance) • TitleCache, LSID

  7. What you get for free • Persistence: Generic CRUD operations • Search: free-text query or criteria query • Versioning: track changes in data objects • Audit: record who did what & when • Validation: check "is this object ok?“ • Web service components (JSON, XML, RDF, LSID Resolution) • Import-Export (TCS, SDD, ABCD, EndNote, CSV, Excel, CDM XML)

  8. What you need to provide • Business Logic • User Interface • Look & Feel • Packaging (as webapp, eclipse RCP, java swing etc)

  9. A quick word about Maven • Maven is the build tool used to manage the CDM Library • For those of you who have used unix, it's a bit like make • For those of you who have used java, it's a bit like ant • It is more than a tool for compiling and packaging applications as it is based on the idea of managing dependencies (i.e. jar files), and of deploying such files to a (local or web-based) repository.

  10. A quick word about Spring Spring is an application development framework that began as a lightweight alternative to J2EE (Java Enterprise Edition). It is based on the idea of services being pojo's (Plain Old Java Objects), which have their dependencies injected into them (dependency injection is also called the "don't call us, we'll call you" principle - the idea of the container managing the dependencies of objects). This application design pattern essentially results in a very loose coupling of dependencies between layers of the application. Loose coupling is a good thing.

  11. A quick word about Spring As an applicaton developer, it is sufficient to create an (XML) file that describes your "application context" - the services that are available as dependencies of your application. E.g. lines like <context:component-scan base-package="eu.etaxonomy.cdm.api"/> will scan your classpath for objects in the eu.etaxonomy.cdm.api package (i.e. the cdm services), and make them available as dependencies.

  12. Taxon Hot OR Not • When a user visits taxon hot or not, they are presented with a taxonomic description. It includes a picture of the taxon. It also includes a form. Within that form is a UUID that identifies that taxon description, and also a field called markerType that can take one of five values that correspond to • Best • Better • Ok • Bad • Worst

  13. Rank this taxon! • By selecting a value for markerType, and clicking on the button, the browser sends the UUID of the descripion and one MarkerType to the controller. • Provided that the POST request is well formed, the controller will add a new "Marker" of the specified type to the description, persisting that updated description. • It calculates a heuristic "score" for the description, based on the ranks that it has been given, returns this data, and gets a new description to rank as well.

  14. MVC Architecture • Model: In this case, the Common Data Model - java objects • View: In this case a single Java Server Page index.jsp, using springs's tag libraries • Controller: In this case a single java class, annotated with spring's @Controller annotation, responding to two types of HTTP Request • HTTP GET to / which returns a description of a taxon (including an image) • HTTP POST to / which includes: • A UUID for the description • A UUID for the marker type

  15. Where to ask for help • http://dev.e-taxonomy.eu Development wiki, bugtrac, subversion, documentation • cdm-edit@mnhn.fr Mailing list • http://wp5.e-taxonomy.eu/cdm/v22 CDM UML Documentation and diagrams • http://wp5.e-taxonomy.eu/cdmlib/site Dependencies, Javadocs,changelog etc for cdmlib releases

More Related