api pres. cont.
authorBill Erickson <berickxx@gmail.com>
Mon, 13 Apr 2015 21:23:48 +0000 (17:23 -0400)
committerBill Erickson <berickxx@gmail.com>
Mon, 13 Apr 2015 21:23:48 +0000 (17:23 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
api_presentation/web_apis.asciidoc

index b275e48..a16e7eb 100644 (file)
@@ -1,17 +1,16 @@
-= Oh CRUD, my API has a Flesh Wound! =
+= Oh CRUD, my API has a Flesh Wound!
 :author: Bill Erickson, Software Development Engineer, King County Library System
 :email: berickxx@gmail.com
 :date: Evergreen Conference, May 14, 2015
-:copyright: 2015 King County Library Systtem
+:copyright: 2015 King County Library System
 :duration: 40 
 :data-uri:
 :backend: slidy
 :max-width: 45em
 
-== Overview ==
+== Overview
 
  * IDL Basics
- * IDL2js
  * PCRUD
   ** IDL Elements / Permissions
   ** Fleshing
   ** fieldmapper.standardRequest()
   ** egNet.request()
 
-  warn against pcrud w/ too-complicated logic / too many calls
-  build apis instead.
+
+== IDL
+////
+IDL is the DNA of Evergreen
+////
+
+XML file which describes the structure of Evergreen classes.
+
+ * Classes (e.g. user, copy, bib record, etc.)
+ * Fields (e.g. user first name, user middle name, etc.)
+ * Relationships between classes
+
+== IDL Classes
+
+ * Standard classes define tables in the database
+ * Virtual classes 
+  ** Purely virtual for carrying data between application components
+   *** E.g. "mvr" metabib virtual record
+ ** Virtual classes whose content is defined by an SQL query.
+  *** oils_persist:readonly="true"
+  *** Effectively an inline database view
+
+== IDL Virtual SQL-driven Class 
+
+[source,xml]
+---------------------------------------------------------------------------
+<class id="ahopl" controller="open-ils.cstore open-ils.pcrud" 
+    oils_obj:fieldmapper="action::hold_on_pull_list" 
+    reporter:label="Hold On Pull List" oils_persist:readonly="true">
+
+    <oils_persist:source_definition><![CDATA[
+    SELECT ahr.*,
+        COALESCE(acplo.position, acpl_ordered.fallback_position) AS
+            copy_location_order_position, au.alias
+        ...
+    ]]></oils_persist:source_definition>
+
+    <fields oils_persist:primary="id">
+        <field reporter:label="Status"
+            name="status" oils_persist:virtual="true" />
+        <field reporter:label="Transit" 
+            name="transit" oils_persist:virtual="true" />
+
+---------------------------------------------------------------------------
+
+== Accessing the IDL
+
+file: /openils/conf/fm_IDL.xml
+
+== PCRUD
+
+////
+warn against pcrud w/ too-complicated logic / too many calls
+build apis instead.
+////
+
+== Questions / Comments
+
+ * Slides:
+[source,sh]
+---------------------------------------------------------------------------
+git clone git://git.evergreen-ils.org/working/random.git
+cd random && git checkout -b slides origin/collab/berick/eg2015
+cd api_presentation && asciidoc web_apis.asciidoc
+---------------------------------------------------------------------------