Community report – XDDN Melbourne April

Ian Randal (@kiwipom) spoke at the XDDN Melbourne April meeting.

He lightly touched on what IoC is, in the context of how Caliburn.Micro uses it. He then went on to show some demos of  Caliburn.Micro. He demonstrated how a XAML page can be created which binds to a ViewModel, without requiring any “UI glue code” to stick it all together. It made for a simple application that had a higher percentage of the code being business logic, rather than scaffolding.

A recording of the talk can be found below

[vimeo https://vimeo.com/41073059/]
https://vimeo.com/41073059/

By David Burela

Advertisements

Developer blog banter #3 Response–Community coding

This is my response to https://davidburela.wordpress.com/2012/04/17/developer-blog-banter-3-show-tell/
Share a single interesting thing you’ve worked with recently. A tool, framework or technology for example.

The coolest thing that I’ve used recently has got to be the combination of https://GitHub.com + Markpad
I had used GitHub frequently in the past as a consumer of data. To download OSS applications to use, or .Net frameworks to include in my projects.

However, recently a tweet caught my attention.

I realised that my usual workflow when writing a blog post was:

  • write the code examples in the post
  • create a working sample application
  • zip it all up
  • host the the .zip file somewhere for readers to download.

After that the code always went stale and I never updated it. David Fowler got me thinking “He is correct. I really should make it easier for others to pull down my source code. And at the same time make it easier to update for when I use the same code in user group presentations

I created my first few repositories https://github.com/DavidBurela and uploaded the source code for a Windows Phone 7 application and source code samples from presentations I gave. GitHub makes it really easy to get started and they have a heap of resources to get started.

With my repositories created and ready to share with the world, there was just one thing missing… a proper README file. When someone navigates to your repository, GitHub looks within the repository for a README file, if it finds one it renders and shows it. Its a great way to give people an introduction to what your repository is for. An example can be seen in my WP7 repository https://github.com/DavidBurela/Windows8DeveloperCampPhoneApplication

The README file is written in a format called MarkDown (as opposed to mark up languages). It can be difficult to write the README files without seeing rendered in real time. This is where MarkPad comes in. It is a MarkDown editor with real time previews.

These 2 products have made my life that much easier to share code with the community. It can be difficult configuring your system with Git for the first time. I have included some links below to help you get started. (But it has been rumoured that GitHub are creating GitHub For Windows, similar to their GitHub for mac client. Which should make things much easier in the future)

Links to get started with Git & GitHub

By David Burela

Developer Blog Banter #3: Show & Tell

After a long hiatus, it is time to continue with the Developer Blog Banters (DBB). Each banter focuses on a single topic allowing passionate developers to blog on a common topic. The goal being to get more developers blogging and cross posting within the community.
Previous banters asked developers to “What their current technology stacks look like” and “How do you test applications”. More information about the blog banter can be found at https://davidburela.wordpress.com/developer-blog-banter/

The guys over at Code52 this week ask you to share a single interesting thing you’ve worked with recently. A tool, framework or technology for example.

http://code52.org/show-and-tell.html
We want to hear about what you have been working with in your spare time. We want to hear about the cool stuff we haven’t had a chance to use. We want to get jealous about hearing how you’ve used it and what you’ve learned about it.

We’re looking for people to write short articles on stuff they’ve used recently or something they’ve built recently to share with the big wide world.

We want to hear:

  • what did you find that is awesome?
  • what is awesome about it?
  • how did you use it?
  • what did you learn from using it?
  • is there some code that people can have a play with?

As usual, post a trackback to this post and I’ll update the list of responses, allowing everyone to easily view posts participants. This also lets the Code52 guys see a consolidated list of responses that are currently online. You may even get your post featured on the Code52 blog! http://code52.org/blog.html

Participants

  1. Tugberk Ugurlu – Generic Repository Pattern series
  2. David Burela – Community coding (GitHub + MarkPad)
  3. Gareth Bradley – My open source application
  4. Duncan Bayne – Automating provision of virtual machines for use as build agents

By David Burela

Windows 8 demo–Updating application tiles

I have had requests to share the Windows 8 demos that I gave at the Windows 8 Developer camp. The source code is available on Github at https://github.com/DavidBurela/Win8Demo-Tiles

Text tile

Application tiles in your application can be updated by sending a formatted XML message to the TileUpdateManager. The easiest way to achieve this is to get a base template for the tile style that you want (Text only, Image, Image and Text, etc) then modifying the Text or Image elements of the template. The code below shows how a XML template can be taken and updated with custom text. The XML document is then used to create a TileNoficitacion which is then sent to the TileUpdateManager.

/// <summary>
/// Set the application's tile to display text content.
/// After clicking, go back to the start screen to watch your application's tile update.
/// </summary>
private void SetTileTextButtonClick(object sender, RoutedEventArgs e)
{
    // Tiles use a predefined set of standard templates to display their content.
    // The updates happen by sending a XML fragment to the Tile update manager.
    // To make things easier, we will get the template for a square tile with text as a base, and modify it from there
    var tileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquareText01);

    // Find the 'text' element in the template's XML, and insert the text "Hi :-)" into it.
    var elements = tileXml.GetElementsByTagName("text");
    elements[0].AppendChild(tileXml.CreateTextNode("Hi :-)"));

    // Create a TileNotification from our XML, and send it to the Tile update manager
    var tileNotification = new TileNotification(tileXml);
    TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotification);
}

Image tile from local image file

It is also possible to create the XML from scratch and send it to the TileUpdateManager. The code below updates the application tile with an image tile. It starts by instantiating a XmlDocument, creating each of the XML elements, and then chaining the elements together to form the final XML document. The path to the image is given as being a local application resource through the convention ms-appx:///Assets/DemoImage.png

/// <summary>
/// Set the application's tile to display a local image file.
/// After clicking, go back to the start screen to watch your application's tile update.
/// </summary>
private void SetTileImageButtonClick(object sender, RoutedEventArgs e)
{
    // It is possible to start from an existing template and modify what is needed.
    // Alternatively you can construct the XML from scratch.
    var tileXml = new XmlDocument();
    var title = tileXml.CreateElement("title");
    var visual = tileXml.CreateElement("visual");
    visual.SetAttribute("version", "1");
    visual.SetAttribute("lang", "en-US");

    // The template is set to be a TileSquareImage. This tells the tile update manager what to expect next.
    var binding = tileXml.CreateElement("binding");
    binding.SetAttribute("template", "TileSquareImage");
    // An image element is then created under the TileSquareImage XML node. The path to the image is specified
    var image = tileXml.CreateElement("image");
    image.SetAttribute("id", "1");
    image.SetAttribute("src", @"ms-appx:///Assets/DemoImage.png");

    // All the XML elements are chained up together.
    title.AppendChild(visual);
    visual.AppendChild(binding);
    binding.AppendChild(image);
    tileXml.AppendChild(title);

    // The XML is used to create a new TileNotification which is then sent to the TileUpdateManager
    var tileNotification = new TileNotification(tileXml);
    TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotification);
}

Image tile from remote image

A remote image can be used by again using a template (or hand crafting the XML from scratch as in the previous example), but this time providing a URI to an image hosted on a remote web server, rather than a local application resource.

/// <summary>
/// Set the application's tile to display a remote image on the internet.
/// After clicking, go back to the start screen to watch your application's tile update.
/// </summary>
private void SetTileRemoteImageButtonClick(object sender, RoutedEventArgs e)
{
    var tileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquareImage);

    // Find the 'image' element in the template's XML. Change the src attribute to a remote URL
    var elements = tileXml.GetElementsByTagName("image");
    var imageElement = elements[0] as XmlElement;
    imageElement.SetAttribute("src", @"http://i.microsoft.com/global/en-us/homepage/PublishingImages/sprites/microsoft.png");

    // Create a TileNotification from our XML, and send it to the Tile update manager
    var tileNotification = new TileNotification(tileXml);
    TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotification);
}

Again, this source code is available as a working example on Github at https://github.com/DavidBurela/Win8Demo-Tiles By David Burela

Windows 8 developer camp companion application + source code

I put aside a few hours over the weekend and created a companion application for the “Windows 8 developer camps” that are currently running all around Australia. http://www.lalaninja.com.au/2012/03/19/windows-8-developer-camps-australia/

It only took a few hours to throw something simple together for the attendees. The application provides some basic features to help out on the day

  • Daily schedule
  • Dates
  • XDDN details. So that attendees can continue with their Windows 8 learning
  • Links to online Windows 8 developer resources
  • Links to source code of the demos I gave in my presentations (submitted in pending app update)

Download the Windows Phone 7 marketplace right now
http://www.windowsphone.com/en-AU/apps/1a7853b1-1d2c-4d1c-9ba1-6d709053eced

I have made the source code available for anyone that wants to see how a simple app can be put together in only a few hours and submitted to the marketplace.
https://github.com/DavidBurela/Windows8DeveloperCampPhoneApplication

scheduleXDDN informationonline resources

By David Burela

XDDN around Australia

To try and streamline the XDDN groups around Australia, I have been working with the organisers of the other cities to create a few central locations for everything.
For those unfamiliar with XDDN, it is a usergroup I run that focuses on UX, Design and Development on Microsoft UI platforms. Such as Win8, WinPhone7, HTML5, etc.

The main reason for moving everything to Meetup is that it allows everyone to easily see upcoming events and get automatically notified when new events are created.
Having XDDN on Meetup.com also supports my other goals of getting more people involved with their local development communities. Joining the groups will allow you to easily find other local groups that you may want to attend, such as Agile or Alt.Net groups.
Please join the group for your city, as the old event sites (such as EventBrite) will be slowly decommissioned over the next few weeks.

My first book has been published Azure & Silverlight integration

It is with GREAT pride and pleasure that I am able to finally announce that my first book has been published and is available to be purchased right now!

Microsoft Silverlight 5 and Windows Azure Enterprise Integration details how enterprise Silverlight applications can be written to take advantage of the key features of Windows Azure to create scalable applications.

It is available as as eBook,  in print format and is available on the Kindle, Nook, etc.  It can be purchased from the following websites:

By David Burela