Modular Application Delphi

Asked

Viewed 697 times

3

I’m starting to work with modular applications in DelphiXE3, however I’m not finding much about.

Picking up a little something from here, I created a dll with a form and added it to a DLL. My question now is as follows: How do I call this formof my main application?

At first I’m only doing a few tests, once I can understand the concept of modularization, I have a whole project to make modular.

1 answer

3


The best way to modularize a Delphi application is through Packages, not Dlls. Packages are actually Dlls, but they carry rich typing information (which is not the case for a DLL), which is precisely what will allow you to create an executable and load existing objects into these Packages.

  • And how I would carry one Package in my application, and how to open a form of that Package?

  • Loadpackage and Unloadpackage methods can be used when the programmer chooses to have this type of work, but usually this is not the case. A Delphi app can be built with what’s called Runtime Packages, where the process of making the load and connections is fully automatic. Look for references regarding Runtime Packages.

  • I did some research and found some materials about it and I have already started to modulate my system. However another question arose. In a Unit that will be in one of the modules, I have: type
 TUsuario = record
 id:Integer;
 idEmpresa:Integer;
 usuario:string;
 foto:string;
 validade: TDateTime;
 senha:string;
 nome:string;
 admin:Boolean;
 ultimoAcesso:TDateTime;
 dataCadastro:TDateTime;
 end; e var
 usuario:TUsuario; That at certain times I will feed this variable and in others I will retrieve the information from it. My question: How to do this?

  • @Thiagothaison for every question try to use a different question. Avoid cascading questions.

  • Okay, thank you...

  • @Thiagothaison: Please, if you considered my response appropriate, mark the question as answered

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.