Connecting to a hosted database using FileMaker Go

NOTE: As of 8/26/11 this article hasn’t been fully vetted. I think everything here is correct, but for the time being I must warn you that you should use this info at your own risk. Hope to have this vetted and, if necessary, corrected by the end of this month.

*

Congratulations! You’ve got an iOS device like an iPad or an iPhone, and you have the appropriate version of FileMaker Go installed on it. Naturally, what you want to do now is connect to a FileMaker database like CMAX.7 or GOODBOOKS2.fp7 while you’re away from your office. If you are the only person who uses the database and you don’t mind accessing it only on your iPad, you can just transfer the database to the iPad and be done with it. You can now open it anywhere you’ve got the iPad, whether you have network access of any sort or not.

But let’s say you’ve got a database hosted on a server back in the office. Other users in the office connect to it from their computers using FileMaker Pro. You probably do the same thing when you’re in the office. But when you’re away, you want to connect with FileMaker Go. This article explains how.

Before you can connect to your database using FileMaker Go from outside your office’s local area network, you’re going to need to do three things:

  • configure the database host machine so it has a fixed address in your internal network;
  • configure the router to open up ports (little doors in your firewall) for FileMaker to use; and
  • learn the IP address of your router.

IP addresses, public and private

But first, just in case you’re new to networking, let me explain IP addresses and how they are used.

All of the “places” that you can visit on the Internet are identified by “IP” (Internet Protocol) addresses. By “places”, I mean web sites, FTP servers, the server where you get your email, and many other services. An IP address is a string of four short numbers separated by dots, like this: “123.456.7.8“. IP addresses are used to identify devices — computers, printers, routers — on an IP network.

The biggest IP network is, of course, the Internet itself. When you connect to a web site by name (say “http://polytrope.com”) or to your mail server (say “pop.youremaildomain.com”), what you’re actually doing is asking a domain name server to look up that name in a kind of Internet phone book and get that domain’s IP address (a kind of public phone number) and then connect to that address. The internet comes to your office and connects initially to a router. The router has an IP address that identifies it on the Internet; this IP address is something like your office’s main phone number.

Now, inside your office, you probably have multiple computers on an internal or private network. These computers also have IP addresses, but they are internal IP addresses. Usually these begin with “192.168″ (or sometimes, “10.10″). The full address for a particular machine inside your office might be 192.168.1.12. An internal network IP address is kind of like an intraoffice phone extension. Normally, the firewall settings in your router prevent people outside your office from seeing or accessing the machines on your internal network.

Giving the host machine a fixed address

The “host machine” is the computer in your office (or possibly somewhere else, like a hosting service such as Point in Space or Digital Forest) that is running FileMaker Server and hosting your database.

If you are using a hosting service like Point in Space, the host machine is already configured for you. You just need to get the IP address of the machine.

On the other hand, if you are using your own host machine to serve your database, you should configure that machine so that it has a static IP address on your internal network. On a Mac, you’d do this in the Network panel of the System Preferences utility. Many if not most internal networks these days use a system called “DHCP” to assign temporary IP addresses to machines as needed. When a machine boots up in the morning, it gets an IP address for the day from the router; when it shuts down, it surrenders that IP address, which can now be assigned, if necessary, to a different machine.

Technically, the host machine doesn’t need a static IP address for you to connect to it using FileMaker Go. But if the host machine is getting a different IP address assigned every day (say, 192.168.1.2 on Monday and 192.168.1.7 on Tuesday), you won’t easily know what IP address to connect to. You would have to call the office and ask somebody to tell you what the host’s current IP address is or guess until you get it right. Configuring the host to have a fixed or static IP address makes it possible for you to connect to your database again and again with confidence.

Configuring the router for remote access

I’m going to go through this part — the hard part — rather quickly because there are a number of variables here, depending on the type of router you’re using, the operating system of the host computer (the one running FileMaker Server) and the design of your network. I’m going to try to explain the basic ideas but you will have to sort the details out for yourself.

First, you must configure “port forwarding” on your office router. The router is the device that is the gateway to the Internet from your office. Port forwarding is kind of like call forwarding on a telephone. Somebody calls you at 555-555-1234 and, because you’re set your phone up to forward calls, the call rings your phone at 555-555-6789. Port forwarding allows people outside your office network to connect to your router and ask for a particular port, and then get connected to a particular computer inside your network. The port number (say “5003″) is sort of like a phone extension.

For info on how to configure port forwarding for FileMaker Server, go here:

How to setup a router for FileMaker Remote Access

Let me note that there may be some variation in how you get to your router’s configuration screens. On most of the wireless routers that I’ve used in the past 10 years, I access the router’s configuration pages through the web browser on my desktop computer. I have to know the router’s IP address (say, 192.168.1.1) and I have to know the admin username and password. But I think some other routers can be accessed differently, perhaps through a utility program that you run on a computer. You’ll have to look at your router’s documentation, if you don’t know.

Once you are “in”, to configure the router, you’re going to open up two “ports” in the router and have them point to the host machine. You must know the host machine’s IP address to do this. The article I linked to above tells you how to find the host IP address if the host machine is a Mac. To get the server machine’s IP address if it’s not a Mac, you can do either of two things. If FileMaker Pro can “see” the server from a client machine inside your office — say, your desktop computer — then open FileMaker Pro, go to File > Open Remote… and select the host name in the hosts list on the right side of the hosts dialog. When you select the host by name, you’ll see its IP address appear in the “Network File Path” down below. Alternatively, if the server is running Windows XP, sit down in front of the server machine and do this:

  1. Go to Start menu and select Run…
  2. Type “cmd” (without the quotes) and hit Enter/Return
  3. Type “ipconfig /all” (without the quotes and with a space before the slash) and hit Enter/Return

That should display a screen that will reveal the computer’s IP address. Once you know that, follow the rest of the directions in the article I linked to, to set up port forwarding. As shown in the screen shot in the article, you will want to set up TCP/UDP port 5009 for FileMaker, and set up TCP/UDP port 5003 for VNC. It’s not important that you understand these terms or know where the port numbers come from.

When you have configured the router, the hard part is over, and it’s time to connect to your database.

Connecting to the database on your iOS device

Go to your iPad (or other iOS device) and launch or open FileMaker Go. The first time you try to connect, in the list of Remote Files and Hosts on the right side of the startup screen, click the server icon that has a plus sign (+). Then type your server’s IP address. This will be the IP address of the router followed by a colon and the port number for FileMaker Server (5003). It should look like this:

123.456.78.9:5003

As far as I know that’s not a real IP address. The first part of the IP address, before the colon, is the public address of your router. In my example, this is 123.456.78.9 but it will of course be something different for your router. The part after the colon is the port you opened up for FileMaker Go; it will always be 5003. You should give the server a descriptive name for future reference and save it.

Once you click Save, if everything has been configured properly, you should see a listing of the databases being hosted under FileMaker Server on your office’s host or database server machine. Select a database and open it! To reconnect to the same server later, you should be able simply to select it from the list of Favorite Hosts.

Two final notes about speed, and security

Be aware that 3G networks don’t transfer data as fast as your office’s ethernet or wifi network does. Depending on the design of the database you are accessing and the speed of your cellular data service from AT&T or Verizon, it’s possible that your experience using the database could be a bit frustrating at times.

It is also very important that you understand that, once you’ve opened up that port and made your database accessible to the outside world, the database is, um, accessible to the outside world — meaning anybody in the world can see it. Every database on your network should require that anyone trying to open it provide a good account name and a strong password.

What’s wrong with scrolling in Mac OS X.7 “Lion”

One of the most controversial changes introduced in Mac OS X.7 “Lion” recently is a change in the way that you scroll pages up and down. In every previous version of the Mac OS and (if I recall correctly) in all versions of Windows, if you’re reading on a long web page and you want to read more, you would place your finger at the top of your mouse or trackpad and pull down, that is, towards your wrist. If you were in the middle or at the bottom of a long page and wanted to move back up, you would push up, away from your wrist. In Lion, you do the exact opposite. To move from paragraph 1 to paragraph 2 and so on, you now push your fingers up; to move from the last paragraph of a long article to the top of the page or the start of the article, you now pull your fingers down. Many users defend this change; others hate it. I’ve been using Lion since the day it was released and I was ambivalent about the change at first, well, after I realized that there was a change and that my Magic Trackpad hadn’t broken. But I’m changing my mind. I’m inclined now to think that this change was a big mistake.

Apple apparently justifies this behavior in part by comparison to the way things work on the iOS, the operating system running on your iPhone or iPad. On these iOS devices, you don’t use a remote pointing device like a mouse or trackpad, indeed, you can’t use a mouse or trackpad with an iOS device because the operating system apparently doesn’t support them. (By contrast, you can add a bluetooth keyboard for typing.) These devices have touch screens, and when you put your finger on the screen, it’s as if you are grabbing the content on screen directly and moving it. On an iOS device, this makes sense. I’ve been using a mouse and a trackpad for a quarter of century and during that entire time, scrolling up moved content up and scrolling down moved content down, where on the iPad, to go down on a page, you grab the page and pull up, and to go up, you grab the page and pull down; even so, when I got my iPad, I never had a single second’s hesitation about knowing how to scroll, or rather, how to move the content on screen (since “scrolling” on an iPad doesn’t seem like quite the right term). It was a non-issue. And for seven or eight months I lived very happily with a contradiction that I was never even aware of: on my iMac where I use a Magic Trackpad, I was pulling down to go down on a page, while on the iPad I was pulling up. I never noticed that my fingers were moving in opposite directions on the two machines.

Until I installed Lion.

.

Which way is up?

In his terrific review of Mac OS X.7, Ars Technica’s John Siracusa comments briefly that one problem with the change in scrolling direction is that it makes us use our hands in an unnatural way. He says that we scroll down much more often than we scroll up (because we read web pages from top to bottom, not vice versa) and says that our fingers find it easier to bend inward (pull down) than pushing out. That seems intuitively right, but I’ve been pushing my fingers up to scroll down now for many weeks and it ain’t all that hard. I haven’t gotten sore fingers from doing it, and I sit at my computer all day long.

I think the problem lies elsewhere.

As I see it, the problem is that the new movement introduces a serious contradiction into the way our pointing devices work on the Mac OS. It’s not a contradiction with the iOS: as I said at the start, that contradiction — well, that difference — between the iOS and the Mac OS has never been a problem. The contradiction I’m talking about is within the Mac OS. The contradiction becomes apparent when you ask, what does the pointing device do? Most of the time it controls the on screen pointer — the arrow or insertion point. And if you want to move the arrow or insertion point up, you push your fingers up. That is intuitive and natural. The content on screen stays put, and you move the pointer. But with this scrolling change in Mac OS X.7, the pointing device now gives you the ability to move the content on screen. Note that when you scroll, the pointer doesn’t move. Anyway, now, when you use one finger to control the pointer on screen, you pull down for down and up for up, but when you use two fingers to control content, you pull down to go up and push up to go down. And while you control content, the on-screen pointer (arrow or insertion point) just sits there.

.

What does “scrolling down” mean?

By the way, I want to note that there is a little confusion here caused by language, but I think it’s not the real problem. We have for a very long time used the terms “scrolling down” and “scrolling up” incorrectly, or at least in a way that is at variance with their use in the world of concrete things. If the web page were really a piece of paper suspended between two sticks and wrapped around one or both of them the way old-fashioned camera film is connected to its reels, then to read the end of a long page, we would scroll up, that is, we’d move the paper so that more paper is wrapped around the upper stick. The paper needs to be moved up so that we can see what’s down below. It’s interesting that on the computer we don’t talk about it that way. If we want to get to the last paragraph on a long page, we “scroll down.”

Anyway, I want to emphasize that, while the language problem makes it a little harder to talk about this issue, the problem is not fundamentally one of language.

.

Tertium quid

Note that there are a couple of behaviors on the Mac OS that brings the two behaviors just mentioned (moving the pointer and moving the content) into a kind of conflict.

Consider, for example, what happens when you grab something and want to move it to another part of whatever context it’s in. For example, say you’re in the Finder looking at a folder in list view and the folder has a lot of documents in it as well as other folders, more than can be seen at once given the current height of the window. You grab a folder or document at the top of the list and want to move it to some position later in the list, below what you can see right now. On the pointing device, do you pull down or push up? The answer is, here you pull down. When you get to the bottom of the visible part of the list, the window will automatically start to scroll to show you more content. Viewed very technically, this makes sense, because dragging and dropping is a one-finger action, not a two-finger action, so if what really mattered was making sure that things work consistently for N fingers, then this is okay. But of course our brains don’t think like that at all. We don’t think to ourselves, if I let go of the feather in my right hand, it’s going to fall down, but if I release it from my left hand it will float up, because the laws of nature work differently when I change hands. You could get used to that sort of contradiction, I suppose, if you had to. But it would still be a contradiction.

An even more striking example of conflict, I think, occurs when you work with a drop-down menu. Working here in WordPress.com’s editor, I use a paragraph style menu to format my section headers. To get the menu to appear, I have to click on it; then I move the pointer down (pulling down with one finger on the trackpad) to move the pointer — that is, the hot spot that I control with the trackpad — into the menu listing. Now, since the paragraph style I want (say, “H5″) isn’t visible in the short menu at first, I have to change the direction my fingers are moving on the trackpad to make the list show me the items at the end of the list. I switch to two fingers to scroll the listing, and for some reason that doesn’t bother me; what bothers me is having to change directions.

Now, notwithstanding the attempt to make the Mac OS work like the iOS, note that they aren’t alike at all in a very important sense. There is no pointer on the iOS, no remotely controlled “hot spot”. You never see an arrow on screen. Instead of an arrow, you have the tip of your finger. This is part of what makes the iOS so easy to use: you experience the touch screen in a very direct way. There is no intermediate pointing device. Alas, Apple seems to have forgotten that that is still not the case when you’re working on a Mac.

If (or when) Apple releases Macs with touch screens, then everything changes. But the problem now is that a pointing device is not a touch screen. Using the pointing device used to seem natural. Now, at least when you’re controlling content (with two finger gestures), it’s unnatural, like trying to use a mechanical grabber arm to pick up a toy, while looking at what you’re doing in a mirror. John Gruber and others have observed that Apple is trying to make things less abstract in the Mac OS. I agree and I would add that Apple has been trying to do this since the Mac was first released. But to paraphrase Einstein, things should be made as concrete as possible—but not more so. The pointing device is necessarily and inevitably an abstraction. It’s a remote control arm. Trying to pretend otherwise is, well, crazy.

.

Mouse vs trackpad, and the on-screen pointer

I want to comment on two other small items.

First, my completely unscientific sense of things is that the new behavior is a little less disconcerting if you use a Magic Trackpad (as I do most of the time) than if you use a mouse. To put it simply, the trackpad provides a more tactile, less abstract experience than the mouse.

Second, I wonder how I’d perceive this problem if Apple simply made the on-screen pointer disappear when I use two fingers to move content around. I’m not sure, but I think it would help. The on-screen pointer is a control point. But there is no reason for it to be visible when I’m moving content around with two fingers. It’s a distraction, a reminder that, if I were using just one finger, I’d be pushing instead of pulling or vice versa.

.

What do I do now?

It’s a strange mistake for Apple to have made. The way things work now “fixes” something that wasn’t broken. Even so, I thought I’d get used to it fairly quickly. I haven’t. Now I am struggling with the question of whether to use the System Prefs panel to restore the old behavior, or stick with the new behavior and simply learn to think backwards. I am sure I can get used to the new behavior, eventually. When I’m taking photos, I don’t have to think at all about asking people to move a few inches to their right (meaning to my left). And I’ve been writing upside down all my adult life. But this might be a little harder because of the contradiction within the Mac OS that I just pointed out: you pull down with one finger to move the pointer down, but to move content down with two fingers, you push up. I may get used to it, but I don’t know that I’ll ever learn to like it.

Smart—and smarterer

The story in this article resonates for me.

Why My Mom Bought an Android, Returned It, and Got an iPhone

I  bought into Android when it first appeared: I had a T-Mobile G1. I rather liked it, partly because I am pretty committed to Google as a user of Gmail and Google Documents. When we moved from T-Mobile to Verizon (for dubiously better connectivity) I upgraded to a Droid Incredible, and I got a Droid Eris for my wife. Nice hardware.

But I deeply disliked the fact that the stuff on my Incredible was not the same as the stuff on my wife’s Eris—and neither was like the stuff I had on the G1 originally. I think that the G1 may have reflected Google’s intentions, that is, it may have been a fairly undiluted version of Android. But the makers of the Incredible and the Eris (companies whose names I am not even going to take the trouble to remember), apparently thinking that they know more about software than Google, screwed things up. The contacts app-cum-dialer on the Incredible was awful, made me angry every time I used it. And it was difficult for me to help my wife with occasional problems if I wasn’t right there with her, because her phone’s preinstalled apps were different enough from mine that I wasn’t really sure what she was seeing.

Anyway, a few weeks ago, having used the Incredible long enough to qualify for an upgrade, I traded it in (not technically the same as returning it). But unlike the mother in the article I linked to, I didn’t switch to an iPhone. Instead, I got some kind of basic LG ordinary “dumb” cell phone. I’m pretty happy with it.

I didn’t get an iPhone mainly because I wanted to cancel my data plan and cut my monthly bill from Verizon. But there are other reasons. The new LG phone’s battery lasts forever; the Droid Incredible’s was good for a day, maybe, if I didn’t use it much. I get better reception on the LG phone than I did on the Incredible. (I can use the phone in my house, for starters.)

And there are a couple reasons that have to do with Apple’s products. I didn’t want to upgrade to an iPhone 4 when the iPhone 5 seems to be just a few months away. And besides, I’m not sure I want an iPhone at all. If I decide I need portable connectivity, I won’t want it for my phone with its teeny display, I will want it for my iPad. So I’m enjoying the LG while I see how long I can go without adding 3G capability to my iPad. Everything I would want 3G capability for — maps, email, blogging — will be better on the iPad than the iPhone. The salesman at Verizon assured me that it won’t be long before the only phones available are smart phones. But until then I’m thinking I may stick with my “smarterer” phone.