I'm developing a quite large class (it handles creation of quite decent, dataset 20 or so temp-tables with corresponding relations).
It wil be on appserver side. Fullfilled from several procedures, or stages of process.
(It is for Mexico's Electronic Bill) (I'll open source it when finished)
I wonder, how is the best way to fill it. For instance, there are processes to define data of myself, my customer, items, etc. each item record fires 3 or 4 (sometimes 5) fill of other temp-tables, that's no problem.
Problem arises from one temp-table that has to be fullfilled with 20 fields or so. What's the best use case for creating a record of it... I think sending 20 parameters to this procedure is some cumbersome. Should I fill a local temptable, and send to procedure and then buffer-copy from one to another? i wouldn't like to define dataset outside of class, I want to encapsulate validation to the class,
I'll be reading tonight chapter 2 of OERA.
You should also read about Business Tasks (or Business Services as Peter referes to them here). The case sounds to me that with "yourself", customer, items, etc. there may be a few business entities which manage sub-sets of the data. The business tasks might provide the overall logic - and knows how to retrieve some bits first and then use keys of that data to retrieve the rest of the data.
Also the business task could be used to transform that data from your internal view to the Mexican standard electronic bill structure.
Architect of the SmartComponent Library and WinKit
I appreciate all input... and really sorry to have missed a clear idea of what i'm in front of at the moment.
The thing is this:
Having a sale given, I have to create an XML file to send to authorized supplier of certifying (PAC), so there is a clear specification of format (by www.sat.gob.mx/.../cfdv33.xsd).
So at the very moment that i'm about to get signed this document, have to get extended info about me (that is the seller), about customer, extended info about items, and then put all inside the dataset and XML-WRITE it, sign locally by SSL and my certificate and encription key, put the digest in a node inside same document and send this file to PAC so it's signed by them and get back the same file with an extra node with info about the signing, at this moment I know the document was authorized (it could be the case that it is rejected!!!), so have to make data permanent and store the signed xml.
The XML has info of about just one sale, so it's one header, and several child rows (in my case is really small amount of child records, not more that 10) each item has 2 or three related records. So it's not massive. 2019 law, will force me to make 30 bill documents, each with 1,000s rows, so that _wil_ be really big. The authorities sell us the idea of fiscal system in Mexico is most advanced in the world... not sure, but....
So this is somewhat broader panorama of project at hand.
The mentioned 30 bills with 1,000's rows, is 30 of them a day, 363 days a year... /mind Jan 1st, and Dec 25th/
In two and a half years from now will be 200 bills a day. In five years will be 1,000 bills a day,, And I'm convinced I'm on the right platform and database...