How do you call into a Table Class

Sten-Erik Björling s-e.bjorling at enviro.se
Tue Jan 30 02:15:25 EST 2018


Hi Das,

My approaches are as follows:

- The data, process and information access is managed by objects - the table classes are called within the methods of the ”data object” class. This allows the information access routine to be more easily updated to get the data using SOA etc. since the methods can change within the object class without changing the parameters in and results out.

- The data objects are called using object references - saves memory which is important for solutions that are planned to be used in app server environments.

- I prefer using ”thin lattice” approach with as few inheritance steps as possible to increase readability and to minimise mistakes. Instead I tend to use ”utility routine objects” that are called as locally as possible by object references. Long term readability of the code is very important.

- Table classes are as small and optimised as much as possible - centring on the db-operations on a single table (insert, delete, update and serials management).

- I prefer entering the SQL myself, little reliance on schemas and query classes. Allows me to use tools for query optimisation tools for the server and it can also simplify the development of autonomous mobile clients that are reliant on SQL code.

- I instantiate objects as much as possible as local variables - when the routine is finished the object is deleted and its memory etc. is automatically cleared. Costs minuscule in performance but is very stable over time and minimises memory leaks.

- I use field references as much as possible - the results of db and other operations are directly delegated to the correct recipient variable by the data / process object.

- I aggressively use both SQL workers, push and session pools in combination with analysed use of "Yield to other threads" to optimise the use of processing power. Both SQL workers and session pools allows delegation of the operations to be delegated to different processing cores in the server system which increases performance.

Take care, all the best…

Stene

______

> 30 jan. 2018 kl. 01:42 skrev Das Goravani <das at goravani.com>:
> 
> Mayada, 
> 
> Why do you prefer the object class, and, the call is not the same because a table is INSIDE a row or list, the object is not, as far I understand, and, what about losing touch with your variables inside the window you’re calling from?  I can’t lose touch with them… I have yet to see how a table works out, I’m just trying it now… tables and objects… do they keep scope with variables in windows, declared in windows, or do you have to pass everything as parameters or references, that I am curious about.  Thank you for your valuable time. 
> 
> Das Goravani
> We both have nice names



Sten-Erik Björling
Enviro Data
Kyrkogatan 5A 2 tr
SE-972 32  Luleå
Sweden

E-Mail: s-e.bjorling at enviro.se
Mobile: +46-70-655 11 72
Wire: @stenerikbjorling
Skype: stenerikbjorling
iChat: stene at mac.com
FaceTime: stene at mac.com
Hotmail / Messenger: stenerikbjorling at hotmail.com
GMail: stenerikbjorling at gmail.com

______

This email and any files transmitted with it are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, please note that any use, distribution, or reproduction of the contents of this email is strictly prohibited and may be unlawful. If you are not the intended recipient, please notify the sender by return email and destroy all copies of the original message including any attachments thereto. Thank you.

Please note that we take reasonable precautions to prevent the transmission of viruses; however, we cannot guarantee that this email or its attachments are free from viruses. We only send and receive emails on the basis that we are not be liable for any loss or damage resulting from the opening of this message and/or attachments.




More information about the omnisdev-en mailing list