Front Controller (FrontController) Implementation

G

Guest

I have been trying to implement Front Controller design pattern for web presentation in my ASP.NET project. I designed my entire presentation layer based on this pattern, just to discover that this pattern cannnot be implemented as it is in ASP.NET. In fact, I designed all layers of my application based on the patterns proposed in "Enterprise Solution Patterns for Microsoft .NET", believing that MS would not suggest a pattern that would not work. The issue with "Front controller" pattern seems universal. All newsgroup postings on "Front Controller" pattern discuss the use of Server.Transfer() method which leads to a known error message "Error executing child request".

I really appreciate the benefits of Front Controller pattern, and I am desperate to implement it in my application. I am really surprised why this design has been proposed by MS when we cannot implement it in .NET. I could not find a single working sample in any of the Microsoft sites except for some code snippets in Patterns and Practices site.

I found one demo at this link http://msdn.microsoft.com/asp.net/using/migrating/jspmig/resources/code/. This demo deals with migration of Java Structs to ASP.NET. Its a very good example, we could actually borrow the Url mapping technique used in this demo. I beleived that I can make Front Controller pattern work, when I ran this demo. Unfortunately, this demo just provides guidelines for JSP migration and does to deal with the Server.Transfer() issues. When I extended this demo code a little, I received the same old "error executing child request" error.

I would be really grateful if someone could prove me wrong and help me make this pattern work in my project

Regards
Wilson
 
L

lyndon

I feel your pain. The demo provides you with just enough code to make you
think you can actually run it. I tried filling in the blanks with no luck.
I had the same fate when trying to learn the methodology by looking at the
architectural site on MS
Wilson said:
I have been trying to implement Front Controller design pattern for web
presentation in my ASP.NET project. I designed my entire presentation layer
based on this pattern, just to discover that this pattern cannnot be
implemented as it is in ASP.NET. In fact, I designed all layers of my
application based on the patterns proposed in "Enterprise Solution Patterns
for Microsoft .NET", believing that MS would not suggest a pattern that
would not work. The issue with "Front controller" pattern seems universal.
All newsgroup postings on "Front Controller" pattern discuss the use of
Server.Transfer() method which leads to a known error message "Error
executing child request".
I really appreciate the benefits of Front Controller pattern, and I am
desperate to implement it in my application. I am really surprised why this
design has been proposed by MS when we cannot implement it in .NET. I could
not find a single working sample in any of the Microsoft sites except for
some code snippets in Patterns and Practices site.
I found one demo at this link
http://msdn.microsoft.com/asp.net/using/migrating/jspmig/resources/code/.
This demo deals with migration of Java Structs to ASP.NET. Its a very good
example, we could actually borrow the Url mapping technique used in this
demo. I beleived that I can make Front Controller pattern work, when I ran
this demo. Unfortunately, this demo just provides guidelines for JSP
migration and does to deal with the Server.Transfer() issues. When I
extended this demo code a little, I received the same old "error executing
child request" error.
I would be really grateful if someone could prove me wrong and help me
make this pattern work in my project.
 
G

Guest

Thanks Lyndon. I think all the time and effort put in making this pattern work is a total waste unless we get proper guidelines from Microsoft. I hope Microsoft will come up with a solution soon.
 

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