May 14th, 2009
Holy cow! Another *DD – man I really must have an IV with that Alt.NET Punch just coursing like a train in my veins! I ask for your patience with this one – cause I think BDD is a really good tool to know – whether you use it or not – knowing the workings of it will allow you to have some intelligent conversation the next time you’re in Austin .
The Start of BDD It all started – or so I’ve read – with a guy named Dan North:
I had a problem. While using and teaching agile practices like test-driven development (TDD) on projects in different environments, I kept coming across the same confusion and misunderstandings. Programmers wanted to know where to start, what to test and what not to test, how much to test in one go, what to call their tests, and how to understand why a test fails.
The deeper I got into TDD, the more I felt that my own journey had been less of a wax-on, wax-off process of gradual mastery than a series of blind alleys. I remember thinking “If only someone had told me that!” far more often than I thought “Wow, a door has opened.” I decided it must be possible to present TDD in a way that gets straight to the good stuff and avoids all the pitfalls.
I felt this exact way when learning up on TDD:
- where do I start?

- what do I do next?
- how do I know when I get there?
Things like that. I still don’t know those answers, but I feel like BDD has helped me see some very interesting ways to address these issues. Moreover, it will help me get along with my PM better – maybe .
The Usual Caveats No – I’m not an expert. Please don’t take any of what you’re about to say as guidance. Do take it as queue to find out more. Do ask a lot of questions and Do challenge yourself to see what some people love to use.
Download it here
Double-click for full screen
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: Kona Posted in Kona, MVC Storefront | Comments
April 7th, 2009
This screencast went from a simple idea – talking to Brad Wilson about better Unit Testing – to some pretty broad topics such as source control, unit testing, and continuous integration. I seriously could have written a whole book based on the stuff flying through my mind. I reigned it in a bit and decided to focus on two things that I don’t think get enough press: writing a good Unit Test coupled with Continuous Integration. It still came in at 50 minutes – oh well. I think it’s all good.
What I decided to do was to answer the following question:
Why should I care about Unit Tests (aside from being made fun of)? Why should I care in a Business Way?
When talking about Unit Testing (and TDD for that matter) most people will say “yah I know I should be writing more tests.” in a “yah I know I shouldn’t drink so much beer.” sort of way. This isn’t really a healthy thing – you shouldn’t feel that you need to write tests to be a good person (though a few folks might say so). You’re a smart person – and I’d like to respect that and see if I can appeal to your business mind.
What if I told you that if you spent some time mastering Unit Tests (coupled with a Build Server) you could:
- Code in less time
- Prove you’re finished (bug free)
- Come in under budget
- Sleep at night
If this sounds interesting to you – this screencast is for you. I should mention this is only an introduction; if what you see here appeals to you I’d like to suggest you get on down to Borders or hit Google to find out more!
The Code is Here
You can download the screencast here
(double-click to view full screen)
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Posted in Kona, MVC Storefront | Comments
March 27th, 2009
This may be a really dumb thing I’ve just done – but bear with me because I think it makes sense. I knew this point was going to come when I first started the MVC Storefront – the point where I’m no longer building “an MVC sample app” and I change directions to build a flexible, pluggable Open Source community application. So I decided to mark the occasion by changing the application name from MVC Storefront to Kona. This screencast is all about that change and what’s become of the MVC Storefront.
What’s Kona?
Aside from being one of the most beautiful places on the planet with one of the best brew fests EVAR, Kona is the name I chose one late night when thinking this whole thing over. Originally I wanted to go with “Hilo” (the 2nd largest city in Hawaii and also a hub of commerce for many, many years in old Hawaii) but everyone I showed it to kept asking me what “Hi Low” was all about. Indeed it did seem confusing – so I went with Kona.
Resuming the Screencasts
One thing I’ve really enjoyed was being able to screencast the “learning process” as I built out the MVC Storefront. I can easily say that I have learned more over the last year than I have *ever* in my career. In fact I’ll say I learned 5 times more – it was a ton of fun and I don’t want to stop now!
There are so many areas to cover that I think would be interesting – such as:
- Cloud Computing and Azure
- Analytics and this F# Thing
- Deep dives into javascript and jQuery
- Deployment issues
- Mono and what it means to us as developers (I have a message into Miguel De Icaza to see if he’d do a screencast with me)
Crazy Town
I’m trying out some different things with Kona, and these are:
- Commitment to simplicity. I think that ASP.NET developers tend to fall into the rut of “producing software” instead of producing a compelling website. So much focus is given to the backend that the front end is “left for the turtlenecks” – and it shows in the popular apps that are out there these days. I’m really going to try to emphasize the user interaction as the driver – not my fear of the architecture police
.
- Commitment to extensibility. This resolves down to plugins and theming – something that ASP.NET developers don’t focus on very much. I want to enable a “Notepad/FTP” experience, where you can alter/fix/maintain your application easily. I know you have a life and your time is precious – you shouldn’t have to dive deep into the application to figure out how tax is calculated
.
The ideas in the webcast are somewhat new and challenging and I’d like to say, once again, this isn’t supposed to be “guidance”. I tried to tackle those issues with the Storefront. This, instead, is my attempt at building something compelling, usable, and damn sexxy!
Your feedback, as always, is a major motivator!
The Code Is Here
Download Here (40 Mb)
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: aspnetmvc Posted in Kona, MVC Storefront | Comments
February 16th, 2009
This is my fault. Boom – there it is. No excuses, no lame attempts to laugh it off and blame Phil (even though it really is his fault). A lot of people have been messaging me via Twitter and leaving comments on my blog with the same question:
Dude, where’s the source! You promised 1-2 weeks! It’s been a month!
My response has been the same every time: the source will be ready by MIX. As you can imagine, people haven’t taken to this very well and have decided that:
- This is yet another, typical Microsoft project with flaws and endless delays
- This is just a marketing vehicle with no substance
- I must have better things to do and I clearly don’t care
I can understand the frustration – honestly I can because I told you something that’s not happening and that’s not cool. Well I’m here to tell you that nothing’s changed really – I still can’t load the source (but I’ll tell you why in just a second) – but it’s not for any of those reasons (obviously).
Good Things Happen The Storefront was probably one of the most organic applications I’ve ever worked on – something that was allowed to morph and change based on community feedback and changes in technology allowed. It changed faces twice:
- When I decided to refactor with an eye on harnessing the complexity using DDD
- When I decided (recently) to refactor yet again, to reduce “concept count” and to massage out a bit of extra poof put in there by my initial attempts with DDD
What you don’t know is that a 3rd refactor has just happened – and for a good reason: Microsoft is taking this effort seriously and it is now my 100% full time commitment (as opposed to before – the Storefront was almost completely an extracurricular thing for me). Now I know what you’re thinking:
OMFG Great!1!1! Another Pet Shop or Fitch and Mather!1!1!
I have nothing against those sample apps – nor do I have an issue with Starter Kits. But this is neither of those things. It has changed, it has matured, and it’s becoming the application I wanted it to become when I started this effort last spring: it’s becoming relevant.
We’re not all evil here. It’s not always about marketing, and it’s not always about pimping our stack – sometimes Good Things Happen and I’m asking for your patience for just another 4 weeks, while we tidy this thing up and I get ready to show it off (and some other things) at MIX.
So Why No Source!1!1! Because it’s not working yet and we’re still nailing out concepts – architectural shifts (slight, but awesome) that will make this thing work in a relevant way. It’s always been in the spirit of the Storefront to do these kinds of things in the open and to remain transparent – but we have a “concept shift” happening that I’ve been pushing for, and we’re “spiking it” right now to see if it makes sense (which I think it really, really does!) – it really helps if you can do these kinds of things in small groups.
So I’m taking this 45 days to work this thing and I’m asking for your patience – it’s coming together and I think it will rock at MIX. This has been a great experience in learning in every way, and if there’s something specific you’d like to know more about (in terms of patterns or code I’ve shown with the Storefront) I’m more than happy to show you and write a blog post on it. Someone just today asked for more information about the Presentation Model Pattern – so I’m working up a post on that currently.
I’m not playing you and I have no other agenda right now except to devote as much of my time as possible to getting this right. It could flop, or it could fly. I just need my head down right now with the rest of the team to nail this – and I’m asking you to be patient with me. It’s only another 4 weeks.
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Posted in MVC Storefront | Comments
January 24th, 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)
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: aspnetmvc Posted in MVC Storefront | Comments
December 5th, 2008
I don’t like the complexity that’s crept into my application. Not sure how else to put it – but the architecture needs to be shaken a bit so in this episode I tackle this complexity head on using DDD.
The Zen of Smell You can’t really define it when your app starts to smell – and I really hate that term! But it really applies to what I’m encountering right now as I begin to not only wrap up what I’m doing, but also demo it. People have questions, things aren’t apparent. I have answers to many of the architectural decisions but when I explain how they are carried out, I realize that I’ve just run over some potholes.
In short: I could have done better.
Continuous Learning That’s what this is really all about: we never stop learning and there’s always some refinement to be made. Yes I realize this can be a vicious cycle of never-delivery, but I’m also confident that the pursuit is always worth it. In this case, I’m relying on my 20 years of coding and development to elbow me in the ribs and suggest to me that “I can do better”.
I can make this application better, faster, stronger than before.
I don’t want to give in just yet and thankfully my new boss is a rockin super star and is letting me further explore this (seriously – send this man some love for letting me experiment).
There is gold in these hills. The journey I’ve set out on has already transformed the way I do things forever and all I hope and pray is that I am able to inject this goodness into the Storefront.
Your Patience, As Always, Is Appreciated To me, the payoff of this entire effort has been the journey itself. .NET has matured to major rev 3 and with it we have a great toolset (Linq, Anonymous types, MVC, etc). It’s sort of like wandering around [Killer Video Game], realizing you’ve leveled up and have unlocked The Next Great Zone.
Exploration is in order, the testing of new powers, the downing of bigger bosses, etc.
I can see the finish line – feature-wise there is no more to do. Right now it’s all about honing and refactoring so sit back and watch Part 1 of a 3-part process, as I take on the “drift” in the Storefront and try to apply some Zen to the madness.
The Source I’m working very hard to synch up everything I’m working on now, and it changes (literally) hourly. I just ask your patience as I get things put together and structured properly. This is not a quick affair, but something that takes time and discipline and I don’t want to short-change it. I really think it will be worth it.
Download Episode 25 It Here (42 Minutes, 62Mb)
Double-click for full screen
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: aspnetmvc Posted in MVC Storefront | Comments
November 24th, 2008
I felt pretty good about where things were a few weeks ago, but as I started tightening things up and showing the app to others (doing walkthroughs and code talks), I began to feel… well a bit “meh” about it. Something was bugging me about the way it’s come together. Some people refer to this as “smell” – when things work but just don’t seem right. I’m about to change that.
UPDATE: Kevin Dente suggested I might have put my foot in it with my statement below that DDD is simply a collection of patterns. That’s what it means to me, at this point, however that’s not what DDD is. It’s a bit more, obviously, and involves working closely with your client as well as testing the tar out of your code. I’d already done that (arguably) and I should have been more clear.
Enter DDD Please don’t hang up yet. Hear me out. I knew this day was coming, but I wanted to stay clear of “dogma” and let my instincts and tests dictate the application design. People had mentioned DDD, but to be honest I didn’t know enough about it to impose it’s strictures on the application.
Over the last few weeks I’ve been demoing the app to various people and walking through the code with them and to be honest, the story I’ve been telling is a tad fragmented. I don’t think it’s bad, but there’s a common understanding that’s missing. I’ve tried to pay attention to patterns where applicable, and I’ve also tried to avoid “crufting up” the application with dogmatic adherence to a line of thought.
I think I just got caught in the middle.
Truth be told I sensed this about 3 months ago and at the time I thought “I need to stop and redo something here” – but I wasn’t sure just what it was that I’d redo. So I picked up copies of Nilsson’s and Evans’ DDD books (at the behest of many) and began to read them on the weekends and evenings.
Koolaid or Kool Kid? I’m sure I’ve just polarized my readership – but I think, perhaps, there’s some common ground here that will 1) help me and 2) help you . If you don’t know DDD (and perhaps don’t want to know it because of… well shall we say getting beaten over the head with it), I think watching as I refactor the application with DDD in mind may really help you. There is a lot of goodness there.
If you’re a DDD wonk and have been waiting for me to “come to [Deity]“, well I’m almost there, but not quite. I really like the DDD approach for the way it deals with complexity – but complexity doesn’t exist when the app is small. This is something I’ve struggled to understand with respect to TDD and DDD.
In fact, so does Nilsson as he starts off his demo app, using TDD and DDD. He literally hams his way through his initial unit tests, implementing patterns and principles that will help him, ultimately, deal with an application he knows will get complex. I almost jumped out of my chair saying “how do you KNOW you need the FACTORY PATTERN YET!” and then BAM, he backs his way out of it and out of all DDD implementation until he really needs it (YAGNI baby!). I’m still unclear on this – I know it needs to be introduced at a refactoring point, but at the same time I also trust my instincts to know that all applications will end up being complex if they are successful.
Anyway, I’m now at a point in the life of the app where I can clearly see that it’s complex and needs to be bound by some common patterns and principles. That’s all that DDD really is – a collection of well-known patterns, many of which I’m already using.
A Little Help From My Friends I’ve asked a few folks I know in the community if they’d be willing to come on and help me out here with implementing some core DDD principles, and also their thoughts on DDD as a whole. I think this will be a very good episode.
I’m never sold on “only one approach” to anything, and I’ll press these guys to help me implement what makes sense. I also know that not everyone is sold on DDD – even some of the more seasoned folks in the community. I was chatting with one of them today and asked what they thought and the answer still has me giggling:
Domain Modeling: Good Jargon Explosion: Irritating
So very, very true.
I think this will be a really good episode, and to be clear, my goals are:
- Add some elegance using some well known patterns (Factory, Unit of Work, Repository)
- Reduce complexity and duplication (Services that just pass on queries, etc)
- Simplify
I’m aiming for Thursday/Friday for this episode to be ready.
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Posted in MVC Storefront | Comments
October 28th, 2008
There is a lot of work left to be done but I thought it would be a good idea to package up a Preview so that people can play with the site and the code.
Episode 24 Has Been Cut I’ve been working on Episode 24 for the last few days, which deals with how to implement coupons and incentives. I finished the system (and I’m happy with it) but the screencast put me to sleep. It was pretty dull, to say the least.
So I’ve decided to focus everything on cleaning this up and getting it ready for general use. If you’re really interested in how the coupons were created, I’ll dive into it at a later time. For now I really want this site to be finished!
You can get Preview 1 Here.
To install, you’ll need to unzip into a directory of your choice and then restore the DB backup file that’s in the “Commerce.Web\App\DBFiles” directory (we’ve removed the DB from the App_Data directory).
Make sure you’re using Visual Studio 2008 with MVC Beta 1, and you’re good to go.
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Posted in MVC Storefront | Comments
October 24th, 2008
A few months back I got to talking to J Sawyer who is a Developer Evangelist in the Texas area about the work I’ve been doing with the MVC Storefront. Before I worked at Microsoft, J was my “main man” with the Commerce Starter Kit – the very first Open Source project I ever worked on.
During the course of the conversation J asked me if I had any plans to do any “WebForm-y” stuff; and I said “no” since this was supposed to be an ASP.NET MVC project. But then I started thinking…
ASP.NET 3.0 doesn’t have any Starter Kits out there (that I know of) and it’s time we had one . If I’ve done my job right – J should be able to take the back-end goodness (Services, Data Access, Unit Tests, etc) and put them behind an ASP.NET WebForms site. And he did!
And thus CSK 3.0 is born.
But wait! There’s more! Part of J’s job at Microsoft will be to support this new project – something that I think is really, really groovy. More time, more love, more awesomeness .
In addition to the work he’s done to get the site rolled to WebForms – J’s also created a DynamicData admin site! I’ve been wanting to do just that for a long time – and I think this is a perfect synthesis of how MVC, DynamicData, and ASP.NET WebForms can all play happily in the same sandbox.
I sat down with J and talked about this and some other things – so have a look-see!
Watch it here. (15 minutes, 16 Mb)
The CSK 3.0 Project is here
J’s blog is here
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Posted in MVC Storefront | Comments
October 11th, 2008
In this episode I restructure a bit in order to clean things up some. I also tweak the site to redo the routing – something I think that went a little awry on me . Finally, I add PayPal as a checkout option.
Routing Can Be Tricky The MVC team did an exceptional job with the Routing engine and I did a less than stellar job of implementing a good routing scheme. As you’ll see in this episode, it got to the point where I had a bit of “route spaghetti” in an effort to make my URLs as pretty as possible. You’ll see me fix this – something I should have done a while ago – and restore routing to its default state.
One of the very cool things about resetting the routing is that I didn’t need to do *any* work to the Views – the ActionLink and Url.Action methods worked flawlessly and I didn’t need to update any links. That’s awesome and a hat-tip goes to Eilon and Phil for that!
PayPal I want to be sure that implementing a “store for the masses” is bleedingly simple – and nothing is easier for a merchant to setup than accepting payments from PayPal. In this episode I add in PayPal Standard and show you how to setup a PayPal controller that works with PayPal’s IPN and PDT. I also show you how to effectively send tax/shipping information to PayPal and catch it on the rebound.
Some Formatting Love Finally – Rickey Rosario over at Razorfish/AvenueA sent me a patch for the HTML/CSS that both cleaned it up and made it look exceedingly pretty. He even included Yahoo’s CSS Reset – which is very nice for resetting the default CSS settings. I can’t thank him enough for his work!
This is a bit of a long one (about 50 minutes) – lots of information in here. After this I’m going to put my head down and crank out the rest of the site as I really would like to finish everything up.
Hope you enjoy!
You can watch it here.
The code Is here (SVN is here)
Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: aspnetmvc Posted in MVC Storefront | Comments
|
|