(Tutorial) Reading And Writing Drupal With Flex

Tutorial : Reading And Writing Drupal With Flex

Drupal is a fantastically well featured, and free, content management system written in PHP. No wonder so many companies are using it internally or externally as one of their business applications. But often Drupal alone is not enough. It needs to be integrated or extended to match the needs of the organization. One way to extend it is on the front-end through something like an Ajax or Flex based widget.

In this article I'll show you how to build a Flex based data entry form that adds it's data directly into Drupal content nodes. Why Flex? Because I'd like to be able to put the widget on any site and Ajax has security issues there. Web browsers, quite rightly, ensure that Ajax pages only request data from their server of origin. So it's much harder to host an Ajax widgets on external sites without kludges like IFrames or Script tag data transit. Flex allows data access from different servers. So it's far easier to write widgets that can be hosted externally.

Another reason to choose Flex in this case is that the resultant widget is a Flash application which is easy to embed on any page with just a little object code. Javascript widgets can be easy to embed as well, but can have compatibility issues with other Javascript code on the same page. Because it's Flash you can reliably drop the widget on any page and have it render and work the same way on any site, browser or operating system.

Of course, Ajax has it's strong point too. It's always a case where you need to judge the correct approach for any application by weighing the pros and cons.

Enough exposition though, on to the implementation, and that starts with getting Drupal to talk web services!


Upgrading Drupal

The first thing I did was install Drupal on my Macintosh OS X laptop. Then I used the install.php script to set up the database and finished the installation by creating my first administrative user account. If you already have a Drupal installation going then you can just us that as is. [..]

[Read more..]

Courtesy : Devzone.zend.com