0 comments
Packt Publishing has reached another major milestone, 2000 titles have been published! To celebrate their milestone they have a surprise in store for everyone: Buy one, get one free offer! Check it out here as it is a limited time offer, so hurry! PacktPub has some tremendous offerings and their library of titles is quite nice. All titles are written by experts in their respective fields and are worth a read.

0 comments

If you are building applications that could use a dashboard then I would recommend taking a look at the PacktPub book “Microsoft Silverlight 5: Building Rich Enterprise Dashboards”. The book focuses on using Silverlight 5 to construct various dashboards and provides guidelines on how to achieve this from start to finish. Along the way are useful tips and tricks and gotchas that can be found when dealing with the various aspects of building a dashboard.

Microsoft Silverlight 5: Building Rich Enterprise Dashboards

The flow of this book is a bit off. Things start off with the general “What is Silverlight 5?” and “Why should I use Silverlight for a dashboard?” questions that are answered at a high level. Reading further starts to answer what dashboards are and how to use Silverlight to build a dashboard. Next comes connecting your data to the dashboard followed by how to integrate your Silverlight dashboard into SharePoint. Going from one chapter to the next has a slight rhythm about it, but it feels disconnected most of the time as if each author took a chapter to write and in the end everything was copied and pasted into this book. One good thing about this approach is that a reader can jump between chapters and still understand what each chapter brings to the table.

The entire book covers many topics … too many topics in my opinion. The number of topics would not be discomforting if each topic delved into more detail; however, most of the topics are at a 30,000 foot level and leave the reader wanting to know more. For example, the book covers the Model View View-Model (MVVM) pattern and describes what it is and why it is a good pattern to follow using Silverlight. This is good but the chapters start to talk about specifics related to MVVM and do not provide enough detail. The delegate command is mentioned in a couple of lines with an example of how to create a delegate command but no information on how (or why) to use the delegate command. If the reader looks closely at the other examples throughout the book then one can infer how to use a delegate command but not the importance of it. There are many more topics explained in the same manner throughout this book and each of these topics really needs more detail to highlight their importance.

The crux of the book is about building dashboards using Silverlight 5 and the authors do accomplish this. There are a couple of chapters that really shine about dashboards and how Silverlight can be used to easily build a dashboard. With the majority of this book covering many topics about Silverlight the overall goal of learning how to build a dashboard is lost.

With so many topics being covered at a high level this book is not for Silverlight beginners. Having a good understanding of what Silverlight is and the features that are in Silverlight will help readers take advantage of this book. If you are new to Silverlight pay close attention to the many topics that are talked about in this book and do some research when you come across the topics to get a better idea of what that feature does and its importance.

One thing I found very distracting were the code examples. Most of them had spaces missing between words. It was very difficult to read the code to gain a better understanding of the topic at hand. This makes the code almost useless to have in the book, please get this fixed!

The book does cover many of the key aspects needed to build a great dashboard with the correct technologies in Silverlight. However, pay close attention to the various technologies that are in each chapter and do enough research to understand these technologies as they are important in constructing your dashboard. If you do you will be able to build a great dashboard using Silverlight.

To wrap things up I would recommend this book if you are interested in building a dashboard using Silverlight. Don’t expect too much from this book as a majority of the chapters focus on the basic (and advanced) building blocks of Silverlight at a high level. It is a quick read and worth your time if you are of a particular audience looking to build a dashboard in Silverlight.

0 comments

I have been writing applications for the Surface recently and started to experiment integrating Behaviors into my applications. One behavior that I am using is a conversion from Laurent Bugnion and his amazing Zoom Behavior for WPF. It was very straight forward and simple to convert this to a Surface Behavior and I would like to demonstrate how I accomplished that in this post.

First thing, go grab Laurent's excellent Zoom Behavior source code (under the Downloads section). Then create a new Surface application and copy in the three files for the Zoom Behavior: ZoomAdorner.cs, ZoomBehavior.cs and ZoomExtension.cs. The main thing we need to replace in the WPF Zoom Behavior code is the mouse events since Surface has no concept of a mouse, instead Surface understands Contact points (sorry, the Surface SDK is not open to the public just yet). These Contacts are how the Surface knows when there is some sort of user input and this is how we will tell the Zoom Behavior where to magnify.

The bulk of the work will be done in the ZoomAdorner class. There were only 3 things we had to change:

  • Replace the MouseMove event with an appropriate Contact event
  • Use the Contact event to hold onto the current position
  • Update the SetGlass() method to reflect the new position from the Contact event

Pretty easy, right? But there are 2 more classes to deal with: ZoomBehavior.cs and ZoomExtension.cs. Lucky for us, neither class needs to be changed, but we will remove 2 lines from ZoomBehavior.cs that changes the cursor of the mouse when the Zoom Behavior is active since Surface does not deal with the Mouse. And that's it!

I have 2 attachments, one that is a direct port of Laurent's sample application that is Surface ready and another test application that uses a ScatterView to demonstrate that the Surface Zoom Behavior will work alongside the user and not interfere with dragging / dropping of Surface elements. Enjoy!

One thing to note, when testing this Zoom Behavior out I found a slight bug in the code. If you set the IsVisible property of the Zoom Behavior to True it will crash. Looking into this does not reveal exactly why this happens other than a private member is not set for some reason which ultimately causes this crash. To get around this, set the IsVisible property to false (or do not specify the property since it defaults to false) and in the code behind in the OnApplicationActivated(object sender, EventArgs e) method set the property to true. This will allow you to have the Zoom Behavior start when your application starts.

There can be a couple of improvements that can be made that would enhance this Zoom Behavior:

  • Have multiple instances for multiple Contacts
  • Demo of a new template with a slider to control the Zoom Factor
  • Fix the IsVisible="True" at startup bug

One last thing to remember, if you are using the Surface Simulator then you need to run that first before running an application with this Zoom Behavior.

filefile size
Magnify.zip1.01 MB
ScatterViewTest.zip225.13 KB

3 comments

Haven't updated this site in a while, been busy with some pretty cool projects ... more to come on them in the near future.

One of the projects I have been doing is a site called Focus on the Home. This site offers a way for people to get organized in many different ways and stay organized. The services that are offered are great ways to start out, and you can even get started with packages!

Go check out Focus on the Home and see how you can get organized and stay organized!

We are looking into adding monthly newsletters that will tie in with the tip of the month that is already up!