473,385 Members | 1,641 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,385 software developers and data experts.

Good layered architecture with validation and LINQ (+ WCF?)

Does anybody have a good example/guide for using LINQ in a layered
architecture with maybe WCF?

Thanks in advance,

Evert
Feb 3 '08 #1
9 2540
Evert wrote:
Does anybody have a good example/guide for using LINQ in a layered
architecture with maybe WCF?
It's in general not good practise to use a service as a tier. Services
are standalone applications, so should be seen as vertical slices of
your application, not horizontal slices of your application.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Feb 4 '08 #2
Can you explain me why a service is not a Tier? What do you mean with
horizontal and vertical? is there a good site which explains this?

Thanks in advance,

Evert

"Frans Bouma [C# MVP]" wrote:
Evert wrote:
Does anybody have a good example/guide for using LINQ in a layered
architecture with maybe WCF?

It's in general not good practise to use a service as a tier. Services
are standalone applications, so should be seen as vertical slices of
your application, not horizontal slices of your application.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Feb 4 '08 #3
It's in general not good practise to use a service as a tier.
Surely WCF is precicely that though; an abstract bridge between
(generally physical/horizontal) tiers For instance, a smart-client
using WCF to access data from a WCF service over (typically) http[s].
Perfectly normal and indeed the textbook use-case.

For specific scenarios, this does exist - but in quite controlled
scenarios - google for "LINQ to Amazon" for example; not WCF, but a
similar fundamental principle - but it takes a lot of plumbing code.
http://weblogs.asp.net/fmarguerie/ar...to-Amazon.aspx

In the more general sense, I know what the OP is asking for (something
akin to a data-context for a WCF interface), and unfortunately I
haven't seen anything that really fills that gap - but the biggest
barrier is that LINQ really works within a logical (vertical) tier
where you can just about get away with allowing ad-hoc (i.e. not
formally defined up-front) queries, since you are in the same column.
It doesn't work well accross physical (horizontal) tiers, where you
normally want to have well-defined interfaces. That said, the REST
offering in 3.5 may offer some interesting possibilities, since that
is a bit less formalised (allow for better composability); but a
double edged sword...

Marc
Feb 5 '08 #4
Evert wrote:
Can you explain me why a service is not a Tier? What do you mean with
horizontal and vertical? is there a good site which explains this?
Vertical means that you have a full application with layers which has
an interface you can utilize as a service. Horizontal means that you
have a layer in your application which happens to be consumable as a
service.

The downside of horizontal usage of a service is that you have a lot
of data-traffic between tiers in formats which are used internally in
your application. In short: it's very inefficient.

Services should be seen as standalone applications you're utilizing in
your application. See these presentations by Gregor Hohpe:
http://www.infoq.com/presentations/h...oa-development
and
http://www.infoq.com/presentations/h...-conversations

I'm sure after the first one, you'll understand what I mean :)

FB

>
Thanks in advance,

Evert

"Frans Bouma [C# MVP]" wrote:
Evert wrote:
Does anybody have a good example/guide for using LINQ in a
layered architecture with maybe WCF?
It's in general not good practise to use a service as a tier.
Services are standalone applications, so should be seen as vertical
slices of your application, not horizontal slices of your
application.
--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Feb 5 '08 #5
Marc Gravell wrote:
It's in general not good practise to use a service as a tier.
Surely WCF is precicely that though; an abstract bridge between
(generally physical/horizontal) tiers For instance, a smart-client
using WCF to access data from a WCF service over (typically) http[s].
Perfectly normal and indeed the textbook use-case.
'tier' in general means horizontal layer, not vertical pillar.

See my links in the other post :)

FB
--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Feb 5 '08 #6
Services should be seen as standalone applications you're utilizing
in
your application. See these presentations by Gregor Hohpe:
[links to some SOA presentations]
Now, if only we (at large) could agree on a single interpretation of
SOA ;-p
Feb 5 '08 #7
hence horizontal not vertical.
or do I mean vertical not horizontal?
"things that are arranged vertically, and have the same horizontal
reference"

I'm managing to confuse all 3 of us now... more coffee...

But if you can see past my random word swaps, I think I have a
sensible point in there somewhere... probably well hidden...
Feb 5 '08 #8
Marc Gravell wrote:
Services should be seen as standalone applications you're utilizing
in your application. See these presentations by Gregor Hohpe:
[links to some SOA presentations]

Now, if only we (at large) could agree on a single interpretation of
SOA ;-p
Hehe, that would indeed be a first ;). Just imagine if such an
agreement would arise... how many book publishers would go out of
business, eh? ;)

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Feb 6 '08 #9
Just to add a thought; perhaps Astoria is the answer here? Currently
CTP, but it seems to offer much of what you are talking about...? I
haven't had time to play with it yet, though...

Marc
Feb 6 '08 #10

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

Similar topics

0
by: Vin | last post by:
Hi, I've got a VB.Net + ASP.Net message board application which has already been customized. There are two solutions in this application. 1. The front end aspx, aspx.vb files, User controls...
6
by: Michael Rodriguez | last post by:
If you're using a standard 3-tiered architecture, i.e. Data Layer-> Business Layer->Presentation Layer, where is the recommended place to put data validations? Specifically, data validations such...
7
by: Jon Davis | last post by:
I have a couple questions. First of all, would anyone consider a multi-layered programming approach (building business objects that are seperate from data access logic and seperate from user...
1
by: Pugi! | last post by:
Because my functions tend to become rather lengthy I split up the functions for each subject or action in a function (a) that checks user input (filter and validation) and if this checks out ok it...
0
by: =?Utf-8?B?RXZlcnQ=?= | last post by:
Does anybody know if it is possible to use the Validation Application Block from Enterprise Library 3.1 in Linq. The problem is that I don't know how to add the validation attributes to the...
8
by: =?Utf-8?B?Q2hyaXMgSGFsY3Jvdw==?= | last post by:
Hi there I've successfully added some .NET validation controls to a page (using <asp:RequiredFieldValidator ...), however when I try to set the 'display' property to 'dynamic', my page then...
1
by: DS | last post by:
I'm trying to understand how these two concepts could work together architecturally (if they can.) I realize both concepts provide benefits of re-use and ease of maintenance. Which is important...
1
by: mimranp | last post by:
Hi all i m using visual developer 2008 i m using xhtml1.1 in that .i m reciving so much error when check in online input w3 standard(C# language code behind) <%@ Page Language="C#"...
9
by: Shreyas | last post by:
Sorry if this has been asked before. Does anyone know of any modern examples of open source software implemented in ANSI-C using a truly layered architecture (preferably in an OO fashion)? ...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.