Jump to content

FastFM - Filemaker PHP ORM.


This topic is 4698 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hello everyone. I'm a web developer who recently had to work to create a PHP website (from scratch, not using filemakers code gen tools) that communicated with a Filemaker Backend.

While the official FilemakerPHP API is great and all, it really just enables communication from PHP to Filemaker. Nothing more. Nothing less.

Being an OOP programmer who believes strongly in ORM's, this API wasn't enough, so I went ahead and developed a light-weight PHP ORM for communication with filemaker. This ORM is just a module that internally uses the Filemaker PHP API to do it's stuff. A port to FX might come later, but for now I'll only support the official API. Being mainly a RoR developer who is in love with Active Record and Active Model. I modeled the ORM after those two.

PHP 5.3 only

If you're interested, check it out on GitHub:

https://github.com/laspluviosillas/FastFM

Shameless advertising because this is an open-source project that has absolutely no copyright or no for-profit motives and you are free to do whatever you want with the code.

Hope this helps any PHP developers out there!

- James.

Link to comment
Share on other sites

This looks pretty good, thanks for posting it here. I'm new to the concept of ORM, but what I just saw on the GitHub project page makes it look like an ideal way to work with FileMaker from PHP.

Link to comment
Share on other sites

  • 2 weeks later...

Looks pretty good, just a few comments:

1) not sure i like the validators, declaring them as statics instead of constants seems really messy.

2) Your where function could use support for compound finds - maybe pass a multi demensional array in for that or even an array of objects.

3) The lack of paging (from what i can see in the documentation) is going to be somewhat of a problem with larger datasets

4) The use of references e.g. line 697 is a bit confusing.. aren't these deprecated in 5.3? What are you trying to achieve there?

I really like thet 401 exception correction

Also, while a great addition to a toolset, those considering using this should see this as just that, an additional toolset during development. If you rely solely on this you're losing the features of Scripts, Valuelists, and Portals and attempting to treat FileMaker as a SQL or Fast Transaction DB which it most definitely is not. The cost of a single API call compared to a single SQL DB transaction is very different.With the use of scritps and portals you can significantly reduce the number of transactions required to inject a record, a series of related records and perform some post injection processing - e.g. you could achieve this all with a single API call.

Link to comment
Share on other sites

This topic is 4698 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.