New Posts New Posts RSS Feed: Bad Golf Example
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Bad Golf Example

 Post Reply Post Reply
Author
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Topic: Bad Golf Example
    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: Querying (Silverlight), Querying (Desktop), Working with Entities (Silverlight), Working with Entities (Desktop), Simple combo box (Silverlight), 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


Edited by johnl - 21-Jun-2011 at 4:18pm
Back to Top
Peer View Drop Down
Newbie
Newbie
Avatar

Joined: 31-Aug-2010
Location: Netherlands
Posts: 15
Post Options Post Options   Quote Peer Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post 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.


Edited by smi-mark - 28-Oct-2010 at 3:44pm
Back to Top
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post 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.


Edited by smi-mark - 28-Oct-2010 at 11:25pm
Back to Top
mseeli View Drop Down
Newbie
Newbie
Avatar

Joined: 20-Sep-2010
Location: Switzerland
Posts: 31
Post Options Post Options   Quote mseeli Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jradxl View Drop Down
Newbie
Newbie


Joined: 14-Jun-2011
Posts: 30
Post Options Post Options   Quote jradxl Quote  Post ReplyReply Direct Link To This Post 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



Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post 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: Querying (Silverlight), Querying (Desktop), Working with Entities (Silverlight), Working with Entities (Desktop), Simple combo box (Silverlight), Composition Context (Desktop).
 
Regards,
   Silvio.
Back to Top
jradxl View Drop Down
Newbie
Newbie


Joined: 14-Jun-2011
Posts: 30
Post Options Post Options   Quote jradxl Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
johnl View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 24-Jan-2011
Posts: 35
Post Options Post Options   Quote johnl Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down