MVC Resources

I am currently working my way through the MVC 3 book that imaginekitty recommended so, they use Entity Framework for a simple ecommerce build.
By the way, ORMs, data persistence and enterprise or n-tier architectures are a new frontier for me.

Serenarules, are you saying that the “completely detached view model” code that you highlighted is a process to use the Entity Framework for a domain driven design as opposed to an “anemic data model (seen frequently in EntityFramework apps)”? Would I be able to do a projection, sum, count, or special grouping in the detached model view?

Thanks again,
tompatamacat

I’d like to see a video tutorial.

tompatamcat

Hmm. Why exactly would I do @{ Model.Page.Title = “foo” } in the View?

You, personally, probably wouldn’t. But when you design software, one must be mindful that other developers may get their hands on it at some point. A modest amount of self-protection is advisable. Never trust the UI. What if the company you design a web app for, decides to have another coder write a reporting UI to supply new demands that your app did not. Can you trust that the intent of the domain will be respected? Maybe. But probably not. The better thing to do is make sure that domain model is encapsulated so that if something unexpected does happen in an upper layer, it won’t taint or currupt the underlying data.

I understand. Thanks. :slight_smile:

For your consideration, I pulled up a little DDD sample I did a while back.

code: http://ragingpenguin.com/downloads/Novus-DDD-Example.zip
data: http://ragingpenguin.com/downloads/Novus-DDD-Example.sql.txt

The things you should focus on are the design of the domain objects and how the IPresentationService works with the view models.

I’ve had to pull the above files out of my domain for now. If anybody did not get it, and wants it, let me know.