views:

161

answers:

1

When I first switched from Java to C#, I was really impressed with C#'s features. However, it seems to me that C# has yet to provide solid infrastructures in the way JavaEE does.

Everytime I try to integrate C#'s features into scalable or complexe architectures, it always comes down to: How can I twist this so it can be MVC / MVP? Databinding, for instance, has gave me more headaches than it had saved me time.

MSDN has lots of documentation related to architecture and patterns. However, for the most part, they are "textbook" and don't address how these concepts relate to .NET features.

JavaEE's EJBs and Apache's Struts both seem to encourage MVC architectures. Like most of JavaEE, they tend to put the emphasis on seperation concepts and scalability, making them candidates for large scale projects.

Apache puts it like this: Struts is like "standing on the shoulders of a giant". Can I make my way onto .NET's shoulders, too?

The best one-liner I could come up with is:

Is there any C# architecture-shaping framework commonly used in large scale projects?

I couln't resist the analogy: I feel like .NET is the Power Rangers while JavaEE is Megazord...

Disclaimer: I'm sold to C#, over Java. I've lead a couple of small-medium scale projects in C#, mostly using MVP seperation; I'm just trying to "fill the void".

+4  A: 

.NET doesn't really have one all-encompassing architectural framework that you can or must use. It depends a lot on the type of application you are writing.

Since you ask explicitly about MVC/MVP and databinding, I guess that one of your concerns is architecture as it relates to UI and separation of concerns. That is very differently handled in web applications and desktop applications.

For web applications, the relatively recent ASP.NET MVC framework takes you in the right direction. It could be better (and I expect v.2 will be), but I'm already pretty happy with it.

For desktop applications, Windows Presentation Foundation gives you good opportunity to separate logic from UI by implementing the MVVM pattern.

I suspect, however, that you are looking for something more structurally founded than that. Today, in the Base Class Library, we don't really have such a thing, but on the other hand, there are many open source DI Containers out there that can help you build composable large-scale applications.

Some common DI Containers are:

I am not sure whether this is helpful or not, as I don't really know Java well enough to understand exactly what you are looking after, but I hope that you find it just a bit useful.

Mark Seemann
I'll certainly take a deeper look into Castle and String.NET; they seem to integrate what I was looking for. Thanks!
Bryan Menard