Achieving one code base with forms and windows
The link below downloads the example I used to present at a number of Euromnis conferences. A bit old but also fairly easy to understand. It shows how you can effectively delegate functionality between data and actor (process) objects between different deployment modes (fat and mobile) – including ultra thin html pages and web services.
Some notes though…
– This is old – working on and testing extended variants for covering sql workers, push and more advanced modularisation of solutions. A bit more complex but also significantly more performant and safe if you are aiming at server-based deployments later. Sending this example because it is fairly clear.
– In the example I do not use object references. At the time of the development of the examples object references where not stable. Have this in mind.
– I extensively use field references and also limit close to all data and process object operations to local scope to secure the proper clearing of memory.
– Minimal use of inheritance in these examples.
Good luck, take care and all the best…
> 7 feb. 2018 kl. 19:44 skrev Das Goravani <firstname.lastname@example.org>:
> So to achieve one code base while having fat client windows and remote forms that replicate each others functionality, one would use Objects and Table Classes to hold the code so that it’s not replicated in the form and the window, correct?
> Tables are best for that code which addresses the row or list it is related to because one does not have to do extra work to address said row or list.
> Object classes are repositories for code
> Once you have put your code that would be in the window or form, into object and table classes, one has very little code left in the window and form, just the calls to the code in the object and table classes, the passing of parameters too
> I think all of the above is correct. Is that correct?
> My question then is, I have heard someone knowledgable say that they instantiate their object classes into the form and window. Would this be to make calling into the object easier since it’s then an instance variable of the window? (I’m really out of my knowledge base now, completely unsure what I’m saying)
> How do you get the code you wrote in an object into an instance variable, is it by subbing it to the object you put code in… I’m not sure what subtype really does when it’s an object with code in it
> I want to move windows I have created (fat client windows) into being forms for iPads
> I have the windows done and working great.
> Now do I move the code to Tables and Objects for their respective qualities, make sure it all works, have to add ref’s and such things…then create my form replicating my window say, and call the code from it as well, with very little code left therefore in the form just like very little left in the window.
> Is this the overall idea ? Am I onto the path here of “one code base multiple platforms” correctly?
> My only question revolves around an unknown for me and that is what is the way to make the coding easiest…is it by putting the object somehow into the form and window…see I don’t know what subtype does…or do you assign your real object to an instance object…again this is only to make the code easier, otherwise I know I can call tables and objects without them being embedded in the window (tables can’t, I get that)
> OK thank you in advance,
> Das Goravani
Kyrkogatan 5A 2 tr
SE-972 32 Luleå
Mobile: +46-70-655 11 72
Hotmail / Messenger: email@example.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.