Table and Query Classes good or unnecessary?
Hi Das & Co,
> 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.
My main reasons to use object classes and avoid table classes are:
1. Many extra (redudant?) classes
As you have to have at least 1 table class linked with each schema class, there will be 100+ extra classes to manage for me. If the table class were built into a schema class, it should be smarter IMHO.
Meaning the more classes the harder to search and maintain (400 normal classes (windows, objects etc) + 100 extra table classes)
2. Orphan table classes
Many of my queries uses several schema classes. Very common.
This means that you cannot logically link this table class to one schema. You have to use ”Orphan” unlinked Table Classes (In my world these are equal to Object Classes)
OR link this multi shema table class to a random schema class.
SELECT id, name FROM table 1
SELECT id, name FROM table 2
Meaning the main reason to use table classes is broken.
3. SQL support
Using plain SQL it is easier to get qualified support via StackOverflow. SO members cannot even spell to Omnis Studio.
Omnis Support are good at basic SQL, but it is not their cup of tea. But beyond basic is StackOverflow outstanding.
Meaning that mainly doing all in plain SQL it is easier to also communicate with professionals outside the Omnis community.
My main reasons to avoid query classes are:
1. Non standard approach
A query class to me is equal to a Postgresql view. I e a stored query you can re-use (= views are simpler than and not equal to a Postgresql functions). But Omnis makes views = query classes hard to understand. Backward SQL?
I find the Postgresql build in views are way simpler to understand, use and maintain.
SELECT * FROM table1_view WHERE id=1
Meaning that I do not understand ho to use query classes.
The table classes seems to be very good and smart, so it is more of programming style if you use them or not.
But query classes IMHO are very hard to understand and maintain. Use Postgresql views instead = very smart and way simpler.