This project is read-only.

Comments on the Tutorial

Jun 24, 2010 at 3:11 PM

It looks like the author got tired of the process towards the end as some errors and omissions appear to sneak in. 


Page 73/74: The text 'introduces' two additional classes (ShoppingCartViewModel and a ShoppingCart), whereas the sections immediately above describe those classes (subtle issue, I know - looks like the result of restructuring the document section sequence)

Top of page 74 sentence: "Here’s the complete StoreManager controller class", whereas the class below is actually (correctly) the ShoppingCartController class.

It might be beyond the scope of the tutorial to discuss, but a little more insight into the JavaScript handleUpdate method would be nice (such as what those $(stuff).stuff  lines do/how they work).

At no point in the tutorial can I see where you add code to allow the user to add albums to the shopping cart (not that it's too hard to work out - I managed - just a completeness thing)

Also - the creation of the CartSummary Partial View is never discussed in the document.


Also: Can people comment on the level of 'best practice' represented in the tutorial. I understand the close coupling between the DB and the models is undesirable (and implemented as it to keep the tutorial simple, but 'real' at the same time) - so I'm thinking about the best practice concerns regarding the ASP/MVC aspects of the tutorial (use of controllers, the views, use of JSON and JQuery, Authentication etc.) rather than the application architecture.




Jul 2, 2010 at 9:45 PM

Trevor, thanks a lot for the feedback. I'll get it fixed up in the next release. Some of the omissions were just plain oversights, others were because I was trying to keep the document to 80ish pages, but if it's unclear it's unclear. Thanks for pointing these out, I'll get them fixed.

Regarding best practice, the biggest (intentional) oversimplifications were in data access (e.g. direct calls to the data layer from controller actions rather than through a repository) and in lack of testing (both lack of unit tests and in use of patterns which aren't as testable). It's hard to get any defined "best practices" that the whole community will agree on, but you can find some community critiques of the project:

Let me know if you're aware of other critiques. My plan is to add an appendix which notes the simplifications the tutorial takes so people can learn more sophisticated practices when they're familiar with the mechanics.

Apr 30, 2011 at 12:11 AM
Edited Apr 30, 2011 at 12:16 AM

On page , in the section entitled Ajax updates with jQuery , there are no instructions as to where to Create the View named 'Index'.  I had to examine the completed project to figure out that the instructions should have read something like this:

"Add a new Folder under Views, entitled ShoppingCart".

then "right click on the new ShoppingCart folder, and select 'Add -> View' to add a new View named Index"

Without this information, if you did not  add the 'ShoppingCart' folder, the view will end up in the Views folder, and will not work. 




Apr 30, 2011 at 12:13 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.