OpenSocial und Apache Shindig
-
Upload
mayflower-gmbh -
Category
Technology
-
view
1.442 -
download
2
Embed Size (px)
description
Transcript of OpenSocial und Apache Shindig

International PHP Conference17. Nov. 2009 | KarlsruheFrank Ruske

© MAYFLOWER GmbH 2009
2
OpenSocial
Frank Ruske
❙ >10 Jahre Erfahrung in der Softwareentwicklung
❙ Seit März 2009 Mitarbeiter bei Mayflower
❙ Autor für das PHP-Magazin

Was ist das Objekt?

Was ist das Ziel?

Wie kann das Objekt geshared werden?

4.294.967.296
340.282.366.920.938.463.463.374.607.431.768.211.456
665.570.793.348.866.943.898.599 pro Quadratkilometer665.570.793.348.866.943.898.599 pro Quadratkilometer
ca. 667.000.000.000.000.000 pro Quadratmillimeterca. 667.000.000.000.000.000 pro Quadratmillimeter

Was ist die Belohnung für eine Anmeldung?

Business Model?

Wie können wir Objekte sozialisieren ohne ein
weiteres Social Network zu erstellen?





a common open set of API's for building
social applications across multiple sites




Gadget (XML)Clientseitig: JavaScript, HTML
und CSS
ContainerServerseitig: RESTfull API, JSON
RPC (optional)

GrundfunktionenPeople,Friends,
Activities,Persistence

BenutzergruppenViewerOwnerFriend


http://www.frank-ruske.com/ipc/hello_world.xml
OpenSocial application „Hello world“




http://www.frank-ruske.com/ipc/show_friends_final.xml




gadgets.io.makeRequest()

Apache Shindig
Incubator seit November 2007


http://shindig.local/gadgets/files/samplecontainer/samplecontainer.html
http://shindig.local/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml


REST / PEOPLE/people/{guid}/@all
Alle Leute mit Verbindungen zum User {guid}
/people/{guid}/@friendsAlle Freunde vom Benutzer {guid}
/people/{guid}/@selfProfil vom Benutzer {guid}
/people/@me/@selfProfil des Viewers

Freunde von „Jane Doe“
http://shindig.local/social/rest/people/jane.doe/@friends

REST / ACTIVITIES/activities/{guid}/@self
Liste mit Aktivitäten des User {guid}
/activities/{guid}/@friendsListe mit Aktivitäten der Freunde des User {guid}

Aktivität von „John.doe“
http://shindig.local/social/rest/activities/john.doe/@self

REST / PERSISTENCE/appdata/{guid}/@self/{appid}
Alle App spezifischen Daten für den User {guid}
/appdata/{guid}/@friends/{appid}Alle App spezifischen Daten für die Freunde des Users

REST / Additional Parameters/format={format}
Format der Rückgabe (ATOM, JSON, XML)
/fields={field+}Die Felder die zurück gegeben werden sollen
/startPage={startPage}Paginator
/count={count}Paginator – Anzahl von Items

Additional Parameters
http://shindig.local/social/rest/activities/john.doe/@self?format=XML

Container implementieren:
1.) PHP Interfaces implementieren:ActivityService, PersonService, AppDataService,
MessagesService, AlbumService, MediaItemService
2.) Apache Shindig konfigurieren

1.) PHP Interfaces implementieren:class JsonDbOpensocialService implements ActivityService, PersonService, AppDataService, MessagesService, AlbumService, MediaItemService {...}
http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/social/sample/JsonDbOpensocialService.php

2.) Shindig konfigurieren
http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/config/container.php

PartuzaOpenSocial / Social Network Beispielseite
Kommuniziert mit Apache Shindig
Implementiert in PHP

1.) PHP Interfaces implementieren:class PartuzaService implements ActivityService, PersonService,
AppDataService, MessagesService, AlbumService, MediaItemService {...}
http://code.google.com/p/partuza/source/browse/trunk/Shindig/PartuzaService.php

2.) Shindig konfigurieren
http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/config/container.php

Vielen Dank für Ihre Aufmerksamkeit!
ReferentFrank RuskeMayflower GmbHPleichertorstr. 297070 Würzburg+49 (931) 35 9 65 - [email protected]