Table and Query Classes good or unnecessary?
I open this topic with this mood: Not to make a caustic discussion happen, but to find out what benefits these two class types give in a sober, calm way hopefully. Any responders are asked to keep it to the facts and leave out love of them, emotions, etc. Keep it only to the facts of what they do, what they offer, what can be done only with them, etc.
> Most love table classes. I find them redundant.
> Table classes = extra layer of complexity and increase your amount of classes = larger library.
> Query classes = a good way to make life harder.
I’m glad you came out and said this. I have heard this opinion from another very learned member of the community, but off list. As a student of Omnis (again) I try to find what the deal is with table classes and all I’ve come up with so far is that they do a con() for you, not a great benefit, a very small one, and they put you inside the row which changes your notation syntax to match that reality, not a great benefit but rather another layer thing to remember…to code differently there verse everywhere else. I have heard from one who espouses table classes that he has very little code in his own table classes. This is about it so far on what I’ve learned. I see no impetus to adopt them therefore.
As for Query’s, I hadn’t a use for them until I needed a list with fields from two tables in one list. I needed to define the list to include more than one table’s fields. I tried just defining the list but it won’t take schema classes as valid. I found the only way to define a list or row to contain more than one tables fields was with a query class. Am I wrong? How do you define a list with multiple table’s columns? Seems to me query is the only way. I must be wrong because I know there are some who don’t use them and they must need lists with more than one table in them sometimes.
I would like to hear comments on this issue. How to define list/row with more than one table and not using a query seems impossible to me right now.
In response to what else you said: I know about plain SQL verse using the Omnis function/commands $insert etc…at this point I use them mostly because I’m trying to get some distance covered, some features done, some app written, so I’m using what’s quick and easy. I know when I get into reports and more complex features I’m going to need to do joins and then I’ll be faced with query verse typing or choosing names from the catalog. I don’t yet see the harm of query classes, they seem like mainly a way to define a list with combined fields from multiple tables and that seems like a help not a harm. But I am not experienced at length with them or any of this, I’m an OmnisSQL newbie of about 2 months time max. I have an app largely written though…because I know Omnis the old from before.