D
DKode
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.
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.