I just realized

I’ve been using Glide since September 2020. I’ve learned a lot about how Glide works by reading the documentation, watching the videos, participating in the user community, searching google for answers. Some things are easy, others difficult to learn about and to understand. I think the difficulty is mostly because I haven’t come across explanations of a couple of concepts central to Glide that I can understand. There is also the issue that Glide is changing as it matures.

Some of these mismatches are due to the fact that I know a lot about procedural programming and expect things to work the way they have work in the past. This is not true for two reasons:

  1. Glide is new, and not all of the features that make previous systems usable have been programmed into Glide yet.

  2. Second, Glide intentionally does things differently. That is the entire purpose of Glide and so is to be expected. The problem is that explanations of new things are difficult to make understandable frequently because they are obvious to the person inventing them, but for people who have not been through the same thought process, these obvious explanations don’t always spark the same intuition.

Two examples I have come across are:

  • Relations: I suspect some of the intuition is derived from relational databases. From the current explanations (both documents and videos) I more or less understand what relations are all about. I have also developed some pattern recognition about situations where relations are most likely the mechanism to achieve what I want to do – but I never feel totally confident. What is the solution: I believe additional explanations, demonstrations, and use cases by Glide users who are not part of the development team are needed.

  • Glide Data [Editor]: Note: I am going to shorten Glide Data Editor to Glide Data so that the cadence of reading about Google Sheets and Glide Data is a little easier.

    I am a little confused about the relationship between Google Sheets and Glide Data. It is clear that mastering Glide Data is critical to using Glide – but I think the importance of Glide Data has increased as the development of the system has progressed. It feels like there is an overlap in functionality between Google Sheets and Glide Data. I suspect someday Glide Data will totally replace Google Sheets in Glide and in the future, the relationship will only be that Glide Data will be able to import/export from/to Google Sheets. But taking on all of the capabilities of Google Sheets would be a mistake for a small company, so we have to accept this shared responsibility for data in Glide between Sheets and Data Editor for the time being.

The current question I have is about the purpose of the Glide Data after you have initially loaded data into your app from a Google Sheets file.

[Note: I don’t believe everything below is absolutely correct and this is a cause of some confusion for me right now]

It appears that currently there are:

  • Certain things that can be done only in Sheets: e.g. entering and updating raw data.

  • Other things that can be done in Google Sheets or the Glide Data Editor – but are easier to do in the Data Editor: create computed columns.

  • Still other things that can only be done in the Glide Data Editor: e.g. create relation columns.

The issue becomes which of the two editors do I need to use to accomplish a particular change:

  • How to describe each of the conditions that determine which Editor (Google Sheets or Glide Data) is correct?

  • There seem to be some conditions that can be done in either place: for example, if the Glide Data Editor sees a column in a Google Sheet that is similar to another column with the difference being the order of the items in the column. In this case, the Glide Data will decide that the column is actually a Relation and label it as such. It is also possible to explicitly use the Glide Data to create a column which is a Relation, defining which other existing column in the Sheet contains items in a different order.

  • I think it is the case that when the Glide app is running, all data references are to the Glide Data. The Google Sheet is only imported into the Glide Data at certain timed points or when you click on the refresh icon at the bottom of the left column in the Glide Template editor. And, I think there is almost no reverse interaction of Glide changing values in the Google Sheet. I say almost because I have seen a column in a Google Sheet acquire an indication of being a Relation after Glide has analyzed the Google Sheet and determined that two columns have this relationship with each other.

That’s all I got for now. Without an explanation about the unique purpose of each component of Glide, it gets quite confusing for a new user – one that will discourage some of the Billions of Users we hope to attract to Glide in the next 10 years.

I hope others who know more than I will make corrections to my intuitive understanding about Glide after using the system for the past 5 1/2 months.

During this time, I have really grown to love Glide and really want this company to succeed in building the next step along the path of making software easier to create. In graduate school, one of my officemates at MIT was Bob Frankston, who along with Dan Bricklin invented VisiCalc – the first spreadsheet program. Like spreadsheets, it took a while before people could converse efficiently about the terms and concepts of this new way of computing numbers. I consider Glide to be attempting to do for a class of applications (again, not sure what to call them) what VisiCalc did for another class of applications that didn’t really have a precise description in 1979 when it was first released.

Regards,

– Harry

5 Likes

There’s a lot to unwrap here, so I may come back to this and add more, but hopefully I can clarify relations a little bit.

First of all, glide will never automatically create relations from data coming from a google sheet…unless you are using the old header naming syntax to create a relation column within a google sheet (it’s a very specific way to to name a column heading where you specify the column name, the destination sheet, destination column, and whether it’s a multiple relation or not and I hope nobody uses that old method anymore because it is very confusing. That used to be the only way to create relations before the data editor ever existed.) What is confusing though, is that an array column (sequentially numbered columns that become combined as an array in the data editor) will appear like a relation and actually have the same icon in the data editor. Relations and arrays are very different. As a programmer, I’m sure you are familiar with the concept of arrays, so I won’t dwell on that.

Again, to stress, glide does not create any relations for you automatically unless you are using the old syntax for column headings that looked something like this EmailKey=NotesDetails:Email:Multiple. Again I hope nobody is using this method any more.

Relations are simply a pathway to related data. Both sides of that pathway need to have a common value to create the link. If you are familiar with SQL, it’s very similar to a JOIN clause within a SQL statement. If you are a little more old school (I work with RPGLE on AS400 systems, or whatever the hell you want to call then now days), the files on a 400 use the concept of Keys and Key Lists, and whenever you chain to a file, you are taking values, placing them in the key list, then using the key list to chain to the file. A chain is like a single relation and returns a single row of data. A reade within a do loop is like a multiple relation and will return all matching rows with that same key.

A relation in glide is like that SQL join or that RPG Chain/Read with a KeyList. In all of the cases, you specify column or values that you want to match up to in another table or sheet.

To touch on the use of Glide Tables vs Google Sheets, yes I would agree that there is some robust capabilities within google sheets. Some things are only able to be done within google sheets. Some things you can do in the google sheets as well as in the glide data. There are a handful of things that can only be done with the glide data. If you really wanted to could have google sheets handle absolutely everything from data storage to calculations, however, data calculated in a google sheet will have a delay to sync data from google to a duplicate of the data on the glide server, and then to each user’s device. It works, but there is a noticeable delay that could ruin the whole experience for the user. When you do these calculation using glide’s computed columns, then the experience is much faster because the google sheet becomes essentially a data backup but the data in the data editor is right there ready to be worked with in real time.

I also want to stress that any computed columns (basically any columns created in the data editor that don’t hold data and aren’t synced to a google sheet) are actually computed directly on each user’s device. So any columns, such as relations, lookups, math, template, etc. all do that computation directly within the copy of the data on the user’s device. None of that calculation happens on glide servers or google sheets. Because of that, an app can be quite a bit more responsive and quick. Otherwise, updated data would have to sync to glide servers, then sync to google sheets, then calculate, the sync back to glide, then sync back to the user’s device. It would become too much of a delay to the user and ruin the experience.

I think you questioned the relation between a google sheet and glide data. The data will always be synchronized. It may be be instant, but usually within a few second, both data bases will update each other. Sometimes it can take up to a few minutes, but it should always be expected that the basic data will synchronize at some point. Clicking on the reload button, just shortcuts the time and makes it happen faster. Unless you are using a pro app and have the refresh setting turn on to ‘While editing or using the app’, the data will otherwise synchronize only when data changes either on the google sheet or in the glide app or data editor.

I think I covered most of your questions briefly, but I’d be happy to try to clarify certain parts if you have questions or if you have a specific example in your app where things are not quite clear.

5 Likes

Jeff, thanks for taking the time to write this… I have had similar questions and frustration.

Agreed!. To this, I would add that the data bubbles (which contain Related values in a Relation column) are also quite confusing. Unless I’m mistaken - there’s no real logic to what Glide is showing in the Relation Column. My solution is to trust that it got it right and ignore what it’s showing me in the Data Editor, then go to a Component to see if my Relation is really showing what I expect.

I have a small amount of experience with SQL, and yet relations in Glide leave me a bit unsettled, too (like Harry).

I appreciate that Glide is a fast growing and evolving product. However, I would add that I think the documentation in the Glide Library is way too short on the “why” - many of the explanations feel more like a demo, than a tutorial. I may be an outlier, but as a systems engineer, I do best when I understand what a component is actually doing - beyond just the rote learning of how to elicit a desired outcome. Clearly, that’s contrary to the target demographic Glide shoots for. But a bit of balance would be appreciated.

Anyway, thanks for this. The community here is fantastic and there are more than a handful of really generous and helpful users here who are the only reason I’ve stuck with the product. That’s not a shot at the Glide team - it’s just my way of saying that the ‘official’ documentation is wanting. If I had to rely just on the Glide Library, I would have given up and moved on after a few weeks.

5 Likes

Yes, this should be improved. The bubble is supposed to represent the entire related row, and the logic for what we display in the bubble is “show the value from the leftmost column in the row”—ideally, you’d tell us which column contains the name (and photo!) and we would render a better bubble.

5 Likes

I see the Glide library as a handy reference. For deeper learning, I rely heavily on the community, which almost never fails to deliver. I’m sure you’ve already noticed, but almost any tutorial from @Robert_Petitto is well worth your time, and I’ve come to view @Jeff_Hager as somewhat of a personal mentor (although he might not be too happy to hear me say that :joy:). But they are not the only ones - the level of support, encouragement and (free) advice on offer here is truly amazing.

4 Likes

:blush:
And ditto with the Jeff-Hager-as-your-mentor comment. It was he who helped me think through some innovative ways to use relations in my first complex gamification app. You want out-of-the-box thinking paired with clear explanations?—look no further than @Jeff_Hager

6 Likes