Saturday, January 24, 2009 -
This is the last episode in the MVC Storefront series and this might seem a bit odd. It's definitely not the last screencast I'll do with respect to ASP.NET MVC, but I think I've gone about as far as I can go with this series.
Shift In Perspective
The goal of the series has been to explore ASP.NET MVC and the various disciplines that compliment it. We've covered all kinds of developer goodness, including Test-driven Development, Dependency Injection, and (lightly) Domain Driven Design. You've seen me build, break,
learn, and refactor - all the cycles that most applications go through in their early lifetime.
At this point the Storefront is changing shape. I talk a bit about this in the video - but I'd like to add to it a bit. I've tried to make this as real-world as possible, which is hard when I didn't really have a client (especially when it came to trying to use DDD). This is has worked for the most part, but I've reached a point where it's no longer viable to keep developing in this way.
We're altering the Storefront right now to be more of a "platform" and this is a lot different from building out a dedicated client application. We have to build in extensibility, theming, and other things that might be of interest, but in the end don't really apply to "real world" development.
I'll have a lot more to say about this at MIX 09 (details in the future) so hopefully you're coming!
Source Code
Many people have been asking for a drop of the source - and I'm hoping to have it soon. There's a lot more to do - including Code Analysis and documentation (which I hope to capture in a screencast). I want to get you the source but it's goin to be a week or two before I can.
The Presentation Model
The first part of the video I spend about 8 minutes or so "wrapping up" the series and offer some final thoughts on the journey so far, but I wanted to tell you there is a fair bit of code in this last video as well.
One question I get asked a lot with respect to ASP.NET MVC is "how do you handle a page with a lot of different data on it" - like the front page of a Blog for instance. I give a possible solution to this with something I've just implemented with the Storefront: The Presentation Model.
The Presentation Model is something Fowler talks about as a way of basically segregating your UI decision "stuff" into a central location so that when you branch/change you UI, your don't need to reproduce all your view logic. This may initially seem like "dude how often would I do that" but if you think about the advent of ASP.NET MVC and how much code you'd need to replace - well you know where I'm going. Centralizing this stuff is a pretty nice design choice, and it also allows you to "go thick" if you want to leverage Silverlight in the future.
Final Thoughts on DDD
In the beginning I finish up my overall thoughts on DDD and where it's taken me and the MVC Storefront in general. I had wanted to do a bit more with respect to DDD, but in the end thought it would be a bit redundant. I've been lucky enough to do a couple of podcasts on the subject:
Hanselminutes Podcast #140: I talk with Scott about learning DDD
Alt.NET Podcast #15: Domain Driven Design
In the first podcast (with Scott) I talk a bit more about the learning of DDD - not really DDD itself so it's sort of a "summary" if you will. In the Alt.Net podcast I go a bit deeper into what I've learned and the philosophy behind it all.
I had intended on talking a bit more about it with the Storefront series, but to be honest I just don't think I know enough about it to go any further. For now I know enough to understand that there are some things that will work well (and I covered those last time) and some things that I just don't need since I'm not building rockets.
To me that's the goal - knowing enough to know when you don't need it.
That's where I'll leave off with this series: the importance of learning and always trying to improve what you know. Knowledge isn't a weapon - it's a gift and one that you should share and seek.
Download Here (35Mb ~ 27 minutes)
-Rafi
Just wanted to say nice work on this series. I've found it very very interesting. It's great to see that Microsoft is adopting proven patterns and practices from the greater software community.
It's been frustrating at times being in the .net camp as a web dev because there have been some awesome j2ee frameworks out there for a long time. About 6 or 7 years ago I used to work with the struts and webwork frameworks (with j2ee), the asp.net webforms framework never seemsed to fit http very well to me, and obviously it wasn't very testable as you've pointed out. This new mvc framework seems to be extremely well designed, I'm looking forward to using it.
Also, I think that the recent (and long overdue imo) shift towards orm in .net is great (i like IQueryable btw!). I remember being on a team that wrote a crude implementation of an orm in c# based on a paper by scott ambler :) And it was because there was no equivilent to ejb or hibernate (which hadn't really established itself at the time).
Anyway, well done with the series, the honesty and humility in your approach and the fact you were able to get the community invloved made it great to watch!
(ideally)...
With the addition of the Presentation Model are you inclined to stick you view presentation logic in those models instead of creating an HTMLHelper function? Like you talked about in "ASP.NET MVC: Avoiding Tag Soup".
release the source and I let it get to me :(. What can I say - I'm human...
Honestly MIX is a convenient target - and hopefully when I'm done with the
talk and release the source it will make sense why.
Storefront being a marketing tool isn't a bad thing. Means someone thinks it worthy to use to show off new features. Not showing it before MIX, done or undone, makes total sense to me. I worked in similar situations where we had to wait for a conference to release a finished product (not saying storefront is finished). Must means something good is to come.
Sorry, I can see how the post didn't come off to well on my side. I've read and watched the series and think you did/ are doing a great job. I thought MIX09 was in 2 months, sorry. One month makes it even better.
The presentation model is of interest because we are currently trying to use MVC in a large project and we are fighting the whole aggregation of data and how to keep things looking right between the model and view. Just trying to find some best practices. So when you hit on it in the last blog I thought, finally I'm not the only one that had a problem.
Out of the three (you, Scott, and Phil), you were the only one doing a complete application so everyone was watching you closely. I wish Atwood would share some insights, using it with stackoverflow, but he rather start flame wars right now. BTW- nice reply on his post.
Any road, I am sorry I said what I said the way I said it. I think it would be cool to work on a project like this and have people want you to kick it up a few notches to make it a best practice / showcase piece.
sharing it right now and I'm asking for your trust here. I don't think I've
done anything to violate that - except for being lucky enough to have
Microsoft "pick up" this project and run with it seriously.
If you have something specific you'd like me to blog about between now and
then, please feel free to ask (it sounds like you want to see more about the
Presentation Model - I'm happy to show you that). But insults don't sit well
with me.
Almost 2 months.
There has been told it will show itself in full Glory on Mix 09, MS main devel conference, so guess we need to get visa fast :)
3 weeks have passed and still no source code ? :(
Any idea about when it will be ready ? ... please ? :)
Either way, just registered for MIX yesterday so I'll be sure to make it to that session.
It's actually the opposite - the project has been embraced completely and
I'll be showing it (in it's new form) at MIX. I'm actually typing this
comment while on a team conf call where we are going over lots of fun
innovations and things we want to show!
So - despite how it *looks* - the project has not gone away :)
Now I know you have bosses and my comment though harsh was not really directed or intended for you. Just a generalization that the usual pattern of having to deal with bosses and the "company," seems to be getting to the project. I look forward to the eventual release of the source and hope that it come sooner rather than later.
Again, I apologize and keep up the good work. :)
put it on Codeplex and it will work against RC, yes. For what it's worth,
I'm working on it full time right now :)
Rob's clearly put a lot of time, thought and effort in to this, you can't rush the process, far better he gets it right. In agile terms it'll be ready when it's ready!
Tisk tisk.
Let me share my recent lesson. I was reading Applying Domain-Driven Design and Patterns and working with NHibernate trying my best to do DDD. Soon I had 8 projects in my solution, was writing tests 75% of the time, and had no clear view of the application anymore. Then the Getting Real book from 37signals arrived in the mail. Since I have rebooted, I will use LINQ to SQL, stick close to the database and I'm not even sure I will be writing unit tests even.
Bottom line, I am now convinced the app will be finished in the near future. I realised my app doesn't need DDD, although I learned it can be a very good practice. Just not for me, not now.
I think you learned similar lessons. If you haven't read the Getting Real book, I recommend it.
I'm very curious.
Just a quick (but certainly not small) thanks for the MVC SF series...I am learning a lot from it and using it to help shape my company's new web site.
I was just wondering if (or where) you have posted the sample code for the last episode? The areas where I need the most help are authentication and wrapping my brain around the method of repository pattern you settled on in the end. It looks like 17126 is the last change set available for download - does that code cover episode 26?
Thx, dave
stay) - again sorry for the pain. The download should work now.
This message has been on the video for days now. I see Jesse Liberty have the same error on his video on his latest blog post, so guess it a common problem with some of Microsoft servers.
The sad thing is that is has been like this for some days now, which is very bad...
Rob, call up Bill and make him take a look at it :)
Oh, btw, would love to comment on the video, but can't see it as you know.
BR
Mads
Thanks
--Dietrich
streaming) or you can DL the vid file. Sorry for the pain.
I've enjoyed the series very much, it has been a great learning experience. Very real world hands on learning, what devs go through everyday, this is why I think so many people have identified with / learned from it.
I'll be sure to drop ScottGu a note, they surely deserve to know the value of this learning experiment.
You are the man!!!!
I should have looked at the code first, I guess... Oh wait... :-P
Just kidding of course, thanks again for the great series (but still, eagerly awaiting some source code!)
needed them according to the UI, not per object. It just so happens I have
one for Order, Product, and Customer :). Which coincidentally are my agg
roots - go figure :)
I would also like to thank all the people that contributed - Scott, Oren, Jeremy ...
It takes a village to build an application!
You got me hooked on TDD, good thing or bad thing I still don't know but I I'm having a lot of fun.
Trevor
...there was some familiarity with sega's hedgog ;)...got it! sonic...Subsonic 3!
I think that will be the final part ;p
Cheers - I really hope to do more in the future :)
I've been loving the series, and it's been a great help in encouraging me to go DDD at work too (it got me to read Evans' book on the subject). Thanks you for sharing this with us.
Angus
go without factories. You can't use this with Linq To SQL:
from p in db.Products
select Product.CreateNew(p.ID, p.Name)
You can use constructors, however.
Yes, I've moved a lot of stuff back to the Repo level as I'm gearing this to
be usable by *any* data source, not just IQueryable sources. I also have
some other tricks up my sleeve which I'll share when I can.
I will get the source pushed - just hang in there.
Thanks for the work though. I'm going to look into Mix 09.
I think a lot of us wouldn't mind an unfinished... maybe "changeset," version of the source. Most of us probably want a peak at the source so we can get some ideas rather than using it as an actual application.
Thanks again.
Thanks,
Santos
Great job!
Thanks!
this series were useful to me it worth watching thank you !
++Alan
I've already emailed your PM (a while back) about how important it has been to myself and my collegues, so i'm sure i'll do it again to re-enforce how important it has been and how (IMO) the community needs more vid's/projects like this. There are so many technologies out there to leverage, it's so frustrating trying to find how to take maximum advantage with least effort - in summary, how to best make a website, using the skills and applications available resulting in least amount of support & maintenance.
I feel that you have opened our eyes to many well know ideas and skills but most importantly showed us how to bring these together into a usable and profitable mechanism.
Well done and i can't wait to see how SubSonic intergrates into this. I'm holding off learning SubSonic until i can see how it is integrated in this project, if that will ever happen. Why? This is how strong i have come to believing in what you've been doing that when i now hear or learn something new out there, I see how it can relate to this project and how it can fit into this project. So when i see how to do SubSonicy(tm) things in this MVC Storefront will i come close to Enlightenment.
So yeah .. thanks Rob :) Oh .. what next? Finish up SubSonic or is there more Ninja-MVC-magic behind the scenes?
/end Wall-Of-Text. *blush*
I think a lot of us wouldn't mind an unfinished... maybe "changeset," version of the source. Most of us probably want a peak at the source so we can get some ideas rather than using it as an actual application.
Thanks again.
Thanks for the work though. I'm going to look into Mix 09.
go without factories. You can't use this with Linq To SQL:
from p in db.Products
select Product.CreateNew(p.ID, p.Name)
You can use constructors, however.
Yes, I've moved a lot of stuff back to the Repo level as I'm gearing this to
be usable by *any* data source, not just IQueryable sources. I also have
some other tricks up my sleeve which I'll share when I can.
I will get the source pushed - just hang in there.
++Alan
Great job!
this series were useful to me it worth watching thank you !
Thanks!
Thanks,
Santos
I've been loving the series, and it's been a great help in encouraging me to go DDD at work too (it got me to read Evans' book on the subject). Thanks you for sharing this with us.
Angus
Cheers - I really hope to do more in the future :)
...there was some familiarity with sega's hedgog ;)...got it! sonic...Subsonic 3!
I think that will be the final part ;p
You got me hooked on TDD, good thing or bad thing I still don't know but I I'm having a lot of fun.
Trevor
I would also like to thank all the people that contributed - Scott, Oren, Jeremy ...
It takes a village to build an application!
-Rafi
needed them according to the UI, not per object. It just so happens I have
one for Order, Product, and Customer :). Which coincidentally are my agg
roots - go figure :)
I should have looked at the code first, I guess... Oh wait... :-P
Just kidding of course, thanks again for the great series (but still, eagerly awaiting some source code!)
I've enjoyed the series very much, it has been a great learning experience. Very real world hands on learning, what devs go through everyday, this is why I think so many people have identified with / learned from it.
I'll be sure to drop ScottGu a note, they surely deserve to know the value of this learning experiment.
You are the man!!!!
streaming) or you can DL the vid file. Sorry for the pain.
I've already emailed your PM (a while back) about how important it has been to myself and my collegues, so i'm sure i'll do it again to re-enforce how important it has been and how (IMO) the community needs more vid's/projects like this. There are so many technologies out there to leverage, it's so frustrating trying to find how to take maximum advantage with least effort - in summary, how to best make a website, using the skills and applications available resulting in least amount of support & maintenance.
I feel that you have opened our eyes to many well know ideas and skills but most importantly showed us how to bring these together into a usable and profitable mechanism.
Well done and i can't wait to see how SubSonic intergrates into this. I'm holding off learning SubSonic until i can see how it is integrated in this project, if that will ever happen. Why? This is how strong i have come to believing in what you've been doing that when i now hear or learn something new out there, I see how it can relate to this project and how it can fit into this project. So when i see how to do SubSonicy(tm) things in this MVC Storefront will i come close to Enlightenment.
So yeah .. thanks Rob :) Oh .. what next? Finish up SubSonic or is there more Ninja-MVC-magic behind the scenes?
/end Wall-Of-Text. *blush*
Thanks
--Dietrich
This message has been on the video for days now. I see Jesse Liberty have the same error on his video on his latest blog post, so guess it a common problem with some of Microsoft servers.
The sad thing is that is has been like this for some days now, which is very bad...
Rob, call up Bill and make him take a look at it :)
Oh, btw, would love to comment on the video, but can't see it as you know.
BR
Mads
stay) - again sorry for the pain. The download should work now.
Just a quick (but certainly not small) thanks for the MVC SF series...I am learning a lot from it and using it to help shape my company's new web site.
I was just wondering if (or where) you have posted the sample code for the last episode? The areas where I need the most help are authentication and wrapping my brain around the method of repository pattern you settled on in the end. It looks like 17126 is the last change set available for download - does that code cover episode 26?
Thx, dave
I'm very curious.
Let me share my recent lesson. I was reading Applying Domain-Driven Design and Patterns and working with NHibernate trying my best to do DDD. Soon I had 8 projects in my solution, was writing tests 75% of the time, and had no clear view of the application anymore. Then the Getting Real book from 37signals arrived in the mail. Since I have rebooted, I will use LINQ to SQL, stick close to the database and I'm not even sure I will be writing unit tests even.
Bottom line, I am now convinced the app will be finished in the near future. I realised my app doesn't need DDD, although I learned it can be a very good practice. Just not for me, not now.
I think you learned similar lessons. If you haven't read the Getting Real book, I recommend it.
Tisk tisk.
Rob's clearly put a lot of time, thought and effort in to this, you can't rush the process, far better he gets it right. In agile terms it'll be ready when it's ready!
Now I know you have bosses and my comment though harsh was not really directed or intended for you. Just a generalization that the usual pattern of having to deal with bosses and the "company," seems to be getting to the project. I look forward to the eventual release of the source and hope that it come sooner rather than later.
Again, I apologize and keep up the good work. :)
It's actually the opposite - the project has been embraced completely and
I'll be showing it (in it's new form) at MIX. I'm actually typing this
comment while on a team conf call where we are going over lots of fun
innovations and things we want to show!
So - despite how it *looks* - the project has not gone away :)
Either way, just registered for MIX yesterday so I'll be sure to make it to that session.
put it on Codeplex and it will work against RC, yes. For what it's worth,
I'm working on it full time right now :)
3 weeks have passed and still no source code ? :(
Any idea about when it will be ready ? ... please ? :)
There has been told it will show itself in full Glory on Mix 09, MS main devel conference, so guess we need to get visa fast :)
Almost 2 months.
sharing it right now and I'm asking for your trust here. I don't think I've
done anything to violate that - except for being lucky enough to have
Microsoft "pick up" this project and run with it seriously.
If you have something specific you'd like me to blog about between now and
then, please feel free to ask (it sounds like you want to see more about the
Presentation Model - I'm happy to show you that). But insults don't sit well
with me.
Storefront being a marketing tool isn't a bad thing. Means someone thinks it worthy to use to show off new features. Not showing it before MIX, done or undone, makes total sense to me. I worked in similar situations where we had to wait for a conference to release a finished product (not saying storefront is finished). Must means something good is to come.
Sorry, I can see how the post didn't come off to well on my side. I've read and watched the series and think you did/ are doing a great job. I thought MIX09 was in 2 months, sorry. One month makes it even better.
The presentation model is of interest because we are currently trying to use MVC in a large project and we are fighting the whole aggregation of data and how to keep things looking right between the model and view. Just trying to find some best practices. So when you hit on it in the last blog I thought, finally I'm not the only one that had a problem.
Out of the three (you, Scott, and Phil), you were the only one doing a complete application so everyone was watching you closely. I wish Atwood would share some insights, using it with stackoverflow, but he rather start flame wars right now. BTW- nice reply on his post.
Any road, I am sorry I said what I said the way I said it. I think it would be cool to work on a project like this and have people want you to kick it up a few notches to make it a best practice / showcase piece.
release the source and I let it get to me :(. What can I say - I'm human...
Honestly MIX is a convenient target - and hopefully when I'm done with the
talk and release the source it will make sense why.
(ideally)...
With the addition of the Presentation Model are you inclined to stick you view presentation logic in those models instead of creating an HTMLHelper function? Like you talked about in "ASP.NET MVC: Avoiding Tag Soup".
Just wanted to say nice work on this series. I've found it very very interesting. It's great to see that Microsoft is adopting proven patterns and practices from the greater software community.
It's been frustrating at times being in the .net camp as a web dev because there have been some awesome j2ee frameworks out there for a long time. About 6 or 7 years ago I used to work with the struts and webwork frameworks (with j2ee), the asp.net webforms framework never seemsed to fit http very well to me, and obviously it wasn't very testable as you've pointed out. This new mvc framework seems to be extremely well designed, I'm looking forward to using it.
Also, I think that the recent (and long overdue imo) shift towards orm in .net is great (i like IQueryable btw!). I remember being on a team that wrote a crude implementation of an orm in c# based on a paper by scott ambler :) And it was because there was no equivilent to ejb or hibernate (which hadn't really established itself at the time).
Anyway, well done with the series, the honesty and humility in your approach and the fact you were able to get the community invloved made it great to watch!
can you please tell me why did you switch to xUnit during StoreFront development? What was that phrase "Bred made me" meaning?
if there were some nice arguments why switch to xUnit I would like to know that, because I want to turn eyes of my colleagues to this framework, but I do not know any arguments yet, except for that I like it=).
Thanks in advance!
The download link does not work anymore.
Thank you!