473,796 Members | 2,465 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The simple stuff

Hi there,

I am planning/building an n-Tier system with 2 presentation layers
(web, windows) which will share the BLL and DAL. This is my first
experience with .Net. As a VB6er I had to work hard to gain an object
oriented perspective. I am sure that will get stronger as I
progress. I've spent quite a bit of time studying the framework. But
now I find I am struggling with the simple things. I am in a small
company and therefore have no one's experience to learn the easy stuff
from. I've read many articles and postings trying to glean this but
find myself still unsure.

I started building the DAL. It references a class library containing
constants Mycompanyname.C ommon I think I referenced by putting
"Imports Mycompanyname.C ommon" in the DAL namespace but I don't
actually know what else to do here. I have so many questions here I
don't even know quite where to start or how to slim it down to the
nitty gritty. I guess to start...where do I put the
Mycompanyname.C ommon.dll? I know there is more than one place to put
it depending upon whether it is a private assembly or not. Both my
DAL assembly and BLL assembly will reference the Mycompanyname.C ommon
assembly. Would that mean it should not be private? Do I need to put
the .Common dll somewhere first and then add it to the DAL Reference
folder?

How do I handle the BLL/DAL dll? The way I see it the BLL references
both the DAL and the .Common. The DAL references the .Common. The
presentation layers reference the BLL. Does that mean that I put the
BLL dll in GAC since it will be referenced by both presentation
layers? I think there is probably an SNL skit here somewhere.

I would truly appreciate any help or guidance here. I am sure many of
you have a standard process that you step through at each point of
development. I would like to follow a strong example so I can be the
same for the other VB6er in my company and to be as good as I can be
at this.

Jul 2 '07 #1
5 1472
re:
!I guess to start...where do I put the Mycompanyname.C ommon.dll?

If you only are going to use it in one application, in the application's /bin directory.
If you're goping to use it on more than one application, in the GAC.

re:
!Both my DAL assembly and BLL assembly will reference the Mycompanyname.C ommon
! assembly. Would that mean it should not be private? Do I need to put the .Common dll
!somewhere first and then add it to the DAL Reference folder?

See above. You can use either location.
The /bin directory makes it easier to update the assembly if there's changes to it, though.

re:
!Does that mean that I put the BLL dll in GAC since it will be referenced by both presentation layers?

Again, it doesn't matter.
You should have no problems with either location.

That's one of the great advantages to having true OOD, which VB6 had only an inkling about.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== ========
"Rowan" <ph********@yah oo.comwrote in message news:11******** *************@o 11g2000prd.goog legroups.com...
Hi there,

I am planning/building an n-Tier system with 2 presentation layers
(web, windows) which will share the BLL and DAL. This is my first
experience with .Net. As a VB6er I had to work hard to gain an object
oriented perspective. I am sure that will get stronger as I
progress. I've spent quite a bit of time studying the framework. But
now I find I am struggling with the simple things. I am in a small
company and therefore have no one's experience to learn the easy stuff
from. I've read many articles and postings trying to glean this but
find myself still unsure.

I started building the DAL. It references a class library containing
constants Mycompanyname.C ommon I think I referenced by putting
"Imports Mycompanyname.C ommon" in the DAL namespace but I don't
actually know what else to do here. I have so many questions here I
don't even know quite where to start or how to slim it down to the
nitty gritty. I guess to start...where do I put the
Mycompanyname.C ommon.dll? I know there is more than one place to put
it depending upon whether it is a private assembly or not. Both my
DAL assembly and BLL assembly will reference the Mycompanyname.C ommon
assembly. Would that mean it should not be private? Do I need to put
the .Common dll somewhere first and then add it to the DAL Reference
folder?
How do I handle the BLL/DAL dll? The way I see it the BLL references
both the DAL and the .Common. The DAL references the .Common. The
presentation layers reference the BLL. Does that mean that I put the
BLL dll in GAC since it will be referenced by both presentation
layers? I think there is probably an SNL skit here somewhere.

I would truly appreciate any help or guidance here. I am sure many of
you have a standard process that you step through at each point of
development. I would like to follow a strong example so I can be the
same for the other VB6er in my company and to be as good as I can be
at this.

Jul 2 '07 #2
It sounds to me like you are biting off more than you are really prepared to
chew here. I'd recommend searching for, downloading, and reviewing OPC (other
people's code) for starters and get a good perspective on how they are doing
this N-Tier "stuff". After spelunking some pretty good code, you'll have a
much better perspective on how you think you should go about yours.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder( BETA): http://www.blogmetafinder.com

"Rowan" wrote:
Hi there,

I am planning/building an n-Tier system with 2 presentation layers
(web, windows) which will share the BLL and DAL. This is my first
experience with .Net. As a VB6er I had to work hard to gain an object
oriented perspective. I am sure that will get stronger as I
progress. I've spent quite a bit of time studying the framework. But
now I find I am struggling with the simple things. I am in a small
company and therefore have no one's experience to learn the easy stuff
from. I've read many articles and postings trying to glean this but
find myself still unsure.

I started building the DAL. It references a class library containing
constants Mycompanyname.C ommon I think I referenced by putting
"Imports Mycompanyname.C ommon" in the DAL namespace but I don't
actually know what else to do here. I have so many questions here I
don't even know quite where to start or how to slim it down to the
nitty gritty. I guess to start...where do I put the
Mycompanyname.C ommon.dll? I know there is more than one place to put
it depending upon whether it is a private assembly or not. Both my
DAL assembly and BLL assembly will reference the Mycompanyname.C ommon
assembly. Would that mean it should not be private? Do I need to put
the .Common dll somewhere first and then add it to the DAL Reference
folder?

How do I handle the BLL/DAL dll? The way I see it the BLL references
both the DAL and the .Common. The DAL references the .Common. The
presentation layers reference the BLL. Does that mean that I put the
BLL dll in GAC since it will be referenced by both presentation
layers? I think there is probably an SNL skit here somewhere.

I would truly appreciate any help or guidance here. I am sure many of
you have a standard process that you step through at each point of
development. I would like to follow a strong example so I can be the
same for the other VB6er in my company and to be as good as I can be
at this.

Jul 2 '07 #3
On Jul 2, 1:02 pm, Peter Bromberg [C# MVP]
<pbromb...@yaho o.yabbadabbadoo .comwrote:
It sounds to me like you are biting off more than you are really prepared to
chew here. I'd recommend searching for, downloading, and reviewing OPC (other
people's code) for starters and get a good perspective on how they are doing
this N-Tier "stuff". After spelunking some pretty good code, you'll have a
much better perspective on how you think you should go about yours.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder( BETA): http://www.blogmetafinder.com
Forgive me if I seem testy but I don't understand why you put the
effort into typing your response. I have searched for, downloaded,
and reviewed MANY OPC. I understand exactly what the architecture is
supposed to be and why. When it comes to coding I cast about for best
practice and who seems to have the cleanest and most efficient code to
learn from because I want whatever I do to be solid, consistent, and
clear. I have spent hours and hours and hours working on absorbing
the .Net Framework. It is a lot of information to synthesize. If I
post it is because I am looking for some clarification, help, advice,
or possibly affirmation so I don't go about wasting too much time down
the rabbit hole. Sometimes it only takes an experienced person one
paragraph of explanation to put it all together. I was not expecting
but hoping for that. Whether I bit off more than I can chew is
moot...I can either find a way to chew it or spit it out. I would
prefer to keep my job.

Jul 2 '07 #4
Rowan,

As your subject line calls for, here some simple stuff I learned over the
years:

The DAL: gotta have one, as you probably noticed. If you want to preserve
your sanity, make the Data Access Objects unaware of where they come from or
where they go to. Some people make (IMHO) the mistake of polluting the DAO's
with SQL - CRUDs, stored procedures. Your DAO model should at a minimum
reflect what is in your database and help your presentation layers to do
some sanity check before bugging the database.

Here's the fun part: the DAL actually is a factory that produces Data Access
Objects as well as consume them to update, insert or delete. You either
build the DAL with SP's (argh), straight SQL (hmm little better) or
reflection (my preferred method). Again, the DAL produces and consumes
objects from the DAO model.

Now look at your BLL: it is free to perform its business functions using the
objects but not caring about the mechanics of retrieving or storing. Since
the DAOs are pure, they can be easily serialized and bound to your
presentation. Which means your presentation knows about the DAL and the BLL
(and the DAO model).

Now, in regards to Common... think a little harder about this - do you
really need that? What are those constants for? Can you put them in a config
file? Or in a resources file? Having a Common class increases coupling and
reduces cohesion.

<flame alert>Whatever you do, stay away from the Microsoft Enterprise
Framework </flame alert>

Otavio
"Rowan" <ph********@yah oo.comwrote in message
news:11******** *************@o 11g2000prd.goog legroups.com...
Hi there,

I am planning/building an n-Tier system with 2 presentation layers
(web, windows) which will share the BLL and DAL. This is my first
experience with .Net. As a VB6er I had to work hard to gain an object
oriented perspective. I am sure that will get stronger as I
progress. I've spent quite a bit of time studying the framework. But
now I find I am struggling with the simple things. I am in a small
company and therefore have no one's experience to learn the easy stuff
from. I've read many articles and postings trying to glean this but
find myself still unsure.

I started building the DAL. It references a class library containing
constants Mycompanyname.C ommon I think I referenced by putting
"Imports Mycompanyname.C ommon" in the DAL namespace but I don't
actually know what else to do here. I have so many questions here I
don't even know quite where to start or how to slim it down to the
nitty gritty. I guess to start...where do I put the
Mycompanyname.C ommon.dll? I know there is more than one place to put
it depending upon whether it is a private assembly or not. Both my
DAL assembly and BLL assembly will reference the Mycompanyname.C ommon
assembly. Would that mean it should not be private? Do I need to put
the .Common dll somewhere first and then add it to the DAL Reference
folder?

How do I handle the BLL/DAL dll? The way I see it the BLL references
both the DAL and the .Common. The DAL references the .Common. The
presentation layers reference the BLL. Does that mean that I put the
BLL dll in GAC since it will be referenced by both presentation
layers? I think there is probably an SNL skit here somewhere.

I would truly appreciate any help or guidance here. I am sure many of
you have a standard process that you step through at each point of
development. I would like to follow a strong example so I can be the
same for the other VB6er in my company and to be as good as I can be
at this.

Jul 3 '07 #5
Thank you very much. After researching reflection more I see how this
is a better approach for my needs. I like it. I am very glad I
posted. Thank you all for your responses. They help so much.
Jul 5 '07 #6

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

Similar topics

1
5384
by: Michael Champagne | last post by:
Does anyone have any examples or links to examples of generating a simple unordered list menu with multiple levels from an XML file? We are redesigning the navigation on our website and I was hoping to make this as flexible as possible. Thanks, Mike
27
2398
by: Brian Sabbey | last post by:
Here is a first draft of a PEP for thunks. Please let me know what you think. If there is a positive response, I will create a real PEP. I made a patch that implements thunks as described here. It is available at: http://staff.washington.edu/sabbey/py_do Good background on thunks can be found in ref. . Simple Thunks
1
1606
by: Larry | last post by:
I am a C++/Java programmer trying to get going with some simpe xml transformations at work here. I bought the O'Reilly book Learning xlst for kicks. Someone at work sent me this xml shown below, they wanted me to try to output some simple text which summarizes the basic data in the xml and do it without perl. After that I guess they will want me to convert other xml files into some kind of text file I am assuming. I downloaded xalan, but...
1
1425
by: Howard | last post by:
Hi, I am using a very simple xslt file to get info from an xml document. The problem seems to me to be that the xml doc uses a namespace, and I don't know how to set up my xslt to recognize it correctly. If I remove the namespace specification from the xml, I can query the node I want perfectly. But with that namespace in there, it fails. Can someone help? Here's a simpilified version of the xml document, with that namespace stuff:
1
314
by: Roy | last post by:
Ok. Call me dumb, but why is this occurring. Table firstv has 303,000 records, table lla has 10,000 records. When I run this query though: SELECT IsNull(lla.voy, '') as voy, IsNull(lla.poe, '') as poe, IsNull(firstv.ocean, '') as ocean, IsNull(firstv.car, '') as car, IsNull(firstv.equipment, '') as equipment FROM LLA INNER JOIN firstv ON lla.voy = firstv.voy AND lla.poe = firstv.poe ORDER BY lla.voy I get 721,000 records back. Maybe...
8
5115
by: Ross A. Finlayson | last post by:
I'm trying to write some C code, but I want to use C++'s std::vector. Indeed, if the code is compiled as C++, I want the container to actually be std::vector, in this case of a collection of value types or std::vector<int>. So where I would use an int* and reallocate it from time to time in C, and randomly access it via , then I figure to copy the capacity and reserve methods, because I just need a growable array. I get to considering...
10
2379
by: serge calderara | last post by:
Dear all, I need to build a web application which will contains articles (long or short) I was wondering on what is the correct way to retrive those article on web page. In orther words, when there is such information to be displayed are they coming from imported files, database ? Where and how this type of information is stored ? What is the way to retrieve such information in order to display it in page ?
1
1551
by: Brian Henry | last post by:
Hello, I was tring to learn socket's (being i never used them before) and have a simple question. I want to create a listner that will get any data recieved and print it out. I've been able to get it to recieve only one line of data, but the next one i send to it wont be printed like the 1st one. I had a listner running in a thread, does anyone have a simple listner code example that would show how to have a tcplistner thread running...
6
2040
by: Jim M | last post by:
I've been distributing a fairly mature, very specific MS Access application to end users in small offices of colleges for several years now. This is a part-time venture and low volume operation- this is somewhat of a hobby for me. Many of my end users are computer phobic and get little support from their IT departments. It is a split database so the datafile gets put on the file server and the 3 different front ends get put on each local...
0
9680
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
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10456
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...
0
10230
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10174
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
10012
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...
1
7548
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2926
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.