Screencasts!

Events happening in the community are now at Drupal community events on www.drupal.org.
snelson's picture

At last, I give you two screencasts to help you get started with Services. The first takes you through the development of a custom service module. The second shows you how to build and connect a Flex app to Drupal using Services.

Enjoy!

Screencast 1 - Overview and Creating a Custom Service

Screencast 2 - Flex Recipe Application

Comments

AMFPHP 1.9b2 ?

g10's picture

Hi Scott,

how is the further dev planned for the services/amfphp module? as AMFPHP 1.9b2 doesnt seem to work at the moment, is there an update planned for the amfphp module for this? or do you await the final AMFPHP 2 to update the module? (which seems more appropriate)

btw. enjoying these modules alot :)

AMFPHP 1.9b2 doesnt seem to work at the moment

toursheet's picture

Should work, make sure you move AMFPHP libraries - it's discussed in the helpful "screencast 2".

I cannot seem to find it in

g10's picture

I cannot seem to find it in the 2nd screencast, it only mentions the AMFPHP 1.9b… I was referring to http://www.5etdemi.com/blog/archives/2007/01/amfphp-19-beta-2-ridiculous...

I got the 1.9b running, but have some problems when it comes to serializing node values that are referencing to (the value of) another node, in Charles/Service Capture it says eg. "reference to Object[4]", tracing it in Flash it gives a wrong value from that referenced node/object (quite akward). As the values are correct in the service browser, I can only assume that AMFPHP somehow does the serialization wrong (empty nodes also get values of another node)…

this is the main reason why I would like to try out the 1.9b to see if this solves this issue

Thank you thank you thank

elliotttt's picture

Thank you thank you thank you! These screencasts are fantastic and helpful.

Excellent screencasts!

johannes-gdo's picture

Thanks a lot Mr.Nelson & co.. this is amazing stuff!

Johannes De Boeck

Perfect

Chris Charlton's picture

These are perfect to get anyone rolling. Thanks!

Chris Charlton, Author & Drupal Community Leader, Enterprise Level Consultant

I teach you how to build Drupal Themes http://tinyurl.com/theme-drupal and provide add-on software at http://xtnd.us

Broken in Drupal 6

Fixdit's picture

I went back over the screen-cast using Drupal 6 to start writing custom services and discovered that the custom "recipe_service" module example would return node id's (nids) in an array form and no actual content.

Heres how it went in the recipe_service.module:

function recipe_service_all($fields = array()) {
$result = db_query("SELECT nid FROM {node} WHERE type='recipe'");
 
   $nodes = array();
  while ($node = db_fetch_object($result)) {
     $nodes[] = services_node_load(node_load($node), $fields);
  }
     
       return $nodes;
}

Outcome:

Array
(
[0] =>
[1] =>
[2] =>
[3] =>
)

Take out the "node_load" inside the "services_node_load" array and I get this:

function recipe_service_all($fields = array()) {
$result = db_query("SELECT nid FROM {node} WHERE type='recipe'");
 
   $nodes = array();
  while ($node = db_fetch_object($result)) {
     $nodes[] = services_node_load($node, $fields);
}
     
       return $nodes;
}

Outcome now:

Array
(
[0] => stdClass Object
(
[nid] => 1
[body] => n/a
[body_value] =>
)

[1] => stdClass Object
(
[nid] => 2
[body] => n/a
[body_value] =>
)

[2] => stdClass Object
(
[nid] => 3
[body] => n/a
[body_value] =>
)

[3] => stdClass Object
(
[nid] => 4
[body] => n/a
[body_value] =>
)

)

It's closer to what I want but it needs to spit out the information contained in the nodes, but don't think the function is looping over the right arrays. Been looking over the code but I'm not sure where to go with it now?
Hope people can help?
BeechyBoy

Hey

robloach's picture

Would you mind creating an issue in the issue queue about this? I'd like to investigate it further...

Sure thing, I will add it

Fixdit's picture

Sure thing, I will add it this weekend.
Ashley Beech

Services

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: