473,789 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help on implementing OOP conectp.

Hi there,
I have designed a three tier arichitecture(p resentation, 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

Jan 2 '06 #1
1 1471
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.

"Learner" <pr****@gmail.c om> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
Hi there,
I have designed a three tier arichitecture(p resentation, 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

Jan 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1731
by: slickn_sly | last post by:
How would i go about implementing a program in java that would do the following, f(1) = 1; f(2) = 1; f(3) = 1; f(4) = 1; f(5) = 1; f(n) = f( n - 1 ) + 3 * f( n - 5 ) for all n > 5 and display the results for n = 6, 7, 12, and 15 if someone can start me off, i would really appreciate it cause i'm
6
1946
by: Steven D'Aprano | last post by:
I've been working with the Borg design pattern from here: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531 and I'm having problems subclassing it. I'm a newbie, so I've probably missed something obvious. I want two Borg-like classes where all instances share state within each class, but not between them. This is what I tried:
4
2069
by: Frank J. Reashore | last post by:
Hello Everyone, I am implementing a simple interface in C# using Visual Studio .net and was quite surprised to discover that the C# compiler does NOT complain if a method on the interface is not implemented. VB.net on the other hand generates a compile error if a method is not implemented. This helps in ensuring that all interface methods are implemented.
5
2394
by: MFC | last post by:
Ok, after three C# books, (C# How to Program, Programming in the Key of C#, and C# Weekend Crash Course) and three weeks, I believe I have tried everything to make a certain form function correctly. I am trying to learn C# after playing around for a bit with procedural programming with PHP, not OOP, and believe I have learned quite a bit in three weeks, just not enough to accomplish this one task. If anyone has a bit of free time and...
2
2031
by: ern | last post by:
My command-line application must be able to run text scripts (macros). The scripts have commands, comments, and flags. Comments are ignored (maybe they are any line beginning with " ; ") Commands are executed as if the user *manually* typed them in the console. Flags are special commands that tell the program where to BREAK, LOOP, START. A typical script may look like this: ; This is my script. It will test my mp3 player... START:
3
1459
by: Jeff User | last post by:
Hi I want to create a rather simple object with a few string attributes to hold some database user information such as: public class UserInfo { //Basic user information for each user associated with a database. private string sDbName; private string sUserName; .... other stuff....
2
1989
by: Ian Semmel | last post by:
I am new to this world of ASP.NET so forgive the dumb questions. I have been looking at the sample provided 'Implementing a Session-State Store Provider' in an effort to understand how the thing works. Now, my question is, if I have this code, what do I do with it. Where do
4
2119
by: Mohamed Mansour | last post by:
Hello, What is the purpose of implementing the Observer Pattern if we can trigger an event easily? For example (from books), You have a "Forecaster" which notifies "Observable" when a prediction is ready, then there is a "WeatherViewer" which calls methods from the "Observer Interface".
1
1781
by: aditi kauts | last post by:
Hi I am implementing security on Contact base smart card which follows scosta template. In card structure ef is directly under DF and DF is directly under MF. According to the template i am implementing security on elementary file(both sac and sae attributes are specified at time of creation in fcp) according to security condition read and update of record requires verification of pin(which is already defined in pin file). Problem is that...
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10410
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9984
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.