Need help on implementing OOP conectp.

L

Learner

Hi there,
I have designed a three tier arichitecture(presentation, business and

datalayer). I have used Shared keyword in all my DL methods inorder to
make them available in my BL. I have realized that i don't need to
instantiate the Data class in my BL and could use all DL methods in my
BL with out instantiating the Data class. But in my BL i haven't used
the Shared keyword in any of the methods. So i need to instantiate the
BL in my presentation class and then explore the methods.


Its some thing like i understood and but confusing. Why can't i use the

same Shared keyword in my BL as i did in DL? I mean we can use but why
we dont' suppose to use it!!!? So its some thing i realized that i need

to understand more to avaiod this kinda confusion when to use what and
where to use them. Is there any blog or some thing like that that could

provide more understanding when to use what and how and where. I looked

at OOPS concepts before these concepts provide the definitions but
didn't provide me with much understanding in designing multi tiered
architecture. I mean i couldn't find any blogs that explain how and
when these kinds of key words used. I have couple of years of work
experience in ASP.NET and i always used the existing classes and
application design but never had a chance to design a new pattern or
desing an application developement envronment on my own. Its intersting
and please some one help me to get upto speed with this.


thanks in advance
-L
 
K

Kevin Spencer

Shared menas one instance shared by all. Instance meand multiple instances
shared accordingly. the answer to your question lies in these attributes of
shared and instance classes. When you want to change one instance, without
afffecting other instances, use Instances. When you want to change one
instance, and that instance is used by all clients, you use shared.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top