Tag Archives: SilverLight

VicinityBuzz Update: Windows Phone 8 & More

VicinityBuzz on Win Phone 8

While attending Codemash a few weeks ago, I ended up in a Windows Phone development precompiler (Codemash’s name for a training session). It was my plan to hit mostly mobile and analytics sessions, but I was not originally planning on attending this session. With Windows Phone still struggling for market share, I wasn’t in a rush to work with it. However, other sessions were cancelled because weather had delayed some presenters, so I ended up in this session. Microsoft’s Jeff Blankenburg was teaching the session, and I have enjoyed some of his presentations and a Silverlight fire-starter event in the past. It’s one of my rules of conferences to attend sessions based more on good speakers, rather than based solely on topic.

With regards to marketshare, Jeff made the point during the session that with a less crowded app store, you do have a bit more discoverability. Even if that doesn’t hold up, the platform shares enough similarity with Windows 8 that a port to the Windows Store will be trivial. The Windows App Store isn’t exactly setting the world on fire either, but I’d like to see my app on all of these platforms, and as Windows 8 adoption rises with new machine sales, that marketplace should see constant upticks.

Having worked with Silverlight in the past, I found it pretty easy to get going on Win Phone 8 development. There was some definite rust on my XAML skills, but it came back to me fairly quickly. One thing to keep in mind is that you want to keep things relatively simple on a mobile platform. I have worked on some WPF projects in enterprise settings with MVVM frameworks, dependency injection frameworks, and more. While I followed an MVVM pattern, I just rolled my own with a simple base class.

My project was to do a version of an app I already have in the iOS App Store, VicinityBuzz. It does location based searches of twitter. You can search around you, or by entering an address. The radius is a configurable setting. I like using the app at conferences like Codemash to catch all the chatter that may not have a hashtag. One catch is that obviously only tweets that included location will be found. If folks have that feature turned off in their twitter app, then it won’t show up.

Since I had written the app before (in phonegap for iOS), I knew the feature set and domain cold. The challenge was just getting up to speed with the latest API’s for search and geolocation, and then implementing within a new platform. One of the biggest benefits of this project was getting up to date with the latest Twitter API. I still need to update the version for iOS, as it’s currently non-functional because of api changes over the last several years. I plan on doing that very soon now that I know the latest version.

Anyway, I won’t go into the development details here too much, but I finished a version 1 of VicinityBuzz, and it is now in the windows phone store here, and it’s free. So go check it out. If you like it, I’d love to have some more reviews.

Also, if you are inspired to do any Windows Phone development yourself, you may be interested in a device to do some real testing. I recently found there are some prepaid phones new on Amazon that are dirt cheap for that purpose. Check out the Nokia Lumia 520 and Nokia Lumia 521 on Amazon.

Watch this blog for upcoming posts about working with the Twitter API, and some of the things I learned working with Windows Phone 8. And more mobile in general. I have the bug again…

New Questions the Build Conference Causes

Build answered a lot of questions for developers who wondered about the future of the Microsoft platform. WinRT is the new API for “Metro ” applications, which are streamlined enable both tablet and pc inputs. These applications can be built in .Net or native C++ using XAML, or in JavaScript with Html5. The traditional desktop interface is still available and it still runs all sorts of full .Net and Win32 applications.

But I’m left with a lot of new questions…

Silverlight is dead but not dead

Silverlight is alive on the desktop version of Windows 8. And it’s easily ported to Metro. But it seems like a big deal to me that the Metro version of IE won’t support Silverlight and Flash.

XNA is dead but not dead

XNA is not supported for Metro games. Given there is no XBox touch screen, maybe the point is that the input libraries could never be made compatible with Metro. Still, that seems like a big deal. C++/DirectX works on the desktop, on metro, and for the 360.

There is no legacy layer for ARM, but is there a Desktop mode

Will the desktop mode even run for ARM? It’s known x86 binaries won’t run on ARM, but will the desktop be recompiled for ARM? Because if not, then all the non-metro supported paradigms (Silverlight, XNA, WPF & more) can’t be recompiled to run on the ARM version. If you have an ARM tablet, you can’t use a flash site or silverlight site. Even if docked. The iPad has that restriction, but keep in mind the iPad was never marketed as a tablet / dock-able laptop like these new Windows 8 machines are. In other words, are desktop applications now “fat binaries”? Which leads too…

You can write Windows desktop applications in almost any language, what about Metro apps?

Did they also just close the door on people who write in Java, Python, Ruby etc? There are windows bindings or even portable UI toolkits (think GTK+) that run on Windows and enable a variety of developers of other languages to write Windows apps. Are they now only able to write desktop mode apps for consumers who have x86 based machines? Or will Microsoft help foster a community of bindings to WinRT for a variety of languages.

Speaking of, anyone notice that F# was not on that diagram as an option for metro apps? They didn’t say .Net, they said C# and VB.Net.

There was a lot of exciting news, and it’s generally a good direction. But they definitely shook up the developer community and didn’t answer everything. What do you think?

Interesting Assignment Related to Rich Internet Controls

One or my recent projects was to work with a client to create a Silverlight control for reporting purposes that has some general flashiness, and is reusable across several sections of the site. It has brushed into some interesting areas. I have used Silverlight for some media and imaging applications before, but this was the first that the control had to integrated with the authorized users profile and other security related server side settings.

In particular, the first thing to keep in mind is that as long as the Silverlight Enabled WCF endpoint is within the web application on IIS, then the service code has access to the users profile info. It’s just as if making a jquery request from a page, there is no need for the Silverlight control to re-authenticate.

The really interesting part is where the project goes from here. The client has asked me to create an equivalent control using HTML 5 technologies. There will be some lunch and learn sessions on how both of these projects were done, and comparing and contrasting both the user experience and developer experience.

I’m excited about doing this type of work for a variety of reasons. First, the training aspect really helps our company differentiate from other consulting companies, especially from rent-a-coder staff augmentation type shops. And I enjoy the challenges and rewards that come with helping other developers work with tools that are new to them. Finally, the very question we’re addressing (plugin vs standards based RIA controls) is on the forefront of lot of minds, given the current state of browser and mobile applications.

Anyway, this is just a general update of what I’m up to, but I hope this work will spin off some presentations I can do locally, and some blog posts.

Silverlight Application Code 2103

When working with Silverlight, if you get an application code error 2103 and go looking for answers, you’ll find posts like this that suggest it’s a namespace problem. If that’s not the problem, you’ll find yourself stuck without many other suggestions.

Here’s a simple check for another common problem, permissions to download the Silverlight xap. Type into your browser http://localhost:8080/ClientBin/MySLControl.xap (based on your dev server and Silverlight control name) and see if you can save the file. FYI – It will show up as a zip.

If this is an asp.net site and you do have permissions issues, just add the following to your web.config:

    <location path="ClientBin">
        <system.web>
            <authorization>
                <allow users="?"/>
            </authorization>
        </system.web>
    </location>

SilverLight and Z-Index

When implementing a new SilverLight custom control, it was blocking menu popups (html / javascript) on the page. I set the z-index of the div and object tags that contained SilverLight to no avail. After a lot of googling, I found the following solution.


Set the Windowless property to true. In the case of manually adding SilverLight to the page, that results in the following child tag of the object tag…

<param name="Windowless" value="true" />

Update: I recently read Professional Silverlight 4 (Wrox Programmer to Programmer) and highly recommend it for developers working with SilverLight. Used copies are pretty affordable.