473,322 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Proper Architecture

I have created an application that will be used for my IT depts.
Tasks. I believe I have created the correct architecture but it
doesn't feel correct. Could I get opionions if I am headed in the
right direction? Here is how I have it set up.

UI -> Business Rules layer -> WebService (Broadcasting from SQL
Server) -> DataLayer -> SQL Helper -> SQL Server

I'll start out at the UI and work my way back.

Windows application with the presentation layer and business rules
layer installed on each users machine. Call is made to the business
rules layer which creates a new instance of the webservice and calls
the same method name in the webservice. WebService is sitting on the
SQL Server IIS. Webservice creates an instance of the datalayer in
it's constructor. webservice calls the same method name on the
datalayer. Datalayer creates an instance of the SQL Helper class and
makes a call to generalized functions. I.E. FillDataSet, the
filldataset has 3 overloaded functions so i can pass some different
options to it. ie: dataset, sqlCommand, table to fill 2nd function:
dataset, sqlString, table to fill.

I have typed datasets for each of the tables in my database. the
lookup tables all exist together in one dataset. Once, i grab the
results it passes the dataset back up to the UI and performs to proper
databinding. I have not yet created all the update features, i just
started out with the features that grabs information from the sql
server.

what i am wondering is that on each layer I have all the same methods.
ie: GetAllTasks, GetTaskByID, GetTaskUpdates, GetTaskUpdatesByID
etc...

Should I be generalizing these methods once I reach the
webservice/datalayer? I feel like I am re-duplicating code on the
different tiers of my application. I designed this from an example I
have.

Any comments would be greatly appreciated. Thank you.
Nov 22 '05 #1
5 827
Why do you have a Windows App in the first place? Just what is so important
that it must be done with a windows app that needs to be installed on a
users computer in the first place?

I mean you have Web Service, why not have WEB app instead of a Windows app?

Is it easier for you to create a Windows app using drag and drop and you
don't know how to do a Web app?
If you are going to a lot of trouble with all the tiers, you had better be
developing for both....otherwise, one needs to ask themselves,
"If they created a Web app, why in the world would they then go back to
making a Windows app that hits the same database?"

You are adding all this work via tiers, I hope you plan to use it one
day...as I know NO ONE who makes a Web app and then has their boss come to
them and say, "Can you make this for Windows? I would like for you to have
trouble installing it on all of our computers."

Are you planning on both supporting both a Windows and Web app that hits the
database? I hope you do a R.O.I. HA ha ha

The suggestion of a Rich Client that is only available via Windows is
COMPLETE propaganda and has no general or practical business advantage over
the Web app. If you want a RICH app, use FLASH...not windows....
How's that for throwing a wrench in this silly n-Tier architecture?


"DKode" <dk***@cfl.rr.com> wrote in message
news:b1**************************@posting.google.c om...
I have created an application that will be used for my IT depts.
Tasks. I believe I have created the correct architecture but it
doesn't feel correct. Could I get opionions if I am headed in the
right direction? Here is how I have it set up.

UI -> Business Rules layer -> WebService (Broadcasting from SQL
Server) -> DataLayer -> SQL Helper -> SQL Server

I'll start out at the UI and work my way back.

Windows application with the presentation layer and business rules
layer installed on each users machine. Call is made to the business
rules layer which creates a new instance of the webservice and calls
the same method name in the webservice. WebService is sitting on the
SQL Server IIS. Webservice creates an instance of the datalayer in
it's constructor. webservice calls the same method name on the
datalayer. Datalayer creates an instance of the SQL Helper class and
makes a call to generalized functions. I.E. FillDataSet, the
filldataset has 3 overloaded functions so i can pass some different
options to it. ie: dataset, sqlCommand, table to fill 2nd function:
dataset, sqlString, table to fill.

I have typed datasets for each of the tables in my database. the
lookup tables all exist together in one dataset. Once, i grab the
results it passes the dataset back up to the UI and performs to proper
databinding. I have not yet created all the update features, i just
started out with the features that grabs information from the sql
server.

what i am wondering is that on each layer I have all the same methods.
ie: GetAllTasks, GetTaskByID, GetTaskUpdates, GetTaskUpdatesByID
etc...

Should I be generalizing these methods once I reach the
webservice/datalayer? I feel like I am re-duplicating code on the
different tiers of my application. I designed this from an example I
have.

Any comments would be greatly appreciated. Thank you.

Nov 22 '05 #2
Generally speaking, you would move the location of your webservice/remoting
boundary like such:

UI->WebService->BusinessRules->DataLayer->SqlHelper->SQLServer

WebService, BusinessRules, DataLayer, and SqlHelper would all reside on one
machine (generally in seperate assemblies though). WebService (or
BusinessRules in some cases) would apply role-based security to its
entry-point methods, if you need role-based security. WebService would not
necessarily export all functionality of BusinessRules to UI, but only the
things actually needed by UI, and possibly repackaged into larger units of
data... for example instead of having GetTaskById and GetTaskUpdatesById in
seperate WebService methods, the GetTaskById would also return the data from
GetTaskUpdatesById, thereby reducing the roundtrips made between UI and
WebService.

Keith Rome
MCDBA/MCAD/CIC

"DKode" <dk***@cfl.rr.com> wrote in message
news:b1**************************@posting.google.c om...
I have created an application that will be used for my IT depts.
Tasks. I believe I have created the correct architecture but it
doesn't feel correct. Could I get opionions if I am headed in the
right direction? Here is how I have it set up.

UI -> Business Rules layer -> WebService (Broadcasting from SQL
Server) -> DataLayer -> SQL Helper -> SQL Server

I'll start out at the UI and work my way back.

Windows application with the presentation layer and business rules
layer installed on each users machine. Call is made to the business
rules layer which creates a new instance of the webservice and calls
the same method name in the webservice. WebService is sitting on the
SQL Server IIS. Webservice creates an instance of the datalayer in
it's constructor. webservice calls the same method name on the
datalayer. Datalayer creates an instance of the SQL Helper class and
makes a call to generalized functions. I.E. FillDataSet, the
filldataset has 3 overloaded functions so i can pass some different
options to it. ie: dataset, sqlCommand, table to fill 2nd function:
dataset, sqlString, table to fill.

I have typed datasets for each of the tables in my database. the
lookup tables all exist together in one dataset. Once, i grab the
results it passes the dataset back up to the UI and performs to proper
databinding. I have not yet created all the update features, i just
started out with the features that grabs information from the sql
server.

what i am wondering is that on each layer I have all the same methods.
ie: GetAllTasks, GetTaskByID, GetTaskUpdates, GetTaskUpdatesByID
etc...

Should I be generalizing these methods once I reach the
webservice/datalayer? I feel like I am re-duplicating code on the
different tiers of my application. I designed this from an example I
have.

Any comments would be greatly appreciated. Thank you.

Nov 22 '05 #3
Thank you Keith, That helps me quite a bit. I think I still have alot
to learn about n-Tier architecture. As for the first guy here that
responded to my question:

I guess you are the type of person that ONLY develops asp apps for
dotnet. In response to your solution let me ask you this: what if the
sql server WILL NOT be online and is not published behind the ISA
server and we have multiple remote users that will be using this
application from california, to other parts of the state and the
midwest. what happens then with the web app when i do not wish to
publish the server on the public internet? we solve this by using a
vpn connection with my vb apps and private t1 pipes between some
locations. besides, asp is a whole other language that i have not had
time to dive into and I am still learning all the details of VB and
C#.
"Keith Rome" <ke***@NO-SPAMmindfusioncorp.com> wrote in message news:<ur**************@TK2MSFTNGP10.phx.gbl>...
Generally speaking, you would move the location of your webservice/remoting
boundary like such:

UI->WebService->BusinessRules->DataLayer->SqlHelper->SQLServer

WebService, BusinessRules, DataLayer, and SqlHelper would all reside on one
machine (generally in seperate assemblies though). WebService (or
BusinessRules in some cases) would apply role-based security to its
entry-point methods, if you need role-based security. WebService would not
necessarily export all functionality of BusinessRules to UI, but only the
things actually needed by UI, and possibly repackaged into larger units of
data... for example instead of having GetTaskById and GetTaskUpdatesById in
seperate WebService methods, the GetTaskById would also return the data from
GetTaskUpdatesById, thereby reducing the roundtrips made between UI and
WebService.

Keith Rome
MCDBA/MCAD/CIC

"DKode" <dk***@cfl.rr.com> wrote in message
news:b1**************************@posting.google.c om...
I have created an application that will be used for my IT depts.
Tasks. I believe I have created the correct architecture but it
doesn't feel correct. Could I get opionions if I am headed in the
right direction? Here is how I have it set up.

UI -> Business Rules layer -> WebService (Broadcasting from SQL
Server) -> DataLayer -> SQL Helper -> SQL Server

I'll start out at the UI and work my way back.

Windows application with the presentation layer and business rules
layer installed on each users machine. Call is made to the business
rules layer which creates a new instance of the webservice and calls
the same method name in the webservice. WebService is sitting on the
SQL Server IIS. Webservice creates an instance of the datalayer in
it's constructor. webservice calls the same method name on the
datalayer. Datalayer creates an instance of the SQL Helper class and
makes a call to generalized functions. I.E. FillDataSet, the
filldataset has 3 overloaded functions so i can pass some different
options to it. ie: dataset, sqlCommand, table to fill 2nd function:
dataset, sqlString, table to fill.

I have typed datasets for each of the tables in my database. the
lookup tables all exist together in one dataset. Once, i grab the
results it passes the dataset back up to the UI and performs to proper
databinding. I have not yet created all the update features, i just
started out with the features that grabs information from the sql
server.

what i am wondering is that on each layer I have all the same methods.
ie: GetAllTasks, GetTaskByID, GetTaskUpdates, GetTaskUpdatesByID
etc...

Should I be generalizing these methods once I reach the
webservice/datalayer? I feel like I am re-duplicating code on the
different tiers of my application. I designed this from an example I
have.

Any comments would be greatly appreciated. Thank you.

Nov 22 '05 #4
First, it's a very bad practice to put your SQL server outside your
firewall. You are saying, "here is my database, have at it and see if you
can break in".

MORE comments inline below...
"DKode" <dk***@cfl.rr.com> wrote in message
news:b1**************************@posting.google.c om...
Thank you Keith, That helps me quite a bit. I think I still have alot
to learn about n-Tier architecture. As for the first guy here that
responded to my question:

I guess you are the type of person that ONLY develops asp apps for
dotnet. In response to your solution let me ask you this: what if the
sql server WILL NOT be online and is not published behind the ISA
server and we have multiple remote users that will be using this
application from california, to other parts of the state and the
midwest. what happens then with the web app when i do not wish to
publish the server on the public internet?
Who said the web app had to published publically? There are many ways to
secure your web app.
Credit card companies and banks are now making their data available via
secure sites, login, password, unpublished URL's. You can trade stocks via
the net..... You can also change URL's and tell your clients to update
their address.....just like you can with passwords.....

You can also designate that only certain IP address are allowed to
connect..... You can also use VPN if you want..... so there you go, a
private web site, that is uniquely and securely available to only those you
want it to be available.....also, you are not making your SQL Server
publically available....and you can have IIS Servers hitting it , one for
private and one for public......the scenarios are numerous.....OH, and you
don't have to train users on how to use your Windows app, nor do you have
upload new versions, etc. Your boss can make user interface changes on the
fly to make things easier for them to use..no training sessions
needed....easier to locate bugs by referencing a single URL...if somethings
goes down you can easily switch to another URL as a backup......you can also
link to other helpful sites......

AND, if you still wanted to access your SQL Server remotely or VPN, I
believe you can buy an extra NIC card stick it in the same server and give
it an IP address..

It seems like you have a lot to learn about the web, ASP.NET, IIS, IP,
etc......
Now I am beginning to understand why a lot of developers are doing the
things they are doing.....very little knowledge of web apps and asp.net and
drag and drop ease of VB6......too bad their users don't like the difficult
to use VB6 apps out there....

we solve this by using a
vpn connection with my vb apps and private t1 pipes between some
locations. besides, asp is a whole other language that i have not had
time to dive into and I am still learning all the details of VB and
C#.
"Keith Rome" <ke***@NO-SPAMmindfusioncorp.com> wrote in message

news:<ur**************@TK2MSFTNGP10.phx.gbl>...
Generally speaking, you would move the location of your webservice/remoting boundary like such:

UI->WebService->BusinessRules->DataLayer->SqlHelper->SQLServer

WebService, BusinessRules, DataLayer, and SqlHelper would all reside on one machine (generally in seperate assemblies though). WebService (or
BusinessRules in some cases) would apply role-based security to its
entry-point methods, if you need role-based security. WebService would not necessarily export all functionality of BusinessRules to UI, but only the things actually needed by UI, and possibly repackaged into larger units of data... for example instead of having GetTaskById and GetTaskUpdatesById in seperate WebService methods, the GetTaskById would also return the data from GetTaskUpdatesById, thereby reducing the roundtrips made between UI and
WebService.

Keith Rome
MCDBA/MCAD/CIC

"DKode" <dk***@cfl.rr.com> wrote in message
news:b1**************************@posting.google.c om...
I have created an application that will be used for my IT depts.
Tasks. I believe I have created the correct architecture but it
doesn't feel correct. Could I get opionions if I am headed in the
right direction? Here is how I have it set up.

UI -> Business Rules layer -> WebService (Broadcasting from SQL
Server) -> DataLayer -> SQL Helper -> SQL Server

I'll start out at the UI and work my way back.

Windows application with the presentation layer and business rules
layer installed on each users machine. Call is made to the business
rules layer which creates a new instance of the webservice and calls
the same method name in the webservice. WebService is sitting on the
SQL Server IIS. Webservice creates an instance of the datalayer in
it's constructor. webservice calls the same method name on the
datalayer. Datalayer creates an instance of the SQL Helper class and
makes a call to generalized functions. I.E. FillDataSet, the
filldataset has 3 overloaded functions so i can pass some different
options to it. ie: dataset, sqlCommand, table to fill 2nd function:
dataset, sqlString, table to fill.

I have typed datasets for each of the tables in my database. the
lookup tables all exist together in one dataset. Once, i grab the
results it passes the dataset back up to the UI and performs to proper
databinding. I have not yet created all the update features, i just
started out with the features that grabs information from the sql
server.

what i am wondering is that on each layer I have all the same methods.
ie: GetAllTasks, GetTaskByID, GetTaskUpdates, GetTaskUpdatesByID
etc...

Should I be generalizing these methods once I reach the
webservice/datalayer? I feel like I am re-duplicating code on the
different tiers of my application. I designed this from an example I
have.

Any comments would be greatly appreciated. Thank you.

Nov 22 '05 #5
Ok,

The reason I have built no ASP.NET websites yet is because it is
another learning curve that I have not had a chance to tackle yet. I
am still trying to grasp the concepts of OOP, let alone trying to
learn another language in the midst of all this. the company i work
for needs everything yesterday and I hardly have time to breath.

I have developed numerous web applications in the past. Alot of PHP
and some PERL. And don't assume that all vb developers use the drag
and drop functionality of vb.net. That was the first thing i disliked
about the IDE.

I also meant that the SQL Server IS NOT on the public internet I.E.
NOT published through the ISA SERVER, which means it is INTERNAL only.

Go ahead and pick apart my comments now, i'm done arguing, i've got
better things to do. have fun!

peace.
"nospam" <n@ntspam.com> wrote in message news:<eQ*************@TK2MSFTNGP11.phx.gbl>...
First, it's a very bad practice to put your SQL server outside your
firewall. You are saying, "here is my database, have at it and see if you
can break in".

MORE comments inline below...
"DKode" <dk***@cfl.rr.com> wrote in message
news:b1**************************@posting.google.c om...
Thank you Keith, That helps me quite a bit. I think I still have alot
to learn about n-Tier architecture. As for the first guy here that
responded to my question:

I guess you are the type of person that ONLY develops asp apps for
dotnet. In response to your solution let me ask you this: what if the
sql server WILL NOT be online and is not published behind the ISA
server and we have multiple remote users that will be using this
application from california, to other parts of the state and the
midwest. what happens then with the web app when i do not wish to
publish the server on the public internet?


Who said the web app had to published publically? There are many ways to
secure your web app.
Credit card companies and banks are now making their data available via
secure sites, login, password, unpublished URL's. You can trade stocks via
the net..... You can also change URL's and tell your clients to update
their address.....just like you can with passwords.....

You can also designate that only certain IP address are allowed to
connect..... You can also use VPN if you want..... so there you go, a
private web site, that is uniquely and securely available to only those you
want it to be available.....also, you are not making your SQL Server
publically available....and you can have IIS Servers hitting it , one for
private and one for public......the scenarios are numerous.....OH, and you
don't have to train users on how to use your Windows app, nor do you have
upload new versions, etc. Your boss can make user interface changes on the
fly to make things easier for them to use..no training sessions
needed....easier to locate bugs by referencing a single URL...if somethings
goes down you can easily switch to another URL as a backup......you can also
link to other helpful sites......

AND, if you still wanted to access your SQL Server remotely or VPN, I
believe you can buy an extra NIC card stick it in the same server and give
it an IP address..

It seems like you have a lot to learn about the web, ASP.NET, IIS, IP,
etc......
Now I am beginning to understand why a lot of developers are doing the
things they are doing.....very little knowledge of web apps and asp.net and
drag and drop ease of VB6......too bad their users don't like the difficult
to use VB6 apps out there....

we solve this by using a
vpn connection with my vb apps and private t1 pipes between some
locations. besides, asp is a whole other language that i have not had
time to dive into and I am still learning all the details of VB and
C#.
"Keith Rome" <ke***@NO-SPAMmindfusioncorp.com> wrote in message

news:<ur**************@TK2MSFTNGP10.phx.gbl>...
Generally speaking, you would move the location of your webservice/remoting boundary like such:

UI->WebService->BusinessRules->DataLayer->SqlHelper->SQLServer

WebService, BusinessRules, DataLayer, and SqlHelper would all reside on one machine (generally in seperate assemblies though). WebService (or
BusinessRules in some cases) would apply role-based security to its
entry-point methods, if you need role-based security. WebService would not necessarily export all functionality of BusinessRules to UI, but only the things actually needed by UI, and possibly repackaged into larger units of data... for example instead of having GetTaskById and GetTaskUpdatesById in seperate WebService methods, the GetTaskById would also return the data from GetTaskUpdatesById, thereby reducing the roundtrips made between UI and
WebService.

Keith Rome
MCDBA/MCAD/CIC

"DKode" <dk***@cfl.rr.com> wrote in message
news:b1**************************@posting.google.c om...
> I have created an application that will be used for my IT depts.
> Tasks. I believe I have created the correct architecture but it
> doesn't feel correct. Could I get opionions if I am headed in the
> right direction? Here is how I have it set up.
>
> UI -> Business Rules layer -> WebService (Broadcasting from SQL
> Server) -> DataLayer -> SQL Helper -> SQL Server
>
> I'll start out at the UI and work my way back.
>
> Windows application with the presentation layer and business rules
> layer installed on each users machine. Call is made to the business
> rules layer which creates a new instance of the webservice and calls
> the same method name in the webservice. WebService is sitting on the
> SQL Server IIS. Webservice creates an instance of the datalayer in
> it's constructor. webservice calls the same method name on the
> datalayer. Datalayer creates an instance of the SQL Helper class and
> makes a call to generalized functions. I.E. FillDataSet, the
> filldataset has 3 overloaded functions so i can pass some different
> options to it. ie: dataset, sqlCommand, table to fill 2nd function:
> dataset, sqlString, table to fill.
>
> I have typed datasets for each of the tables in my database. the
> lookup tables all exist together in one dataset. Once, i grab the
> results it passes the dataset back up to the UI and performs to proper
> databinding. I have not yet created all the update features, i just
> started out with the features that grabs information from the sql
> server.
>
> what i am wondering is that on each layer I have all the same methods.
> ie: GetAllTasks, GetTaskByID, GetTaskUpdates, GetTaskUpdatesByID
> etc...
>
> Should I be generalizing these methods once I reach the
> webservice/datalayer? I feel like I am re-duplicating code on the
> different tiers of my application. I designed this from an example I
> have.
>
> Any comments would be greatly appreciated. Thank you.

Nov 22 '05 #6

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

Similar topics

5
by: DKode | last post by:
I have created an application that will be used for my IT depts. Tasks. I believe I have created the correct architecture but it doesn't feel correct. Could I get opionions if I am headed in the...
25
by: David Noble | last post by:
We've been developing a web site using 3-tier architecture for 18 months now. There is a common layer that defines the classes - using XML schemas. The data layer acts as a wrapper to 3 databases...
4
by: apngss | last post by:
what's the differences between collocated architecture and distributed architecture?? My understanding is that collocated architecture has everything in a single machine? i.e. There is only 1...
6
by: Gary James | last post by:
This may not be a direct C# question, but since I'll be using using C# for development, I thought I'd pose the question here. I'll soon be involved in the design of a new software product that...
6
by: carsonbj | last post by:
I have an issue where the below operation works on a little-endian architecture but not on a big-endian architecture. I was under the impression that pointer arithmetic is architecture independant...
13
by: rrs.matrix | last post by:
hi i have to detect the type of CPU. whether it is 32-bit or 64-bit.. how can this be done.. can anyone please help me.. thanks.
11
by: giddy | last post by:
hi , ok , i have a programming background but i'm new to C# . i'm also self taught so : i have a datagridview that should act differently depending on which user has signed in now is it...
0
by: srikar | last post by:
Hi all, I am having a problem, when I am compiling the code in 32 bit option on a 64 bit machine using the macro CPPFLAGS= -m32 I am getting the following warnings from the linker . ...
6
by: mattmao | last post by:
Hi all. There is a challenge question I encountered recently, which says: "In plain English, there are six different ways when you want to tell someone else about the current time: ...
3
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, if i'm using webservices in my project, is that considered a type of SOA (Service Oriented Architecture)? thanks, rodchar
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.