Archive for the 'Integration' Category

Crossing Drupal Street IV

The last couple of installments were about understanding the basics of what makes a Drupal web site.  We covered nodes, views, and plugins, among other things.  We didn’t go unnoticed either.  While at the 2011 DevCon, I was featured on an episode of FileMaker Success Tips.

This week we are going to look at the integration of a Drupal web site and a FileMaker database.  We had a client with a specific need; an art school that offers classes to adults in their community.  They have a FileMaker back-end database that they use for registration and membership.  They also have a web site where people can view class offerings and enroll in classes.  The client would like to create a way to link these two independent databases.

Continue reading ‘Crossing Drupal Street IV’

 

Crossing Drupal Street III

This is where it may get hairy…

1490430-Who-needs-pictures-of-cute-kids-1

Compare relationships and querries

During the last episode we learned that Drupal is most powerful when the knowledgeable developer uses plug-ins to extend the abilities of the web site.  Some of the most useful plug-ins are CCK (adds the ability to create custom fields), Fivestar (adds a voting widget to your website) and Views (a powerful way to view data from different nodes).  We used the CCK to create a couple of new fields in the Things content type.

This episode we will show a basic technique to display information.  Lets say you want to see a list of content types.  To use FileMaker-speak, lets say you want to see a list of related records.

Continue reading ‘Crossing Drupal Street III’

 

FMPHP: Passing an array of values and performance testing on adding records

In my previous post about the difference between the createRecord() and newAddCommand() functions in PHP, Anders Monsen asked in comments:

I’ve never tried the createRecord method, but the ability to send an array of field values in the method seems very interesting. How would you format this data in the $values array?
$rec =& $fm->createRecord(‘Form View’, $values);
The PHP API lacks good examples of each of the methods in the class, and this post brings attention to an alternate method to set data, though I’m not certain when it might be useful, aside from bypassing the large XML array in the $result. Might be worth a try to see the differences in performance.

So two worthy questions, for which I have answers! Continue reading ‘FMPHP: Passing an array of values and performance testing on adding records’

 

FMPHP: The difference between createRecord() and newAddCommand()

If you’ve been looking at building custom PHP scripts to add records to your FileMaker database, you might have come across the following snippet from the Custom Web Publishing with PHP document:

There are two ways to create a record:

  • Use the createRecord() method, specifying a layout name, and optionally specifying an array of field values. You can also set values individually in the new record object.The createRecord() method does not save the new record to the database. To save the record to the database, call the commit() method.
    For example:
    $rec =& $fm->createRecord('Form View', $values);
    $result = $rec->commit();
  • Use the Add command. Use the newAddCommand() method to create a FileMaker_Command_Add object, specifying the layout name and an array with the record data. To save the record to the database, call the execute() method.
    For example:
    $newAdd =& $fm->newAddCommand('Respondent', $respondent_data);
    $result = $newAdd->execute();

Which is somewhat helpful, but many people wonder what the substantive difference is between these two statements. Continue reading ‘FMPHP: The difference between createRecord() and newAddCommand()’

 

Crossing Drupal II

In last week’s episode I mapped out our goal for this series: learn how to understand Drupal from the perspective of a Filemaker developer.

Following our motto of “Shut up and Fix it”,  we’re going to simply create a Drupal web site.  We’ll build a storefront that has products and a small blog attached.  Once that is running, we’ll attach the Drupal site to a FileMaker back end system.  This will allow us to pull product info from the back end system and possibly have users log in and track their orders.  That’s the end state we’ll be working toward in this series.

This week let’s expand our understanding a bit by taking a walk through the Content Construction Kit (CCK).

You’ll remember that last week we learned that a “Content Type” is analogous to a Table.  By default Drupal gives us two fields in each table:  Title and Body.  In order to make a useful database, we are going to need to add more fields to each table.

At its heart Drupal is a Content Management System.   Since the content that Drupal is designed to manage is typically a blog, the default Content Types in drupal are a Page and a Story.

The Page Content Type is normally for info that doesn’t change often, and a Story is typically used for things that change often.  Remember these are only the Drupal defaults; as with Filemaker, you are expected and encouraged to change the setup as appropriate.

We’re going to be using the Story content type for our store blog.  If all you are doing with Drupal is writing a blog, you’re basically done.  Stop reading here!

For this project, however, we plan to do a bit more, so  we’ll need to add some more descriptors into Drupal.

 
Pages: 1 2 3 4 5