Data layer

F

Fanor P.

Hello all,

I'm developing a program but still having some issues to write a good
layered program wich includes presentation, business, and data layers. Can
some one suggest any good book, white paper, or article about it with case
study and clear examples writen in c#.

TIA
 
P

PvdG42

Fanor P. said:
Hello all,

I'm developing a program but still having some issues to write a good
layered program wich includes presentation, business, and data layers.
Can some one suggest any good book, white paper, or article about it
with case study and clear examples writen in c#.

TIA

Here:

http://www.codeproject.com/KB/architecture/three_tier_architecture.aspx

http://www.dotnetfunda.com/articles/article18.aspx

http://www.codeproject.com/KB/aspnet/ThreeTierCodeGenerator.aspx
 
G

Gregory A. Beamer

I'm developing a program but still having some issues to write a good
layered program wich includes presentation, business, and data
layers. Can some one suggest any good book, white paper, or article
about it with case study and clear examples writen in c#.

I am in the process of writing such a book, but can't help now. Perhaps
I will blog something so you have an idea.

IMO, you need to think of UI as a faceplate, database as a storage
mechanism and app as the business logic that uses the data and has a UI
on top of it.

This is different from what you are asking, but it then leads you to
easy solutions (when you make the paradigm change). By focusing on the
business problem, you end up only building logic that solves the
problem.

I don't personally think you can get there without testing early (either
Test Driven Development (TDD) or Test Early Development (I will dub this
TED)), as you are a bit blind without the other "layers". But focusing
on logic also forces you to think about the communication between the UI
and the app and the data store and the app.

I will see if I have time at lunch to blog it.

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
G

Gregory A. Beamer

What does that matter? A proper DAL should be able to be dropped
unmodified into any .NET project - that's the whole point...

I take it a step farther and state the app is the business logic, the data
is a persitant mechanism and the UI is a faceplate for interaction. :)

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
J

JohnnyD

I have one sitting right here on my desk with the catchy title of

"Building Client/Server Applications with VB.NET: An example-driven
approach" by Jeff Levinson.

It's absolutely great. It explains everything you'd ever need to write every
single layer of an n-tier application and although it is writen with VB.NET,
it still explains how to make your app easily accessable by other languages
like java.

Thoroughly recommend it.

John.
 
M

Miha Markic

It looks that OP is looking for advice on all layers, not just DAL. That was
my impression...

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: blog.rthand.com


Mark Rae said:
"Miha Markic" <miha at rthand com> wrote in message

[please don't top-post]
Is this a WinForms or ASP.NET or something else?

What does that matter? A proper DAL should be able to be dropped
unmodified into any .NET project - that's the whole point...
 
G

Gregory A. Beamer

Couldn't have put it better myself!

Thanks. I am working on a book idea that shows how to develop in this
paradigm. Do you think it might sell?

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
F

Fanor P.

Actually you are right Miha. I read some articles about them and theory is
pretty clear, however implementation isn't that clear, for instance when I
use controls like textbox to bind to fields there is no problem, but if I
use a grid which can be editable the conection with the busines and data
layers are kind of confusing. I'm sure that everyone deals with it in their
own way, as I do myself, that is why I want to read other approaches to
find better ways.

Miha Markic said:
It looks that OP is looking for advice on all layers, not just DAL. That
was my impression...

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: blog.rthand.com


Mark Rae said:
"Miha Markic" <miha at rthand com> wrote in message

[please don't top-post]
I'm developing a program but still having some issues to write a good
layered program wich includes presentation, business, and data layers.
Can some one suggest any good book, white paper, or article about it
with case study and clear examples writen in c#.
Is this a WinForms or ASP.NET or something else?

What does that matter? A proper DAL should be able to be dropped
unmodified into any .NET project - that's the whole point...
 
F

Fanor P.

Winforms

Miha Markic said:
So, what kind of application we are talking about?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: blog.rthand.com

Fanor P. said:
Actually you are right Miha. I read some articles about them and theory
is pretty clear, however implementation isn't that clear, for instance
when I use controls like textbox to bind to fields there is no problem,
but if I use a grid which can be editable the conection with the busines
and data layers are kind of confusing. I'm sure that everyone deals with
it in their own way, as I do myself, that is why I want to read other
approaches to find better ways.
 
G

Gregory A. Beamer

Hmm - maybe...

Need a proof reader / technical editor...? ;-)

Possibly, but it depends on how I do this. ;-)

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
P

Paul

Are grids meant to be editable????

Square hole Round peg......

Like said above 3 tier is a good start.

Use model objects for communication of data this ensures your application is
Business Logic focused.


UI| WEBSITE WPF WIN
Services | M

| O
BLL| OrdersHandler PaymentsHandler
| D

| E
DAL| SQL Oracle MySQL Other
services | L


If your BLL is Web Service based then Model is used by BLL and DAL and the
UI uses the WSDL as an interface. WCF allows you to still use the model even
based on WSDL which is strange as somehow it must transpose namespaces. I
have not done much with WCF but it is interesting how it does this and I
wonder whether it could cause more issues than it solves.

Fanor P. said:
Actually you are right Miha. I read some articles about them and theory is
pretty clear, however implementation isn't that clear, for instance when I
use controls like textbox to bind to fields there is no problem, but if I
use a grid which can be editable the conection with the busines and data
layers are kind of confusing. I'm sure that everyone deals with it in
their own way, as I do myself, that is why I want to read other
approaches to find better ways.

Miha Markic said:
It looks that OP is looking for advice on all layers, not just DAL. That
was my impression...

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: blog.rthand.com


Mark Rae said:
"Miha Markic" <miha at rthand com> wrote in message

[please don't top-post]

I'm developing a program but still having some issues to write a good
layered program wich includes presentation, business, and data
layers. Can some one suggest any good book, white paper, or article
about it with case study and clear examples writen in c#.

Is this a WinForms or ASP.NET or something else?

What does that matter? A proper DAL should be able to be dropped
unmodified into any .NET project - that's the whole point...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top