Technische Universität München
Bachelor Practical Course Semantic Web
Summer Term 2014
Part 1 - 9.4.2014
Claudius Hauptmann
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 2
Agenda
1. Organisational Issues
2. Linked...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 3
Bachelor Practical Course - Module Descri...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 4
Organisational Issues
• 10 tasks (and 11 ...
Technische Universität München
Linked Data
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 6
Motivation
• Publish datasets over the we...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 7
Queries
• “Retrieve a performance of the ...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 8
Background standards
• HyperText Transfer...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 9
Uniform Resource Identifier (URI)
• A com...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 10
Resource Description Framework (RDF)
• S...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 11
RDF Schema (RDFS)
• Extension of RDF
• A...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 12
SPARQL Protocol and RDF Query Language
•...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 13
Principles of Linked Data
• Use URIs to ...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 14
Rating published datasets
1-star: The da...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 15
Sites using Linked Data
• http://data.ny...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 16
References
• EUCLID Project:

http://www...
Technische Universität München
Continuous Delivery
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 18
Continuous Delivery - Motivation
• Goal:...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 19
Continuous Delivery - Release Antipatter...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 20
Continuous Delivery - How to Achieve?
• ...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 21
Continuous Delivery - Benefits
• Empower...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 22
Continuous Delivery - Principles
• Creat...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 23
Configuration Management - Definition
Co...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 24
Configuration Management - Key Questions...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 25
Configuration Management - Principles
• ...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 26
Continuous Integration - Motivation
• Th...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 27
Continuous Integration - Prerequisites
•...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 28
Continuous Integration - Essential Pract...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 29
References
Technische Universität München
Build Automation
Maven 3
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 31
Build Lifecycle - Phases
• validate
• co...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 32
Plugins
• Plugins / Plugin Goals represe...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 33
Default Bindings - Packaging (jar)
• pro...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 34
Project Object Model (POM / pom.xml)
• d...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 35
Build Profiles
• Multiple Configurations...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 36
Standard Directory Layout
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 37
Dependency Mechanism
• Dependencies defi...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 38
References
• Maven Documentation

http:/...
Technische Universität München
Distributed Version Control
Git
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 40
Git - Design Issues
• Speed
• Simple des...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 41
Git - Snapshots, Not Differences
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 42
Git - Recording Changes to the Repository
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 43
Git - Basic Data Model
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 44
Git - Commits
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 45
Git - Branches
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 46
Git - Head
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 47
Git - Merging
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 48
Git - Remotes
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 49
Git - Workflow - Centralized
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 50
Git - Workflow - Integration-Manager
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 51
References
• Git Documentation

http://g...
Technische Universität München
Task 1
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 53
Software Development Environment
• Git S...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 54
Technical Documentation
• Build Automati...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 55
Important
• Build + test your project be...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 56
Tasks
• Create a Maven 3 project
• Creat...
Technische Universität München
Bachelor Practical Course Semantic Web - Part 1 57
Test Data
• The Beatles made the album “...
Technische Universität München
Thank you! Questions?
Upcoming SlideShare
Loading in …5
×

Bachelor Practical Course Semantic Web Part 1

373 views
265 views

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
373
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Bachelor Practical Course Semantic Web Part 1

  1. 1. Technische Universität München Bachelor Practical Course Semantic Web Summer Term 2014 Part 1 - 9.4.2014 Claudius Hauptmann
  2. 2. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 2 Agenda 1. Organisational Issues 2. Linked Data 3. Continuous Delivery 4. Build Automation 5. Distributed Version Control 6. Task 1
  3. 3. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 3 Bachelor Practical Course - Module Description • Intended Learning Outcomes: “Participants are able to design and implement small software systems in a team. They know how to apply engineering methods and models and can judge the risks and typical problems encountered in software projects.” • Content: “Participants exercise systematic software engineering for a small system in small teams with a precise task description with tight time constraints (design, implementation, test). Intermediate results of the team work have to be presented. Design, project plans and implementation have to be documented.” • Work load: 300 total hours (90 contact hours, 21o self-study hours)
  4. 4. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 4 Organisational Issues • 10 tasks (and 11 appointments) • The tasks have to be solved in small teams • Deadlines for the tasks are on the next tuesday evening • Every solution counts 10% of the practical course • The teams will present their solutions at the next appointment • Every team member has to contribute to the solution • Each task contains optional parts
  5. 5. Technische Universität München Linked Data
  6. 6. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 6 Motivation • Publish datasets over the web • Query datasets effectively by applications • Graph-based data model • Extension, integration, inference and uniform querying
  7. 7. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 7 Queries • “Retrieve a performance of the Beethoven violin concerto by a Chinese orchestra” • “Retrieve a photo of the conductor of this performance” • “List male British rock musicians married to Scandinavians”
  8. 8. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 8 Background standards • HyperText Transfer Protocol (HTTP) • Uniform Resource Identifier (URI) • eXtensible Markup Language (XML) • Resource Description Framework (RDF) • RDF Schema (RDFS) • Web Ontology Language (OWL) • SPARQL Protocol and RDF Query Language (SPARQL)
  9. 9. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 9 Uniform Resource Identifier (URI) • A compact sequence of characters that identifies an abstract or physical resource • Data from different data sources has to be linked to indicate synonyms http://rdf.freebase.com/ns/en.ludwig_van_beethoven! http://dbpedia.org/resource/Ludwig_van_Beethoven! http://musicbrainz.org/artist/1f9df192- a621-4f54-8850-2c5373b7eac9#_! http://data.nytimes.com/N30866506154608358173
  10. 10. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 10 Resource Description Framework (RDF) • Statements are represented as triples of the form subject-predicate- object <http://musicbrainz.org/artist/b10bbbfc-cf9e-42e0-be17- e2c3e1d2600d>! <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>! <http://musicontology.com/specification/#term-MusicGroup>.
  11. 11. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 11 RDF Schema (RDFS) • Extension of RDF • Allows resources to be classified explicitly as classes or properties • Further statements like class-subclass or property-subproperty relationships, and domain and range of a property <mo:member> <rdf:type> <rdfs:Property>.
 <mo:member> <rdfs:domain> <mo:MusicGroup>.
  12. 12. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 12 SPARQL Protocol and RDF Query Language • Language for formulating queries over RDF data • It is the Semantic Web's counterpart to SQL PREFIX dc: <http://purl.org/dc/elements/1.1/>
 PREFIX foaf: <http://xmlns.com/foaf/0.1/>
 PREFIX dbpedia: <http://dbpedia.org/resource/>
 PREFIX music-ont: <http://purl.org/ontology/mo/>
 
 SELECT ?album_name ?track_title WHERE {
 dbpedia:The_Beatles foaf:made ?album .
 ?album dc:title ?album_name .
 ?album music-ont:track ?track .
 ?track dc:title ?track_title
 }
  13. 13. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 13 Principles of Linked Data • Use URIs to identify things. • Use HTTP URIs so that people can look up those names. • When someone looks up a URI, provide useful information, using the standards (RDF, RDFS, SPARQL). • Include links to other URIs, so that they can discover more things.
  14. 14. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 14 Rating published datasets 1-star: The data is available on the web with an open license. 2-star: The data is structured and machine-readable. 3-star: The data does not use a proprietary format. 4-star: The data uses only open standards from W3C (RDF, SPARQL). 5-star: The data is linked to that of other data providers.
  15. 15. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 15 Sites using Linked Data • http://data.nytimes.com/schools/schools.html • http://www.bbc.co.uk/music • http://linkedgeodata.org/ • http://www.data.gov/ • http://data.gov.uk/
  16. 16. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 16 References • EUCLID Project:
 http://www.euclid-project.eu/modules/chapter1
  17. 17. Technische Universität München Continuous Delivery
  18. 18. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 18 Continuous Delivery - Motivation • Goal: Deliver software as quickly as possible • A lot of software development methodologies focus on requirement engineering and impact on development effort • Bottleneck: build, deploy, test and release process
  19. 19. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 19 Continuous Delivery - Release Antipatterns • Deploying Software Manually • Deploying to a Production-like only after Development is Complete • Manual Configuration Management of Production Environments
  20. 20. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 20 Continuous Delivery - How to Achieve? • Automated build, test, deploy and release process (repeatability) • Frequent releases • Every change should trigger the feedback process • The feedback must be received as soon as possible
  21. 21. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 21 Continuous Delivery - Benefits • Empowering Teams • Reducing Errors • Lowering Stress • Deployment Flexibility • Practice Makes Perfect
  22. 22. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 22 Continuous Delivery - Principles • Create a Repeatable, Reliable Process for Releasing Software • Automate Almost Everything • Keep Everything in Version Control • If It Hurts, Do It More Frequently, and Bring the Pain Forward • Build Quality In • Done Means Released • Everybody is Responsible for the Delivery Process • Continuous Improvement
  23. 23. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 23 Configuration Management - Definition Configuration Management refers to the process by which all artefacts relevant to your project, and the relationships between them, are stored, retrieved and uniquely identified, and modified.
  24. 24. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 24 Configuration Management - Key Questions • Can I exactly reproduce any of my environments and their configuration? • Can I easily make an incremental change and deploy to any, and all, of my environments? • Can I easily see each change that occurred to an environment and trace it back to see exactly what the change was and who made it? • Can I satisfy all of the compliance regulations that I am subject to? • Does every member of the team easily get the information needed?
  25. 25. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 25 Configuration Management - Principles • Use Version Control • Manage Dependencies • Manage Components • Manage Software Configuration • Manage Environments
  26. 26. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 26 Continuous Integration - Motivation • The application should always be in a working state • Not: “Yes, the application is finished, we only have to build it and run some tests…”
  27. 27. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 27 Continuous Integration - Prerequisites • A Version Control System • An Automated Build • Agreement of the Team • Check in Regularly (to Trunk/Master) • Create a Comprehensive Automated Test Suite • Keep the Build and Test Process Short • Manage Your Development Workspace • A Continuous Integration Software (“Build Server”)
  28. 28. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 28 Continuous Integration - Essential Practices • Don’t Check in on a Broken Build • Always Run all Commit Tests locally before Checking Committing • Wait for Commit Tests to Pass before Moving On • Never Go Home on a Broken Build • Always be Prepared to Revert to a Previous Revision • Time-Box Fixing before Reverting • Don’t Comment Out Failing Tests • Take Responsibility for all Breakages That Result from Your Changes • Test-Driven Development
  29. 29. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 29 References
  30. 30. Technische Universität München Build Automation Maven 3
  31. 31. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 31 Build Lifecycle - Phases • validate • compile • test • package • integration-test • verify • install • deploy
  32. 32. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 32 Plugins • Plugins / Plugin Goals represent specific tasks • Plugin Goals are bound to build phases • Examples: • compiler plugin • jar plugin • surefire plugin • deploy plugin
  33. 33. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 33 Default Bindings - Packaging (jar) • process-resources resources:resources • compile compiler:compile • process-test-resources resources:testResources • test-compile compiler:testCompile • test surefire:test • package jar:jar • install install:install • deploy deploy:deploy
  34. 34. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 34 Project Object Model (POM / pom.xml) • dependencies • plugins / goals • build profiles • project version • description • developers • …
  35. 35. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 35 Build Profiles • Multiple Configurations / Environments • Developer • Team Build • Production • Build Profile Types • Per Project • Per User • Global (per Maven Installation)
  36. 36. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 36 Standard Directory Layout
  37. 37. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 37 Dependency Mechanism • Dependencies defined in POM are included automatically • Transitive dependencies are included automatically • Dependency Scopes • compile • provided • runtime • test • system • import
  38. 38. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 38 References • Maven Documentation
 http://maven.apache.org/guides/
  39. 39. Technische Universität München Distributed Version Control Git
  40. 40. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 40 Git - Design Issues • Speed • Simple design • Strong support for non-linear development • Fully distributed • Able to handle large projects like the Linux kernel efficiently
  41. 41. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 41 Git - Snapshots, Not Differences
  42. 42. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 42 Git - Recording Changes to the Repository
  43. 43. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 43 Git - Basic Data Model
  44. 44. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 44 Git - Commits
  45. 45. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 45 Git - Branches
  46. 46. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 46 Git - Head
  47. 47. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 47 Git - Merging
  48. 48. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 48 Git - Remotes
  49. 49. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 49 Git - Workflow - Centralized
  50. 50. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 50 Git - Workflow - Integration-Manager
  51. 51. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 51 References • Git Documentation
 http://git-scm.com/book
  52. 52. Technische Universität München Task 1
  53. 53. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 53 Software Development Environment • Git Source Code Repositories (Atlassian Stash):
 https://devschlichter.cs.tum.edu/source/ • Build Server (Atlassian Bamboo):
 https://devschlichter.cs.tum.edu/ci/ • Maven Repository Manager (Sonatype Nexus):
 https://devschlichter.cs.tum.edu/repo/
  54. 54. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 54 Technical Documentation • Build Automation / Maven • http://maven.apache.org/guides/ • Distributed Version Control / Git • http://git-scm.com/book/ • http://help.eclipse.org/kepler/ (EGit Documentation) • http://confluence.atlassian.com/display/STASH/ • Continuous Delivery / Bamboo • http://confluence.atlassian.com/display/BAMBOO/
  55. 55. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 55 Important • Build + test your project before creating commits! • Create useful commit messages for each commit! • Create a commit for each useful step! • Push your commits to the server! • Pull other’s commits from server! • Create comments for your code and your tests! • Format your code (the lines you changed)! • Do not commit Eclipse configuration files or generated files! • No Warnings / Errors / Code in Comments / …
  56. 56. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 56 Tasks • Create a Maven 3 project • Create a Git repository und push it to the server • Configure your maven deployment settings + maven repository • Enable your build plan • Add jena and junit as maven dependencies • http://jena.apache.org • https://github.com/junit-team/junit/wiki/Download-and-Install • Add unit test class[es] with test methods for the examples in
 http://www.euclid-project.eu/modules/chapter2
  57. 57. Technische Universität München Bachelor Practical Course Semantic Web - Part 1 57 Test Data • The Beatles made the album “Help". • The Beatles made the album "Abbey Road”. • The Beatles made the album "Let it be”. • The Beatles includes band-member Paul McCartney. • Wings made the album "Band on the run”. • Wings made the album "London Town”. • Wings includes band-member Paul McCartney. • The Rolling Stones made the album "Hot Rocks"
  58. 58. Technische Universität München Thank you! Questions?

×