services apps iand flex applications

21
Services API and Flex Applications By: sumitk http://sumitk.net

Upload: sumit-kataria

Post on 29-Nov-2014

2.491 views

Category:

Technology


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Services Apps Iand Flex Applications

Services APIand

Flex Applications

By: sumitkhttp://sumitk.net

Page 2: Services Apps Iand Flex Applications
Page 3: Services Apps Iand Flex Applications

Services

• An API which helps integrating external applications with Drupal

• Service callbacks may be used with multiple interfaces like XMLRPC, SOAP, REST, AMFPHP.

Page 4: Services Apps Iand Flex Applications

Servers for Services API

• XMLRPC (in core)• REST• SOAP• AMFPHP

Page 5: Services Apps Iand Flex Applications

Services included ServicesAPI• node.load(node_load)• node.save• node.delete(means all node services)• file service• menu service• system service• taxonomy service• user service• views service(I know everyone is exited about it

;) you can get, exportOR import a view)

Page 6: Services Apps Iand Flex Applications

 

Page 7: Services Apps Iand Flex Applications

Authentication layer over ServicesAPI

• Keys method(got to register app. with a key and then include that key in service request)

• SessionID method (use user’s sessionID for authentication)

• OAuth method – NOT in core right now but patch is ready ;) we can use it any time :)

Page 8: Services Apps Iand Flex Applications

HOW call looks like$change = array(                "nid" => 14,                                    //required for update                "revision" => time(),                   //required for update                "changed" => time(),                    //required for update                "type" => "page",                               //required                "uid" => 1,                                     //required both uid and name to associate to a user                "name" => "user1",                              //required both uid and name to associate to a user

                "title" => "TEST NODE.SAVE TITLE **UPDATES**",                "status" => 1,                                  // = published                "body" => "this is a body **UPDATES**",        );

print_nice ($change);$m = new xmlrpcmsg('node.save',                array(                        php_xmlrpc_encode($sessid),                        php_xmlrpc_encode($change)                        )                );$c = new xmlrpc_client("?q=services/xmlrpc", "localhost", 80);

Page 9: Services Apps Iand Flex Applications

AMFPHP : server to connect ServicesAPI and Adobe

Flex/Flash

 

Page 10: Services Apps Iand Flex Applications

What is AMFPHP??

AMFPHP is a free open-source PHP implementation of the Action Message

Format(AMF). It acts as a binary gateway to pass your data through & send it to FLEX/FLASH in an insane

speed. So this project actually connects our drupal and flex application.

Page 11: Services Apps Iand Flex Applications

 

 

Page 12: Services Apps Iand Flex Applications

 

 

Page 13: Services Apps Iand Flex Applications
Page 14: Services Apps Iand Flex Applications
Page 15: Services Apps Iand Flex Applications
Page 16: Services Apps Iand Flex Applications
Page 17: Services Apps Iand Flex Applications
Page 18: Services Apps Iand Flex Applications
Page 19: Services Apps Iand Flex Applications
Page 20: Services Apps Iand Flex Applications

 

 

SO when we are MAD!!

Page 21: Services Apps Iand Flex Applications

End

Have a nice weekend