Home MVC Storefront

MVC Storefront Part 17: Checkout With Jeff Atwood

In this episode I ready up the checkout process and talk with Mr. CodingHorror himself, Jeff Atwood. We talk about all kinds of things but mostly discuss Open ID, CardSpace, and how Jeff would like to see the checkout process work in an ideal world. I then walk you through setting up CardSpace on your local machine.

CardSpace Is Dead. Long Live CardSpace!
It's a shame that InfoCard/CardSpace doesn't get the attention it deserves. It really is an amazingly cool technology that can make life a lot easier for developers. It took me a long time (3 days to be exact) to find some usable, workable code to get CardSpace running (yes I've seen the examples - none of them worked).

Long and short of it is that once I got it up and running, I was amazed!

I hope you enjoy this screencast - Jeff's super awesome sauce for coming on, and he even used small words. I'll have a code drop in a few days once I round things out a bit.

You can watch it here.

Jonx avatar
Jonx says:
Thursday, July 17, 2008

How can I think any good from a technology that needs me to investigate several days before being able to see how amazing it is... Maybe that's why it strugles at getting the attention it deserves. Hopefully your example will improve this ;)

Also, for me, I would prefer the pragmatic world against the ideal world. Thanks anyway. The fun is still on your side.


Jeff avatar
Jeff says:
Thursday, July 17, 2008

Woohoo! first comment. Thanks for the new addition, I am atching it now I am sure it will be awesome as always


Angel Escobedo avatar
Angel Escobedo says:
Thursday, July 17, 2008

Hi there Rob, have you mind move code to preview 4? i try to found how json works in preview 3 but i just found few documentation to start works with third party js libraries, ill be so thankfull!

*PD: Interesting webcast, thanks again about your time and shared knowledge [:)]


Jamie avatar
Jamie says:
Thursday, July 17, 2008

This is good stuff. Hopefully we'll get the capability to run the whole CardSpace infrastructure from USB soon. It'll be nice to carry a USB stick with your cards on it and just run it from there without having to import to someone else's computer.


Rob Conery avatar
Rob Conery says:
Thursday, July 17, 2008

@Jonx the technology shouldn't be compared to the support surrounding it; it's good stuff in all shapes and forms. But you're right - that is why it's struggling.

Pragmatic vs. Ideal? That's hardly a fair statement here. Storing user information when not needed is not pragmatic.


Joel avatar
Joel says:
Thursday, July 17, 2008

Rob,

Thanks for the webcast. I wish Cardspace was more widely used.

---

Are you going to post the source code from this webcast?

On your twitter a few days ago you mentioned a fix for your LazyList. Can you speak more about that? Thanks.


Emad Ibrahim avatar
Emad Ibrahim says:
Friday, July 18, 2008

whew... I just finished watching all 17 videos (in windows media player at 2x speed)... my head hurts...

Awesome stuff man, can't wait for the rest. I agree with Joel, CardSpace is cool and I wish it was more widely used... I tried to use it a couple of years ago, but it was so badly documented that I got discouraged.

I also noticed you ran into a problem when you used IIS. I ran into the same problem. MVC routing doesn't work well with virtual directories and seems to always try to go to the root e.g. /account instead of /mvcsf/account. So when deploying prototypes to clients, I have to use subdomains i.e. prototype.mysite.com instead of mysite.com/prototype... is there an easy way to address this issue?

PS: I am so used to hearing you at 2x, so I think if I meet you in person, you will sound so slow... Don't be offended if I dose off :)


Eric avatar
Eric says:
Friday, July 18, 2008

I took a look at the application code for the first time. The amount of code required for SqlOrderRepository.SaveOrder() is downright scary!?! What benefit do you get from using LINQ To SQL? I thought that using an OR/M was supposed to mean that you wrote less data access code and spent more time with business logic (or 'domain logic' as the cool kids are now calling it) code? I bet you $500 dollars*, I could write less code using ADO.NET's ExecuteCommand() and it would be 100,000 times easier to read and maintain. I *shudder* to think that this is some sort of 'reference architecture' that people will model their applications on.

* Not a real bet. ;)


Chris Kolenko avatar
Chris Kolenko says:
Friday, July 18, 2008

Sorry Rob,

i'm not going to praise you here!!.. Only really works with IE.. i bite my lip when i heard that..

Sounds like a great option but i would only use card space once it worked on Safari..

Card Space .. sounds like they will integrate this with dominos on the Microsoft Surface.. is that a good assumption?


Yitzchok avatar
Yitzchok says:
Sunday, July 20, 2008

If you want CardSpace for Firefox 3 try this

www.codeplex.com/.../ProjectReleases


Travis avatar
Travis says:
Monday, July 21, 2008

Eric, dont compare LINQ to SQL with a "true" ORM. Look at the code required to do the same thing with NHibernate, you might be surprised.


Rob Conery avatar
Rob Conery says:
Monday, July 21, 2008

>>> The amount of code required for SqlOrderRepository.SaveOrder() is downright scary!<<<

Absolutely agree - this will be refactored (as I mention in the comments and in the screencast).

>>>I bet you $500 dollars*, I could write less code using ADO.NET's ExecuteCommand() and it would be 100,000 times easier to read and maintain.<<<

Sure, I'll take that bet :)

>>>I *shudder* to think that this is some sort of 'reference architecture' that people will model their applications on.<<<

I spose if you want to base the entire application on 1 routine - that's up to you :). This 1 routine, however, is not my "architecture" - it's 1 routine that needs to be refactored. I don't think I'm following you here (nice Gravatar though - should I take your comment seriously?)

@Chris Kolenko - I didn't say CardSpace works only with IE - I said there's no plugin for FF3 yet but from what I understand it's available now.

>>> i would only use card space once it worked on Safari..<<<

CardSpace is only an option for qualifying browsers. What you use and what your Users use is a different issue - it doesn't invalidate InfoCard/CardSpace.


Firefly avatar
Firefly says:
Tuesday, July 22, 2008

I haven't got time to follow the source code due to other obligation but from my personal experience I'll take DLINQ over ADO.NET anyday. There are always some architecture overhead whenever you want to apply loose coupling and divide up your application on a small scale application. But as my application scale up I've learned to appreciate what it mean to be loose couple.


Chris Kolenko avatar
Chris Kolenko says:
Tuesday, July 22, 2008

Thanks for the update Yitzchok/Rob.. :D

Just to make it clear.. i couldn't care less about safari.. it's just this brain washing i have from my project manager who is a mac fan.. if it doesn't work on safari i get a smack lol..

i just have this bad gut feeling when ever i see active x object required.. or pluggin needed..

The goal of this MVC Store front is to "sell stuff", if i was a potient client and i saw active x object.. this big red alert comes up and says don't buy from this guy/girl..

Ok.. now Rob is going to say that's why there is other ways to sign in.. which is all good.. just there is to much complexity.. and i'm waiting to see how you come up with the solution.. which you have mentioned..

As for this Open ID stuff.. i think it's great.. i would like to see it on more social sites.. forums things like that.. as for a website that is trying to sell stuff.. this little thought comes to mind.. why hasn't this guy bothered with making his own user repository.. is he cheap?? is he going to take my money and run...

please note these are my own views.. i haven't been drinking.. what are other peoples thoughts?


Jamie avatar
Jamie says:
Tuesday, July 22, 2008

I agree with Chris Kolenko on the point about Open ID possibly making a site look "cheap". I can tell you that when I go to make a purchase and their only check out option is to be shuttled off to PayPal (not the integrated PayPal, but the one where you actually are redirected to PayPal to check out) it does make them look a little less professional to some people. And it doesn't really matter that PayPal is a pretty well universally accepted payment medium - there's still a sizable portion of the web-browsing population that instinctively thinks your site is duct-taped together when any kind of redirect to a third party happens.


Jon avatar
Jon says:
Tuesday, July 22, 2008

This series was very promising. It's a shame it is devolving into a lot of 'latest geek technology'-itus and Rob's replies on anything in the comments are degenerating into 'because I said so' defensiveness. It's an ecommerce store. You don't need all this complication. Just store usernames and passwords like the rest of the world and move on. Your current checkout page, with all its options for logging in, is just a mess and will confuse the majority of people. You put the most complicated options at the top and move down to the least complicated, but you know some people will think they have to use the first options and be really confused. You won't sell much stuff that way and I suspect this project is dying a slow death unless Rob snaps out of his fascination with all these 'cool toys'.


Rob Conery avatar
Rob Conery says:
Tuesday, July 22, 2008

@Jon perhaps I should have mentioned a few more times in the screencast that the page would be refactored, heavily. It sounds to me like you don't care for the ideas here - which is fine :). I'd much rather hear reasons as to why you don't like the "shiney new toys" as opposed to why you think I'm lame.

Also - with respect to being "because I said so" defensive - where did I do this?


Jon avatar
Jon says:
Tuesday, July 22, 2008

Rob, ok first, I *do* like what you are doing here generally. But you've now spent three weeks fussing with openid and cardspace and users tables. It really isnt necessary and it just adding complication... as others have also pointed out, not just me. As for being defensive, take a look at your replies at the beginning of the series compared to the way you reply now. You may not realize it, and Im sure you feel like you are being battered by 'everyones against you', but your tone has changed considerably. Sure, a lot of the comments here have been abrasive, including mine... which is not entirely a bad thing. But it sure kills everything when the dev's usual response is 'this is the way Im doing it, you dont have to like it'. Especially on a project that was supposed to evolve with community input. Put up a poll, Im pretty sure the response will be 'scrap openid' since thats the majority of whats being said in the comments on these threads over the past three weeks.


Rob Conery avatar
Rob Conery says:
Tuesday, July 22, 2008

>>>you've now spent three weeks fussing with openid and cardspace and users tables.<<<

I actually haven't - I've refactored and built out the application a whole lot (which I didn't fit in this screencast). I spent a day integrating Open ID and CardSpace - which I both find as great alternatives to storing username/password.

>>>It really isnt necessary and it just adding complication...<<<

This is where we disagree. You have a strong opinion and you've expressed it - allow me to do the same?

My unwillingness to remove it doesn't make me a bad person :) and while you might couch it as being defensive/geek-fad-prone, I like to think I'm challenging you and others to think a bit differently.

Above all I'm going to ask you politely, once again, to keep this discussion on the technology and less about me and my motives.


Chris Kolenko avatar
Chris Kolenko says:
Tuesday, July 22, 2008

I agree with Rob..

if we all go down the path of saying Rob.. you're lame and defensive.. it's going to end up like every other nerd blog.. saying linux is better then windows.. and visa versa..

I do like the idea of Open ID.. i just don't think people like mum and dad are.. the question is.. if we all start using it will it become excepted?

when i take on a new project i think of ways to make it unique, ie invent the standard rather than follow it!!

If we don't make the website special no one is going to come back..

Rob, if i have myself been defensive or criticised you personally i'm sorry, personally i'm just here for the MVC Storefront.

and if you ever needed an extra hand i would love to be involved.


Manu avatar
Manu says:
Thursday, July 24, 2008

Hi Rob,

I like to see MVC Storefront like my "new default architecture" just in order to use a phrase of Jimmy Nilsson.

I think that would be a beautiful idea to create a forum for MVC storefront.


jeff avatar
jeff says:
Thursday, July 24, 2008

Well, I can't believe all this debate on the infocard/cardspace and openID implementations. I haven't looked at the sorce code latley, but if it looks like it does on screen it wouldn't be to incredibly hard to plug .net membership back in or your own system. I for 1 love the fact that rob is using some of these new technologies. We don't have to use them, and if you go a few screencast back you can see the way it exsisted in the past.

For thoses of you that think your clients want to buy from a site that makes them create another account because they think that it means the site is larger or more reputable, then I think a little polling of end users and some market research is needed.

Not one person I have ever polled or asked would say "Alright, this site must be reputable and mean seriuos business. I have to create another user account" in fact, I believe that most people say somthing like "Crap I have to type in all this information again, I wish susch and such would have had the item it would have been easire". I actually think this will help drive sales.

And more and more places are switching to an openID compatible system. Which is why you most likley already have an openID.

Anyway, try to remember the goal here is that this thing is exstensible. So plug in what you like in your implemetation. Like the others earlier with nhibernate, go ahead and make your membership plugin or whatever. There is no possible way for Rob pick and include the exact set of technologies that everyone wants. For example I would have liked to see Entity Framework instead of Linq to SQL, simply beacause there are tones of examples of Linq to SQL, but not so many Entities.


Chris Kolenko avatar
Chris Kolenko says:
Thursday, July 24, 2008

I agree Jeff,

I don't like typing all my info in over and over again, but that all depends on what i'm purchasing.

If i was doing some electronic thing for my bank i don't want to be using OpenID, if i was just going to purchase a book of amazon i would prefer OpenID.

Can i ask you something tho, are you from America?.. i live in Sydney Australia, and to be honest we are behind the world in adopting new technologies, partly due to America not making stuff for us until 6 - 12 months later..

So for aussies to start using this open id stuff.. 1, they will need to sign up anyway and 2, they is no credibility that we know about.

Even i just found out about it..

so the question is.. can we sign people up to Open ID directly through the e-comerce site??. i guess that has it's problems too..


jeff avatar
jeff says:
Friday, July 25, 2008

well I haven't been able to see a full implementation in .net but myopenid has affiliate pages and a new myopenid for domains system that will give you a king of co-branded signup page so I would think that there would be a way to integrate it for sign up.

Are there not that many Flickr, Yahoo!, Blogger, Technoriti, Verisign, etc. users in Australia. I geuss I was making the assumption that alot of these services were getting equal use worldwide.

and yes this wouldn't be for a bank, I agree.


Chris Kolenko avatar
Chris Kolenko says:
Friday, July 25, 2008

>>>Flickr, Yahoo!, Blogger, Technoriti, Verisign, etc. users in Australia<<<

Hell no.. i can't talk to the whole of australia.. but in my circle of friends and the people i know..

no one uses them.. people use photo bucket and myspace still..

the price for data in australia is 10x more than the U.S. so all these cool services that send free sms. and require mobile phones on the web.. they don't exist yet.. it really sucks..

i would like people to get used of this open id stuff would save me so much time...

can Rob and the Microsoft team start the marketing engine more in australia please.. ?? just and ad on tv or something.. i know you can't promote open id..

why isn't there some sort of usb dongle system out there yet?? put the usb stick in.. have a pin number.. and than something like card space to have different profiles.. is it so hard to get a product like this to everyone??


jeff avatar
jeff says:
Saturday, July 26, 2008

well, i dont know that a usb dongle would be any easier for a cradspace like product. Everyone with windows xp/vista and an updated .net should have cardspace. Unless it isn't in international versions for some reason.

As far as openID thats not really a microsoft thing so I don't think they can help you there.

I don't know that I follow you on ther services, if they are using myspace and photobucket I can't see why they couldn't use these other services, it probably is that maybe those things haven't caught on yet.

anyway, I am excited to see were Rob goes next. My guess is that he touches back on ajax because of preview 4 but I actually hope that he moves on. I would actually like to see some video on the other refactorings he did, i knwo he touched on them but it would be nice to see how other people go about the process.


Joel avatar
Joel says:
Saturday, July 26, 2008

Rob,

I agree a little bit with both Chris and Jon. It does seem that you tend to focus on answering only comments that disagree with you, but I certainly don't have a problem with you discussing intersting topics like identity. Anyway, can you answer the questions I left earlier on July 17th? Here is the post again:

Rob,

Thanks for the webcast. I wish Cardspace was more widely used.

---

Are you going to post the source code from this webcast?

On your twitter a few days ago you mentioned a fix for your LazyList. Can you speak more about that? Thanks.


Robin M avatar
Robin M says:
Wednesday, July 30, 2008

Great series - really enjoying it, thanks.

I'd love to see more source releases so I can follow along and experiment with the code - any chance?


Bill avatar
Bill says:
Wednesday, July 30, 2008

Rob,

Previously you talked about a fix for your Lazy List. Can you please talk about it. I would like to use it but do not understand the fix.

Thanks


Mads Laumann avatar
Mads Laumann says:
Friday, August 01, 2008

Hi Rob

I'm all new to MVC but I really like it so far. Only thing I don't like right now, is that it doesn't run on a "default" IIS. This means that people running on shared hosting, can't use it, as they don't have access to the IIS directly.

But I guess you can't do anything about that?

As Bill said, I would also like to hear more about your LazyList fix. I read your article, but sometimes it's just better when it's spoken, like in your videos.

Keep up the good work!

:)


Mads Laumann avatar
Mads Laumann says:
Friday, August 01, 2008

Hi Rob

Forgot to ask before.

Why is the Model and Filters in the Commerce.MVC.Data class library project?

Both the Model objects and the Filters are business logic, so it should have been placed in the Services? You are also only (not really sure here) using the Filters from the Services class library. So why put it in the Data project?

Guess you have a reason for putting them there, just wanted to hear it, as I can't recall having you have mentioned it before.


Rob Conery avatar
Rob Conery says:
Friday, August 01, 2008

Hi Mads - not sure what you mean by "default" IIS - it runs well on IIS6 and 7. What issues are you having?

The LazyList fix is here: blog.wekeroad.com/.../lazy-loading-wi

RE the Model/Filters - a model is a representation of your "domain" and are the data that the service class (Business Logic) uses; I see these as data.

The filtration bits are data routines that are put together by the Service class - this isn't (to me) business logic - rather it's a data operation (building a query).

At least that's the way I think about it...


Mads Laumann avatar
Mads Laumann says:
Friday, August 01, 2008

Hi Rob

By "default" IIS, I actually mean if you have a shared host.

Here I mean a IIS that you can't make changes too. To make .NET MVC work on a IIS 6, you have to do something like this (http://biasecurities.com/blog/2008/how-to-enable-pretty-urls-with-asp-net-mvc-and-iis6/), which you can't do on a shared host, as you can't logon to the server via terminal service for instance. Actually you said it yourself in one of the videoes, that IIS 6 can't, per default, run appplications without extensions, as the .NET MVC do as we all know.

That's just a problem for me. Well, it isn't now, but it will be when my big .NET MVC application is finished :P

About the Model/Filters, I see where your getting at. It just wasn't my first thought. But after a second thought, you would also have a problem if your Model were in your Services project. What should you then return from the Data project? IQueryable? That wouldn't be good, as you would then have to pass IQueryable to your Service project, which wouldn't be nice in my eyes.

... in short, I see what you mean :)


Rob Conery avatar
Rob Conery says:
Friday, August 01, 2008

I think that's only for extensionless URLs yes? Most hosters allow you to map ".mvc" and if they don't - I'm sure they will soon. I know there may be issues at GoDaddy - but this isn't because pretty URLs are not doable in IIS - it has more to do with mapping the requests.


Mads Laumann avatar
Mads Laumann says:
Friday, August 01, 2008

Hi Rob

Yeah, thats exactly what I'm talking about. But I see I can get around it by adding the .mvc extension, that will maybe work. I just saw the guide, and thought it looked like I had to setup alot of things myself on the IIS6, which I can't. But as you say, I actually think my provider lets me set the extensions, so I should be able to do it that way.

Thanks. :)


Mads Laumann avatar
Mads Laumann says:
Tuesday, August 05, 2008

Hi Rob

I playing around with my old .NET MVC application here, and were thinking about caching.

Where would you place caching in and .NET MVC application?

Looking forward to you get to caching in your Storefront and see how to do it.

:)

//Mads


Mads Laumann avatar
Mads Laumann says:
Tuesday, August 05, 2008

Hmm, typos there...

Let me rephase the start of my previous post.

"I am playing around with my [b]own[/b] .NET MVC application here, and were thinking about caching."


Mads Laumann avatar
Mads Laumann says:
Tuesday, August 05, 2008

Hi Rob

In one of the videos you show how to use "ComponentController", and you talk nice about it. In the next video this feature is gone?

Why was it removed? Is it replaced by UserControls?

I know the ComponentController isn't a part of the Storefront project, but I think you say in the video that you had made this CompomentController in the .NET MVC, so thought you might knew it. I have tryed google it alittle, but can't find an answer.

Thanks in advance, sorry for all my question, but Im new to this .NET MVC, and questions just keep coming up in my head :)


hj avatar
hj says:
Thursday, August 07, 2008

Any news on when the next episode is going to air? Or are you in summer break?



Search Me
Index Of MVC Screencasts

You can watch all of the MVC Screencasts up at ASP.NET, and even leave comments if you like.

Subscribe

Popular Posts
 
My Tweets
  • @jbrinkman is .NET's Gunny Sergeant Ermey. Sir YES SIR! HOOORAHH!
  • @subdigital we have a CI server running which uses TeamCity - it's having some issues currently though.
  • @subdigital what can I say :) it was late - I also looked at the wrong execution process. I'll have to redo it with a proper load test.
  • My pushups last night: 18, 10, 7, 4, 2
  • @stevenharman: http://tinyurl.com/5d8xbh
  About Me



Hi! My name is Rob Conery and I work at Microsoft on the ASP.NET team. I am the Creator of SubSonic and was the Chief Architect of the Commerce Starter Kit (a free, Open Source eCommerce platform for .NET)

I live in Kauai, HI with my family, and when my clients aren't looking, I sometimes write things on my blog (giving away secrets of incalculable value).