List Info

Thread: Re: Exception handling in multitier applications




Re: Exception handling in multitier applications
user name
2008-06-30 22:30:48
Hi Seref,

I think you're looking for aspect oriented programming
(AOP). I think
the comparison between your sentence and the first sentence
of the wikipedia
article on AOP is illuminating.

Yours:  "I've realized that error handling aspects tend
to cross cut
multiple layers sometimes"

Wikipedia: "In software engineering, the programming
paradigms of
aspect-oriented programming (AOP), and aspect-oriented
software development
(AOSD) attempt to aid programmers in the separation of
concerns,
specifically cross-cutting concerns, as an advance in
modularization.


The article contains a list of C# AOP frameworks to choose
from.


Good Luck.

-Conrad


On Thu, Jun 26, 2008 at 5:40 AM, Seref Arikan <
serefarikankurumsalteknoloji.com> wrote:

> Hi,
> I'd like to get your opinions, and if possible pointers
to resources for
> exception handling in multitier .net applications. When
you have a usual
> multitier app, you usually have a db access layer like
a generated ORM
> classes, web services exposing them, and clients (web
and desktop) that
> consume these services.
> At the moment I have a few apps that I'm maintaining,
and some web pages
> and
> windows forms are constructed by calls to various web
services, and later
> combining their outputs. However, there are a lot
things that can go wrong,
> like a syntactically correct input being rejected by a
back end service,
> which requires adjustments in the user interface like
disabling  various
> parts of the screen etc.
> I've come to realize that error handling code scattered
around layers is
> the
> most ugly part of all software that I write.
> We have a lot of best practices and design options but
resources about them
> seem to cover mostly the cases where things go as
expected. A consistent
> approach to handling errors would be really nice, for
what I have right now
> is just results of my own experience, and I believe in
learning from
> other's
> mistakes and best practices.
> Do you have any resources that I can benefit from? Any
error-handling
> patterns? For example how and where do you log and
report errors in a web
> based app? I've realized that error handling aspects
tend to cross cut
> multiple layers sometimes, and writing code to cover
these aspects leads to
> high coupling between layers. After spending a great
amount of effort for
> low coupling, this is not nice!
> I'd be more than happy to hear your thoughts and
suggestions
>
> Regards
> Seref
>
> ===================================
> This list is hosted by DevelopMentor(R)  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

>

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


Re: Exception handling in multitier applications
user name
2008-07-01 09:02:02
I suggest looking into the Microsoft's Enterprise Library
and the Exception Handling Application Block.

http://msdn.microsoft.com/en-us/library/cc309505.aspx
________________________________________
From: Discussion of advanced .NET topics.
[ADVANCED-DOTNETDISCUSS.DEVELOP.COM] On Behalf Of Conrad
Frix [conradfrixGMAIL.COM]
Sent: Monday, June 30, 2008 10:30 PM
To: ADVANCED-DOTNETDISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Exception handling in
multitier applications

Hi Seref,

I think you're looking for aspect oriented programming
(AOP). I think
the comparison between your sentence and the first sentence
of the wikipedia
article on AOP is illuminating.

Yours:  "I've realized that error handling aspects tend
to cross cut
multiple layers sometimes"

Wikipedia: "In software engineering, the programming
paradigms of
aspect-oriented programming (AOP), and aspect-oriented
software development
(AOSD) attempt to aid programmers in the separation of
concerns,
specifically cross-cutting concerns, as an advance in
modularization.


The article contains a list of C# AOP frameworks to choose
from.


Good Luck.

-Conrad


On Thu, Jun 26, 2008 at 5:40 AM, Seref Arikan <
serefarikankurumsalteknoloji.com> wrote:

> Hi,
> I'd like to get your opinions, and if possible pointers
to resources for
> exception handling in multitier .net applications. When
you have a usual
> multitier app, you usually have a db access layer like
a generated ORM
> classes, web services exposing them, and clients (web
and desktop) that
> consume these services.
> At the moment I have a few apps that I'm maintaining,
and some web pages
> and
> windows forms are constructed by calls to various web
services, and later
> combining their outputs. However, there are a lot
things that can go wrong,
> like a syntactically correct input being rejected by a
back end service,
> which requires adjustments in the user interface like
disabling  various
> parts of the screen etc.
> I've come to realize that error handling code scattered
around layers is
> the
> most ugly part of all software that I write.
> We have a lot of best practices and design options but
resources about them
> seem to cover mostly the cases where things go as
expected. A consistent
> approach to handling errors would be really nice, for
what I have right now
> is just results of my own experience, and I believe in
learning from
> other's
> mistakes and best practices.
> Do you have any resources that I can benefit from? Any
error-handling
> patterns? For example how and where do you log and
report errors in a web
> based app? I've realized that error handling aspects
tend to cross cut
> multiple layers sometimes, and writing code to cover
these aspects leads to
> high coupling between layers. After spending a great
amount of effort for
> low coupling, this is not nice!
> I'd be more than happy to hear your thoughts and
suggestions
>
> Regards
> Seref
>
> ===================================
> This list is hosted by DevelopMentor(R)  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

>

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


Re: Exception handling in multitier applications
user name
2008-07-01 11:29:54
Hi Conrad,
I've previously worked on AOP, but the idea of using weavers
did not sound
very nice, maybe I should check it again. Still, I'd be more
inclined to go
towards a method that would not require external
modifications to
assemblies. Do you have any suggestions for tools in a .NET
environment?

All the best
Seref

On Tue, Jul 1, 2008 at 6:30 AM, Conrad Frix
<conradfrixgmail.com> wrote:

> Hi Seref,
>
> I think you're looking for aspect oriented programming
(AOP). I think
> the comparison between your sentence and the first
sentence of the
> wikipedia
> article on AOP is illuminating.
>
> Yours:  "I've realized that error handling aspects
tend to cross cut
> multiple layers sometimes"
>
> Wikipedia: "In software engineering, the
programming paradigms of
> aspect-oriented programming (AOP), and aspect-oriented
software development
> (AOSD) attempt to aid programmers in the separation of
concerns,
> specifically cross-cutting concerns, as an advance in
modularization.
>
>
> The article contains a list of C# AOP frameworks to
choose from.
>
>
> Good Luck.
>
> -Conrad
>
>
> On Thu, Jun 26, 2008 at 5:40 AM, Seref Arikan <
> serefarikankurumsalteknoloji.com> wrote:
>
> > Hi,
> > I'd like to get your opinions, and if possible
pointers to resources for
> > exception handling in multitier .net applications.
When you have a usual
> > multitier app, you usually have a db access layer
like a generated ORM
> > classes, web services exposing them, and clients
(web and desktop) that
> > consume these services.
> > At the moment I have a few apps that I'm
maintaining, and some web pages
> > and
> > windows forms are constructed by calls to various
web services, and later
> > combining their outputs. However, there are a lot
things that can go
> wrong,
> > like a syntactically correct input being rejected
by a back end service,
> > which requires adjustments in the user interface
like disabling  various
> > parts of the screen etc.
> > I've come to realize that error handling code
scattered around layers is
> > the
> > most ugly part of all software that I write.
> > We have a lot of best practices and design options
but resources about
> them
> > seem to cover mostly the cases where things go as
expected. A consistent
> > approach to handling errors would be really nice,
for what I have right
> now
> > is just results of my own experience, and I
believe in learning from
> > other's
> > mistakes and best practices.
> > Do you have any resources that I can benefit from?
Any error-handling
> > patterns? For example how and where do you log and
report errors in a web
> > based app? I've realized that error handling
aspects tend to cross cut
> > multiple layers sometimes, and writing code to
cover these aspects leads
> to
> > high coupling between layers. After spending a
great amount of effort for
> > low coupling, this is not nice!
> > I'd be more than happy to hear your thoughts and
suggestions
> >
> > Regards
> > Seref
> >
> > ===================================
> > This list is hosted by DevelopMentor(R)  http://www.develop.com
> >
> > View archives and manage your subscription(s) at
> > http://discuss.develop.com

> >
>
> ===================================
> This list is hosted by DevelopMentor(R)  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

>

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )