Print Page | Close Window

Bad Golf Example

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2271
Printed Date: 19-Apr-2024 at 2:29pm


Topic: Bad Golf Example
Posted By: WardBell
Subject: Bad Golf Example
Date Posted: 27-Oct-2010 at 5:55pm
----------
Please note:
As of 05.2011, the Cookbook has been shelved and it's samples have been split apart.

You can still find them (with exception to the BadGolf sample) in the DRC: http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-querying - Querying (Silverlight) , http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-querying-wpf - Querying (Desktop) , http://drc.ideablade.com/xwiki/bin/view/Documentation/code-samples-working-with-entities - Working with Entities (Silverlight) , http://drc.ideablade.com/xwiki/bin/view/Documentation/code-samples-working-with-entities-wpf - Working with Entities (Desktop) , http://drc.ideablade.com/xwiki/bin/view/Documentation/SimpleComboBox - Simple combo box (Silverlight) , http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-extend-faking - Composition Context (Desktop) .

The Bad Golf sample is no longer available.
----------


I just added my "Bad Golf" example to the DevForce Cookbook. "Bad Golf" is an attempt to show a number of useful patterns and practices working together without making something too complex to follow.
 
It's not done yet (not sure what that would mean anyway) and I cut corners all over the place. But it's got something of interest on a wide variety of development subjects and I hope it stimulates thought ... not slavish imitation!
 
Poke around in it and you will find evidence of:
 
DevForce Fake backing store instead of a database
Model-View-ViewModel (MVVM)
ViewModelLocator
Repository
EntityManager Gateway
Bootstrapper / ServiceLocator
Design with Data (Blendability) using both Blend sample data and DevForce ViewModel
Tests that works in both Silverlight and Desktop
Asynchronous testing
ViewModel testing
 
I'll keep nursing it along. I'll certainly be writing about how each of these features are illustrated. But don't wait for me; dive in and let me know what you think



Replies:
Posted By: Peer
Date Posted: 28-Oct-2010 at 1:58am
Thanks a lot Ward!  I will check this out and come back to this . I think it is just what I need to evaluate our strategies  in way we can  learn from it and make them better.

Best Regards,
Peer


Posted By: WardBell
Date Posted: 28-Oct-2010 at 2:36am
Happy to be useful, Peer.
 
Everyone - please remember - this sample is full of hints and suggestions that are intended to inspire you; it is not prescriptive! You are required to think before using :->.
 
I hasten to add that "Bad Golf" is not "supported" in the sense that our product is supported. We want to hear your feedback and we want to know if something fails. But we will be most delighted if you come up with even better ideas.
 
Oh ... and feel free to add your own commentary about any of it. Other developers love to hear what you (that's all of you reading) have gleaned from this.


Posted By: smi-mark
Date Posted: 28-Oct-2010 at 11:29am
Had a quick glance, a good start to showing how DevForce can work seamlessly with MVVM. The design time support is great!

Ward, what are your thoughts on either view first, or VM first? With your example, which seems to be based upon a stripped down version of MVVM Light, you employ a view first approach, whereas other frameworks such as Caliburn Micro tend to prefer a VM first approach.

The nice thing about the view first, is it makes it very easy to bind to a VM for design time, something that is a little more complicated in Caliburn.

Edit: I think I may have a go converting this to Caliburn Micro using Autofac, just to show off how you can achieve the same thing with other frameworks.


Posted By: smi-mark
Date Posted: 28-Oct-2010 at 11:24pm
Ok. I've converted it to Caliburn.Micro and Autofac :)

I have even included design time support, using what I have dubbed the 'DesignTimeBootstrapper'

There are probably better ways, but I am still quite new to MVVM and especially Caliburn.

http://rapidshare.com/files/427733842/BadGolfCaliburn.zip

Autofac:

http://code.google.com/p/autofac/downloads/list

Caliburn.Micro:

http://caliburnmicro.codeplex.com/

This is just the SL project, and nothing else, it will not currently run with the unit tests, for obvious reasons.

If anyone is really interested I could package it all together.


Posted By: mseeli
Date Posted: 29-Oct-2010 at 12:28am
Hi smi-mark

I just want to share that we are also developing our first big SL Application with DevForce and Caliburn.Micro. We are still trying out different ways to implement the best and most elegant architecture and to make the whole thing work with TDD.
I will have a close look at your BadGolf-Caliburn project.
Markus Seeli


Posted By: jradxl
Date Posted: 20-Jun-2011 at 9:27am
Hi,
The "CookBook" comes up in a search of DRC, last modified 29th March 2011

but trying to view it gives results in a 404 error.

Any chance it could be fixed?

thanks
John





Posted By: sbelini
Date Posted: 20-Jun-2011 at 10:06am
Hi John,
 
The Cookbook samples have been split apart. You can still find them (with exception to the BadGolf sample) in the DRC: http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-querying - Querying (Silverlight) , http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-querying-wpf - Querying (Desktop) , http://drc.ideablade.com/xwiki/bin/view/Documentation/code-samples-working-with-entities - Working with Entities (Silverlight) , http://drc.ideablade.com/xwiki/bin/view/Documentation/code-samples-working-with-entities-wpf - Working with Entities (Desktop) , http://drc.ideablade.com/xwiki/bin/view/Documentation/SimpleComboBox - Simple combo box (Silverlight) , http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-extend-faking - Composition Context (Desktop) .
 
Regards,
   Silvio.


Posted By: jradxl
Date Posted: 20-Jun-2011 at 10:49am
Hi Silvio,
Thanks. I've already found some of them and was wondering if the CookBook meant there were even more examples!!. You might want to get the DRC CMS system fixed to remove the reference to CookBook.

Having them all separate is a much slower way of reviewing the samples... Some are slighly old and I've had to fix as I go. One example (somewhere) I couldn't regenerate with the Express version.

Is it possible you could put all the examples up on Codeplex, with proper version control and branches to track your change of DevForce versions.

thanks
John


Posted By: johnl
Date Posted: 21-Jun-2011 at 4:23pm
Thanks for the heads up John.

I've deleted the reference in the DRC so hopefully it won't misdirect others in the future.

Please let me know what sample you had issues regenerating and I'll look into it immediately.



Print Page | Close Window