2014 – Happy New Year!

Now that 2013 has come to an end and I’d like to thank everyone who has been in touch, or has supported me during the past 12 months.

I wish everyone the best of luck for 2014, and I hope that you’re successful in achieving your ambitions, dreams, and New Year resolutions.

Posted in Uncategorised | 1 Comment

MSDN Flash articles on LightSwitch

Over the past year or so, I’ve contributed various articles to MSDN Flash on the topic of LightSwitch. The nice thing about MSDN Flash is that it reaches a large developer audience. Many of its readers are not LightSwitch developers, so it’s a great way to introduce the technology to those that are unfamiliar. Earlier this year, I wrote about the new LightSwitch features in VS11.

http://blogs.msdn.com/b/ukmsdn/archive/2012/04/04/article-lightswitch-in-visual-studio-11-beta.aspx

My latest article went out last week and talks about the new HTML Client in the upcoming version of LightSwitch. This major new enhancement makes it easy to target your LightSwitch application at mobile devices. You can see more of what I’ve written through the following link.

http://blogs.msdn.com/b/ukmsdn/archive/2012/07/31/guest-post-an-introduction-to-lightswitch.aspx

Posted in LightSwitch | Leave a comment

LightSwitch – MSDN Article with Garth Henderson

The MSDN flash article that I’ve been working on with Garth was published last week.

In terms of LightSwitch, Garth is one of most talented individuals that I know. For me, it’s been pleasure finding out and seeing the projects that he’s worked on.

You can find out more by visiting the following link.

http://blogs.msdn.com/b/ukmsdn/archive/2011/08/08/lightswitch-in-the-real-world.aspx

Posted in LightSwitch | Leave a comment

LightSwitch – Automatically Upper Case TextBox Text

Here’s a quick post in reference to question on how to automatically upper case the characters whilst typing into a TextBox.

LightSwitch includes a changed event but the problem with using this is that it only fires after leaving the TextBox. You therefore don’t see the characters being upper cased as you type into the control.

One possible workaround is to handle the KeyUp event of the TextBox control. In keeping with the standard practice of handling Silverlight control events, the ControlAvailable event is used to attach the KeyUp event of the Textbox.

Assuming that you have a TextBox named ‘Surname’, here is some sample code that automatically upper cases the characters as you type into the control. The ‘SelectionStart’ property is used to set the cursor location to the end of the TextBox, otherwise you end up with some strange behaviour as subsequent text will be inserted into the start of the TextBox.

 

Private Sub MyScreen_Activated()
    AddHandler Me.FindControl("Surname").ControlAvailable, AddressOf TextBoxAvailable
End Sub

Private Sub TextBoxAvailable(sender As Object, e As ControlAvailableEventArgs)
    AddHandler CType(e.Control, System.Windows.Controls.TextBox).KeyUp, AddressOf TextBoxKeyUp
End Sub

Private Sub TextBoxKeyUp(sender As Object, e As System.Windows.RoutedEventArgs)
    Dim strTextUpper As String = CType(sender, System.Windows.Controls.TextBox).Text.ToUpper
    CType(sender, System.Windows.Controls.TextBox).Text = strTextUpper
    CType(sender, System.Windows.Controls.TextBox).SelectionStart = strTextUpper.Length
End Sub

Here’s the C# version.

 

private void CreateNew_Activated()
{
    this.FindControl("Property1").ControlAvailable += TextBoxAvailable;
}

private void TextBoxAvailable(object sender, ControlAvailableEventArgs e)
{
    ((System.Windows.Controls.TextBox)e.Control).KeyUp += TextBoxKeyUp;
}

private void TextBoxKeyUp(object sender, System.Windows.RoutedEventArgs e)
{
    string strTextUpper = ((System.Windows.Controls.TextBox)sender).Text.ToUpper;
    ((System.Windows.Controls.TextBox)sender).Text = strTextUpper;
    ((System.Windows.Controls.TextBox)sender).SelectionStart = strTextUpper.Length;
}
Posted in LightSwitch | 2 Comments

LightSwitch – Extension Development Kit

Earlier this week, Yann Duran mentioned the Extensibility Toolkit which was featured in Beth Massi’s recent video.

http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/DEV354

For those who haven’t watched this, the following post contains some screenshots from the video illustrating how this works. (I would still recommend watching the video however. The toolkit section appears at 55min).

The toolkit goes a long way to simplifying the creation of extensions. The current method of creating extensions using the “Cookbook” is fairly time consuming. In particular, the errors that could be encountered when renaming everything from “BlankExtension” can be very painful.

 

Screenshots

With the Extension Library installed, opening Visual Studio and selecting “New Project” shows the following Extension templates.

image

 

Creating a new project based upon the above template creates a solution with the following projects.

image

 

The above projects correspond to the projects in a regular LightSwitch project (for example Client, Common, Server, etc) You will notice 2 additional project which are the “Vsix” and “Lspkg” projects. The output from the Vsix project will be used to install the completed extension into Visual Studio.

LSPKG stands for “LightSwitch Packaging Project”. Right clicking on this and choosing “New Item” brings up the following screen.

image

From here, templates relating to the 6 LightSwitch Extensibility points are available.

  • Business Types
  • Custom Controls
  • Data Source
  • Screen Template
  • Shell
  • Theme

Selecting the “Theme” option will create a theme which includes all the display elements. You can simply modify the fonts and colours to suit your style.

image

 

Although this toolkit has not yet been released, it should hopefully simplify the creation of extensions to a very large degree.

Posted in LightSwitch | 4 Comments

Microsoft Community Contributor Award 2011

Today, I received an email awarding me a Microsoft Community Award for 2011.

image

 

In all honesty, I knew very little about this award until today and still don’t know who nominated me nor what was involved in me being awarded this prize.

I’m very grateful to those who were influential in this process. In particular, I’d like to thank all my friends at Microsoft UK and I also want to give a special mention to everyone in the Microsoft LightSwitch team who are currently doing a spectacular job.

Posted in Other | 11 Comments

Behaviour Driven Design with Ian Cooper

During this months user group meeting in Reading, Ian Cooper presented a session on Behaviour Driven Design.

Much was covered during the event but some of the main points whichI took away were:

  • Reducing rework is one of the key principles of BDD
  • This is achieved by fully testing and involving the customer during each iteration
  • Analysis of typical applications reveal that 45% of features are never used. 7% of features are regularly used. There is much inefficiency is software as a large percentage of features are never used.
  • ‘5 Whys’ – recursively asking why something is required 5 times can often reveal the real purpose of a requirement
  • The ‘Purpose Alignment Model’ can be used to work out features which add the most business value. This comprises of a chart with ‘Market Differentiation’ on the y-axis and ‘Mission Criticality’ on the x-axis. By using this to understand the purpose of a project, we stand a much greater chance of achieving the objectives.

Various tools such as Fit, Cucumber and Nbehave, Nunit, Mspec were also discussed.

I found Ian’s presentation very useful and so did many in the audience judging by some of the questions. Thanks for presenting Ian!

Posted in VBUG | Leave a comment