{"id":1333,"date":"2017-06-26T14:58:54","date_gmt":"2017-06-26T19:58:54","guid":{"rendered":"http:\/\/inova8.com\/bg_inova8.com\/?p=1333"},"modified":"2019-04-23T02:30:08","modified_gmt":"2019-04-23T07:30:08","slug":"really-rapid-rdf-graph-application-development","status":"publish","type":"post","link":"https:\/\/inova8.com\/bg_inova8.com\/really-rapid-rdf-graph-application-development\/","title":{"rendered":"Really Rapid RDF Graph Application Development"},"content":{"rendered":"<div class=\"boldgrid-section\">\n<div class=\"container\">\n<div class=\"row\">\n<div class=\"col-md-12 col-xs-12 col-sm-12\">\n<p><em>Let\u2019s face it, RDF Graph datastores have not become the go-to database for application development like MySQL, MongoDB, and others have. Why? It is not that they cannot scale to handle the volume and velocity of data, nor the variety of structured and unstructured types.<\/em><\/p>\n<p><em>Perhaps it is the lack of application development frameworks integrated with RDF. After all any application needs to not only store and query the data but provide users with the means to interact with that data, whether it be data entry forms, charts, graphs, visualizations and more. <\/em><\/p>\n<p><em>However application development frameworks target popular back-ends accessible via JDBC and, now we are in the 21century, OData. RDF and SPARQL are not on their radar \u2026 that is unless we wrap RDF with OData so that the world of these application development environments is opened up to RDF Graph datastores.<\/em><\/p>\n<p><em>OData2SPARQL provides that Janus-inflexion point, hiding the nuances of the RDF Graph behind an OData service which can then be consumed by powerful development environments such as OpenUI5 and WebIDE.<\/em><\/p>\n<p><em>This article shows how an RDF Graph CRUD application can be rapidly developed, yet without losing the flexibility that HTML5\/JavaScript offers, from which it can be concluded that there is no reason preventing the use of RDF Graphs as the backend for production-capable applications.<\/em><\/p>\n<p>A video of this demo can be found here:&nbsp;<a href=\"https:\/\/youtu.be\/QFhcsS8Bx-U\">https:\/\/youtu.be\/QFhcsS8Bx-U<\/a><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-743\" src=\"http:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/04\/OData2SPARQL.janus_.png\" alt=\"\" width=\"6526\" height=\"4393\" srcset=\"https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/04\/OData2SPARQL.janus_.png 6526w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/04\/OData2SPARQL.janus_-300x202.png 300w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/04\/OData2SPARQL.janus_-768x517.png 768w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/04\/OData2SPARQL.janus_-1024x689.png 1024w\" sizes=\"(max-width: 6526px) 100vw, 6526px\" \/><\/p>\n<p style=\"text-align: center;\">Figure 1: OData2SPARQL: the Janus-Point between RDF data stores and application development<\/p>\n<h2>Rapid Application Development Environments<\/h2>\n<p>There are a great number of superb application development frameworks that allow one to create cross platform (desktop, web, iOS, and Android), rich (large selection of components such as grids, charts, forms etc) applications. Most of these are based on the MVC or MVVM model both of which require a systematic and complete (CRUD) access to the back-end data via a RESTful API. Now that OData has been adopted by OASIS, the number of companies offering explicit support for OData is increasing, ranging from <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/\">Microsoft<\/a>, <a href=\"https:\/\/www.ibm.com\/support\/knowledgecenter\/en\/SSGR73_7.5.1\/com.ibm.wci.doc\/OData_Overview.html\">IBM<\/a>, and <a href=\"http:\/\/www.sapui5.org\/sapui5blogs\/sapui5-odata\/\">SAP<\/a>. Similarly there are a number of frameworks, one of which is <a href=\"https:\/\/www.sap.com\/developer\/topics\/ui5.html\">SAPUI5<\/a> which has an open source version <a href=\"http:\/\/openui5.org\/\">OpenUI5<\/a>.<\/p>\n<h3>OpenUI5<\/h3>\n<p><a href=\"http:\/\/scn.sap.com\/community\/developer-center\/front-end\/blog\/2013\/12\/11\/what-is-openui5-sapui5\">OpenUI5<\/a>&nbsp;is an open source JavaScript UI library, maintained by&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/SAP_AG\">SAP<\/a>&nbsp;and available under the Apache 2.0 license. OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice. It\u2019s based on JavaScript, using JQuery as its foundation, and follows web standards. It eases your development with a client-side HTML5 rendering library including a rich set of controls, and supports data binding to different models (JSON, XML and OData).<\/p>\n<p>With its extensive support for OData, combining OpenUI5 with OData2SPARQL releases the potential of RDF Graph datasources for web application development.<\/p>\n<h3>Web IDE<\/h3>\n<p><a href=\"https:\/\/wiki.scn.sap.com\/wiki\/display\/SWI\">SAP Web IDE<\/a> is a powerful, extensible, web-based integrated development tool that simplifies end-to-end application development. Since it is built around using OData datasources as its provider, then WebIDE can be used as a semantic application IDE when the RDF Graph data is published via OData2SPARQL.<\/p>\n<p><a href=\"https:\/\/wiki.scn.sap.com\/wiki\/display\/SWI\">WebIDE<\/a> runs either as a cloud based service supplied free by SAP, or can be downloaded as an Eclipse ORION application. Since the development is probably against a local OData endpoint, then the latter is more convenient.<\/p>\n<h2>RDF Graph application in 5 steps:<\/h2>\n<ol>\n<li>Deploy OData2SPARQL endpoint for chosen RDF Graph store<\/li>\n<\/ol>\n<p style=\"padding-left: 60px;\">The Odata2SPARQL war is available here, together with instructions for configuring the endpoints: <a href=\"https:\/\/github.com\/peterjohnlawrence\/com.inova8.odata2sparql.v2\">odata2sparql.v2<\/a><\/p>\n<p style=\"padding-left: 60px;\">The endpoint is this example is against an RDF-ized version of the ubiquitous Northwind databases. This RDF graph version can be downloaded here: <a href=\"https:\/\/github.com\/peterjohnlawrence\/com.inova8.northwind\">Northwind<\/a><\/p>\n<ol start=\"2\">\n<li>Install WebIDE<\/li>\n<\/ol>\n<p style=\"padding-left: 60px;\">Instructions for installing the Web IDE Personal edition can be found here: <a href=\"https:\/\/wiki.scn.sap.com\/wiki\/display\/SWI\/SAP+Web+IDE+Personal+Edition\">SAP Web IDE Personal Edition<\/a><\/p>\n<ol start=\"3\">\n<li>Add OData service definition<\/li>\n<\/ol>\n<p style=\"padding-left: 60px;\">Once installed an OData service definition file (for example NorthwindRDF) can be added to the SAPWebIDE\\config_master\\service.destinations\\destinations folder, as follows<\/p>\n<p style=\"padding-left: 90px;\">Description=Northwind<\/p>\n<p style=\"padding-left: 90px;\">Type=HTTP<\/p>\n<p style=\"padding-left: 90px;\">TrustAll=true<\/p>\n<p style=\"padding-left: 90px;\">Authentication=NoAuthentication<\/p>\n<p style=\"padding-left: 90px;\">Name=NorthwindRDF<\/p>\n<p style=\"padding-left: 90px;\">ProxyType=Internet<\/p>\n<p style=\"padding-left: 90px;\">URL=http:\/\/localhost:8080<\/p>\n<p style=\"padding-left: 90px;\">WebIDEUsage=odata_gen<\/p>\n<p style=\"padding-left: 90px;\">WebIDESystem=NorthwindRDF<\/p>\n<p style=\"padding-left: 90px;\">WebIDEEnabled=true<\/p>\n<ol start=\"4\">\n<li>Create new application from template<\/li>\n<\/ol>\n<p style=\"padding-left: 60px;\">An application can be built using a template which is accessed via File\/New\/Project from Template. In this example the \u201cCRUD Master-Detail Application\u201d was selected.<\/p>\n<p style=\"padding-left: 60px;\">The template wizard needs a Data Connection: choose Service URL, select the data service (NorthwindRDF) and enter the path of the particular endpoint (\/odata2sparql\/2.0\/NW\/).<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-1336\" src=\"http:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig2_.png\" alt=\"\" width=\"1731\" height=\"829\" srcset=\"https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig2_.png 1731w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig2_-300x144.png 300w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig2_-768x368.png 768w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig2_-1024x490.png 1024w\" sizes=\"(max-width: 1731px) 100vw, 1731px\" \/><\/p>\n<p style=\"text-align: center;\">Figure 2: WEB IDE Data Connection definition<\/p>\n<p style=\"padding-left: 60px;\">At this stage the template wizard allows you to browse the endpoint\u2019s entityTypes and properties, or classes and properties in RDF graph-speak.<\/p>\n<p style=\"padding-left: 60px;\">Since the Web IDE and OpenUI5 is truly model driven, the IDE creates a master-detail given the entities that you define in the next screen.<\/p>\n<p style=\"padding-left: 60px;\">The template wizard will ask you for the \u2018object\u2019 entityType which in this example is Category. Additionally you should enter the \u2018line item\u2019 but in this case there is only one navigation property (aka objectproperty in RDF graph-speak) which is the products that belong to the category.<\/p>\n<p style=\"padding-left: 60px;\">Note that this template allows other fields to be defined, so titls and productUnitprice were selected.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-1337\" src=\"http:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig3_.png\" alt=\"\" width=\"1736\" height=\"831\" srcset=\"https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig3_.png 1736w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig3_-300x144.png 300w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig3_-768x368.png 768w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig3_-1024x490.png 1024w\" sizes=\"(max-width: 1736px) 100vw, 1736px\" \/><\/p>\n<p>Figure 3: WEB IDE Template Customization<\/p>\n<ol start=\"5\">\n<li>Run the application<\/li>\n<\/ol>\n<p style=\"padding-left: 60px;\">The application is now complete and can be launched from the IDE. Right-click the application and select Run\/Run as\/As web application:<\/p>\n<p style=\"padding-left: 60px;\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-1338\" src=\"http:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig4_.png\" alt=\"\" width=\"1294\" height=\"925\" srcset=\"https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig4_.png 1294w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig4_-300x214.png 300w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig4_-768x549.png 768w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig4_-1024x732.png 1024w\" sizes=\"(max-width: 1294px) 100vw, 1294px\" \/><\/p>\n<p style=\"text-align: center;\">Figure 4: Application<\/p>\n<p style=\"padding-left: 60px;\">Even this templated application is not limited to browsing data: it allows full editing of the categories. Note that even the labels are derived from the OData endpoint, but of course they can be changed by editing the application.<\/p>\n<p style=\"padding-left: 60px;\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-1339\" src=\"http:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig5_.png\" alt=\"\" width=\"1296\" height=\"924\" srcset=\"https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig5_.png 1296w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig5_-300x214.png 300w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig5_-768x548.png 768w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig5_-1024x730.png 1024w\" sizes=\"(max-width: 1296px) 100vw, 1296px\" \/><\/p>\n<p style=\"text-align: center;\">Figure 5: Edit Category<\/p>\n<p style=\"padding-left: 60px;\">Alternatively a new category can be added:<\/p>\n<p style=\"padding-left: 60px;\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-1340\" src=\"http:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig6_.png\" alt=\"\" width=\"1286\" height=\"914\" srcset=\"https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig6_.png 1286w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig6_-300x213.png 300w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig6_-768x546.png 768w, https:\/\/inova8.com\/bg_inova8.com\/wp-content\/uploads\/2017\/06\/Really-Rapid-RDF-application-development.fig6_-1024x728.png 1024w\" sizes=\"(max-width: 1286px) 100vw, 1286px\" \/><\/p>\n<p style=\"text-align: center;\">Figure 6: Create New Category<\/p>\n<h2>Next Steps<\/h2>\n<p>That\u2019s it: a fully functional RDF Graph web application built without a single line of code being written. However we can chose to use this just as a starting point:<\/p>\n<ol>\n<li>Publish data views, the SPARQL equivalent of a SQL view on the data, to the OData2SPARQL endpoint.\n<ul>\n<li>These are particularly useful when publishing reports in OpenUI5, Excel PowerQuery, Spotfire, etc.<\/li>\n<\/ul>\n<\/li>\n<li>Modify the model that is published via the OData2SPARQL endpoint\n<ul>\n<li>The model that is published is extracted from the schema defined in the endpoint configuration. Thus the schema can be changed to suit what one wants in the endpoint metamodel.<\/li>\n<\/ul>\n<\/li>\n<li>Edit the templated application\n<ul>\n<li>The templated application is just a starting point for adaptation: the code that is created is nothing more than standard HTML5\/JavaScript using the OpenUI5 libraries.<\/li>\n<\/ul>\n<\/li>\n<li>Build the application from first-principles\n<ul>\n<li>A template is not always the best starting point, so an application can always be built from first-principles. However the OpenUI5 libraries make this much easier by, for example, making the complete metamodel of the OData2SPARQL endpoint available within the application simply by defining that endpoint as the datasource.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Let\u2019s face it, RDF Graph datastores have not become the go-to database for application development like MySQL, MongoDB, and others have. Why? It is not that they cannot scale to handle the volume and velocity of data, nor the variety of structured and unstructured types. Perhaps it is the lack of application development frameworks integrated [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"bgseo_title":"Really Rapid RDF Graph Application Development","bgseo_description":"This article shows how an RDF Graph CRUD application can be rapidly developed, yet without losing the flexibility that HTML5\/JavaScript offers, from which it can be concluded that there is no reason preventing the use of RDF Graphs as the backend for production-capable applications.","bgseo_robots_index":"index","bgseo_robots_follow":"follow","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[16,21,15,28,11],"tags":[48,43,41,40,49,35,44,38,42,36,37,39,45,34,47,46],"_links":{"self":[{"href":"https:\/\/inova8.com\/bg_inova8.com\/wp-json\/wp\/v2\/posts\/1333"}],"collection":[{"href":"https:\/\/inova8.com\/bg_inova8.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/inova8.com\/bg_inova8.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/inova8.com\/bg_inova8.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/inova8.com\/bg_inova8.com\/wp-json\/wp\/v2\/comments?post=1333"}],"version-history":[{"count":7,"href":"https:\/\/inova8.com\/bg_inova8.com\/wp-json\/wp\/v2\/posts\/1333\/revisions"}],"predecessor-version":[{"id":1531,"href":"https:\/\/inova8.com\/bg_inova8.com\/wp-json\/wp\/v2\/posts\/1333\/revisions\/1531"}],"wp:attachment":[{"href":"https:\/\/inova8.com\/bg_inova8.com\/wp-json\/wp\/v2\/media?parent=1333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/inova8.com\/bg_inova8.com\/wp-json\/wp\/v2\/categories?post=1333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/inova8.com\/bg_inova8.com\/wp-json\/wp\/v2\/tags?post=1333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}