BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Some 'newbie' IW questions (user session, data module)

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (IntraWeb)
View previous topic :: View next topic  
Author Message
Lauchlan M
Guest





PostPosted: Fri Apr 15, 2005 3:09 pm    Post subject: Some 'newbie' IW questions (user session, data module) Reply with quote



Hi

I looked at IW some time ago, but have not looked at it for quite a while
now (I've been using ASP.NET). So my questions are like newbie questions
again!

I created a couple of test apps, they went fine, but raised some questions

1. In the IW manual (p. 51) it suggests that the server controller contains
code like

TUserSession = class
public
end;

that you can extend, eg to include user details for the session.

The server controller in my test app (using IW 7.something) seems to have a
TIWUserSession rather than TUserSession, and this class does not seem to be
defined in the server controller.

Where should I define what data goes in to my user session?

Or is this done differently now - should I create my own class and somehow
put it in or associate it with a .data property for the TIWUserSession?

I see that in the USerSessionUnit, there is a TIWUSerSession defined -
should I simply redfine that one to something like

type
TIWUserSession = class(TIWUserSessionBase)
private
{ Private declarations }
// add username and secuirty level etc fields
public
{ Public declarations }
// add getters and setters for username etc
end;

?

Basically all I want to do is have a text username and security level, and
boolean LoggedIn value associated with the user session.

It seems the manual is a little out of date (but not as out of date as the
Falafel training manual, if that is still at IW 5.1).

2. I decided to hook up a data source to the web app, so I could look up
user details. Thinking that the IWUSerSession is a datamodule, I added some
database components to it, but it did not seem to like referring to them.

So I added a new (standard Delphi) datamodule and put my data components on
that.

Is this the right thing to do? Or are there problems with threading etc
using standard Delphi datamodules?

Is the IWUserSession a datamodule or not, and if it is, why can't I just put
my data components on that?

Thanks in advance!

Lauchlan Mackinnon


Back to top
Lauchlan M
Guest





PostPosted: Fri Apr 15, 2005 3:28 pm    Post subject: Re: Some 'newbie' IW questions (user session, data module) Reply with quote



Quote:
Where should I define what data goes in to my user session?

Or is this done differently now - should I create my own class and somehow
put it in or associate it with a .data property for the TIWUserSession?

I see that in the USerSessionUnit, there is a TIWUSerSession defined -
should I simply redfine that one to something like

type
TIWUserSession = class(TIWUserSessionBase)
private
{ Private declarations }
// add username and secuirty level etc fields
public
{ Public declarations }
// add getters and setters for username etc
end;

?

That seemed to work, anyway.

I take it that you always need to use the ServerController unit if you want
to refer to/use the UserSession, as that function is defined there?

Quote:
It seems the manual is a little out of date (but not as out of date as the
Falafel training manual, if that is still at IW 5.1).

2. I decided to hook up a data source to the web app, so I could look up
user details. Thinking that the IWUSerSession is a datamodule, I added
some
database components to it, but it did not seem to like referring to them.

So I added a new (standard Delphi) datamodule and put my data components
on
that.

Is this the right thing to do? Or are there problems with threading etc
using standard Delphi datamodules?

Is the IWUserSession a datamodule or not, and if it is, why can't I just
put
my data components on that?

Still unsure about this though . . .

Lauchlan Mackinnon



Back to top
Lauchlan M
Guest





PostPosted: Fri Apr 15, 2005 3:58 pm    Post subject: Also (using grids) Reply with quote



Also,

I seem to be having trouble getting a grid going . . .

I have a query in a datamodule, hooked to a datasource.

The grid is hooked to that datasource on the datamodule.

In the form I have the grid on, I do query.open in the IWForm.create
handler.

But, I don't see any data in the grid.

So obviously I'm doing something wrong (probably something simple!)

Any suggestions?

Lauchlan Mackinnon


Back to top
Lauchlan M
Guest





PostPosted: Sat Apr 16, 2005 9:06 am    Post subject: Re: Also (using grids) Reply with quote

Quote:
I seem to be having trouble getting a grid going . . .

This problem solved.

Thanks.

Lauchlan M



Back to top
Christina Androne
Guest





PostPosted: Sat Apr 16, 2005 2:17 pm    Post subject: Re: Some 'newbie' IW questions (user session, data module) Reply with quote

Lauchlan M wrote:

Quote:
Hi

I looked at IW some time ago, but have not looked at it for quite a
while now (I've been using ASP.NET). So my questions are like newbie
questions again!

Best thing to start with are the demos. Check the Features demo,
Phonetics Customer Profile , Die Fly! Die, etc to learn how to work
wiht hte session object, grids, etc. If you still are unsure how to do
it please come back wiht a post.

Best,
Christina Androne

(Atozed Software Technical Support)

Back to top
Chad Z. Hower aka Kudzu
Guest





PostPosted: Wed Apr 20, 2005 8:13 pm    Post subject: Re: Some 'newbie' IW questions (user session, data module) Reply with quote

"Lauchlan M" <LMackinnon (AT) Hotmail (DOT) com> wrote in
news:425fda2b (AT) newsgroups (DOT) borland.com:
Quote:
The server controller in my test app (using IW 7.something) seems to
have a TIWUserSession rather than TUserSession, and this class does not

Just a naming difference.

Quote:
seem to be defined in the server controller.

Its created in the server controller if you select it in the wizard. It
becomes and owned object of the IW Internal session object.

Quote:
Where should I define what data goes in to my user session?

Just expand the class.

Quote:
Or is this done differently now - should I create my own class and
somehow put it in or associate it with a .data property for the
TIWUserSession?

That's what TIWUserSession does, its just the wizard makes it all for you.

Quote:
Basically all I want to do is have a text username and security level,
and boolean LoggedIn value associated with the user session.

Just add them.

Quote:
It seems the manual is a little out of date (but not as out of date as
the Falafel training manual, if that is still at IW 5.1).

Make sure you have the latest from our site. We will also be beginning a
BIG doc review phase in about 2 weeks when some new software (IW based!)
comes online.

Quote:
2. I decided to hook up a data source to the web app, so I could look up
user details. Thinking that the IWUSerSession is a datamodule, I added
some database components to it, but it did not seem to like referring to
them.

Delphi cant see them unless you add this to your uses. You can see
FishFactDM for an example of this.

Quote:
Is this the right thing to do? Or are there problems with threading etc
using standard Delphi datamodules?

IW takes care of it.

Quote:
Is the IWUserSession a datamodule or not, and if it is, why can't I just
put my data components on that?

It is a DM essentially.

Quote:

Lauchlan Mackinnon





--
Chad Z. Hower
Atozed Software Technical Support

Atozed staff provides basic assistance with peer support
on these forums. For more information see:
http://www.atozed.com/intraweb/support/peer.iwp

Back to top
Chad Z. Hower aka Kudzu
Guest





PostPosted: Wed Apr 20, 2005 8:14 pm    Post subject: Re: Some 'newbie' IW questions (user session, data module) Reply with quote

"Lauchlan M" <LMackinnon (AT) Hotmail (DOT) com> wrote in news:425fdeb3
@newsgroups.borland.com:
Quote:
I take it that you always need to use the ServerController unit if you
to refer to/use the UserSession, as that function is defined there?

Thats one part, it makes a shortcut for you to reference it. But it also
creates it on a new user session.



--
Chad Z. Hower
Atozed Software Technical Support

Atozed staff provides basic assistance with peer support
on these forums. For more information see:
http://www.atozed.com/intraweb/support/peer.iwp

Back to top
Chad Z. Hower aka Kudzu
Guest





PostPosted: Wed Apr 20, 2005 8:15 pm    Post subject: Re: Also (using grids) Reply with quote

"Lauchlan M" <LMackinnon (AT) Hotmail (DOT) com> wrote in
news:425fe58c (AT) newsgroups (DOT) borland.com:
Quote:
I seem to be having trouble getting a grid going . . .

So obviously I'm doing something wrong (probably something simple!)

Have you looked at FishFactDM? It does all of this. :)


--
Chad Z. Hower
Atozed Software Technical Support

Atozed staff provides basic assistance with peer support
on these forums. For more information see:
http://www.atozed.com/intraweb/support/peer.iwp

Back to top
Lauchlan M
Guest





PostPosted: Thu Apr 21, 2005 2:53 pm    Post subject: Re: Also (using grids) Reply with quote

Quote:
I seem to be having trouble getting a grid going . . .

So obviously I'm doing something wrong (probably something simple!)

The problem was the form/datamodule create order.

The IWForm was trying to create itself before the datamodule was created
(because I started with an IW project with an IWForm and then added a
datamodule), so I just needed to swap the order then all was fine.

Lauchlan M



Back to top
Lauchlan M
Guest





PostPosted: Thu Apr 21, 2005 3:00 pm    Post subject: Re: Some 'newbie' IW questions (user session, data module) Reply with quote

Quote:
Is the IWUserSession a datamodule or not, and if it is, why can't I just
put my data components on that?

It is a DM essentially.

ok, thx

So where is the recommended place to put ones database server connection (if
there is a recommended place) -

- on the server controller
- on the IWUserSession
- on a new datamodule created to hold the database server connection

I'd lean towards the third, but perhaps it unnecessarily adds a new dm to
the project.

BTW, when you do your next update, could you modify the IW wizard that comes
up from File | New | Other | Intraweb, so that it lets you browse to select
the location for the project directory? It's a bit of a hassle to have to
remember it or to click back and forth between there and the Windows
Explorer to get it.

Lauchlan M



Back to top
Lauchlan M
Guest





PostPosted: Thu Apr 21, 2005 3:01 pm    Post subject: Re: Some 'newbie' IW questions (user session, data module) Reply with quote

Quote:
I take it that you always need to use the ServerController unit if you
to refer to/use the UserSession, as that function is defined there?

Thats one part, it makes a shortcut for you to reference it.

I get that . . .

Quote:
But it also
creates it on a new user session.

Could you elaborate on that?

Thx

Lauchlan M



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (IntraWeb) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.