21. April 2013 12:24
After a short period of testing and use in a project, I released version 1.2 of YLOD (on NuGet) today. It adds support for passwords, a feature requested by Brecht over on CodePlex. I was a bit amazed that I didn't ran into this earlier, as having passwords in your app's options seems like an obvious use case. It once again shows the value of feedback from others – thanks for that.
How it works
Passwords integrate in the same way as all other available options by using attributes for configuration. There are two typcial scenarios that are supported:
- You want the user to enter credentials for some own or external service. This would be achieved by displaying a single password box.
- You want to enable your users to change some existing credentials, for example for your own service and/or app. This typically requires a second password box to confirm a password change and avoid typos.
The following snippet shows a fully configured password property on your options data container type with the second scenario used. You don't need to configure the confirmation related properties if you're only interested in the first scenario, of course.
[OptionPassword(Description = "This is a password with confirmation, e.g. to change an existing password.",
GroupName = "passwords",
ShowConfirmation = true,
ConfirmationDescription = "Confirm the password:",
PasswordsDoNotMatchErrorMessage = "Password and password confirmation do not match.",
MinLength = 3,
ValidationErrorMessage = "A password must be at least 3 characters long.")]
public string MyPassword
As you can see, the "OptionPassword" attribute inherits some base properties, in particular of the string option attribute, to let you add simple validation checks (through the "MinLength" or "RegularExpression" properties) without requiring custom validators.
Of course the new option supports all the features of other options, including localization and support for both Windows Phone 7 and 8 (more here: https://ylod.codeplex.com/documentation).
How it looks like
The above example results in an options page like this:
If you want to play around with this or any other features of YLOD, I recommend taking look at the source code, which contains sample applications for both Windows Phone 7 and 8 that make it easier to get started with the project.
I hope you enjoy this new feature and find some use for it. Have fun!
2. April 2013 07:30
I used the time over the Easter holidays to update some of my open source projects. It was mostly fixing small issues and also improving support for Windows Phone 8. In particular:
Your Last About Dialog (also on NuGet)
Your Last Options Dialog (NuGet)
Liphofra (NuGet) – first public release
I also introduced some changes to PAARC lately, and worked a bit on the Phone Net Tools – however not to a point that would justify a new release (see the repository if you're interested).
12. August 2012 17:51
So far, this series has talked about all kinds of problems you may run into with background agents, like API restrictions, timeout/memory constraints, data exchange between your app and your agent and finally possible error conditions when you want to create tasks. There's one additional topic I want to talk about briefly, because it's a really important one, and it took me a while to figure out the exact inner workings of it myself.
Part 5: Expiration Time
When I started working with background agents, there were only a few vague hints available for a particular behavior of the operating system regarding their expiration. It wasn't clear to me what exactly happens and what an app is responsible for (or allowed to do) with regards to this, so I went through some painful experience to learn the details (for example, an update for the SilverlightShow app to fix an issue with this was needed). Luckily, the documentation on MSDN on this is much better today, and together with my following explanation hopefully you won't have to go through the same process like me. More...
14. May 2012 11:30
When you create an app like the SilverlightShow app, that accesses remote data frequently, thinking about a suitable strategy for local storage and caching is vital to provide a great user experience. In the previous parts of this series, we have already seen how several optimizations are used to improve the networking performance of the app. Overall, the costs to pull data from the portal could be reduced to far less than 1/10th of the original traffic by applying some relatively simple changes. However, this is only half the story. What we also wanted to achieve is that content that has been retrieved once should not be fetched again – we needed a solution for storing those items locally.
You can read the full article at SilverlightShow here:
10. May 2012 17:55
I once again would like to thank everybody who attended my session about Behavior-Driven Development with Windows Phone at this year's Entwicklertag Karlsruhe (#etka12), and for the great feedback and discussions afterwards. I offer both the slides and the shown demo code for download here:
Slides: BDD mit Windows Phone (German)
Source Code: [Will follow soon, currently there's a NuGet issue]
As requested by someone, here also is the link to my free Windows Phone training videos again:
This can be used to get started with Windows Phone programming from scratch, and to learn about the special features and inherent problems of the platform discussed during the session.
I hope you enjoyed etka12 as much as I did; happy coding!
2. May 2012 07:00
It's been a while since the last part of my series on background agent pitfalls, where I talked about data exchange between your app and the agent, and what potential errors and edge cases you may run into with that. There are a few more topics I wanted to create awareness for, so today I'll continue with…
Part 4: Exceptions, exceptions, exceptions
A lot of things can go wrong when you work with agents, and one of the places that are particularly interesting is at the very beginning – when you try to schedule your task. There are a hand full of conditions that may prevent you from doing this, and knowing about them to e.g. add proper error handling is vital. In this part I'll show and explain to you the individual error cases, and talk about how to work around them, if that's possible at all. More...
1. May 2012 13:46
I've released version 2.0 of my open source component "Your Last About Dialog". This major new release adds full styling support to the about page, which gives you complete control over the visual appearance of the component. This not only includes simple details like foreground and background colors, font sizes and styles, but also much more sophisticated things like the possibility to add page transitions from the Silverlight Toolkit, or control the visibility of the system tray and other details.
Version 2 also improves the install experience from NuGet by integrating some quick start help, to get you up and running in only a minute, without the need to study the documentation separately. As always, installing from NuGet is the recommended way, but you can of course also download the binaries and source code from CodePlex if you want. To learn about the new features in more detail, consult the "Styling" section of the documentation. The default styles that are created for you when you install the NuGet package also contains some pointers and comments on what you can do.
Have fun :)
20. April 2012 08:00
Two days ago, almost one hundred attendees joined my webinar about advanced MVVM topics. I've used some sample scenarios on the Windows Phone platform to demonstrate typical problems (and possible solutions) that you potentially will run into when you apply the MVVM pattern to your applications. In particular, I talked about:
- Accessing features of the view from your view models (e.g. navigation features, dialogs)
- Elegantly handle access of view model features from your views when there's no built-in support for it (e.g. missing binding capabilities in the application bar)
- Accessing data and features that are not available in the current context (e.g. access across boundaries of unrelated view models, passing data between pages)
I'm pleased to announce that a recording of the whole webinar is now available for free here:
You can also download the slides and samples sources shown in the webinar (this requires a free account on SilverlightShow.net).
Thanks to everybody who attended and the great feedback I've received. Also, congratulations to all the winners of free ebooks.
17. April 2012 07:00
Last week, Carl Franklin and Richard Campbell recorded an interview with me for their show "The Tablet Show". The show focuses on all kinds of mobile devices and covers WinRT/Metro, Windows Phone, iOS, Android and HTML5 development topics. If you haven't heard of it yet, check it out! You can expect the same fun and quality as with their other show ".NET Rocks!", which I'm sure you all know and are fans of :).
In the episode we talk a bit about Windows Phone in general, some of my open source projects, and then about the differences between Silverlight and XNA programming. We also spend a good amount of time talking about hybrid apps that let you combine both technologies and use the best of two worlds in a single application, and conclude with a short outlook on the future of XNA on the phone. Yesterday the recording went live, and you can now listen to the episode for free here:
Talking to Carl and Richard was a really pleasant experience, and I hope we're able to convey the key points of XNA and Silverlight on Windows Phone to get you interested in more.
12. April 2012 17:30
In the first parts of the series about developing the SilverlightShow Windows Phone app I explained the general development process and the technical details of accessing and optimizing the RSS feeds of the site. Now that we are able to access all of the content from the phone, the next step is to take a look at what was necessary to display what we have to the user while preserving a native look and feel. If you haven't seen the app in action, here is a short video about it.
When you recall the details of the previous part or simply take a quick look at the RSS feeds of the SilverlightShow site again (sample), you will see that the content of each category (news, articles, events) is stored as fully formatted HTML already. All of it is produced by authors in WYSIWYG tools like Windows Live Writer and directly uploaded to the site's content management system. Even though we receive a slightly optimized and cleaned version of that rich content on the phone, it's still HTML. The fundamental decision to make hence was whether we would take that content as-is or transform it into something more native to the phone platform.
You can read the full article at SilverlightShow here:
Creating the SilverlightShow Windows Phone App: part 3