From Filemaker to Xojo question

I have created a project in Filemaker and already decided during the development if it, that when it would be ready, I would recreate it in Xojo. There are problems in FM that simply do not seem to be solvable, like the error message on opening that “The primary file cannot be found…”, no rtf exports, no options to have the same record open in different windows without them becoming locked (are these things btw an issue in Xojo?).

After 1 1/2 year development, the FM app is beta ready, so time to take a look at Xojo.

Using the FM solution as starting point, I would like to keep the same design. The app has a single window with a buttonbar on top. Each button opens another layout which has its own text fields, portals buttons etc. How would this translate to Xojo?

How do I create something like a FM portal in Xojo?
Is the use of Tables the same as in FM?

time to look at Aloe : https://aloe.zone
or as first step look at the EddieElectronic App in the xojo examples folder.

I choosed a different approach : rebuild from scratch.
I do not like the filemaker interface, too rigid.
so I made a full multi-window database interface entirely in Xojo.
it took me one year to have some working prototype, and a second year to perfect it.
in the third year, I’m still adding possibilities and libraries, following customers requirements.

Thanks, I will have a look.

Is there an overview somewhere that compares elements of FM with the equal elements in Xojo? I remember seeing this somewhere, but cannot find it.

I assume Xojo also makes use of table, portals etc as FM does? I need to lay the table foundation first I assume as I did in the FM project, but I do not see a way to do this in Xojo.

All databases use tables. Which database are you going to use? There is no anchor-buoy nonsense in Xojo, though.

Xojo doesn’t have portals. You would load a record into TextFields. A portal could be loaded into a Listbox.

Unfortunately, Xojo doesn’t have a simple database library. The Eddies Electronics should get you started. If you are more familiar with Xojo you can look at ActiveRecord and Argen (https://bkeeney.com/highlight/argen/). It’s not a silver bullet. For my uses I found it too complicated.

Thanks. I think it’s best to get through the basic tutorials first. It’s very tempting to skip that after having spent 1 1/2 year on a FM project and now hoping quickly to create a Xojo project out of it.

I did the first 3 getting started project yesterday and was surprised to see how easy it is to make things work, that’s give me hope! My FM solution is using pretty basic things, all the elements are already used in the Xojo “getting started” projects. The only thing that is missing is a way to get the added information stored so it’s still there when reopening a project. I assume that is where the use of tables comes in that is not being demonstrated in the getting started projects?

Do you mean preferences for an app? I don’t think that there is an example project.

Are you a Mac or are you a Windows?

I work on a Mac.
No, I mean that when I run for example the Task manager app that is used to get started in Xojo, and I add some tasks, then close the app and open it again, that information is gone.

Whatever data your app or an example uses it must be saved to a file, a database or a preferences file. When you run it again the data must be loaded from the file, the database or the preference.

It really depends on what you want to do and how much data you have. Windows positions and the like are good for preferences. I have a complex setup data that in an upcoming version of my app will be saved to a database with 5-6 tables.

For preferences on macOS you need to use a specific API. You can use macOS lib (is this the latest version? https://github.com/macoslib/macoslib). It’s a huge library that isn’t very easy to use. Or you use the MBS plugin (https://www.monkeybreadsoftware.net). It costs money. Don’t let you tell that you don’t need the plugin. It will greatly speed up your development time.

My FM app is for developing and writing stories. So I have a table for saving character information (text and pictures), another table for saving the written story information etc. Things like window positions and size are saved in a preference table.

So do I understand correctly that Xojo does not have its own build in ways of storing this kind of information and it relays on third part plugins?

You can either use macOS lib which is free or you can use a plugin which costs money. Or you can roll your own which may not work in future versions of macOS.

No built-in way.

Third Party ?
This is up to you: your choice.

Or, at close time, you store these details into a preferences file and reload them at open time (if some exist). It is up to you to set whatever preferences you want.
Look at Jean-Yves screen shot (far above):
you can set a one color line background color (as well as two or three or),
You can set the window(s) location(s),
You can set if a window is open or not,
You can set the Sort as it was previously,
You can even display the Listbox row as they were before closing (display Row #144 at the Listbox Top).

Most of the time, you cannot do something because you do not think at that something / do not think that something is possible (even if this is possible).

In your browser, put the following:

site:documentation.xojo.com FileMaker

and follow the best looking answers. :wink:

Edit:
You will love this link:
https://documentation.xojo.com/topics/migrating_from_other_development_tools/migrating_from_filemaker.html

Thanks. Filemaker was my first encounter with programming so I have no other understanding from database, tables etc than from what I learned in FM. Terms like macOS lib and API do not mean anything to me and how these things relate to Xojo. I will have to read up a lot to see everything in context before I can use Xojo, it seems. Still, seeing how easy it seems to gt something to work gives hope. I will need time to fit all the puzzle pieces together.

It would help to see a video where someone builds something like a contact/employees kind of database from scratch so I can relate that to what I am planing to do in my own project.

[quote=441101:@Emile Schwarz]In your browser, put the following:

site:documentation.xojo.com FileMaker

and follow the best looking answers. :wink:

Edit:
You will love this link:
https://documentation.xojo.com/topics/migrating_from_other_development_tools/migrating_from_filemaker.html[/quote]

I do indeed love this page, thanks!

The ease in both Filemaker and Xojo are deceptive. In Filemaker I hit a hard wall and couldn’t continue. In Xojo you can do a lot more. But then things can progress from simple to complicated.

Xojo is far more flexible. But you’re also responsible for doing more of the work. To give an example, in FileMaker a layout is linked to a table. So you don’t have to write any code to navigate, display, edit, or save records in the layout.

In Xojo you are responsible for writing the code which: creates, retrieves, updates, and deletes records from the database; maps record data to and from controls in a window or web page; and responds to user actions like clicking Save or Next. Of course that means you’re not limited in the same ways as FM. You can display the same record in a hundred windows if you like. Or, when using a database server like Postgres, you can have a thousand users editing records.

Clicking a button in a toolbar might open a new window, at which point (Window.Open event) your code would retrieve the record(s) for that window and set the controls.

Xojo doesn’t have the concept of a “portal” per se. You would simply retrieve related records or data and set the appropriate controls.

Yes and no. The concept of a table is common to most databases. But the specifics, such as data types, are going to vary based on the database engine you choose. It won’t be as easy as FM but it will be far more flexible and powerful if you need it.

You can store any kind of information you want with Xojo. But you are responsible for the code which reads and writes said information, including mapping the information to a UI or to an action which should be taken. How you store that information is also up to you: SQL database, disk file (JSON, XML, or some custom format), registry on Windows, etc. It’s lower level than something like FileMaker, but as a result it’s far more flexible. Third party plugins aren’t necessary for your main data or for auxiliary data like preferences, though they can save you time.

What is a FileMaker Portal ?
(either I forgot or that do not comes in the firsts FileMaker versions)

You can simply store a file in the correct location (~/Library/Preferences). The format of that file can be whatever you like. Plist files are common but you can use XML, JSON, SQLite, or a custom text/binary format. I see all variations in my ~/Library/Preferences folder.

Having said that…

You’ve created a database application in FM, so naturally the Xojo version is going to be database driven as well. It may make sense to store things like window layouts in a table of the same database as the stories. There is a catch: if the database is ever going to become multi-user client server then you would need to tag preference records by user. If I’m a user and I login I want my windows to assume the positions I set and not the positions someone else set.

[quote=441110:@Emile Schwarz]What is a FileMaker Portal ?
(either I forgot or that do not comes in the firsts FileMaker versions)[/quote]

If I remember correctly, FileMaker’s method of displaying related records in a layout. An example would be a layout which displays Customer specifics, and at the bottom has a table with related Orders.

Thanks for so much good information to get me started. Today I watched some tutorials about windows, the listbox, creating Container controls and page panels, toolbars and the MainMenuBar. After that I did set up the windows, menu and toolbar for my project as I had made in FM.

Just wondering: what is a common window size setup? I went terrible wrong in FM at the start by creating my own larger window size and the windows turned out far too large. I had to redo all the layouts after that.

Xojo opens at 600 * 400, which looks very small to create layouts on. There is also the issue that every user will have another Display setting. How do I take this into account with the window sizes in Xojo?