Larry Beall: PHP & ASP.NET

A long journey, definitely worth taking…

by Larry Beall on Sep.08, 2009, under Family

Wow… it’s been a bit since I last posted, hopefully things have calmed down for me and I’ll be able to get back to posting with a little bit more regularity.  This blog post is not going to be about technology, instead today I am going to talk about a very long journey that just came to a conclusion a couple of weeks ago. I apologize now for the length, but I think it is a good read…

The beginning…

We were married in January of 2000 and we had always talked about having a family, but made the decision to wait a couple of years.  We figured we were young and had plenty of time to get settled in to marriage and have a few life experiences before starting a family. This was a great couple of years and our relationship grew stronger.

The trying…

We finally decided that it was time to start trying to have a family, but we would be casual about it.  No sense in rushing it or putting undo pressure on ourselves, we are still young after all and had plenty of time.  After a year we started getting concerned and consulted with physicians.  Initially the physician identified my weight as a possible problem, so we set out to resolve that issue and put things on hold.

(continue reading…)

5 Comments :, more...

Debugging WPF Bindings…

by Larry Beall on Jul.31, 2009, under WPF

So the following question was posted on twitter earlier today.

So I take it that unit testing WPF bindings isn’t an easy thing to do?

At ICC we tend to use what we consider a “Debug” value converter to make debugging bindings easier on ourselves.  Below is the source to such a value converter.

   1: using System;

   2: using System.Collections.Generic;

   3: using System.Linq;

   4: using System.Text;

   5: using System.Windows.Data;

   6:  

   7: namespace WpfApplication1

   8: {

   9:     public class DEBUG_Converter : IValueConverter

  10:     {

  11:         #region IValueConverter Members

  12:  

  13:         public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)

  14:         {

  15:             return value;

  16:         }

  17:  

  18:         public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)

  19:         {

  20:             throw new NotImplementedException();

  21:         }

  22:  

  23:         #endregion

  24:     }

  25: }

From here we we will put a break point in the Convert method, so that we can be sure that the binding is in fact firing and that the value we expect is showing up.  The thing to remember is that a binding in this scenario should fire atleast two times.  The first being the initial class instantiation, then the next one when a value is actually set.  If you get only one and the value coming in is null, it is most likely due to your implementation of INotifiyPropertyChanged not being correct.  Below is the source of the XAML that shows the binding with the debug converter applied.  I am also attaching the source of the example project that this code comes from.

   1: <Window x:Class="WpfApplication1.Window1"

   2:         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

   3:         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

   4:         xmlns:converter="clr-namespace:WpfApplication1"

   5:         Name="uiThis" 

   6:         Title="Window1" 

   7:         Height="300" 

   8:         Width="300"

   9:         >

  10:     

  11:     <Window.Resources>

  12:         <converter:DEBUG_Converter x:Key="_DEBUG_Converter" />

  13:     </Window.Resources>

  14:     

  15:     <Grid>

  16:         <TextBlock Text="{Binding MyString, ElementName=uiThis, Converter={StaticResource _DEBUG_Converter}}" />

  17:     </Grid>

  18: </Window>


One thing to remember is that this is just one approach and it is the first step we will normally take.  This will most likely help solve 50-60% of all cases.


Source Solution

1 Comment : more...

MVC4WPF Launch

by Larry Beall on Jul.23, 2009, under MVC4WPF

Today we officially launched MVC4WPF. We held the launch event, along with upwards of 30+ developers and IT personnel in the Columbus area in attendance, at the Microsoft offices at Polaris.  So what the heck is MVC4WPF anyhow?  Well our CodePlex site states:

MVC4WPF is a software architectural pattern that provides an approach for building enterprise applications in an efficient, highly flexible, and cost-effective manner. Broadly speaking, MVC4WPF is based on a hybrid of the MVC pattern and the PAC patterns, with modules built on MVC and controller parent-child relationships built on PAC relationships. The result is a natural, hierarchical flow. MVC4WPF provides flexible architecture but requires a disciplined implementation approach. It also provides code automation for rapidly producing reliable "plumbing" code, allowing your developers to focus on requirements rather than reinventing solutions to old problems. It also maintains the separation of roles provided by MVC to gain all the advantages of parallel development.

One of the best things about MVC4WPF is that it is free.  We have released the project on CodePlex for everyone to use, comment on and help shape it’s direction.  In the next code drop we will be including some code snippets and further refinements to our automation code to make this pattern even better in the future. If you happened to miss our launch event or are not located in Columbus, you can find all the materials that we covered at the event here. This includes the files needed to get up and running, our slide deck and the source code to an early release version of our demo application that is modeled after Nerd Dinner.

1 Comment :, , more...

Welcome to my little space…

by Larry Beall on Jul.21, 2009, under General

So I have finally decided to join the ranks of blogging world. I have several posts planned for the next few days/weeks. First post will go up shortly covering the launch of our new automated pattern: MVC4WPF.  I have recently seen the pattern best described as a hybrid of MVC and PAC with a ton of automation built for VisualStudio to make programming WPF applications much quicker.  Up next will be an article that will describe the fun that I had while converting the ASP.NET MVC based CMS application I wrote for the MVC4WPF website from a SQL backed traditionally hosted web application to a fully Azure Cloud hosted application.  From there we get I’m going to put my PHP hat on and talk about writing a PHP application for the Azure Cloud.  These will probably take me about a week or so to get completed and posted, but they should just be the tip of the iceberg from me.  Keep watching to see what I come up with.

Leave a Comment :, , , , more...