| john's profileJohn West - Technology, ...PhotosBlogLists | Help |
John West - Technology, continued... |
|||||||||||||||||||||||
|
April 20 What Windows Mobile Needs, from a Developer PerspectiveI’ve been thinking a lot about Windows Mobile 6.5 and 7.0. Everyone is very focused on the user experience that Microsoft will provide. Will they show the hexes or hide the hexes… Will it have Multitouch or not? Zune integration? Will it be more stable? These are all great questions, but as a developer, none of them are the right question for me. I mean, I want the Zune Marketplace on my WM device, no doubt about it. However, there’s one thing I want more than any other as a developer. WPF for Windows Mobile! Yes, that’s what I want as a developer. I want my .net, but I want it pretty and usable. Is that too much to ask? Let’s face it. The .net compact framework is extremely powerful once you get past the UI. But the UI is what makes the experience, and CF is sorely lacking. WM isn’t competing against dumbphones anymore. It’s competing against the iphone and the Pre and others like it. Each of these devices does a tremendous job of making applications easy to use, and, dare I say it, fun! WM, not so much. Why not WPF? I can think of a few reasons why we don’t have WPF. I have no inside knowledge; these are just guesses.
Those are some reasons I can think of off the top of my head. I’m sure there are more reasons. Now, there is one wildcard in all this… Silverlight for Windows Mobile MS has announced that Silverlight will be released for Windows Mobile. Since Silverlight (v2+, at least) is a subset of WPF, this really shows that it can be done. I don’t count SLOOB (Silverlight Out-of-Browser, coming in v3) as a viable alternative, since it runs in a sandbox, and therefore is too limited for many apps I, and others, would want to write for WM. So, what to expect? I have no expectations. I wish I had inside knowledge. I have none. I’m extremely hopeful, but extremely doubtful, that MS might announce WPF for WM at Tech-Ed when they officially launch WM 6.5. I just don’t see it happening, though, since there haven’t even been the slightest rumors on the interweb. Maybe with WM7. If you know anything I don’t, and you care to share, feel free in the comments below. February 20 Getting Windows Mobile Internet Sharing to work with an AT&T phoneI have an AT&T Fuze with the original, stock Windows Mobile 6.1 installed. I have tried repeatedly on two different machines to get Internet Sharing working over either bluetooth or usb. No dice. Finally, I stumbled on this blog: http://stevenharman.net/blog/archive/2008/10/03/windows-mobile-internet-connection-sharing-hack.aspx. The important part wasn’t how to hack the registry. What I needed was to know that the AT&T ISP connection needed to point to wap.cingular instead of isp.cingular. I made that simple change and my connection worked flawlessly! Hopefully this helps someone else. November 20 Take Your Music EverywhereI’ve always wanted to have and play my music from anywhere. As of today, I’m getting really close. Two things happened to make it easier. First, Zune Pass with Free MP3s (if you have MP3s from other sources, skip this section and move on to “Mesh” below) First, I’m a Zune Pass guy. For $14 a month, you get unlimited music to listen to on your PCs and Zunes. Of course, if you end the subscription, you don’t keep the music. That’s mostly true as of today, with a great exception. As of now, every month you’re a Zune Pass subscriber, you get to download 10 DRM-free MP3s from the Zune library. These credits show up as you browse your music, and when you go to buy an MP3, you’ll see ‘NO CHARGE’ as long as you have credits remaining (note: these aren’t rollover credits – you need to use them every month). These MP3s are yours forever, regardless of whether you have a Zune pass, or even Zune hardware or software. They’re POMP3s (plain-ole MP3s) to do with as you like. Second, Mesh Ok, so it’s great that I get free MP3s. And since I can copy them around, I can take them with me on any device. However, it’s time-consuming to copy files and make sure everything’s in sync. It also doesn’t help if you’re at someone else’s computer. That’s where Live Mesh comes in. Live Mesh, although much more, includes file-synching capabilities. Once you install Mesh (www.mesh.com) on the desired computers, you can join them into your own sort of personal network (called a Mesh, of course), simply by using your Live/Msn/Hotmail Logon. Once they’re in the Mesh, you can add any folder on any computer to be synced, and specify that it should also be synced with any/all of the other computers. So, Computer A and B sync a folder called ‘ZuneMP3s’. Any changes on either computer will automatically be synced through the included computers without you doing a thing! Add some MP3s on computer A and they’ll be on computer B, and vice versa. Any problems with making sure all your devices have the MP3s is solved. And you can have nearly unlimited computers in your mesh. That’s great. Your PCs all have your MP3s. But wait, there’s more. This is where it gets really, really good! In addition to syncing the folders to your devices, you can sync it to your Mesh “Live Desktop”. This is your mobile desktop on the web. As you can see below, I’m syncing my MP3s to my Live Desktop. (Note: there’s currently a 5gig limit to your Live Desktop while it’s in beta). Why is this important? It’s important because your Live Desktop includes a built-in media player by way of the Silverlight plugin. This means, yes, you can play your MP3s from the browser, from any computer that supports Silverlight (Mac, Windows, Firefox, Safari, etc)! At a friends house? Just log on to your Live Desktop and start playing your music! Bonuses Bonus #1: Soon you’ll be able to include Mobile devices and Macs in your Mesh. That means you can have your MP3s sync to your phone for play on the road! Bonus #2: Mesh includes remote desktop abilities. That means that you can remotely connect to any machine in your Mesh as if you’re sitting in front of it. Bonus #3: Mesh is set to be much more than just a file-synching solution. Silverlight apps can be hosted within it, and developers can write apps that use it to sync whatever types of information is relevant. Summary I can sync and play my MP3s from any PC in my Mesh, and I can play my MP3s anytime, anywhere, from a browser! How’s that for cool?!?! Setting an assembly's LINQ connection string via your web.configNote: The examples are for VB.NET. I have a separate assembly that hosts the layer containing my LINQ to SQL model. If you're going to use the L2S designer, you need to let L2S store the connectionstring in the settings.settings file, as shown here. This is great, until you move your website to staging/production. You need to be able to change this connectionstring by way of a web.config setting. This method assumes that your L2Q data context has the following settings: Connection: ExampleConnectionString (MySettings) It turns out that it’s really simple. Just add a connectionstring entry to override the one in the assembly containing the L2S connectionstring. Here’s mine for the example above: <connectionStrings> The key is the name. You have to prefix your connection string’s name with “RootNamespaceForYourAssembly.My.MySettings.”. That’s it. Your web.config settings will now override the assembly’s settings when you view the website, and yet the designer will continue to use the settings in the assembly! John ps. I do recommend you verify your changes before moving this to production to make sure your web.config connectionstring is being used. To do this, simply make your production web.config connectionstring point to an invalid server and make sure you get the error on your website. That way you’ll know for sure that it’s reading it correctly. July 14 Silverlight 2 Beta 2 Animation Reuse ErrorsI'm trying to reuse an animation that I create programmatically. The why isn't important. What is important is that the second time I try to run it with animation.Begin(), it bombs. Well, with some properties it bombs. With others, it works. Transform properties cause the error, but standard properties like opacity and canvas location work when you run the animation multiple times. Below is a sample app. Button one and two are two instances of the same created animation. Each of them will run once, but fail the second time. This shows that it's not the object being animated, but the animation itself that is causing the error. Button three and four are opacity animations, and show that animations that change opacity never fail when run multiple times. I'm sure one suggestion will be to recreate the animation each time. However, in my real-world app, I capture some object properties at the time the animation is created, and need to have these same values used each time the animation runs. If I were to grab the properties over each time I recreated the animation, the object might be in a different state. And I don't want to cache the initial values, because 1) it makes my animation library less flexible, and 2) I just want to do it this way, 'cause it's easier :). I've added my code after the sample app. If anyone has any idea what I can do to prevent this while still creating the animations programmatically, please add a comment. Here is the xaml (Page.xaml). <UserControl x:Class="AnimationReuseTest.Page" And here is the code (Page.xaml.vb). Partial Public Class Page Dim s1 As New Storyboard Public Sub New() 'add storyboards to resources - not sure why, but I'm following examples I've seen Sub CreateAnimation(ByVal s As Storyboard, ByVal Prop As String) Private Sub btnAnimate1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Private Sub btnAnimate2_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Private Sub btnAnimate3_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Private Sub btnAnimate4_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) |
Sites I've created to play with different web technologies
|
|||||||||||||||||||||
|
|