YTread Logo
YTread Logo

FileMaker Data API and Web Integration with Michael Layne 2/22/22

Mar 22, 2024
so welcome once again everyone to the kentuckiana developer group, and this week or this month, we have a host, Michael Lane, who I was lucky enough to be able to go on air with Paws last year and in October, and I got to I attended his session on Data API and Web Integration and was also able to pick his brain and get a lot of information, unfortunately I didn't annotate very well and missed a lot of that information, so I hope I can. We'll have a chance to ask those questions again, but Michael will walk us through a little bit about the Filemaker Data API and web

integration

, and with that Michael, if you want to take over, you should be able to share.
filemaker data api and web integration with michael layne 2 22 22
Can I introduce you a little bit more to Michael and I co-hosted Paws several years ago in Cleveland? If you remember Michael, we, we shared a time, I had a big crowd that was a big crowd, uh, them. I went out to see Michael and I was there too anyway uh good to see you again Mike Jonathan you too I thought I recognized you and then I heard your voice and I know I knew who it was um cool well thank you um and Ron, yeah we went on hiatus on the air in October it was really nice to be together after many of you know the strangeness for the last year and a half before that so yeah I spent a lot of time talking to ron actually and it was one. of the week's highlights um so let me share my screen and start sharing.
filemaker data api and web integration with michael layne 2 22 22

More Interesting Facts About,

filemaker data api and web integration with michael layne 2 22 22...

I'm going to share my entire desktop and then start doing this. Does everyone see a slide or does anyone see a slide? Well great. Well, then, it's an honor to be here. I'm Ron, I really appreciate you inviting me to speak. I have a handful of slides, but we're definitely going to talk to some file creators and some non-file creators, but um. I have some slides that I want to see to set up some things about security and about some of the technologies that I use and actually, before we start, I realize that I was thinking about this presentation today.
filemaker data api and web integration with michael layne 2 22 22
And I've spent my entire career with one foot in a filing cabinet and one foot out and this presentation is really a culmination of that and it speaks to exactly where I am with what I do, so I hope that makes sense, so let's take um, let's um, let's go from

filemaker

to um no

filemaker

, so, um, we're going to look at a large complex mission-critical internal system and we're going to extract a small part of It's something that this is the organization that we created for solution a few years ago, they wanted to expose a small part of their solution to customers in a browser on the phone, on a laptop or on a tablet, and you'll notice it. it says it doesn't involve web direct, so my two seconds on web direct is um, I know it's a great technology, I think it's coming a long way from version one, but since I've always been kind of a web developer, I've also never really done a straight web project in my life because I've always been out of Filemaker and then when I do the Filemaker

integration

I go back and I'm sure some of you will.
filemaker data api and web integration with michael layne 2 22 22
I remember cdml and lasso and some of those technologies and then fx.php came along. I don't know when, at least 15 or 20 years ago, I used so much, I used odbc heavily, I never really used the php API because I just stuck with fx because the amount of work I was doing satisfied all my needs and throughout Along the way I made many more web development integration APIs and that's why when the Data API came out, I was very happy and I still am very happy. Use it while developing filemaker solutions for the web, so we will look at filemaker, then we will look at a php application with filemaker as a backend and then we will look at a viewer application which is javascript. djs is a JavaScript framework that talks to the

data

API and lastly, let me, I don't know, I can't, I don't think I can even see it because there are things covering my screen and I'm in presentation mode, but that last thing that we're going to look at the view and we're going to look at something else that's not filemaker um so let's what we're going to do in this presentation is we're going to review a filemaker flow to manage a shipment for a company that moves fine art all over the world. world, we'll look at access and how it works, we'll look at the web application, we'll definitely look at some things outside of filemaker, but definitely related to the

data

API and for those of you doing some integration or web development, when Filemaker returns this table name colon and field name which is not something that many technologies outside of Filemaker appreciate, it usually means that it usually means a step in class or something else, so, to parse the string we receive from Filemaker, you have to do a little work, whether it's Python or Go, PHP or JavaScript, nothing really likes that double call, so I'm going to talk a little bit about how to get rid of that in the process of feeding direct json to a separate application, so I have a brief explanation of why I think I think the browser is a good goal for any user and I've been doing this for a long time so I'm a big believer I also think that when you move to different technologies you have to start simple and sometimes it's really good to start with a clean slate and I think it promotes simplicity. a lot of file creation solutions tend to get super dense on the layouts and super dense on the data and what you'll see, hopefully, it doesn't do that and I already talked about this, but I think not the direct web is more control and less. hack, you can use web-centric technology stacks which we'll go over very briefly, just a high-level overview, and then you'll learn something new and be able to expand your skill set.
Wow, okay, this slide is about security. I want to talk about this briefly because, I'm not a security guru like Stephen Blackwell or when to go to court. However, I know it's important and when I started doing web, this type of integration really gave me a new appreciation for how rich the security model is that Filemaker gives us out of the box, a lot of that has to do with the field-level access, so on this screen you'll see that, in the left column, it shows how many data tables, layouts and scripts and fields there are in this solution that we're about to take a look at all what the web touches is in that web column, so a fraction of the number of tables, layouts, scripts, and fields we touch in field-level access actually exist. less than 100 fields that the entire web application reads and we only have three that are um that you can create or edit records, so it is super locked and this is all thanks to the security models, so in the filemaker api file that You'll be able to Look, we have a privilege set that has completely blocked the data API that this application has access to.
That's not to say that each individual user has their own account which we use and I think Ron mentioned this earlier, this solution actually uses table based authentication, so we have users in tables, we have passwords, we have two factor authentication and everything. that's table based, so this level of access that the app has is In addition to users, just log in so we know who they are. At the bottom, you'll notice that we have three scripts that are the only three scripts that are available for this solution. It is a login script. set up a password script and a PIN verification script that has to do with two factor authentication and by the way if you have any questions I'll be happy to take you on the go or you can wait but I'm not looking for any so I'm not checking the chat or anything if anyone has anything here's a quote I like to remember just to make sure I keep things simple every day with whatever I'm doing for any client on any project and this is one of the last screens before we get into this, I just want to cover some of the technologies that are out there and then some that you'll see today on the far left.
We have CSS frameworks that are quite common in the web development community. it's your presentation layer, that's what um html looks, feels and acts in a browser and you'll see that list of frameworks. bootstrap is very, very popular. I know that even in the file creator community a lot of people take advantage of bootstrap if I'm going to use data tables in a web viewer, so a bootstrap is very, very common stuff, it's an important foundation and one that I like. because it is super simple to implement and answers all these answers. It's bulma, so it's bold because I'm using it, so as far as JavaScript front-end frameworks go, there are tons of them out there, but these are the big ones and most of you have probably heard of these angular ones.
It's generally more of an enterprise level framework, it's been around for a long time because Google React was born from Facebook and there are tons of build developers that are leveraging the React view. I would also say it is one of the largest and most popular. frameworks that exist and I kind of leaned towards that, I took it easier than the others that I've used before, so we'll look at a view application, but as far as the brain of a file creator is concerned, I would say that the view of reactor is definitely something that will be easier to understand than angular just for what it's worth and lastly the backend of some of what you'll see is node which is a server side JavaScript implementation and express.js is just one library or framework that we use to do things like routing and managing the application itself, so we're not going to go into detail on any of this, but I just wanted to give you a high-level overview of some of those technologies that we're using.
Let's see and finally I want to point out that even though javascript, filemaker and php are different technologies, you can do the same thing in any of them and I could mention 10 other languages. Here you'll see on the left a JavaScript snippet to load or get an item from an Amazon Web Services s3 bucket to um in Filemaker. You can do the same thing inside the URL which we're actually going to look at and in php, you can see I'm leveraging the AWS SDK. I am creating an s3 bucket and doing the same thing. I get a list of objects in a bucket, so although these are very different technologies, um. what you can do, is there a way to take advantage of the leverage APIs with any of them, so let's jump to uh, let's jump to Filemaker.
I'm going to open it. Hopefully, I wanted to keep this closed. Let me close this and see. If this is the right file, I'm opening sorry, yeah, okay, so we're looking at a solution called artwise that manages shipments of artwork around the world and I'm not going to go into too much of this, but we're going to jump right into it. a shipment and the shipment is something that takes place and that can be scheduled months in advance and the day that the shipment will take place, that means that there is a painting that will go from a museum in New York to a museum in Paris and it's coming back in six months and this is all that's happening with that shipment, so I'm going to jump to a shipment and you'll see a screen, you're seeing a screen. that's heavy and full of data, but I assure the people who use this system all day, every day, this all makes sense to them, so I'm going to take a moment to walk you through the screen because it's going to matter.
When we look at this in a browser, any shipment will have three main players, so to speak, or entities, a carrier, an agent, and a consonant or the actual destination of the artwork or whatever it is being shipped, we have a place to Notes, we have a place for activities that take place during shipping, for example, you will see some dummy data here, like pressure washing, which is not a real activity, but something like going through customs or something that is palletized on site . the cargo bay in air france or the box that is loaded on the plane, those are all activities that they want to track, so those are the activities, so we have people, you will notice that there are a lot of people associated with shipping and the only thing that really What matters is that some of these people are internal and many of them are external, there are people who work with the carrier or agent, there are field operations people, there are couriers who travel with the artwork and I can activate or deactivate their access right down to the sending level, so first we have some security that we discussed earlier, then we have the ability to allow a user in the system to be able to access the web application or not and that is handled in their in their contact level, so first of all they need authentication, then they need to have two other authentication factors built in and they still can't see anything unless they are attached to a shipment and they have to have access turned on.
Here, not only that, but we have an expiration, we can ship, so if it's expired, no one can see the shipping period, that's how shipping level access works and I'm going to quickly jump in. through these tabs we have some flights here we will see the flight data a little later we have some people from field operations these are the boxes that go to the shipping, the road transport, they are the companies that can carry the shipment on one side to another, then we have the content of theboxes, we have the couriers that travel with it, we also have some documents that people will use and we I'm going to visit these documents a little later and then I won't bother with these other tabs, but this is a shipment, so if anyone wants submit, if anyone wants to give you access to submit, I can do that.
Seeing the submission, I'm going to go ahead and click this button and I'm going to open this submission in a portal. I can also do this and I can copy and paste this link and if I want to put it in an email and send it to someone who I want to give them access to this, so now I'm going to go ahead and click on um, just open send , so it took me to my browser. I know what the URL is. but I'm not authenticated, so I take the ID and I paste it into the URL so I can, if I log in, access this chip, so I'll go ahead and log in.
The submission was not found or not available um that's what you'll see if you don't have access or the submission has expired so I'm going to shoot Filemaker again and if you noticed I cleaned this up so I'm going to go ahead and give it a date expiration today and I'm going to go back to my browser, I'm going to refresh and there's the shipping, so I'd like to point out a couple of things that hopefully you'll see for yourself first. This is all. This is what you've seen, but it looks like it's designed quite differently.
Hopefully, it looks a lot simpler and a lot cleaner. You see, we have the sender, the agent, and the consonant all here. Every ounce of data you see comes directly from filemaker through the data API um we have some links to view boxes I can see the contents I can see the contents of the boxes I can go back to shipping um here are my flights I have my couriers I can see things called career roadmaps and um and here are activities that we're going to look at shortly, but this is probably one of the main and best benefits of using these web technologies instead of saying webdirect and yes I'm not wrong, webdirect still it's not quite responsive, but if I take my browser and I scale it down, you can see that this basically mimics a phone, so a lot of things disappear, we have menus that have collapsed, we have um. we have everything is big and wrapped up, if I scroll to the top, you'll notice these anchors appear, so if I want to quickly access the activities for this submission, I can just click on that and it's going to take me to the activities, all of this you get it for next to nothing because most CSS frameworks these days are designed to be responsive, so if I expand this window, you'll see what you'll see.
It seems like you know, as we get older, you're going to see things start to break apart and look on a tablet and then if we do another breakpoint, we're going to see these, these items disappear because we don't need them anymore, they don't need them, They don't make as much sense if I'm looking at this in a browser, sorry, on a desktop with all this room to grow, so we've got our shipment. here, um, I'm going to pivot for a moment and we're going to go ahead and look at the information here, so this shipment, this is the shipment ID back here that you see at the top, so let's open it up. postman which I'm sure some of you can use to test, it's a great tool for testing any API, it's an http client so I have a method called getsubmission, it's a post because in Filemaker you, um, when it does. a find with the data API you post data and the file creator parses it and returns a result and I'm going to go ahead and submit this and we get our data back so we'll look at a couple of things here um We've passed the submission id .
We have passed the user id. Remember that we can check if that user has access to the submission or not and also when the user logs in. We know what roles he has. and these roles are, this solution is based on the group model and we have roles and group roles and all that good stuff, so this particular user has four roles, one of them is administrator and another one has access to the web and that's another one. security level that we can use to control who can see what, so we retrieve our data and this comes directly out of the data from the direct data API, we have our field data and then I can collapse it like if, then I can. we have the data from our portal which, for those of you who are familiar with the data API, this is simply how Filemaker returns the data.
There's nothing they can do about it unless they want to modify them on the Filemaker side and return something. apart from the native native data if you want to run a script otherwise this is what you will get so we have a lot of portal data here there are a lot of relationships with a send and we will look at the filemaker in a moment to check it out but you'll see here I have these activity roles again, here's our table name and our field name. We have couriers, flights, field operations, transportation, which is trucking activities, parties, uh, carrier. consonant agent these are all the things related to this submission we also have some things that we definitely don't need in this case, which is this portal data information, this is just metadata about the portals that we received, so we don't need that either, but what we get is about 800 lines of json, it was 37k and you see, it took um 1900 milliseconds, if I go ahead and do this again, it will be effective and it will take a little bit, so now it's 379 milliseconds, so a little bit.
A little bit of an improvement, you see, it's still super fast, but I want to write that number down there because we're going to reference that number in a minute, so one of the things we want to do is limit the amount of information we send back. It's always good to be cleaner and more efficient, so I want to get rid of the data from this portal. I want to get rid of some of this stuff I don't need. I also want to get rid of things like shipping leftovers. flight colon colon airline code so the way we do it is we're going to open up our text editor and I have this is the controller for this application and it's called shipping.php and I'm going to quickly go to get shipping, like this which there is my get send controller, this is a really simple piece of code, we get the data that comes from the application, which is the data that you saw me post and then we have a response and that response is returned by the model and the model is what communicates with the database and the method we call is again get dispatch and we pass the data in so let's go ahead and take a look at get dispatch and I promise you that we're going to see exactly where come on so here's our get send so we get our data um we decode it um and then we basically turn it into something that Filemaker is going to understand um so we pass some we pass some things we do some things in php because it's easier and then we package it and send it back to the data API.
In this particular case, I'm using a library called fm um fmpda oh god yes, it must be fmpda um, it's a typed library. by a guy named Mark Denise, there are several libraries that help you communicate with the Data API. I made my own when the API first came out, it's not too difficult and plenty of other people have written some and this is the one. That worked best for me also for those of you who have used the PHP API in the past. This is just a slight twist. Use the same type of term. The same nomenclatures.
Some of the same script names. Still, you only need to make a few. slight tweaks and if you've used the PHP API and as you know that can go away and if you're running Linux it's gone so it's really easy to switch to using the data API instead of the old XML interface. So, coming back to this, my design is called remainder sending. I pass some parameters that I have into some environment variables and then I just say, look for these records and in this case I'm looking for exactly one record and then I get it. return result and um filemaker always returns us everything in an array, even if there is a record, so this little snippet here with this zero that just says give me the first record of what I'm getting so I don't have to.
We unpack it later, I assign it to a variable called result and then I return a result so good that it gives us the raw data, but what I would like to do is clean up a few things so you can see that I have some sanitized results. here and I will comment on my original result. I'm going to uncomment them and show you that I built a little function that removes the double colons and the table names, so the first thing I do What I do is I take my flights from my portal data and create a variable called flights, then I run it through this function called sanitize key and then I unconfigure what's php to get rid of this thing called this flight, so I do that for the flights. activities activity roles parties and races I could do it for more but for demonstration purposes this this is enough for you to see a good result of a difference another thing I do is also disassemble that is, also known as kill carbon get rid of this this data information From the portal we saw before, what I do is rebuild an array and remove a lot of the garbage that flows downstream, so I still have my submission because I still need data from that primary record, but now I have a new separate set of rules flight activities activity, partners, priorities and messengers, so now that I've done this, I'm going to save it, we'll go back to the postman and notice that we had 800 lines and something like that. 387k I'm going to forward this to the data API 365 milliseconds, we reduce it by about 10k and we reduce it by about a hundred lines of code.
The most important thing is that you will see that, in addition to the portal data, it is still there now. I have flight activities, all these things that we talked about and noted in my flight set Registration ID Airline Code Flight Number Departure. We have gotten rid of the field. Sorry, table names and double colons, so why go to the trouble to do that, whatever language you're getting this data in for those double colons, it can be painful to parse what I mentioned, and since I was able to do it and wrote the function to do it, it just clears the data. alright, it's a lot easier to deal with when you're building your html and you're inserting the code that you get, so now that we have this cleaner data, let's look at a view. application expecting cleaner data so what I have here is a single page application written in the view and it uses basically the same exact API as the code you just saw the php application running so here is the application php than here is the php application and now I am going to log in to the display application with the same credentials because it is the same backend.
I'm going to click on shipments. You'll notice that things look slightly different because I'm using a different framework, um, but the results are very similar. I still get things like um, um, I write ahead and I search and I already have a demo, I've already landed on one. I'm already uploading something so I can grab the shipment we want to compare to, so here's the same shipment we're looking at. I'm going to click on the shipping detail. I'm going to do this a little bit. wider so we're comparing apples to apples and hopefully you're seeing this saying oh my gosh it looks the same because that was my goal was to make it look the same it's one of the ways I teach myself same, is that you?
I know you do something and try something different with a different technology but you are looking for parity and now I know two ways to do something and one of the file creators often tells me about a smart way to do something in web development and also. doing things in web development also informs me on how to be a better file developer, so that's another benefit of exposing yourself to these technologies, so again, if I switch back and forth, you can see that's not exactly the same, but people would do it. I don't really notice the difference.
If you look at one or the other, we get the same benefits of a visually responsive design, so when I scale this down, everything looks a little different. I didn't spend as much time cleaning. This is ready, but for making almost no effort, I still understand, I still have all the nice wrapping and responsiveness of the design that is going to change, so I have a couple more things to show you, but one of them that usually appears, so I'm going to go ahead and jump to it now. I'm going to go ahead and open the api file.
This solution has the ui file, an api file that has all the transactions and then it has a data file and the api file is the file that we access from the web application, so I'm going to go to the transactions. Actually, I just want to run a different layout. Here rest, shipping, here we go, so the shipping I've been looking at all this time from this design, the design is based on the shipping table, but you can see that there are many related fields and many portals. All these portals are necessary to bring what we want to see to the end user to thatclient or that client, so um uh, as far as I can remember, when you access data from Filemaker, except odbc, it must have context, it must call a layout, it must be in the context of the layout and if a field is not in that layout, you won't get it even if it's related That's why all of this has to be in this layout, even things like uuids if I'm using them, so this layout is there's a submission record and there's probably at least 10 or 20 records related to a shipment and I hope not.
I know that for sure, but I hope you all trust that that's probably the case and what I'd like to do now is show you a concept of, instead of having one main record with at least a dozen related records in several different relationships, um and actually, You know what I'm going to do too. I'm going to show this in case anyone is interested and wants to see it, so here is the relationship graph for the API file and everything that is this rest. You see this rest. send these are all the relationships that are needed to drive the data that we are retrieving, so I'm going to show you what filemaker is not now let's go back to see sorry, let's go back to the browser.
Let's look at shipping from a different angle. I have a link here that says Shipping v2. I'm going to click on it and you'll notice when I load this. it's pretty instantaneous if I go back to the other one there's a little bit more delay this is filemaker 20. no it's not filemaker 20. it's mongodb um what I did was I took the data from a commit and I, uh, built our commit log in mongodb and the way I can test it is I have another tab here in my postman called get shipping just, just this is um, this is looking at a node application running on my server looking at a mongodb database in the cloud, so I'm going to press, I'm going to send this shipment, look at the time eight milliseconds, it's 3k because there's not that much data, but all you see here is our sender with an address, the name of the shipment, um different.
Agent ID continues, we also have flights here, all the related contacts, um, here they are, I think I saw flights, yes, here are the flights that are related and if I reopen this browser, you can see that, um, there it is , you know, only I have a flight here but there's the flight there's the um so this is using the same framework it's a view application just this design this view if you want or this component is not looking at filemaker it's looking at mongodb um let's see, I think I'm still doing well for a while.
I'd like to point out one of the advantages of leaving Filemaker when you do things like this. Let's quickly look at the vs code and let's look at the shipping details, so this view think of an html file because that's basically what this shipping detail file has. You can see it looks almost like html, only we're incorporating something dynamic. data, this is this layout, um, so when I look at this, you notice we have the modeler, the agent, the constant, we also have this block here for the flights now in traditional html, everything you see here would be rendered in a file html in In other languages, you can certainly parse this and have things imported or exported or inlined and some of these technologies just lend themselves to that, so if I go back to this flights box with these two flights in it, I go a to do a flight search and you'll see right here I have a grid and I have a column here that's ready to grab something and inside that column I have a little block of code that says flight card and it's not, it's not necessary. that you understand this at this level right now, but you should know that I have this little widget or component called flights card and I'm passing it a flights value which is an array, I'm passing the flight number and I'm passing the air waybill from the shipping from the shipping record itself and how I'm doing it is I'm importing the um flights card, I'm importing it. down here here when I get rid of my html you'll see this: I'm importing something and I'm calling it flightscard and I'm importing it from a Flightscard.view component and then I'm calling it component here, so this is the component, this is where I'm importing, you saw where I was using it here and this part here is this file called flights card, so this file is 50 lines of code, it's nothing, it's a table. and all I'm doing is throwing the data from the date API, not from mongodb, but from the data API.
I pass them into this little widget and then I just do a little loop, there's a table, there's a table. queue, I'm going through my flights and there's the airline code, the fight number, the departure date, etc., and that's it, and this is entered in detail and then when this page is accessed and it is rendered , a nice little box appears here for flights, so that's what makes me wish we could do that in Filemaker. I wish we could have parts of the design that were shared between all the designs or just concepts like that, but, I'm about to wrap up.
I hope you all get an idea of ​​how the Data API can be a glorious thing you never see when building web applications and I'm open to any questions, comments or feedback, completely, so I'll turn it around. Leave it to someone else if you have anything to say, I'm almost done, thank you very much, Michael, um, yeah, let's open it up for questions. Does anyone have anything? I can probably think of a dozen questions. more or less, but I'm going to go back to gallery view so I can see everyone so I can stop sharing, but in case someone does, I'll leave.
I didn't do that, so I guess my questions really arise. probably more than one and I know you and I spoke in a pause by mistake like I did some limited things with uh php api um, which is basically just giving the user the ability to open a payment page on a website. in a web browser to enter credit card information and process a payment and it basically sends the information to the Filemaker app and runs a script, processes the payment and returns the result, which is a much simpler solution than what you have . demonstrated here, but I guess you know that a lot of what I'm trying to get out of all of this is some of the basics, so for example, just a simple solution like that, and I think for many of us FileMaker developers , we probably deal with you, you know, small businesses that are doing, you know, a very limited type of application, um, and most of the time, like several of my clients, they're hosted on things like Godaddy and Hostgator and things So.
Do you have any kind of thoughts on whether the data API is something you can work with in that type of hosting solution or is it more? I have a feeling that most of these things are under your control, where you basically have I built and managed the server and so you can dictate all these frameworks and all that kind of stuff, okay, yeah, um, well, then everything You've seen here it runs in a local environment, but I have the exact same thing running, not in a local environment. For example, there are some of these solutions that are, let's look at the web application, so the php part is hosted on digital ocean on a server in new york, which is kind of the small potato of digital ocean, but I think some people they know. and I'm a big fan because it's very easy to manage, so that application is hosted on a digital ocean server, which could be anything, it's just php running on a server and the file creation and data server is running in which we have.
I have one that runs on aws in ohio and serves the data API it runs on linux version of aws another one runs on a server in atlanta um and I can point the php in new york to any of those things as long as there is an ssl certificate and it's, you know, it's secure and it's exposed, it has a publicly available public domain, a file creation server, you know, it's just accessing the file creation server with the data API turned on, as far as that kind of accessing it, you know, yeah, I manage them, but I think most people who host Filemaker in the cloud.
I also know I've worked with some projects recently where even though they do all the hosting, all the Filemaker hosting through Salient and we've set up several web applications that live outside of any kind of alliance server, but we can still access the API because you know there is an SS certificate and we have the proper security setup, so I don't know. If that answers your question or is it a bit rum and I ask before I answer, are you talking about using the Filemaker php that comes installed on the Filemaker server? That's where you're going, yeah, well what am I?
I mean that, and Michael mentioned it too. I've been using, I've set up a couple of small web pages that access data with Filemaker using the PHP API, which is deprecated, yeah, you know, and they keep warning us. that's going away and then another situation that I've run into as well is that I now have a client hosted on a Linux server through a hosting service. The file builder database is on Linux so I can't use the PHP API anymore so I have to dive into how to convert those existing solutions that were previously hosted on the servers where I hosted the page, like for example, an example that only has one payment. page to enter a payment and send a payment um I was on a windows server in aws so I set up the web server, I set up php and all that, php, the html and php pages were published to the same server as the database of the file builder was on um, you know, and basically managed to get a basic setup that allowed me to host that page or two pages or maybe it was three or four pages, but just those pages, just to open one page. to enter a payment and send it to the file creator's database.
That environment has changed and we moved away from the AWS server and now host it on a Linux server through a host company, so now the challenge is I have to do it. find a way where I have to host the php pages that I'm going to use probably on my client's web server integrated with their website, which is a wordpress website, so I have to figure out how to fix all that, put it on the WordPress website, integrate it with that and then access the Linux server with the data API and understand how to convert the PHP API to the data API, so okay, yeah, and that's good too. but many times when this question comes up what people don't realize is that when you install the Filemaker server and even when you can install the Filemaker API for PHP, it is not necessary to have it on the same machine and as web for a long time. host company years ago we definitely parted ways so your database is your database whether it's filemaker or sql or my sequel or you know postgres or whatever and then your API that you're using is on your web server and then , if you had that setup What Michael is saying is that it doesn't really matter where your data is and it doesn't matter where that set of API classes is hosted, as long as it can point to the database, it's fine, you know that and yes, you can and I want to think in terms of switching from that API to using the data API just because the other one disappeared, but when you think in terms of i, if I separate the Filemaker server that hosts the data from that API, which is a set of files you can place. any web server that has php, that helps you say that I'm not really changing, I'm just hosting those files somewhere else, looking back at the file creator's server just for data so they can be overcome, try to help , yes, yes, a little. a little bit, I may be looking at it a little bit more complicated because, um, and part of that is you know I'm a file creation developer, I'm not a web developer, so you know enough to put together the basic knowledge of html and php. a simple page but when I go for example look well how do I put this page on my wordpress hosted website and that seems overwhelming to me like you know so yeah Beverly knew she always has a lot of wisdom ?
There are things to say and I agree with everything she said, um, if you go out of the Filemaker universe, you generally always want a separation of concerns, a database server hosts a database and there's nothing else in it and the application in this case php. or javascript or anything else that usually lives in a separate space or a separate box is a separate physical space or a separate virtual space um so you can get it, I think we can, we can get our header to have those two separate things um and A lot Sometimes for years it was very common for us to have a Filemaker server running on Windows on AWS and an East T2 instance and then use a very small, inexpensive Linux server sitting inside.
Note that they sit next to each other because they're right there in the AWS console, you know the management console, and that Linux server is just a stupid, basic Linux server running PHP and whatever other technology, a stack of lamps, you already know Linux. apache mysql and php or some kind of that and your php just points to theIP address or to the domain of that server that is next to it so that was a good way to do it and then I will tell a 30 second story about when Filemaker 13 came out until five micro 13. I also thought it was easier on my brain to have everything on a server so I could get I built some pretty crazy little php applications um talking to Filemaker and they always ran on the same service Filemaker server and as I got more into the community I heard people say no that's kind of No, no, you shouldn't do it. that or you don't have to do that and I thought you know what I'm okay with just having it all in the same place and then with the Filemaker 13 manager a lot of things changed some things changed and we all saw it. and some things changed under the hood for the Filemaker server and Andy Localiza came to the Atlanta user group meeting a week after Filemaker 13 was released and there were probably 30 or 40 or 50 people there and I and I remember we were all sitting in this clubhouse in someone's common place, you know, someone's, a neighborhood association common place by the pool and we had a big screen on and Andy was talking and we got into the discussion about installing all these other things that we all used to do and let ph Let Apache serve all these custom PHP web pages and he said Filemaker: We are very arrogant when we install the Filemaker 13 server.
We just go in there and change them, make our own version of PHP and do some changes. Apache and you know, without getting into low level granular stuff, I remember a very clear warning in my head that I don't put things on the same file creation server anymore and even though we did for a while, we slowly got out of them and. there is still an http folder that you can still put things in there and they work. I know there are some uh goya um fm rest solutions that are on the same server and work perfectly.
The things you're doing work perfectly but you don't have to do them and if something goes wrong you just know it's just the database server so that's all I have to say about that but I think about that story slight. I guess where I am now, although I'm still struggling. With uh, figuring out how to go from using the data API or using the PHP API to the data API, the library that I had on my screen in fmpda, that library is designed specifically to allow you to transition from the API from PHP to data API.
Because it uses almost the same thing, it uses many of the same class and method names that guide you if you use the Data API. Here are the things you need to do to use this. I mean, I've never used it. I didn't care about that, but I think other people have had success. We've moved everything out of PHP. It is not so difficult. That was actually the easiest part. What you are actually doing is changing where you get your data from. I'm no longer using the built-in file builder php custom php option, I'm just using the AP Data API, so that was actually the easiest part to go further, although like Michael did it here. and actually changing the entire interface to use the view, that's a whole different ball game, that's why we're still struggling with it, yeah, hey Chris, I didn't see it, I didn't see your name until you started talking, but it's nice to see. you too, yes, I think you already know the use cases, it will probably be a long time before I put effort into something as deep as what Michael just demonstrated, but I think you know the common use cases: do you know how to place a payment accessory, like me? described send an email with a link that says if you want to pay online, go here and it will just take you to your invoice, it will allow you to pay another one that I have coming up, it's a project for a convention and they are wanting to be able to do online registrations for the convention and something you know is simple, just let someone click here to register for this convention and you know and most and in those cases you know and what I see that is especially the more appropriate use case for uh data api versus web direct is you know these are anonymous users versus you know, uh, yeah, that's why it was actually May of last year and we also had the same need, so we reached out to Charles.
Delft after trying to talk to quite a few people and we used better ways, which actually turned out to be a very good option because it has much better anonymous handling, it was definitely a learning experience, but I found people like Mike uh uh bergie who could help us set up very nice and attractive user interface once you set it up, you don't need any javascript visualization skills, you can go in just edit css and modify it to what you need. It took us about two weeks to set up, but we were actually able to get a full site capable of handling anonymous shirt orders, taking a credit card, calculating shipping, all using API calls with the backend as a file builder and we were up and running. in two weeks. which would have been impossible if we had done everything, you know, as an independent site, we had a summary that is impressive, yeah, in this group, last year, I don't think we did, Jonathan, are you still listening or are you still not? we did?
I have a presentation on that, I'm watching, yeah, he did the presentation last year, yeah, yeah, yeah, and I've seen the videos and stuff on that other one uh too, so yeah, I'm familiar with it enough to I know it's out there and I can consider that as a possibility. I have heard nothing but good things about f and better ways. I've never used it personally, but also, if I'm not mistaken, he's the one using it. see um yeah in the black box of him yeah yeah that's cool he's a good guy too. I have spoken with him several times.
Yes, he is, yes, he is very, very helpful. Yes, I often run into a speed, maybe it's a shortcoming or maybe it's a good thing, but one of the things I tend to want to do when it comes to things like that instead of using a third-party solution is to be able to figuring out how to do it myself, so I know you know how to do it, that's how I learn, you know, it's by figuring out how to do these things that, so sometimes I'm a little bit too, I hold on a little bit. Probably too difficult, yes, but I want to build it myself, I don't want to depend on anyone else, so from the end of the clip, yeah, well, it looks like we've reached the top of the hour, so that brings us to the end from yet another edition of the kentuckiana filemakers developer group um thank you for joining us thank you very much

michael

uh I enjoyed the presentation again and it's great to see you again um and I hope to see you again at Paws on Air this year, uh, that was a great experience the last year, so it's always a pleasure, unless someone else had some parting comments.
Thank you very much, thank you all, thank you. Great to see you all, bye, everyone have a great day, even Alan. I love that one, thanks bev.

If you have any copyright issue, please Contact