Jump to content

Some basic stuff


adragan

Recommended Posts

Hi Fershad

 

I have some basic questions for you.

 

1. In Delphi one can either create all the forms at the start of the program and then show/hide them

accordingly to the application logic, or create the forms when needed and free them after they

are not needed anymore.

It seems to me that UniGui works diffrently. Application creates them all at the start.

Even if you free them you don't have to recreate them the next time. You just call show.

Please comment.

 

2. In a previous message I read that the database components should stay in the UniMainModule

which is a kind of a DataModule container. Everythine ok till now .

For a test I tried to put queries and tables on frames and the application still works even when the

database components have the same name for diffrent clients( sessions).

Putting the database components on then MainModule is a must or a reccomandation ?

 

3. For various reasons I had to move Apache from listening on 80 to 8090.

Application started but any button pressed gave the same message "Server not available".

Is there a setting for the isapi.dll so that the application responds ?

Link to comment
Share on other sites

1) if I'm not wrong, the forms are not created at runtime, and what you do when you call each of them is to use the function with the same name, this function creates an instance of that object.

2) No is necessary set the DB components in the UniMainModule, but is most recommended.

3) Already tried change the port in ServerModule-->Port?

 

 

I hope to be useful

Link to comment
Share on other sites

1) if I'm not wrong, the forms are not created at runtime, and what you do when you call each of them is to use the function with the same name, this function creates an instance of that object.

 

You are probably right but this leads to the necessity to free all the instances after you don't need them anymore.

OnClose -> Action = caFree;

Otherwise they will hang aroud until , hopefully, the closing of the session will kill them.

 

 

2) No is necessary set the DB components in the UniMainModule, but is most recommended.

 

Normally I put all the common logic/functions in the DataModule.

For the presentation layer I prefer to put queries on the form so I don't overcrowd the MainModule.

 

3) Already tried change the port in ServerModule-->Port?

 

I'll try that, thanks !

I hope to be useful

Link to comment
Share on other sites

  • Administrators

Hi Fershad

 

I have some basic questions for you.

 

1. In Delphi one can either create all the forms at the start of the program and then show/hide them

accordingly to the application logic, or create the forms when needed and free them after they

are not needed anymore.

It seems to me that UniGui works diffrently. Application creates them all at the start.

Even if you free them you don't have to recreate them the next time. You just call show.

Please comment.

 

unigui only creates MainForm at start. Other forms are created on demand.

 

2. In a previous message I read that the database components should stay in the UniMainModule

which is a kind of a DataModule container. Everythine ok till now .

For a test I tried to put queries and tables on frames and the application still works even when the

database components have the same name for diffrent clients( sessions).

Putting the database components on then MainModule is a must or a reccomandation ?

 

In a DB app generally there is one DB connection which is shared among other Forms in app. That's the main reason of putting DB connection on MainModule. Also it speed ups your app because there is no need to establish a new connection each time you create a Form instance.

There is no restriction on where you can place DB components. It is only a matter of design. However, in future we may develop pool for dataModules to save resources. In this case putting db components on dataModule will make a difference.

 

3. For various reasons I had to move Apache from listening on 80 to 8090.

Application started but any button pressed gave the same message "Server not available".

Is there a setting for the isapi.dll so that the application responds ?

Changing port with change your caller URL.

 

http://myserver:8090/myapp/my.dll

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...