General frustration with design of block

Topics: Web Client Software Factory, User Forum
Mar 6, 2007 at 5:59 PM

This block has a lot of potential but it seems many common cases weren't thought through and the flexibility is seriously lacking. I'm not trying to bash anyone here seriously; I have built custom ASP.NET product frameworks myself and I know the work involved. However devs, please have a look at Ruby on Rails in detail some more for inspiration. I created the product I'm using this block for in .NET using rails already in 3 weeks. The company I'm consulting for however is owned by a bigger company that is freaked out about supporting open source frameworks though so they are going with .NET even though I told them it will take 3 months for equivalent functionality (I've been doing .NET for 6 years and Rails for 1 - this is definitely a fair estimate). The total project will probably take them 2 years, which they really are having a hard time affording.

As far as separation of concerns the block does a great job! As far as productivity it really needs work however because the separation is (IMHO) too much...

When I use the guidance packages to create a module, I should have a folder for Constants, BusinessEntities, and Services created for me automatically. The generators should create NUnit tests for me if I don't have TFS. I know you guys want people to buy TFS but this is the real world, many companies simply can't afford it.

The guidance packages also don't work correctly if I move my module's views into a subfolder of the Modules folder in my solution, even though doing so by hand works great (this is needed for maintainability of projects with 20+ modules). A flat list of modules under the "Modules" folder will grow unwieldy fast in big solutions.

Having to write a test against my business entities, controller, presenters, views, and services is a ton of work for such little functionality. The mock strategy is very error prone and complicated. I should be able to test my model, view and controller as a unit, and services and be done.

The web service application block is also a very complicated and finicky piece of framework functionality for building DALs. Service agents, entity translators, and all this other stuff is very difficult for me to get our junior devs to grok. I've designed hand-rolled, well-documented portal frameworks with .NET several times before and it's definitely possible to get solid web service deployment in place to make swapping the pieces out for SOA scenarios work and still have it simple enough to understand.

Also configuring the default Enterprise Library logging block to place a rolling-over file logger into a well known location is a must for any enterprise level ASP.NET application, this should come out of the box.

Keep at it you guys, this is just feedback. I would strongly recommend learning Rails and releasing more often. You guys could really save the big hole many see in Microsoft's ASP.NET story if you continue smooth execution. Right now I spend several months at the beginning of creating any ASP.NET codebase upon which a company will build a new product (I'm a .NET/Rails/Java architect) before people can even see tangible results above and beyond infrastructural busywork. This is very hard for management to swallow and is making Rails much more attractive to many folks out there who are evaluating technology options for their next big project.

The pain I've went through deploying applications with MSI, and a look around at the market also shows that I think most folks that do not already have a vested interest in client applications are not interested in WPF or smart client applications - they want to build new products as commercial web sites that are shrink wrapp deployable (MSI again) or easy to deploy to .NET hosts. ASP.NET is just as important as ever, but you need to up the ante to make sure people keep adopting .NET and not looking at Rails for new web products.

Thanks for listening,
Mar 6, 2007 at 9:58 PM
Edited Mar 6, 2007 at 10:00 PM

I hear where you are coming from and agree with some of what you are saying. I think we have to look at the WCSF as the glass is half-full and not half-empty. A year ago we did not have a WCSF and now we have a 1.0 product that shows a lot of promise and is pretty productive and based on proven practices - proven practices that are new to a lot of developers.

Through feedback, the WCSF Team is now able to focus in on customer demand, which they didn't get the privilege of doing until they came out with a 1.0 product and people started talking more about their pain points and key scenarios with the product. A perfect example of this is the immediate response to people wanting to use Web Application Projects as opposed to web sites. They immediately came out with a solution for that demand.

I think there is also a lot going on behind the scenes that we are unaware of, or at least I hope so :) Enterprise Library is moving to version 3.0 this month. I think the WCSF may want to wait for it until creating another release as EntLib 3.0 is a significant release and will have for the first time the Rolling Log File TraceListener you think every website should have :) I hope for dear sake that we see a new version of ObjectBuilder, 2.0, that will have some documentation as well as a Dependency Injection Container. I am currently on a rant about a DI Tool in Enterprise Library or ObjectBuilder that you can read about in the following places:

Policy Injection Application Block - ObjectBuilder - Dependency Injection

Missing PolicyInjection.Create Method from PIAB

The beautiful thing about the Software Factories is that they are built on Guidance Automation Extensions and can be modified to your liking via the Guidance Automation Toolkit. This means you can personally modify the recipes to automatically include folders in your modules for Constants, BusinessEntities, and Services. I don't know if we should be requiring this a standard for everyone, but certainly if you have specific standards, you have the ability to make the modifications yourself. I am not suggesting this is a trivial exercise, but I don't know how many people would actually be deleting those folders either.

You use NUnit, but I prefer MbUnit. I also use Rhino Mocks, but I am sure others use different mocking frameworks. At some point I am sure the WCSF Team has to stop and say here is the biggest bang we can give you for the buck and you will have to incorporate the rest using your specific environment. I don't know where that is, but I can understand the dilemma that happens during developer meetings as to where to spend the time and effort.

I am also not sure if the WCSF is trying to compete with Ruby on Rails. I haven't used Ruby on Rails so I couldn't say, but one of the big assumptions here is that the WCSF is Microsoft's answer to Rails. I don't know that it is. I can think of a lot of other tools in my toolbox that will make an n-layer website based on a database. It might be that someone should make a spin off of the WCSF specific for Rails-type development. I know tools / projects like Subsonic, CodeSmith, BLINQ, MonoRail, etc. are more geared toward that type of development.

Anyway, I feel your pain as well and understand your frustration. I, however, really like what I am seeing from Patterns and Practices and think the next version will be a hit and continue to get better. I also agree that more agile techniques for putting out versions quicker is a must have. I know they are dogfooding a lot of their own projects that have different schedules so it may not be that easy.




David Hayden
Microsoft MVP C#
Mar 6, 2007 at 10:26 PM
Edited Mar 6, 2007 at 10:27 PM
Just so we're clear - I'm not trying to say that there is not a lot of great work being done. This could potentially be the best thing for web application development since ASP.NET 1.0 for Microsoft. The .NET framework has always had the runtime for what is needed to build large apps (with comparison to Java at least) but the IDE assumes drag and drop development, which just doesn't scale in large enterprise projects. This block takes a step towards a bit more complicated set of classes needed to do real world MVC'ish web apps and that's a gap that needs to be filled, for sure. I'm just stating that whether they are trying to compete with Rails or not, the complexity of this block really needs to be tuned down - and I know it's possible (I've had to create APIs to do many of these same things before myself).

I've heard a term "Architecture Astronaut" many times and it means this. Someone who goes up so many levels of abstraction from their goal that they begin to run out of air. I think this block has the potential to suffer from this on several levels. The design just needs to be revisited a bit and simplified, and the guidance packages need to be fleshed out to be more robust at giving you all the basics you need.

I'll be watching this block closely as I use it, and if I can provide any helper classes or better ways to do things I'll be sure to contribute them back to the block so people can benefit from them. I guess I'm just trying to understand the ultimate goal of the block and if the developers recognize how difficult some of the modularization makes it for typical, non-architect developers to grasp it. I get flashbacks to COM with some of the abstraction here.

Apr 15, 2007 at 6:53 AM
I think you are doing a fantastic job. Keep it up!!! I found this post when searching for how deal with the subfolder issue. That being said, the great thing about guidance is that you can write it yourself for special cases.