Hi,

encapsulating client info into a system-state-bean call ClientInfo will
make it easier to pass it eventually to a business-logic-class that needs 
access to the info. So I would recommend that.

If the size is big, make it "persistant" and store just a key in the 
http-session, else store it in the http-session.

hope this helps
Alexander

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 23, 2001 11:18 AM
To: [EMAIL PROTECTED]
Subject: RE: design question




>It is quite tricky to answer your question as you did not mention
additional
>info i.e best practices is also depend on the  application size ( how
much
>client it will cater and for what purpose )
>anyway this is what I hope you'll get something from my assumption :-
>1) if the number of client is not too many i.e only have 100 + but no
more
>than or never goes beyond 100 000 ( the number is abitrary , just to
show
>you how big is big )
>then session will be the choice since it is faster  to retrieve the
data ,
>but if you 're going to have many clients then state bean will be more
>efficient since the session will used up your memory while the state
bean (
>session bean) will passivate if it is not used ( and save the memory ) 

+++  Its not an efficiency issue. The number of clients will not be too
many. 

>2) Please refer to the www.javasoft.com website and find the EJB
tutorial
>from there 

+++ I didnt mean session bean from EJB   :-).

"system state bean" is mentioned in Struts User Guide.   As I
undwerstood I can use it instead of session variables.
I dont like session variables because I have to define names of session
variables somewhere (like in class Constants)
otherwise its easy to mix up them  or to forget their names.


>3) That depend on your architecture.basically the bean should stick to
the
>javabeans specification design and should not have any jdbc calls ( but
>there is an exceptio for that . i.e if you create a bean for your
taglibs
>you'll need to embed the jdbc to it )


> -----Original Message-----
> From: Māris Orbidāns [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, November 22, 2001 4:54 PM
> To:   Struts-list (E-mail)
> Subject:      design question
> 
> Hello
> 
> I have several questions about design, "best practises":
> 
> 1)  Where to store client's profile information (like login name) ?
> session  or system state bean ?
> 
> 2)  How to create and use a system state bean ?
> 
> System state bean should be in scope "session", shouldnt it ?
> 
> 3) Where to put business logic (where I invoke JDBC) ?  
>       Should business logic class be a bean ?
> 
> thanx in advance
> Maris Orbidans
>       
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to