Please check out my Provable Code course on Pluralsight. If you are not yet a Pluralsight subscriber, go ahead and sign up for 200 free minutes. You won’t be able to get through the whole course on that, but it will be enough for you to decide whether to subscribe.
Awesome Course
I really enjoyed your pluralsight course. Your examples definitely seem to illustrate the "right" way to write object oriented programs. The following are some questions I had while watching your course:
1. Code contracts seem promising, but it would be nice to be able to assume something to the effect x>0 and y>0 -> x/y >0 so that the compiler could verify instantiations of that claim rather than having to make specific assumption. Do you if would be possible to achieve that with code contracts?
2. Do you know if is a nice way to modify the constructor pattern to prove that a caller is called twice before it's used by a class?
3. Could KnockoutCS with an ASP.NET MVC project even though it aides the MVVM framework?
Thank you
Code Contracts is powerful, but it does have its limitations. You can inject a "Contract.Assume(x/y > 0)" where necessary to help it along, but it won't always figure that out for you. I'd recommend probing the boundaries to see where its limitations lie.
If you want something to be called exactly twice instead of exactly once, then you'll have to do something with the Factory pattern. Have the first factory create a second factory, and have that one create the object.
KnockoutCS is currently just for Silverlight 5, though WinRT support is coming soon. You can use Update Controls for dependency tracking and ignore the MVVM stuff in an AST.NET MVC app. This will let you build a dependency chain, but it won't help you update the UI. If you want to update the UI client-side, then use KnockoutJS.
Sounds Good
Thanks for letting me know. I'll definitely play around with Code Contracts to get a feel for the limitations. It does seem like the Factory Pattern with Callbacks are going to be the main tools to force code to flow as specified. Which message bus system would you recommend to use with KnockoutCS and KnockoutJS in an ASP.NET MVC application?
No message bus needed
I find that I don't need a message bus when using a dependency tracking framework like Knockouts.js. A message bus is all about moving a change from one independent object to another. But if you are using dependency tracking, then you don't need to have independent state in two places.
Great to know
I'm excited to start up an example project and test all this stuff out before trying to migrate the techniques in my existing projects. I subscribed to your blog, but I noticed that feedburner seems to think there hasn't been a new post since Mon, 04 Jan 2010. Could you fix that so I'm notified when there's new articles?
Could not recover Feedburner URL
I could not recover the Feedburner URL. So I changed the Subscribe link to a direct feed of the blog. You will have to re-subscribe, but once you do it will continue to work.
Sorry for the inconvenience.
Great
The xml feed does indeed work.