LinqBinding Markup Extension

Earlier today on Twitter Aaron Erickson was berating the inability to write linq statements directly in Xaml. While I’m not totally convinced that is a good idea to begin with I decided to come up with a little proof of concept to see if it’s even feasible. I was able to get about half way to what I would like to see by creating a custom markup extension called LinqBinding. The result allows you to create bindings such as this:

<sys:String x:Key=”query”>id &gt; 1 &amp;&amp; id &lt; 4 || name==”six”</sys:String>
<ListBox ItemsSource=”{e:LinqBinding {StaticResource query}, Binding={Binding}}” />
The query in the string is the linq statement you would put into the where clause normally. I was unable to figure out how to use a Binding statement to a TextBox instead of having the hard-coded string but I’m pretty confident it is possible somehow (I’ll leave that for another blog post for now).
In order to accomplish this I used the code found in the Dynamic Linq examples talked about by Scott Guthrie in his blog.
Here is the sample: LinqExtensionSample.zip

Charity Fragathon

The Twin Cities XNA User Group is hosting a very special event next month…

We’re hosting a huge Halo 3 Tournament at Microsoft to raise money for Children’s Hospitals and Clinics of Minnesota. We’ll also have Rock Band 2 and a few standalone machines for people to check out XNA Community Games.

Even if you aren’t a gamer, you probably know one. You might even have one in your family. This is an excellent cause worth donating to, and best of all: Magenic is matching funds raised by the event (up to the first $3000)!!

So… let’s take advantage of this opportunity.

For more information, and to register (or just donate), please visit http://www.charityfragathon.com

So please help spread the word. Tell your clients.  Tell your friends.

Twin Cities Code Camp Wrapup

So not long ago I presented at the Fall 2007 Twin Cities Code Camp about NBusiness. It was a great experience and really forced me to crystalize a lot of the thoughts I had been coming up with while working on NBusiness. I tried to put in a half and half dose of theory and code. In the end I had more questions than I could really answer in the hour and a half time span we had available. Which is good! I also had a few really interesting questions that really got me thinking about some necessary capabilities for the next version, namely Entity Models and data hiding.

I’ve uploaded the slide deck from the presentation for anyone who’s interested in seeing it. I realize it’s hard to fully grasp of the meaning of a slide without the corresponding talk but, who knows, maybe you’ll find it interesting anyway. I just got my evaluations and I’ll post the results here.

Quality Ideas and information Presenter Abilities Relevant Average Comments
3 3 4 3 3.333333  
4 4 5 3 4.333333 very impressed. this guy is great.
4 4 4 3 4  
4 5 5 4 4.666667  
5 5 5 5 5 Nice job Justin…
5 5 5 5 5 Justin did really well for his first presentation…and he really knows his topic because he was ready with answers to nearly every question that came up.
4.166667 4.333333 4.666667 3.833333 4.25  

So I’ll take this as pretty positive results. If anyone has a need for a presenter on NBusiness you know how to call! I wonder if I should do another presentation at the next code camp? Depends on how much I get done on the next version I suppose. I’m guessing I’ll be right in the middle of some big changes at that time so maybe I’ll defer to the next code camp.

Speaking of which, there is a conference in Redmond at the end of January I am thinking about attending. The conference is called the 2008 Lang.NET Symposium and is all about the creation of .NET languages, compilers and development tools. I really can’t imagine a more perfect conference for me to attend! I’m still trying to figure out the cost of this but if it’s at all feasible then I will definitely go. I would love to learn some things and get a chance to talk to some other people who are interested in the same things.

Twin Cities Code Camp 2007

On October 27th, 2007 the 3rd anual Twin Cities Code Camp will be taking place. I would definitely recommend attending this event for anyone located in the twin cities area! I’ve been to the last two code camps and thought it was a fun way to meet new people and learn about new things. They also have a pretty good list of give aways and it’s free! Hard to beat that.
Well this year I’ll not only be attending but I’ll be giving a presentation about NBusiness, so if anyone is interested in learning more or talking to me in person this is a perfect opportunity. I haven’t worked out my slides or my demo yet but I’m thinking I might use this very blog as an example of how to use NBusiness in the real world.
If anyone has something specific they like to hear more about let me know and I’ll try to focus on it. There should be some time for questions in general as well. I’d love to see this attract a little more attention and get a few more people interested in trying it out.
So if you’re not sure what you’re doing on Oct. 27th, navigate to the TWCC website and register now!