473,811 Members | 2,767 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Basic n-tier architecture question...

I understand that there are a several ways to architect an n-tier solution,
but I think we can keep it simple in our projects...they tend to be pretty
small. I just need to know if I have the right idea.

1) We're building ASP.NET apps and I intend to add WinForm apps to the mix.
2) We're using SQL Server 2005 for the backend.
3) I'm adding .NET Class Libraries for the business layer.

Here's what I'm unsure of. For the business layer, is the basic idea to have
static methods in my class which I call from the front end?

Example:

Web page -> MyBusinessObjec t.GetNumClients () -> call SQL Server sproc
Web page -> MyBusinessObjec t.SaveClientNam e( name ) -> call SQL Server sproc

and so on. Should look the same for WinForm apps.

Is this the right idea? Again, I don't THINK we need anything elaborate.
Just something that will perform reasonably well and allow reuse of our calls
to the database.

Thanks,
Jay
Mar 10 '06 #1
4 1320
Hello Jay,

Your queries to DB will be pooled, and u can create thread pool to add more
flexibility.
But what do u mean there by "static calls"?

JW> I understand that there are a several ways to architect an n-tier
JW> solution, but I think we can keep it simple in our projects...they
JW> tend to be pretty small. I just need to know if I have the right
JW> idea.
JW>
JW> 1) We're building ASP.NET apps and I intend to add WinForm apps to
JW> the mix.
JW> 2) We're using SQL Server 2005 for the backend.
JW> 3) I'm adding .NET Class Libraries for the business layer.
JW> Here's what I'm unsure of. For the business layer, is the basic idea
JW> to have static methods in my class which I call from the front end?
JW>
JW> Example:
JW>
JW> Web page -> MyBusinessObjec t.GetNumClients () -> call SQL Server
JW> sproc Web page -> MyBusinessObjec t.SaveClientNam e( name ) -> call
JW> SQL Server sproc
JW>
JW> and so on. Should look the same for WinForm apps.
JW>
JW> Is this the right idea? Again, I don't THINK we need anything
JW> elaborate. Just something that will perform reasonably well and
JW> allow reuse of our calls to the database.
JW>
JW> Thanks,
JW> Jay
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Mar 10 '06 #2
Static methods in the class in the class library, so I can just call the
method I need to whenever I need to call it, without instantiating an
instance...as below:

Web page -> MyBusinessObjec t.GetNumClients () -> call SQL Server

"Michael Nemtsev" wrote:
Hello Jay,

Your queries to DB will be pooled, and u can create thread pool to add more
flexibility.
But what do u mean there by "static calls"?

JW> I understand that there are a several ways to architect an n-tier
JW> solution, but I think we can keep it simple in our projects...they
JW> tend to be pretty small. I just need to know if I have the right
JW> idea.
JW>
JW> 1) We're building ASP.NET apps and I intend to add WinForm apps to
JW> the mix.
JW> 2) We're using SQL Server 2005 for the backend.
JW> 3) I'm adding .NET Class Libraries for the business layer.
JW> Here's what I'm unsure of. For the business layer, is the basic idea
JW> to have static methods in my class which I call from the front end?
JW>
JW> Example:
JW>
JW> Web page -> MyBusinessObjec t.GetNumClients () -> call SQL Server
JW> sproc Web page -> MyBusinessObjec t.SaveClientNam e( name ) -> call
JW> SQL Server sproc
JW>
JW> and so on. Should look the same for WinForm apps.
JW>
JW> Is this the right idea? Again, I don't THINK we need anything
JW> elaborate. Just something that will perform reasonably well and
JW> allow reuse of our calls to the database.
JW>
JW> Thanks,
JW> Jay
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Mar 10 '06 #3
Please don't crosspost. I replied to this posting in the
distributed_app s NG

Mar 10 '06 #4
Hello Jay,

it depends on your requirements and constraints. The best colution is don't
have active resources and release them asap
it's the best and simpe aproach. Afterthat try to check performance and test
how much time instantiating component takes
If it's unacceptable for your solution then make it static and keep in memmory,
but be aware - there are a slight complex, because
u need to manage object state between calls (proper locking and thread management)
it's the common solution for your scenario
JW> Static methods in the class in the class library, so I can just call
JW> the method I need to whenever I need to call it, without
JW> instantiating an instance...as below:
JW>
JW> Web page -> MyBusinessObjec t.GetNumClients () -> call SQL Server
JW>
JW> "Michael Nemtsev" wrote:
JW>
Hello Jay,

Your queries to DB will be pooled, and u can create thread pool to
add more
flexibility.
But what do u mean there by "static calls"?
JW> I understand that there are a several ways to architect an n-tier
JW> solution, but I think we can keep it simple in our
projects...they
JW> tend to be pretty small. I just need to know if I have the right
JW> idea.
JW>
JW> 1) We're building ASP.NET apps and I intend to add WinForm apps
to
JW> the mix.
JW> 2) We're using SQL Server 2005 for the backend.
JW> 3) I'm adding .NET Class Libraries for the business layer.
JW> Here's what I'm unsure of. For the business layer, is the basic
idea
JW> to have static methods in my class which I call from the front
end?
JW>
JW> Example:
JW>
JW> Web page -> MyBusinessObjec t.GetNumClients () -> call SQL Server
JW> sproc Web page -> MyBusinessObjec t.SaveClientNam e( name ) -> call
JW> SQL Server sproc
JW>
JW> and so on. Should look the same for WinForm apps.
JW>
JW> Is this the right idea? Again, I don't THINK we need anything
JW> elaborate. Just something that will perform reasonably well and
JW> allow reuse of our calls to the database.
JW>
JW> Thanks,
JW> Jay
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Mar 10 '06 #5

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

Similar topics

7
9293
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. # No warranty express or implied for the accuracy, fitness to purpose
56
4144
by: Dave Vandervies | last post by:
I just fixed a bug that some of the correctness pedants around here may find useful as ammunition. The problem was that some code would, very occasionally, die with a segmentation violation error. (Not as infrequent as some bugs that have been discussed here in the past, but maybe once in an overnight run of the program when it was configured to aggressively exercise the section that the bug was in.) It was easy enough to trap the...
14
2515
by: luis | last post by:
Are basic types (int, long, ...) objetcs or not? I read that in C# all are objects including basic types, derived from Object class. Then in msdn documentation says that boxing converts basic types in objects. But if they are objects why it´s need this conversion? Aren´t objects (basic types) like Java?
3
2545
by: sefe dery | last post by:
hi ng, i try to create a asp.net 1.0 website on windows server 2003(Servername: ServerX) with iis 6.0. PROBLEM: The user should login with his windows credentials in basic.aspx and automatically redirect to his own files. i have the following file-structure:
13
3042
by: usenet | last post by:
How and where can one find out about the basics of VB/Access2003 syntax? I am a died in the wool C/C++/Java Linux/Unix programmer and I am finding it difficult to understand the program format for accessing objects, controls, etc. in VB/Access2003. In particular where will I find explanations of:- Actions, Functions, Methods, Properties - I'm understand the
10
2671
by: trippeer | last post by:
I have the source code to an old BASIC program that a friend of mine would like to run online. I am a beginner at JS, but I think that it would be a good choice for the project. My background is in C/C++ and web development. Any suggestions that might get me off to a good start here? I can provide more information if needed, but I am not sure what would be helpful. The program is 550 lines in what appears to be BASIC and is a calendar...
97
5560
by: Master Programmer | last post by:
An friend insider told me that VB is to be killled off within 18 months. I guess this makes sence now that C# is here. I believe it and am actualy surprised they ever even included it in VS 2003 in the first place. Anyone else heard about this development? The Master
111
5608
by: Enteng | last post by:
Hi I'm thinking about learning C as my first programming language. Would you recommend it? Also how do you suggest that I learn it?What books/tutorials should I read for someone like me? Thanks in advance! -entengk
6
3150
by: Simon Walsh | last post by:
I'm an Electronics student in college and I'm currently working on a project. I was given a circuit diagram for my project, from which I had to design a printed circuit board to be sent off and manufactured. I got my printed circuit board back and populated it with components. On my circuit board, I have a chip holder for a Basic STAMP microcontroller. To those unfamiliar with it, the Basic STAMP is a microcontroller which has an onboard...
28
3610
by: Randy Reimers | last post by:
(Hope I'm posting this correctly, otherwise - sorry!, don't know what else to do) I wrote a set of programs "many" years ago, running in a type of basic, called "Thoroughbred Basic", a type of business basic. I need to re-write it, bring it kicking and screaming to run on Windows XP. This is for a video rental place, tracks movie and game rentals, customers, employee transactions, reservations, does reports,..... and on. I know some of...
0
9727
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
10647
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
10398
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
10133
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
7669
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...
0
6889
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
5554
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...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.