vorstellung open social ipc 2009
TRANSCRIPT
International PHP Conference17. Nov. 2009 | KarlsruheFrank Ruske
© MAYFLOWER GmbH 2009
2 OpenSocial
F rank Rus ke
❙>10 J ahre 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 Quadratkilometerca. 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: J avaScript, HTML
und CSS
ContainerServerseitig: RESTfull API, J SON
RPC (optional)
GrundfunktionenPeople,Friends,Activities,
Persistence
BenutzergruppenViewerOwnerFriend
http://www.frank-ruske.com/ipc/hello_world.xml
OpenS oc ia l applic ation „Hello w orld“
http://www.frank-ruske.com/ipc/show_friends_final.xml
http://www.frank-ruske.com/ipc/activity.xml
http://www.frank-ruske.com/ipc/save_data.xml
gadgets.io.makeRequest()
Apache Shindig
Inc ubator s e it November 2007
http://shindig.local/gadgets/files/samplecontainer/samplecontainer.htmlhttp://shindig.local/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml
http://www.frank-ruske.com/ipc/activity.xml
RE S T / PE OPL E/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 „J ane Doe“
http://shindig.local/social/rest/people/jane.doe/@friends
RE S T / AC T IVIT IE S/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
RE S T / PE RS IS T E NC E/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
RE S T / Additiona l Parameters
/format={format}Format der Rückgabe (ATOM, J SON, 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
C onta iner implementieren:
1.) PHP Interfac es implementieren:ActivityService, PersonService, AppDataService,
MessagesService, AlbumService, MediaItemService
2.) Apache Shindig konfigurieren
1.) PHP Interfac es implementieren:class JsonDbOpensocialService implements ActivityService, PersonService, AppDataService, MessagesService, AlbumService, MediaItemService {...}
http://svn.apache.org/repos/asf/incubator/shindig/trunk/php/src/social/sample/J sonDbOpensocialService.php
2.) S hindig 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
Vie len Dank für Ihre Aufmerks amkeit!
ReferentFrank RuskeMayflower GmbHPleichertorstr. 297070 Würzburg+49 (931) 35 9 65 - [email protected]