Posts tagged with 'Xamarin'
J. Tower is answering all my burning questions about .NET and .NET Core
Show Notes:
Want to be on the next episode? You can! All you need is the willingness to talk about something technical.
Theme music is "Crosscutting Concerns" by The Dirty Truckers, check out their music on Amazon or iTunes.
Welcome to another "Weekly Concerns". This is a post-a-week series of interesting links, relevant to programming and programmers. You can check out previous Weekly Concerns posts in the archive.
- I've been exploring the Command/Query Objects pattern, specifically with the idea of replacing the repository pattern. I've started with Dustin's Brown post about Command/Query Objects with Dapper.
- How to setup Twitter Cards for your site (specifically WordPress, but blog post is helpful for everyone else too).
- Rob Gibbens posted about using Fody.PropertyChanged (an AOP plugin to the Fody IL rewriting framework) with Xamarin to use the MVVM pattern.
- EconTalk is one of my favorite podcasts. Check out this episode about the "sharing economy", in which they discuss the impact of technology like Uber, AirBnb, and so on, featuring my favorite guest: Michael Munger. Especially interesting to me is the discussion about taxi medallion investments.
If you have an interesting link that you'd like to see in Weekly Concerns, leave a comment or contact me.
Welcome to another "Weekly Concerns". This is a post-a-week series of interesting links, relevant to programming and programmers. You can check out previous Weekly Concerns posts in the archive.
- Paul Sodimu sent me a link to his blog post about Aspect Oriented Programming Using Castle Windsor. Check it out!
- Get yourself a free C# t-shirt from Xamarin.
- The ideal length of tweets, headlines, blog posts, email subjects, and more.
- CodeWars: you can't even get in until you complete a coding challenge.
If you have an interesting link that you'd like to see in Weekly Concerns, leave a comment or contact me.
I first used MvvmCross with Windows Phone 8, and XAML has a pretty good data-binding syntax already in place.
Switching over to Android, though, and the data binding didn't seem as straightforward. I was struggling just to bind a Button to an IMvxCommand.
So I checked out the MvvmCross documentation on Databinding (which, by the way, makes it seem like databinding is still very much a work in progress in MvvmCross), and I came across the idea of "Fluent Databinding" (as opposed to "Swiss Databinding", I guess). Instead of doing the binding in the AXML Android view markup, I could just do it in C# in the Android activity. Here's an example of binding a Button click event to an IMvxCommand in the viewmodel:
Note that the .For("Click") clause is actually optional, since "Click" seems to be the "default view property". But I chose to be explicit, especially for this example.
I'm continuing my adventures into mobile development this year. I've spent a lot of time on Windows Phone 8 so far, and as I'm writing this post, I've shipped an app off to a couple of friends to try on their real phones.
Next step, since I'm using MvvmCross, is to take that codebase and use (most of) it to create an Android version of the same app using Xamarin.
I've done Android development before, both with plain Java and with Xamarin (called MonoDroid way-back-when), and either way a major pain point has been the Android emulator. It's slow, clunky, and cumbersome, and everyone knows it. Fortunately, Greg Shackles, Xamarin MVP and all-around great guy, heard my whining and recommended that I check out Genymotion (which I had never heard of).
And, behold! Genymotion is just what I've always wanted. It can create and spin up Android emulators for me using VirtualBox. The prices are very reasonble, and there's even a free version that is no slouch!
I installed it, and it was even kind enough to install VirtualBox for me. Once it's installed, you can select from a whole bunch of pre-configured Android devices (Galaxy S4, HTC One, Moto X, etc).
I decided to create a Galaxy S2 image (which is the phone I actually own and use everyday).
Then, just click that "play" button, and a reasonably fast Android emulator will start up. Both Xamarin Studio and Visual Studio with Xamarin discover it, no problem. I assume Eclipse will also be able to find it.
If you're doing Android development, do yourself a favor and give Genymotion a try.
P.S. It's pronounced "Jenny motion"