4D Satellite-Client


Inhouse läuft eine 4D Client/Server-Anwendung. Diese ist seit Jahren gewachsen und zuverlässig. Nun sollen die Techniker einen mobilen Client zur Datenbank bekommen. Morgens, nach der Tagesbesprechung, ziehen sie die Tagesaufträge vom Server aufs iPhone und sind dann den Tag außer Haus, beim Kunden. Dort

  • wählen sie den Auftrag aus den Tagesaufträgen aus und sehen die Auftragsdaten,
  • sie klicken die Anfangszeit,
  • scannen die Barcodes der aufgestellten Geräte,
  • markieren ausgeführte Arbeiten und
  • klicken die Abfahrzeit an.
  • Für kurze Notizen sind ein paar Zeilen vorgesehen.

Zum Feierabend werden die über Tag erfaßten Daten in die 4D Client/Server-Anwendung überspielt.

Wir schreiben einen Web-Client mit einem optimierten Formular und nutzen den Browser des iPhone als Frontend. Leider ist auch in der Großstadt nicht immer Netzabdeckung vorhanden. Besonders nicht auf Baustellen und nicht tief im Keller oder in der unterirdischen Parketage. Ein Web-Client am 4D Server müßte diese Aussetzer überbrücken, ohne den Techniker nach einer Netzverbindung suchen zu lassen. Ein normaler Web-Client löst diese Aufgabe nicht.

Ein Satellit kreist um meine App. Ab und an wird kommuniziert
Ein Satellit kreist um meine App. Ab und an wird kommuniziert. Satellit von misirlou

Ich brauche einen Satelliten-Client zum 4D Server. Das ist ein Client, der Kontakt zum Server aufnimmt, sobald er hinter dem Mond vorkommt. Hinter dem Mond arbeitet der Satelliten-Client autark. Von 4D gibt es keine Satelliten-Client Lösung.

Die erste Überlegung führt zur WebApp, also eine HTML-Seite, die aussieht wie eine App und Daten zwischenspeichert (localstorage). Die WebApp müßte sich die Auftragsdaten am Morgen holen, über Tag die Daten zwischenspeichern und am Abend die Daten des Tages an die Basis zurückliefern. Der einfache Part ist die Gestaltung des Formulars, aufwendiger wird die Zwischenspeicherung der Daten. Webformulare haben begrenzten Zugriff auf die Kamera und die Sensoren des iPhone. Eine zusätzliche Hürde: WebApps sind im Datenvolumen begrenzt. Werden 5 MB überschritten, wird nachgefragt und selbst mit nachgefragter Erlaubnis sind maximal 50 MB Daten möglich.

Die zweite Option ist eine eigene Satelliten-App mit Xcode zu erstellen. Wenn der Aufwand vom Budget des Projektes gedeckt ist, ist das eine gute Option. Eine Hürde hier: wenn die eigene App nicht über den AppStore vertrieben wird, wird sie über TestFlight als Beta Testing aufs iPhone installiert. TestFlighting hat seine eigenen Grenzen.

Die dritte Überlegung ist eine App zu finden,

  • die von mir gestaltete Formulare nutzt und mit Daten füllt, die
  • die Kommunikation mit meinem 4D Server beherrscht, die
  • angelieferte Daten annimmt und erfasste Daten speichert und
  • die Kamera einbindet, um Fotos aufzunehmen und BarCodes zu scannen.
  • Zugriff auf andere Sensoren ist ein Plus.

FormEntry
Gefunden habe ich FormEntry von WidgetPress.

FormEntry sind zwei Apps: FormEntry und FormEntry touch.

  • FormEntry ist eine Mac-App 1 mit der die Formulare gestaltet, die Datenstrukturen und Relationen angelegt und die Verbindung zu meinem Backend einrichtet werden.
  • FormEntry touch ist die iOS-App, die meine mit FormEntry gestalteten Formulare ausführt.

Arbeitsweise

Auf dem Mac gestalte ich mir Formulare mit FormEntry. Jedes Formular-Element bekommt einen Objektnamen und eine Beschriftung. Das Formular schicke ich zum iPhone oder iPad. FormEntry touch listet mir alle geladenen Formulare auf. Ich wähle ein Formular aus und trage neue Datensätze ein. Die bereits eingetragenen, die gesendeten und die verworfenen sind ebenfalls aufgelistet und können nachbearbeitet, erneut gesendet, im Papierkorb gelöscht oder in einen anderen Ordner verschoben werden.

Will ich die Formulare vorfüllen, lege ich Datentabellen in FormEntry an. Damit weise ich FormEntry an SQLite-Tabellen zu erzeugen, incl. Relationen wenn gebraucht. Formular-Objekte lassen sich über Regeln mit den Datentabellen verknüpfen und befüllen.

Meine 4D-Anwendung und FormEntry touch tauschen über HTML und/oder JSON Daten aus. So kann ich die Formulare aus 4D vorfüllen und die mobil erfaßten Daten in 4D annehmen.

Aufwand

Ich schreibe hier über FormEntry der Version 2.4 für iOS 7/8, neu in 2014 mit einigen Updates seit dem. Eine V2 hat die Geburtswehen hinter sich, sie hat noch lange nicht die Reife einer V15 und auch nicht den Komfort. Es braucht seine Zeit sich in das Konzept von FormEntry einzudenken und die Kommunikation mit 4D zu schreiben. Wir haben das als 4D-Komponente gelöst.

FormEntry touch schreibt mir ein Protokoll, so daß ich Fehler suchen und beheben kann.

Kommen Sie alleine nicht zurecht oder möchten Sie schneller zu Potte kommen, dann melden Sie sich.

FormEntry InApp-Käufe
Ich empfehle All Controls und All Transmittals zu erwerben.

Lizenz

FormEntry kostet nichts in der Grundausstattung. Weitere Controls (Oberflächen-Elemente) und Transmittals (Kommunikation und Datenformate) werden einzeln oder in Packeten als InApp-Käufe erworben werden.

FormEntry touch kostet nichts, keine InApp-Käufe nötig.


1 Rezensionen im AppStore Für mich als 4D Entwickler ist FormEntry genau der Satelliten-Client den ich heute brauche. Das sahen die Rezensenten anders. Von ihnen hat niemand Bedarf an einem Satelliten-Client. Glücklicherweise habe ich mich von deren Unverständnis zu was FormEntry zu gebrauchen ist nicht beirren lassen.



The in-house 4D client/server app is doing well and reliably for years. Now we want to outfit the service-people with a mobile-client. Every morning they’d download the schedule and stay outside all day. At the client-site they’d use their iPhone to

  • select the project from a list of the current projects and see additional data
  • click for start of work
  • mark the executed work
  • scan barcodes of set up machinery
  • take some photos of the site-conditions
  • click when leaving.
  • If necessary they’d jot down some notes.

Back in the evening the mobile client would transfer the collected data to our 4D client/server app.

Usually we’d install a web-client, i.e. a simplified form and use the browser as client to the server-app.

Unfortunately even in major cities a reliable network-connection is not available et every site, especially not at construction works or below the main floor like in parking garages. A web-client would need to compensate for that situation, without urging the technician to keep the webpage open while searching for a connection. This is unachievable with a standard web-client.

Ein Satellit kreist um meine App. Ab und an wird kommuniziert
A Satellite orbits around my 4D app. By and then, communication is possible. Satellite by misirlou

Needed is a 4D satellite-client. A client that contacts the server when leaving the area behind the moon and being stand-alone when behind. 4D doesn’t offer a satellite-client option.

First idea. Construct the web-client as a web-app, which is a HTML-page which looks like an app and supports local storage. This web-app needs to load project data before leaving in the morning, store collected data during the day, and sends the data to the server at night. The simple part is the form itself. More work is to be invested into storing data locally. Accessing camera and other sensors from a webpage is no trivial task. Then there is the storage limit of 5 MB. The user is asked for permission to expand the local storage. Even with permission there is a maximum of 50 MB of storage.

Second option. Build a native app. If budget fits, this a perfect option. There are still some hurdles. If the app is not released to the AppStore or doesn’t comply to the AppStore-rules, the app needs to be installed by the means of beta-testing via TestFlight. TestFlighting has it’s own limitations.

Third idea is to find an already released to the AppStore App that

  • runs forms I created and fills them with data
  • talks to my 4D server
  • loads data from server, stores and collects data locally and
  • accesses the camera for taking photos and scanning barcodes.
  • Offering access to other sensors is a plus.

FormEntry
I found FormEntry, a product from WidgetPress.

FormEntry is two Apps: FormEntry and FormEntry touch.

  • FormEntry is a Mac-App 1 to create forms, to define datastructures and relations, and to define the kind of connection to any backend.
  • FormEntry touch is a iOS-App, which runs FormEntry-forms.

How does it work

On Mac I create forms with FormEntry. Every form-element gets an object name and a label. The form is sent to iPhone or iPad. FormEntry touch lists all forms loaded. I select a form and enter new data. Already entered data is listet as draft, send, or trashed. The collected data can be edited any time, send again, or moved into another folder.

To fill a form with data, I need to define data tables in FormEntry. Creating a data table instructs FormEntry to create SQLite-tables and relations between the tables, if necessary. Rules connect selected rows with form-objects.

My 4D app and FormEntry touch exchange data via HTML and/or JSON. This is the means to prefill forms and receive mobile entered data.

How much efforts

I’m describing FormEntry version 2.4 for iOS 7/8 which was new in 2014 with a couple of updates since. This is already a V2. V2 means not as sophisticated as a V15 but beyond their first steps. It takes some time to understand the concepts of FormEntry and to write the code for the communication with 4D. We’ve done this as a 4D component.

FormEntry touch writes a protocol if instructed, to search for errors and do better next time.

If you don’t get up and running fast enough or don’t know why something doesn’t work as expected, ask.

FormEntry InApp-Käufe
I recommend to buy All Controls and All Transmittals plus the Excel-Transmittal if necessary.

License

Basic FormEntry is free to load and use. You can buy additional controls (UI-elements) and transmittals (Communication and data formats) single or packages as InApp-purchases.

FormEntry touch is the free runtime to execute FormEntry forms.


1 AppStore reviewers For a 4D developer as I am FormEntry is exactly the satellite-client I need. Those reviewers don’t need a satellite-client and didn’t understand that concept. Sometimes I don’t follow their advice, which was good in the case of FormEntry .