SlideShare a Scribd company logo
Midgard2
Content repository for mobile applications
Henri
Bergius



          Microblogs: @bergie
              http://bergie.iki.fi
Content Repository


Don't invent your own file formats
Content Repository


Objects instead of SQL
Content Repository


            Objects instead of SQL




http://xkcd.com/327/
Content Repository


Signals about changes
Content Repository


Data model is scriptable
Content Repository


Synchronization and sharing
With a content repository
incredible power is at your disposal
Free Content Repositories


•   Schema-based, relational   •   Schema-free
•   Query Builder              •   Javascript map/reduce
•   C, glib, libgda            •   Erlang
•   LGPL                       •   Apache License
•   D-Bus signals              •   JSON polling via HTTP
•   Library                    •   Daemon
          midgard2.org              couchdb.apache.org
...and they talk to each other
The Midgard Project
•   Free software project    •   Object-Relational
    since 1999                   Mapping, trees, D-Bus
                                 signals
•   Contributors from most
    European countries       •   APIs for C, PHP, Python,
                                 Vala, Objective-C, ...
•   Synchronized release
    model, every 6 months    •   Linux, Mac, Maemo
Midgard on Maemo 5




Conboy: notes on your phone
Midgard on Maemo 5




Workstreamer: project tracking for N900
Midgard on the web




Qaiku.com: conversational microblogging
Getting started with Midgard
Installation
•   Linux distribution repositories (Ubuntu, Debian, RHEL,
    OpenSuse etc) on OBS:
    http://download.opensuse.org/repositories/home:/midgardproject:/mjolnir/
•   After that Midgard is just an apt-get install python-
    midgard2 or apt-get install
    php5-midgard2 away
•   Maemo 4 and 5 available
    in Extras Devel (soon
    Extras)
•   On OS X use MacPorts
    or the ObjC bundle
Objects are defined by MgdSchema
<!-- This will be installed to /usr/share/midgard2/schema/ -->
<type name="midgard_person">
   <property name="id" type="unsigned integer" primaryfield="id">
      <description>Local non-replication-safe database identifier</description>
   </property>
   <property name="firstname" type="string" index="yes">
      <description>First name of the person</description>
   </property>
   <property name="lastname" type="string" index="yes">
      <description>Last name of the person</description>
   </property>
   <property name="birthdate" type="datetime">
      <description>Birth date of the person</description>
   </property>
   <property name="email" type="string" index="yes">
      <description>Email address of the person</description>
   </property>
</type>
Midgard API for PHP
<?php
// Load the Midgard2 API extension
dl('midgard2.so');

// Set up the repository config
$config = new midgard_config();
$config->dbtype = 'SQLite';
$config->database = 'midgardexample';
// this will store to SQLite in ~/.midgard2/data/midgardexample.db

// Open a Midgard repository connection
$midgard = midgard_connection::get_instance();
$midgard->open_config($config);

// Prepare storage for your data
midgard_storage::create_base_storage();
midgard_storage::create_class_storage('midgard_person');
Midgard API for PHP
// Create a new person object
$person = new midgard_person();
$person->firstname = 'Leif';
$person->lastname = 'Eriksson';
$person->create();

// Query system for all persons with lastname "Eriksson"
$qb = new midgard_query_builder('midgard_person');
$qb->add_constraint('lastname', '=', 'Eriksson');
$persons = $qb->execute();
foreach ($persons as $person)
{
   echo "{$person->lastname}, {$person->firstname} has GUID {$person-
>guid}n";
   // Add an email address and update
   $person->email = 'leif@vinland.no';
   $person->update();
}
import antigravity




http://xkcd.com/353/
import antigravity
# Load the Midgard2 API extension
import _midgard as midgard

# Set up the repository config
configuration = midgard.config()
configuration.dbtype = 'SQLite'
configuration.database = 'midgardexample'
# this will store to SQLite in ~/.midgard2/data/midgardexample.db

# Open a Midgard repository connection
connection = midgard.connection()
connection.open_config(configuration)

# Prepare storage for your data
midgard.storage.create_base_storage()
midgard.storage.create_class_storage('midgard_person')
Midgard API: PHP vs. Python
// Create a new person object              # Create a new person object
$person = new midgard_person();            person = midgard.mgdschema.midgard_person()
$person->firstname = 'Leif';               person.firstname = 'Leif'
$person->lastname = 'Eriksson';            person.lastname = 'Eriksson'
$person->create();                         person.create()

// Query system for all persons with       # Query system for all persons with
// lastname "Eriksson"                     # lastname "Eriksson"
$qb = new                                  qb = midgard.query_builder('midgard_person')
midgard_query_builder('midgard_person');   qb.add_constraint('lastname', '=', 'Eriksson')
$qb->add_constraint('lastname', '=',       persons = qb.execute()
       'Eriksson');                        for person in persons:
$persons = $qb->execute();                    print "%s, %s has GUID %s" 
foreach ($persons as $person)                    % (person.lastname, person.firstname, 
{                                                person.guid)
    echo "{$person->lastname},”               # Add an email address and update
       . ” {$person->firstname}”              person.email = 'leif@vinland.no'
       . “ has GUID {$person->guid}n";       person.update()
    // Add an email address and update
    $person->email = 'leif@vinland.no';
    $person->update();
}
Oh, and Vala too!
/* valac --debug --pkg midgard2 -o midgard-vala-example example.vala --vapidir=./ */
using GLib;
using Midgard;
namespace MidgardValaExample {
     void main() {
         Midgard.init();

       Midgard.Config config = new Midgard.Config();
       config.read_file ("midgard_test", true);
       Midgard.Connection cnc = new Midgard.Connection();
       cnc.open_config (config)

       Midgard.Object person = new Midgard.Object (cnc, "midgard_person", null);
       person.set ("firstname", "Leif");
       if (person.create()) {
            string guid;
            person.get ("guid", out guid);
            GLib.print ("Created new person identified by GUID %s n", guid);
       }
any tools you use, Midgard is there
...maybe even in your finger
How about Qt?
•   Midgard already
    works in PySide
    applications
•   Would be great to
    have proper Qt
    support
•   Anybody want to
    help with this?
Tree access

•   Parent-child relations
    •   get_parent()
    •   list_children()
•   Access via named paths
    •   get_by_path()
Extending objects
•   Subclasses in MgdSchema
    <type name="bossa_attendee" extends="midgard_person">
       <property name="likesbeer" type="boolean" default="true" />
    </type>
•   Ad-hoc additional properties
    object.set_parameter('bossa', 'key', 'value')
    value = object.get_parameter('bossa', 'key')
•   Binary attachments are also supported
    •   Metadata in repository, file in filesystem
    •   API provides access to filehandles
Midgard MVC

Put your content repository on the web
Midgard MVC
•   Very efficient MVC
    framework for PHP
•   Python and D-Bus for
    background processing
•   Gettext + intl i18n
•   TAL templating
•   Full WebDAV support
•   Git for packaging and
    deployment
Midgard MVC




Tomboy web synchronization with Midgard
Midgard Runtime
Explore the possibilities
           of content repositories




midgard2.org   #midgard on FreeNode   @MidgardProject

More Related Content

What's hot

10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data ModelingDATAVERSITY
 
MongoDB 3.2 - Analytics
MongoDB 3.2  - AnalyticsMongoDB 3.2  - Analytics
MongoDB 3.2 - Analytics
Massimo Brignoli
 
Webinar: Back to Basics: Thinking in Documents
Webinar: Back to Basics: Thinking in DocumentsWebinar: Back to Basics: Thinking in Documents
Webinar: Back to Basics: Thinking in Documents
MongoDB
 
An introduction to CouchDB
An introduction to CouchDBAn introduction to CouchDB
An introduction to CouchDB
David Coallier
 
Conceptos básicos. Seminario web 5: Introducción a Aggregation Framework
Conceptos básicos. Seminario web 5: Introducción a Aggregation FrameworkConceptos básicos. Seminario web 5: Introducción a Aggregation Framework
Conceptos básicos. Seminario web 5: Introducción a Aggregation Framework
MongoDB
 
Hadoop - MongoDB Webinar June 2014
Hadoop - MongoDB Webinar June 2014Hadoop - MongoDB Webinar June 2014
Hadoop - MongoDB Webinar June 2014MongoDB
 
MongoDB + Java + Spring Data
MongoDB + Java + Spring DataMongoDB + Java + Spring Data
MongoDB + Java + Spring DataAnton Sulzhenko
 
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...MongoDB
 
Back to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB ApplicationBack to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB Application
MongoDB
 
Learn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBLearn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDB
Marakana Inc.
 
Socialite, the Open Source Status Feed Part 2: Managing the Social Graph
Socialite, the Open Source Status Feed Part 2: Managing the Social GraphSocialite, the Open Source Status Feed Part 2: Managing the Social Graph
Socialite, the Open Source Status Feed Part 2: Managing the Social Graph
MongoDB
 
Back to Basics Webinar 5: Introduction to the Aggregation Framework
Back to Basics Webinar 5: Introduction to the Aggregation FrameworkBack to Basics Webinar 5: Introduction to the Aggregation Framework
Back to Basics Webinar 5: Introduction to the Aggregation Framework
MongoDB
 
Doctrine and NoSQL
Doctrine and NoSQLDoctrine and NoSQL
Doctrine and NoSQL
Benjamin Eberlei
 
MongoDB .local Munich 2019: Best Practices for Working with IoT and Time-seri...
MongoDB .local Munich 2019: Best Practices for Working with IoT and Time-seri...MongoDB .local Munich 2019: Best Practices for Working with IoT and Time-seri...
MongoDB .local Munich 2019: Best Practices for Working with IoT and Time-seri...
MongoDB
 
Doctrine for NoSQL
Doctrine for NoSQLDoctrine for NoSQL
Doctrine for NoSQL
Benjamin Eberlei
 
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
MongoDB
 
2014 bigdatacamp asya_kamsky
2014 bigdatacamp asya_kamsky2014 bigdatacamp asya_kamsky
2014 bigdatacamp asya_kamsky
Data Con LA
 
Beyond the Basics 2: Aggregation Framework
Beyond the Basics 2: Aggregation Framework Beyond the Basics 2: Aggregation Framework
Beyond the Basics 2: Aggregation Framework
MongoDB
 
Morphia, Spring Data & Co.
Morphia, Spring Data & Co.Morphia, Spring Data & Co.
Morphia, Spring Data & Co.
Tobias Trelle
 

What's hot (19)

10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling10gen Presents Schema Design and Data Modeling
10gen Presents Schema Design and Data Modeling
 
MongoDB 3.2 - Analytics
MongoDB 3.2  - AnalyticsMongoDB 3.2  - Analytics
MongoDB 3.2 - Analytics
 
Webinar: Back to Basics: Thinking in Documents
Webinar: Back to Basics: Thinking in DocumentsWebinar: Back to Basics: Thinking in Documents
Webinar: Back to Basics: Thinking in Documents
 
An introduction to CouchDB
An introduction to CouchDBAn introduction to CouchDB
An introduction to CouchDB
 
Conceptos básicos. Seminario web 5: Introducción a Aggregation Framework
Conceptos básicos. Seminario web 5: Introducción a Aggregation FrameworkConceptos básicos. Seminario web 5: Introducción a Aggregation Framework
Conceptos básicos. Seminario web 5: Introducción a Aggregation Framework
 
Hadoop - MongoDB Webinar June 2014
Hadoop - MongoDB Webinar June 2014Hadoop - MongoDB Webinar June 2014
Hadoop - MongoDB Webinar June 2014
 
MongoDB + Java + Spring Data
MongoDB + Java + Spring DataMongoDB + Java + Spring Data
MongoDB + Java + Spring Data
 
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
 
Back to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB ApplicationBack to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB Application
 
Learn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBLearn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDB
 
Socialite, the Open Source Status Feed Part 2: Managing the Social Graph
Socialite, the Open Source Status Feed Part 2: Managing the Social GraphSocialite, the Open Source Status Feed Part 2: Managing the Social Graph
Socialite, the Open Source Status Feed Part 2: Managing the Social Graph
 
Back to Basics Webinar 5: Introduction to the Aggregation Framework
Back to Basics Webinar 5: Introduction to the Aggregation FrameworkBack to Basics Webinar 5: Introduction to the Aggregation Framework
Back to Basics Webinar 5: Introduction to the Aggregation Framework
 
Doctrine and NoSQL
Doctrine and NoSQLDoctrine and NoSQL
Doctrine and NoSQL
 
MongoDB .local Munich 2019: Best Practices for Working with IoT and Time-seri...
MongoDB .local Munich 2019: Best Practices for Working with IoT and Time-seri...MongoDB .local Munich 2019: Best Practices for Working with IoT and Time-seri...
MongoDB .local Munich 2019: Best Practices for Working with IoT and Time-seri...
 
Doctrine for NoSQL
Doctrine for NoSQLDoctrine for NoSQL
Doctrine for NoSQL
 
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
 
2014 bigdatacamp asya_kamsky
2014 bigdatacamp asya_kamsky2014 bigdatacamp asya_kamsky
2014 bigdatacamp asya_kamsky
 
Beyond the Basics 2: Aggregation Framework
Beyond the Basics 2: Aggregation Framework Beyond the Basics 2: Aggregation Framework
Beyond the Basics 2: Aggregation Framework
 
Morphia, Spring Data & Co.
Morphia, Spring Data & Co.Morphia, Spring Data & Co.
Morphia, Spring Data & Co.
 

Viewers also liked

Proggis - Business Analytics with Linked Data
Proggis - Business Analytics with Linked DataProggis - Business Analytics with Linked Data
Proggis - Business Analytics with Linked DataHenri Bergius
 
Kevin Kelly Capitulo 7
Kevin Kelly Capitulo 7Kevin Kelly Capitulo 7
Kevin Kelly Capitulo 7Raul Cordova
 
Location-aware applications with GeoClue
Location-aware applications with GeoClueLocation-aware applications with GeoClue
Location-aware applications with GeoClue
Henri Bergius
 
Semantic editor
Semantic editorSemantic editor
Semantic editor
Henri Bergius
 
Nemein ja Midgard - yritys open source -projektin keskipisteessä
Nemein ja Midgard - yritys open source -projektin keskipisteessäNemein ja Midgard - yritys open source -projektin keskipisteessä
Nemein ja Midgard - yritys open source -projektin keskipisteessäHenri Bergius
 
NoFlo - Flow-Based Programming for Node.js
NoFlo - Flow-Based Programming for Node.jsNoFlo - Flow-Based Programming for Node.js
NoFlo - Flow-Based Programming for Node.jsHenri Bergius
 
CreateJS hackathon in Zurich
CreateJS hackathon in ZurichCreateJS hackathon in Zurich
CreateJS hackathon in ZurichHenri Bergius
 
Decoupling Content Management with Create.js
Decoupling Content Management with Create.jsDecoupling Content Management with Create.js
Decoupling Content Management with Create.js
Henri Bergius
 

Viewers also liked (9)

Proggis - Business Analytics with Linked Data
Proggis - Business Analytics with Linked DataProggis - Business Analytics with Linked Data
Proggis - Business Analytics with Linked Data
 
Kevin Kelly Capitulo 7
Kevin Kelly Capitulo 7Kevin Kelly Capitulo 7
Kevin Kelly Capitulo 7
 
Location-aware applications with GeoClue
Location-aware applications with GeoClueLocation-aware applications with GeoClue
Location-aware applications with GeoClue
 
Semantic editor
Semantic editorSemantic editor
Semantic editor
 
Nemein ja Midgard - yritys open source -projektin keskipisteessä
Nemein ja Midgard - yritys open source -projektin keskipisteessäNemein ja Midgard - yritys open source -projektin keskipisteessä
Nemein ja Midgard - yritys open source -projektin keskipisteessä
 
NoFlo - Flow-Based Programming for Node.js
NoFlo - Flow-Based Programming for Node.jsNoFlo - Flow-Based Programming for Node.js
NoFlo - Flow-Based Programming for Node.js
 
CreateJS hackathon in Zurich
CreateJS hackathon in ZurichCreateJS hackathon in Zurich
CreateJS hackathon in Zurich
 
Decoupling Content Management with Create.js
Decoupling Content Management with Create.jsDecoupling Content Management with Create.js
Decoupling Content Management with Create.js
 
200531063exam
200531063exam200531063exam
200531063exam
 

Similar to Midgard2 - Content Repository for mobile applications

Offline first development - Glasgow PHP - January 2016
Offline first development - Glasgow PHP - January 2016Offline first development - Glasgow PHP - January 2016
Offline first development - Glasgow PHP - January 2016
Glynn Bird
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
Alive Kuo
 
MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)
Uwe Printz
 
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaSolutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Guido Schmutz
 
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
confluent
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Guido Schmutz
 
Infrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and OpsInfrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and Ops
Mykyta Protsenko
 
Webinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and JavaWebinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and Java
MongoDB
 
Multilingualism makes better programmers
Multilingualism makes better programmersMultilingualism makes better programmers
Multilingualism makes better programmers
Alexander Varwijk
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
christkv
 
Eagle6 mongo dc revised
Eagle6 mongo dc revisedEagle6 mongo dc revised
Eagle6 mongo dc revisedMongoDB
 
Eagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessEagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational Awareness
MongoDB
 
Drupal 8 migrate!
Drupal 8 migrate!Drupal 8 migrate!
Drupal 8 migrate!
Pavel Makhrinsky
 
Deploying Machine Learning Models to Production
Deploying Machine Learning Models to ProductionDeploying Machine Learning Models to Production
Deploying Machine Learning Models to Production
Anass Bensrhir - Senior Data Scientist
 
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-FormatsBig Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
Guido Schmutz
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGap
Alex S
 
Icinga 2009 at OSMC
Icinga 2009 at OSMCIcinga 2009 at OSMC
Icinga 2009 at OSMC
Icinga
 
Terrastore - A document database for developers
Terrastore - A document database for developersTerrastore - A document database for developers
Terrastore - A document database for developersSergio Bossa
 
Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012
sullis
 
How to develop Big Data Pipelines for Hadoop, by Costin Leau
How to develop Big Data Pipelines for Hadoop, by Costin LeauHow to develop Big Data Pipelines for Hadoop, by Costin Leau
How to develop Big Data Pipelines for Hadoop, by Costin Leau
Codemotion
 

Similar to Midgard2 - Content Repository for mobile applications (20)

Offline first development - Glasgow PHP - January 2016
Offline first development - Glasgow PHP - January 2016Offline first development - Glasgow PHP - January 2016
Offline first development - Glasgow PHP - January 2016
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)
 
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaSolutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
 
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
 
Infrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and OpsInfrastructure-as-code: bridging the gap between Devs and Ops
Infrastructure-as-code: bridging the gap between Devs and Ops
 
Webinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and JavaWebinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and Java
 
Multilingualism makes better programmers
Multilingualism makes better programmersMultilingualism makes better programmers
Multilingualism makes better programmers
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
 
Eagle6 mongo dc revised
Eagle6 mongo dc revisedEagle6 mongo dc revised
Eagle6 mongo dc revised
 
Eagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessEagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational Awareness
 
Drupal 8 migrate!
Drupal 8 migrate!Drupal 8 migrate!
Drupal 8 migrate!
 
Deploying Machine Learning Models to Production
Deploying Machine Learning Models to ProductionDeploying Machine Learning Models to Production
Deploying Machine Learning Models to Production
 
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-FormatsBig Data, Data Lake, Fast Data - Dataserialiation-Formats
Big Data, Data Lake, Fast Data - Dataserialiation-Formats
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGap
 
Icinga 2009 at OSMC
Icinga 2009 at OSMCIcinga 2009 at OSMC
Icinga 2009 at OSMC
 
Terrastore - A document database for developers
Terrastore - A document database for developersTerrastore - A document database for developers
Terrastore - A document database for developers
 
Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012
 
How to develop Big Data Pipelines for Hadoop, by Costin Leau
How to develop Big Data Pipelines for Hadoop, by Costin LeauHow to develop Big Data Pipelines for Hadoop, by Costin Leau
How to develop Big Data Pipelines for Hadoop, by Costin Leau
 

More from Henri Bergius

Decoupling Content Management
Decoupling Content ManagementDecoupling Content Management
Decoupling Content Management
Henri Bergius
 
Create.js - Inline editing for any website
Create.js - Inline editing for any websiteCreate.js - Inline editing for any website
Create.js - Inline editing for any website
Henri Bergius
 
Decoupling Content Management with Create.js and PHPCR
Decoupling Content Management with Create.js and PHPCRDecoupling Content Management with Create.js and PHPCR
Decoupling Content Management with Create.js and PHPCR
Henri Bergius
 
Bisnesdata - Tietojärjestelmien kätköistä tableteille
Bisnesdata - Tietojärjestelmien kätköistä tableteilleBisnesdata - Tietojärjestelmien kätköistä tableteille
Bisnesdata - Tietojärjestelmien kätköistä tableteilleHenri Bergius
 
Create - Decoupled CMS interface
Create - Decoupled CMS interfaceCreate - Decoupled CMS interface
Create - Decoupled CMS interface
Henri Bergius
 
Create JS - A new kind of web editing interface
Create JS  - A new kind of web editing interfaceCreate JS  - A new kind of web editing interface
Create JS - A new kind of web editing interface
Henri Bergius
 
PHPCR - Standard Content Repository for PHP
PHPCR - Standard Content Repository for PHPPHPCR - Standard Content Repository for PHP
PHPCR - Standard Content Repository for PHP
Henri Bergius
 
Symfony2 for Midgard Developers
Symfony2 for Midgard DevelopersSymfony2 for Midgard Developers
Symfony2 for Midgard Developers
Henri Bergius
 
VIE - Using RDFa to make content editable
VIE - Using RDFa to make content editableVIE - Using RDFa to make content editable
VIE - Using RDFa to make content editable
Henri Bergius
 
Midgard Create and VIE
Midgard Create and VIEMidgard Create and VIE
Midgard Create and VIE
Henri Bergius
 
Location awareness in MeeGo
Location awareness in MeeGoLocation awareness in MeeGo
Location awareness in MeeGoHenri Bergius
 
Midgard Create and editing content via RDFa
Midgard Create and editing content via RDFaMidgard Create and editing content via RDFa
Midgard Create and editing content via RDFaHenri Bergius
 
Midgard2 Content Repository at FSCONS 2009
Midgard2 Content Repository at FSCONS 2009Midgard2 Content Repository at FSCONS 2009
Midgard2 Content Repository at FSCONS 2009Henri Bergius
 
Midgard & Nemein - when an open source project and company evolve together
Midgard & Nemein - when an open source project and company evolve togetherMidgard & Nemein - when an open source project and company evolve together
Midgard & Nemein - when an open source project and company evolve togetherHenri Bergius
 
OSM2Go
OSM2GoOSM2Go
Location-aware desktop
Location-aware desktopLocation-aware desktop
Location-aware desktopHenri Bergius
 
Midgard2: Content repository for desktop and the web
Midgard2: Content repository for desktop and the webMidgard2: Content repository for desktop and the web
Midgard2: Content repository for desktop and the webHenri Bergius
 
Midgard and the Interactive Knowledge System
Midgard and the Interactive Knowledge SystemMidgard and the Interactive Knowledge System
Midgard and the Interactive Knowledge SystemHenri Bergius
 
Midgard 2 - The cloud you can control
Midgard 2 - The cloud you can controlMidgard 2 - The cloud you can control
Midgard 2 - The cloud you can control
Henri Bergius
 
Attention Profiling for smarter web services
Attention Profiling for smarter web servicesAttention Profiling for smarter web services
Attention Profiling for smarter web services
Henri Bergius
 

More from Henri Bergius (20)

Decoupling Content Management
Decoupling Content ManagementDecoupling Content Management
Decoupling Content Management
 
Create.js - Inline editing for any website
Create.js - Inline editing for any websiteCreate.js - Inline editing for any website
Create.js - Inline editing for any website
 
Decoupling Content Management with Create.js and PHPCR
Decoupling Content Management with Create.js and PHPCRDecoupling Content Management with Create.js and PHPCR
Decoupling Content Management with Create.js and PHPCR
 
Bisnesdata - Tietojärjestelmien kätköistä tableteille
Bisnesdata - Tietojärjestelmien kätköistä tableteilleBisnesdata - Tietojärjestelmien kätköistä tableteille
Bisnesdata - Tietojärjestelmien kätköistä tableteille
 
Create - Decoupled CMS interface
Create - Decoupled CMS interfaceCreate - Decoupled CMS interface
Create - Decoupled CMS interface
 
Create JS - A new kind of web editing interface
Create JS  - A new kind of web editing interfaceCreate JS  - A new kind of web editing interface
Create JS - A new kind of web editing interface
 
PHPCR - Standard Content Repository for PHP
PHPCR - Standard Content Repository for PHPPHPCR - Standard Content Repository for PHP
PHPCR - Standard Content Repository for PHP
 
Symfony2 for Midgard Developers
Symfony2 for Midgard DevelopersSymfony2 for Midgard Developers
Symfony2 for Midgard Developers
 
VIE - Using RDFa to make content editable
VIE - Using RDFa to make content editableVIE - Using RDFa to make content editable
VIE - Using RDFa to make content editable
 
Midgard Create and VIE
Midgard Create and VIEMidgard Create and VIE
Midgard Create and VIE
 
Location awareness in MeeGo
Location awareness in MeeGoLocation awareness in MeeGo
Location awareness in MeeGo
 
Midgard Create and editing content via RDFa
Midgard Create and editing content via RDFaMidgard Create and editing content via RDFa
Midgard Create and editing content via RDFa
 
Midgard2 Content Repository at FSCONS 2009
Midgard2 Content Repository at FSCONS 2009Midgard2 Content Repository at FSCONS 2009
Midgard2 Content Repository at FSCONS 2009
 
Midgard & Nemein - when an open source project and company evolve together
Midgard & Nemein - when an open source project and company evolve togetherMidgard & Nemein - when an open source project and company evolve together
Midgard & Nemein - when an open source project and company evolve together
 
OSM2Go
OSM2GoOSM2Go
OSM2Go
 
Location-aware desktop
Location-aware desktopLocation-aware desktop
Location-aware desktop
 
Midgard2: Content repository for desktop and the web
Midgard2: Content repository for desktop and the webMidgard2: Content repository for desktop and the web
Midgard2: Content repository for desktop and the web
 
Midgard and the Interactive Knowledge System
Midgard and the Interactive Knowledge SystemMidgard and the Interactive Knowledge System
Midgard and the Interactive Knowledge System
 
Midgard 2 - The cloud you can control
Midgard 2 - The cloud you can controlMidgard 2 - The cloud you can control
Midgard 2 - The cloud you can control
 
Attention Profiling for smarter web services
Attention Profiling for smarter web servicesAttention Profiling for smarter web services
Attention Profiling for smarter web services
 

Recently uploaded

Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 

Recently uploaded (20)

Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 

Midgard2 - Content Repository for mobile applications

  • 1. Midgard2 Content repository for mobile applications
  • 2. Henri Bergius Microblogs: @bergie http://bergie.iki.fi
  • 3. Content Repository Don't invent your own file formats
  • 5. Content Repository Objects instead of SQL http://xkcd.com/327/
  • 9. With a content repository incredible power is at your disposal
  • 10. Free Content Repositories • Schema-based, relational • Schema-free • Query Builder • Javascript map/reduce • C, glib, libgda • Erlang • LGPL • Apache License • D-Bus signals • JSON polling via HTTP • Library • Daemon midgard2.org couchdb.apache.org
  • 11. ...and they talk to each other
  • 12. The Midgard Project • Free software project • Object-Relational since 1999 Mapping, trees, D-Bus signals • Contributors from most European countries • APIs for C, PHP, Python, Vala, Objective-C, ... • Synchronized release model, every 6 months • Linux, Mac, Maemo
  • 13. Midgard on Maemo 5 Conboy: notes on your phone
  • 14. Midgard on Maemo 5 Workstreamer: project tracking for N900
  • 15. Midgard on the web Qaiku.com: conversational microblogging
  • 17. Installation • Linux distribution repositories (Ubuntu, Debian, RHEL, OpenSuse etc) on OBS: http://download.opensuse.org/repositories/home:/midgardproject:/mjolnir/ • After that Midgard is just an apt-get install python- midgard2 or apt-get install php5-midgard2 away • Maemo 4 and 5 available in Extras Devel (soon Extras) • On OS X use MacPorts or the ObjC bundle
  • 18. Objects are defined by MgdSchema <!-- This will be installed to /usr/share/midgard2/schema/ --> <type name="midgard_person"> <property name="id" type="unsigned integer" primaryfield="id"> <description>Local non-replication-safe database identifier</description> </property> <property name="firstname" type="string" index="yes"> <description>First name of the person</description> </property> <property name="lastname" type="string" index="yes"> <description>Last name of the person</description> </property> <property name="birthdate" type="datetime"> <description>Birth date of the person</description> </property> <property name="email" type="string" index="yes"> <description>Email address of the person</description> </property> </type>
  • 19. Midgard API for PHP <?php // Load the Midgard2 API extension dl('midgard2.so'); // Set up the repository config $config = new midgard_config(); $config->dbtype = 'SQLite'; $config->database = 'midgardexample'; // this will store to SQLite in ~/.midgard2/data/midgardexample.db // Open a Midgard repository connection $midgard = midgard_connection::get_instance(); $midgard->open_config($config); // Prepare storage for your data midgard_storage::create_base_storage(); midgard_storage::create_class_storage('midgard_person');
  • 20. Midgard API for PHP // Create a new person object $person = new midgard_person(); $person->firstname = 'Leif'; $person->lastname = 'Eriksson'; $person->create(); // Query system for all persons with lastname "Eriksson" $qb = new midgard_query_builder('midgard_person'); $qb->add_constraint('lastname', '=', 'Eriksson'); $persons = $qb->execute(); foreach ($persons as $person) { echo "{$person->lastname}, {$person->firstname} has GUID {$person- >guid}n"; // Add an email address and update $person->email = 'leif@vinland.no'; $person->update(); }
  • 22. import antigravity # Load the Midgard2 API extension import _midgard as midgard # Set up the repository config configuration = midgard.config() configuration.dbtype = 'SQLite' configuration.database = 'midgardexample' # this will store to SQLite in ~/.midgard2/data/midgardexample.db # Open a Midgard repository connection connection = midgard.connection() connection.open_config(configuration) # Prepare storage for your data midgard.storage.create_base_storage() midgard.storage.create_class_storage('midgard_person')
  • 23. Midgard API: PHP vs. Python // Create a new person object # Create a new person object $person = new midgard_person(); person = midgard.mgdschema.midgard_person() $person->firstname = 'Leif'; person.firstname = 'Leif' $person->lastname = 'Eriksson'; person.lastname = 'Eriksson' $person->create(); person.create() // Query system for all persons with # Query system for all persons with // lastname "Eriksson" # lastname "Eriksson" $qb = new qb = midgard.query_builder('midgard_person') midgard_query_builder('midgard_person'); qb.add_constraint('lastname', '=', 'Eriksson') $qb->add_constraint('lastname', '=', persons = qb.execute() 'Eriksson'); for person in persons: $persons = $qb->execute(); print "%s, %s has GUID %s" foreach ($persons as $person) % (person.lastname, person.firstname, { person.guid) echo "{$person->lastname},” # Add an email address and update . ” {$person->firstname}” person.email = 'leif@vinland.no' . “ has GUID {$person->guid}n"; person.update() // Add an email address and update $person->email = 'leif@vinland.no'; $person->update(); }
  • 24. Oh, and Vala too! /* valac --debug --pkg midgard2 -o midgard-vala-example example.vala --vapidir=./ */ using GLib; using Midgard; namespace MidgardValaExample { void main() { Midgard.init(); Midgard.Config config = new Midgard.Config(); config.read_file ("midgard_test", true); Midgard.Connection cnc = new Midgard.Connection(); cnc.open_config (config) Midgard.Object person = new Midgard.Object (cnc, "midgard_person", null); person.set ("firstname", "Leif"); if (person.create()) { string guid; person.get ("guid", out guid); GLib.print ("Created new person identified by GUID %s n", guid); }
  • 25. any tools you use, Midgard is there
  • 26. ...maybe even in your finger
  • 27. How about Qt? • Midgard already works in PySide applications • Would be great to have proper Qt support • Anybody want to help with this?
  • 28. Tree access • Parent-child relations • get_parent() • list_children() • Access via named paths • get_by_path()
  • 29. Extending objects • Subclasses in MgdSchema <type name="bossa_attendee" extends="midgard_person"> <property name="likesbeer" type="boolean" default="true" /> </type> • Ad-hoc additional properties object.set_parameter('bossa', 'key', 'value') value = object.get_parameter('bossa', 'key') • Binary attachments are also supported • Metadata in repository, file in filesystem • API provides access to filehandles
  • 30. Midgard MVC Put your content repository on the web
  • 31. Midgard MVC • Very efficient MVC framework for PHP • Python and D-Bus for background processing • Gettext + intl i18n • TAL templating • Full WebDAV support • Git for packaging and deployment
  • 32. Midgard MVC Tomboy web synchronization with Midgard
  • 34. Explore the possibilities of content repositories midgard2.org #midgard on FreeNode @MidgardProject