Constants in App or session

Wondering where to put the constants for db_name, db_host db_host etc? and why?
Is it correct to add these constants under Session when you expect multiple users to login each with different passwords and usernames?

If you are talking about constants, then anywhere. Properties though should be at the session level if they are going to be different.

Thanks a lot Wayne. Just started out with Web app so I appreciate it.

One more question…
So if I have

If mDb.Connect Then mIsConnected = True

Do I put ‘mDB’ and ‘mIsConnected’ as property of ‘Session’ and call it

If session.mDB.Connect then session.mIsConnected = true

Yes. That will create a seperate db connection for each session.

Awesome thanks Albin.

If I have a multiuser webapp do I have to add all properties to Session and call them that way? What about methods? I’m not quite sure. Is there some reading about this?

If methods are to be for each user, keep them in WebPages or Session. And do not use static, it would bleed to all sessions. Use properties if you need to keep a value between calls.

So if I have methods in a webpage, let’s say a method to delete and enable some textfields, this won’t affect another users who is logged into the same webpage and calling the same method, right?

Indeed. Each session instance has its own instances of WebPage, properties and methods onto them. Basically, the more encapsulation the better.

Don’t use global or app properties unless you want all session users to access them. Modules methods are alright, as long as they don’t use global or static properties.