Navigation


Markus on Development and Publishing

This is Markus Egger's professional blog, which covers topics such as development, publishing, and business in general. As the publisher of CoDe and CoDe Focus magazines, and as the President and Chief Software Architect of EPS Software Corp., Markus shares his insights and opinions on this blog.

Content Area Footer

Friday, February 12, 2010
DevConnections 2009 (Las Vegas) Slide Decks

Here is some older stuff I never had the chance to share before. This ZIP file has my slide decks for all my session for DevConnections 2009 in Las Vegas. This includes the following sessions:

  • Graphics Design for Developers
  • Interface Design
  • iPhone Development for .NET Developers
  • REST and Data in Azure
  • All day WPF Business Application pre-conference session.

Enjoy!



Posted @ 6:32 PM by Egger, Markus (markus@code-magazine.com) -
Comments (2)


Friday, February 12, 2010
Presentation Materials for my C# 4.0 Dynamic Presentation at HDNUG

Last night I did a presentation at the Houston .NET User Group (HDNUG) on .NET Language developments, with a focus on dynamic languages, and C# 4.0’s dynamic features in particular.

You can now download the slide deck I used for that presentation (here), and the samples (here). Enjoy!



Posted @ 6:11 PM by Egger, Markus (markus@code-magazine.com) -
Comments (1)


Friday, February 05, 2010
Thinking about Google's Chrome OS and Similar Offerings

So how about Google’s Chrome OS? Interesting idea, isn’t it? (Although not very original and certainly not something Google invented). Create a device with a closed OS that launches straight into the browser as a pure web device. A solid state drive will make booting a very fast operation. No software installs mean no hassles (at least in theory). One is always online anyway, or so the theory goes, so why ever install a rich client app?

For many users, this may be pretty close to the truth. However, and that much is clear, HTML apps are not really great apps. From a UI design point-of-view, they outright suck. Sure, we have come a long way in making HTML UIs better, and we sure are pushing the limits with AJAX and advanced client-side scripting, but at the end of the day, we are still stuck in a fairly outdated world of HTML that was never all that great, even when it was new. Even simple Windows UIs often provide much better user experiences, and they are much less labor intensive to build. But I digress.

So for many scenarios, users will be happy with web browsers, but at the same time, they are losing the ability to do anything on their machines. No Word documents to create, no Outlook, no games to play. Will users really be happy using Google docs and Outlook Web Access? Personally, I know I wouldn’t. Nobody I know would. But then maybe I just don’t know the right people. I am sure some people really value not having to install anything as it also brings the benefit of not accidently installing viruses locally. (Although Facebook shows that viruses and other malware can also make it into online offerings, and Chrome OS won’t be immune to those sort of attacks either. And neither will any other system for that matter. Take that, Mac!).

I really do wonder about the user experience though. I can’t see myself using just HTML-based apps. Sure, HTML may improve. After all, HTML5 is on the horizon and there is hope of adoption of those new features. Especially on Google’s side (who is behind HTML5, after all). Although in general, pushing a new HTML standard is a very difficult undertaking, as there simply is no way to force all the clients to update (which now include anything from Windows machines to mobile devices such as phones and Kindles). So it will be a very long time before HTML5 really becomes significant. And “oh by the way”, how are you going to get a new browser with HTML5 support onto your Chrome OS Netbook? Well, there will be some update ability, which weakens the “no install” story considerably. How much you can update the OS and its components (such as the browser) will probably depend on the OS vendor (as Google is not the only one playing in this market), but the situation is clear: Either you allow (update) installs and are more susceptible to security problems (with a weaker advantage on the maintenance side), or you can’t update, turning the machine into a brick every time something new is coming out. (Perhaps with the ability to re-flash the device at the original vendor, similar to the situation with some phones today).

Of course the no-install-story also means very poor support for technologies like Silverlight and Flash. After all, how are you going to get that technology on your device, and how are you updating it? And forget about running any offline apps, no matter how great those features are in Silverlight 3 and 4!

One of the biggest question in terms of Google’s success with the Chrome OS is “how will they build customer affinity”? If you are a Windows user, you identify with that OS. Same if you are a Mac user. Your next PC is likely going to be a Windows or Mac PC again, unless you have a really good reason to abandon that platform and your investment in it. If you are a pure web-OS user on the other hand, then who cares what OS you are using? You might go from Chrome OS to some other vendor of a web-OS. You will probably hardly know the difference. Or you might go to Mac or Windows as you grow tired of not having a strong offline story. Anything that installs on the client ties the user to that platform. If it wasn’t for all the apps, I might have long tried a phone other than the iPhone again (as there are now offerings with similar feature sets to the original iPhone), but the apps keep me there. “What if there isn’t an equivalent of Shazzam”? I often think. Substitute the app(s) of your choice. You get the idea.

If you have something client-specific, you care about the client. Otherwise, clients become interchangeable, which is bad news if you are the company invested in creating the client technology/device.

Frankly, even if Google’s idea with the web-OS flies, I would have much higher hopes for someone like Apple to capitalize on it. After all, Google is an advertisement company, not a tech company.

What about Microsoft? Could they compete in this arena? Fundamentally, yes. In fact, I think Microsoft is in a great position to re-purpose some if its OS assets in combination with Internet Explorer and put that into a scale-down version, perhaps with some rich-client capabilities (and Silverlight pre-installed). In short: Microsoft would be great to put out a very competitive offering that is much superior to whatever Google and (hypothetically) Apple could put out. Whether that will happen is a completely different story however. After all MS’ track record in the mobile device arena is plastered with unrealized potential…



Posted @ 4:15 PM by Egger, Markus (markus@code-magazine.com) -
Comments (1)


Thursday, February 04, 2010
Social Media Pet Peeves

I like social media. I think especially Facebook and Twitter is the way to go and for individuals and businesses, it is as important to establish a meaningful presence on these sites as it was in 1998 to have a web site. I also like other social media outlets such as Xbox Live. I have tons of friends and I care about what they do. I am also interested in tons of businesses and products and want to be connected with them, but I’d never have the time to go out of my way to visit their web sites all the time.

There are some things people do on these sites however, that drive me nuts. Here is a list of my top gripes:

  • Pick a name I can recognize! If you friend me and I can’t tell who you are, I am not going to friend you back. And even if I can find out who’s behind a silly name initially, I will probably forget it and not recognize you when you post a status update. Besides, many social networks will make it very hard for me to search for you if you use a silly name!
  • Upload a real picture of yours! This is very similar to the name issue. I (as many people) are not all that good with names. I meet tons of people at various events and other occasions. I make an effort to remember names, but I still have a much easier time to recognize faces. So use a photo that allows me to recognize you!
  • Put up a short and concise bio (especially on Twitter). If you friend me, I will follow you too in all likelihood. But I go through lists of people fast. Just today, I weeded through 200 followers and I have probably less than 1 second for each of them to decide whether I want to follow them back. So I glance at the bio and make an on the spot decision. If I do not find anything that interests me, I will never follow you. This is a one-chance deal.
  • Before you friend a lot of people, add some substance. If someone follows me on Twitter I will look at their page, and if there is nothing there for me to look at tweet-wise, then I will not follow you back as I have no idea what kind of stuff you post online.
  • If you are a business, you need to change the way you present yourself. Post a single stupid marketing message and I will unfriend you. Post something that has substance.
  • Don’t protect your tweets. If you do not want your tweets to be seen, then Twitter is not the place for you. I will never go out of my way to follow you if I have to request the follow. You can always block someone you don’t want to see your tweets.
  • DON’T SHOUT AT ME! If you write in all upper case, you are annoying a lot of people.

Well, that’s the short list anyway. I could go on and on. What are your social media pet peeves?



Posted @ 4:41 PM by Egger, Markus (markus@code-magazine.com) -
Comments


Monday, February 01, 2010
Dynamic C# 4.0 Presentation from the Munich .NET User Group

Geee! I almost forgot to upload this: I recently (January 2010) did a presentation at the .NET User Group in Munich (http://munichdot.net/). Here is a link to the slide deck I used for that presentation.

Note that this slide deck (and presentation) is in German. I will however present the same talk at the Houston .NET User Group soon (www.hdnug.org), and I’ll upload the English slide deck after that event.



Posted @ 12:25 PM by Egger, Markus (markus@code-magazine.com) -
Comments


Saturday, January 30, 2010
My Thoughts on the Apple iPad

As many of you probably know, I love Tablet PCs and similar devices. I have had a Tablet PC from the day they became available. I have even had a tablet device that was Windows CE based years and years ago. I have spent a huge amount of time developing for the Microsoft Tablet PC and also for Origami devices (“UMPC” a.k.a. “Ultra Mobile PCs”). I even like related devices such as Microsoft Surface, the iPhone, and e-Reading devices such as the Kindle. We have done 2 CODE Magazine special issues focusing on Tablet PC and Mobile PC development (www.code-magazine.com/focus/tabletpc). Microsoft even named me one of the world’s most influential Tablet PC and Mobile PC developers.

So with all that in mind, what do I think about the iPad?

Well, I think it is a cool device and I will def. get one! And here is why:

Ain’t I a Microsoft Guy?

As most readers of my blog probably know, I like Microsoft stuff, so I would like to add a little background information on how that impacts me feelings towards the iPad. (And of course, as a Microsoft Regional Director (RD), I am pre-disposed to liking Microsoft stuff over other products). Furthermore, I have gone on record stating that I am not a fan of Apple Macs. But yes, I have also enjoyed my iPhone. So there is a bit of an odd relationship there. At the end of the day however, I like slate devices. Ever since I first saw a tablet style device on Star Trek, I knew that I would enjoy such an experience, and I have gotten my first tablet device based on Windows CE years and years ago. Then, once Microsoft came out with true Tablet PCs, I jumped on that and spent a huge amount of time programming them and evangelizing Tablet PCs. In fact, Microsoft named me one of the most influential Tablet PC and Mobile PC developers in the world. From a magazine point of view, we have published 2 focus issues on Tablet PC and Origami development (Origami being Microsoft’s Ultra Mobile PC offering, which was supposed to be very similar to the iPad although it didn’t quite work out like that) and you can still find that content on www.code-magazine.com/focus/tabletpc. At EPS, we are also a Microsoft Surface shop, which falls into the same category in some ways.

Then, along came the iPhone and it made NUIs (Natural User Interfaces) and multi-touch mainstream. (Microsoft also has gone that direction, first with Surface and now with Windows 7). What is great about the iPhone and iPod Touch product line is that it is entirely designed with NUIs in mind. These devices run apps that aren’t adopted for multi-touch interaction, but they have been specifically created for that kind of an experience. Now, the iPad follows the same approach, and from everything I have seen so far, I think the result will be very good.

So yes, I am a Microsoft guy, but I have to acknowledge that Apple seems to have a very interesting product again (probably not as mainstream as the iPod or the iPhone, but still…). I am hoping Microsoft will come out with a competing product, because I think the original ideas around Origami were awesome and I also think that Microsoft’s Tablet PCs (current and devices that are rumored to be coming) are fundamentally better as they support true multi-tasking, pen input, handwriting recognition, and so forth. Nevertheless, I think the iPad will be a good product and it is an important step forward.

Note: With that in mind, we recently recorded an episode of CodeCast which you can download here.

A Great Experience

One of the things that is really crucial and a stand-out feature is how well Apple designed the overall experience of the iPad. I am not always an Apple UI fan, but for this, I think they knocked one out of the park. A lot of features of the iPad are available elsewhere. Sure, using a Windows 7 tablet, one can use IE to browse the web in a multi-touch fashion. Sure, the iPhone has photo albums. Sure, one can open Outlook on a Tablet PC. But the point is that the iPad provides an experience that is specifically created for multi-touch and NUI interaction.

In Windows, the web browsing experience is a GUI experience that is retro-fitted with touch support. Launching applications is done through the Windows Task Bar, which works in multi-touch scenarios, but it is not a great experience as it is optimized for mouse interaction. Sure, the Task Bar is now a tad bigger so one can interact with it using one’s finger. But if one was to start from scratch with a multi-touch UI, then one would do it completely different (as Apple and others – such as HP – have done). Try using Outlook in a NUI setup. It simply isn’t usable.

Nope, Apple has the upper hand at this point. The multi-touch UI of the iPhone/iPod Touch is done very well and it is super responsive. The iPad looks to be scaling things up. It is reportedly even more responsive than the iPhone and it provides a bigger touch area and screen. Browsing the web, reading email, watching videos, looking at photos, keeping up with Facebook, and looking at Tweets will be a treat! I entirely believe that doing all those things will be a better experience on the iPad than any other device! (For book reading on the other hand, I think the Kindle is better with its digital ink display technology and long battery life).

But it’s just a bigger iPod!

Exactly! I consider that a good thing. Some people have reacted disappointed to Apple’s announcement. I disagree! I would not want the iPad to be a scale-down Mac, because if it was, the same problems as with MS Tablet PCs would apply. I do not want to use apps designed for mouse and keyboard with some sort of half-assed touch support scheme. Instead, I want the available touch ups to become more sophisticated and scale up! And that is exactly what Apple is doing. They take the mail client from the iPhone and make it take advantage of the bigger display. The photo app looks to be a treat. Even the iWorks suite will provide a pretty cool environment for document reading and handling.

Furthermore, there are 140,000+ apps (January 2010) that are already designed entirely for multi-touch with a NUI. Let those apps grow up and provide more power within these exciting new paradigms. Scaling down a Mac (or a Netbook) would be exactly the wrong way to go as GUI apps simply don’t translate well to environments that call for NUIs.

Another aspect of the iPad being a bigger iPod is that there is a huge ecosystem of iPod/iPhone accessories that will now also work with the iPad. These accessories are already made to work with mobile devices and are thus very suitable for the iPad. Accessories made for the Mac on the other hand wouldn’t.

Personally, I have gone on record saying that I think mobile devices will largely replace desktop PCs. Why have a desktop machine when you can have a mobile device the size of a phone you can always carry with you and use in a way that provides a good experience, and when you are in the office, you dock it and use an external keyboard and monitor as the device switches into “stationary mode”. Sure, we are not there yet and it will take years to get there, but ultimately, I believe this is where things will go. And for that to be true, we will see smaller devices become more powerful and grow up, rather than current PCs shrinking down with features such as mouse and keyboard UIs and everything else that goes along with PCs. The iPad is one small but very significant step in this direction (and it supports an external keyboard and monitor).

The Size of the iPad Device

I have read online (in particular in a blog owned by a former manager of the MS Origami team) that some people think the device is too large. “When we designed the Origami, we aimed for a more mobile and portable experience” they say. But this was at a time when cell phones didn’t provide good online experiences. Today, the iPhone has revolutionized phones and entirely changed the game for what a phone can do. Reading the web is a very good experience on the iPhone (and other phones that followed). So we already have an ultra-mobile experience that works well and we do not need the iPad to be a device we always take with us wherever we go.

Instead, I see the iPad as a device I will use in my home. I will have it next to my development machine with some documentation open or a video running. I will have it next to my gaming machine or Xbox to read a strategy guide, a walk through, or the WoW Wiki. I also envision taking it on flights to have a bit of a bigger video screen than phones provide. I will take it to my granny to show her the latest pictures of ourselves or from Facebook friends. I will take it on a trip to have my travel guide and map with me. I will take it to the beach. I will use it to read email on the couch or in bed. I may even have one for the bathroom. But I will not constantly carry one in my pocket.

For all these scenarios, I believe the size of the device is going to be great. It is also very lightweight (1.5lbs… less than 1kg), which is great!

The Limitations

Of course the iPad has some limitations that are rather the bummer. No support for Flash and Silverlight. I think it makes sense from Apple’s point of view to not provide competition to the app store, but from a user’s point of view, it would be very nice to have. (And from a developer’s point of view, I would love to use Silverlight to code for this device).

Furthermore, the device has no stylus, eliminating all possibility of more accurate and sophisticated interaction. There is no handwriting recognition, which is a feature I use all the time with Tablet PCs. The touch technology Apple uses (their capacitive touch sensor) is great for finger-interaction, but it simply does not support stylus-interaction. To me, that is probably the single biggest limitation. I believe if people gave the handwriting recognition on Tablet PCs a try, they would be amazed!

Multi-tasking is a problem at this point. Developers can’t write apps that run in the background. But that limitation could probably be lifted over time.

The device doesn’t have a camera. This is an odd omission, and i predict it will be fixed in the future. A camera would enable video conferencing. I think it would be neat, but I don’t think it is quite as big a deal as people think. You are not going to use the iPad to take pictures at a party since you are unlikely to carry it along, and even if you did, it would be too unruly. Also, the way you are likely to hold the iPad, a fixed camera is unlikely to point in a useful direction. A movable camera on the other hand would be just… well… odd in a device like this. It would probably make the device thicker and the moving part would probably make it much more fragile. Perhaps it may even be better to have a camera accessory that connects with a cable…

The iPad Name

So there is a bit of a comedic factor here. Yes, I get it. Female hygiene product. Hours of entertainment value. If you are in puberty. For everyone else: Let’s move on! It’s called the iPad and I think that is a good name. It rolls of the tongue. It explains exactly what it is: A digital pad. What is a tablet exactly? What is a slate? I think “Tablet PC” is a good name for a true PC in tablet form, but for what Apple built, a “pad” is a good correlation. Furthermore, it puts the product right into the same family as the iPod, which is good as well. After all, it tells people right away to associate this with an iPod style of experience rather than a Mac experience.

It also amused me that the aforementioned gentlemen from the Origami team thought the name is “awful”, while he apparently thought “Ultra Mobile Personal Computer” was a good name for his offering. That little nugget sure keeps me entertained longer than the reference to a female hygiene product ;-).

What I think will/should happen

I think the iPad will be a success. It is a good idea. It’s time has come. And most importantly, Apple provides what appears to be a good product and pairs it with a huge marketing push which the Tablet PC and the MS UMPS never enjoyed. Furthermore, Apple doesn’t just provide the software, but it provides the device. Once again (similar to the iPhone and iPod), if you want one, there will be no doubt where to get one and what you will get. I think all this will add up to a device that will sell well and bring this type of experience into the mainstream. Of course the product is more specialized than a phone or a music player, so I would not expect this to sell as much as the iPhone or the iPod, but it will still do well, I think.

I am also hoping that Microsoft will come forth with another push in the Tablet market. There are rumors around the “Courier” tablet device. Microsoft has already shown smaller slate devices. All those things are very exciting, and – as mentioned above – I think Microsoft has technology that is better. I hope that Microsoft will come forth with a completely new UI for these devices that is built from the ground up as a NUI and I want Tablet PCs that also work in regular laptop mode to switch between the current Windows paradigm (GUI) to a NUI paradigm when needed. I also would like to see Microsoft build their own devices. I have no problem with OEMs also building devices, but I think Microsoft needs to put out a device with a feature set people are aware of, with a price point people are aware of, and with a place to buy them people are aware of. (With the Origami, Microsoft completely depended on OEMs to put together hardware that supported feature sets the OEMs picked, and a price point the OEMs set, resulting in a scenario where MS could only advertise the OS but not much more, leaving people wondering where they could get such a device… not unlike the scenarios with MS phones, really).

Oh, and for all this to make sense for MS, there needs to be marketing. I think Apple has put more marketing muscle into the iPad in the last 2 or 3 days than MS did for the entire Tablet PC and Origami efforts combined. At least it seems that way, and that is what marketing is all about, after all.

Pros and Cons

Here is a list of pros and cons of the iPad as I see them:

Advantages:

  • Great overall experience built uncompromisingly for touch
  • All iPhone apps available (140,000+ at this point)
  • Programmable the same way as the iPhone (Objective-C and MonoTouch)
  • Probably a very good Internet browsing experience
  • Probably great for email reading
  • Probably excellent for video viewing (although the aspect ratio is an old-fashioned 4:3)
  • Probably great for photo viewing (one can see the iPad as a great digital picture frame)
  • Great integration of things such as Facebook, YouTube, Twitter, and third party apps like SlingCatcher/SlingBox
  • Lightweight (1.6lbs)
  • Instantly on
  • Very responsive (supposedly more so than the already very responsive iPhone).
  • Excellent screen
  • Relatively long battery life (supposedly 10 hours, so much longer than even Netbooks but also much less than the Kindle and other eReaders)
  • Not bad to have a new e-Reader app (iBooks) although I wouldn’t want to trade my Kindle for it (although the Kindle reader should be supported by the iPad just like it is on the iPhone)
  • An external keyboard is available as is the ability to hook it up to a monitor
  • The iPad is less expensive than a slate-only Microsoft Tablet PC (and the least expensive version will work well for most people)
  • All iPod/iPhone accessories should work with the iPad (other than the ones it doesn’t physically fit in, such as a lot of the speaker-docking-stations)
  • iWorks suite should be decent for office app needs (within reason)

Disadvantages:

  • Not a “real computer” (can’t run Mac and Windows software)
  • No camera (motion or still)
  • I haven’t tried it myself, but typing on the virtual keyboard is not something I am looking forward to. Data entry will be difficult, I bet.
  • No stylus or handwriting support
  • No support for Flash and Silverlight
  • Cost (although not compared to the iPhone) - 16GB ($499/$629), 32GB ($599/$729), or 64GB ($699/$829) – the lower price is with wireless only, while the more expensive one supports 3G (but doesn’t include the monthly cell service fee 3G requires).
  • Short battery life compared to Kindle and other e-Readers
  • Screen probably hard to read in sunshine (unlike e-Reader screens like the Kindle’s)


Posted @ 12:20 AM by Egger, Markus (markus@code-magazine.com) -
Comments (6)


Friday, October 30, 2009
State of .NET and User Group Presentations in Denver

I just got back from doing a State of .NET Event in Denver as well as a user group presentation there. It was fun. Thanks for the warm welcome “Denverers” (what do you call people from Denver?). 

For those of you who attended one of the presentations, don't forget to sign up for a CODE Magazine subscription using one of the special URLs provided. For those of you who weren't there, you can still get a great CODE Magazine offer here. Also, don't forget to subscribe to the free CodeCast podcast

Here is the slide deck for these talks:

Also, I promised additional examples to download, so here they are:

Also, for more information on Silverlight and related Expression products, see www.Silverlight.net/GetStarted

For more information on our Tower48 escrow company, check out this post, or go to www.Tower48.com. Also, here is a video on the Tower48 stuff:

And here is a video of the Silverlight hockey app:

The external download link for the video is this:
http://www.youtube.com/watch?v=BD8OPqtHYdg



Posted @ 4:24 PM by Egger, Markus (markus@code-magazine.com) -
Comments


Tuesday, October 06, 2009
Cross-Site Access Policy for Self-Hosted WCF Services

When you build WCF Services you basically have to options in making the service available: 1) host in IIS, and 2) self-host in something like a Windows Service or similar application. In general, it is easier to let IIS host the service, because it offers features such as service-health-monitoring. Plus, it is easier to just put a service into an ASP.NET based application as a .svc endpoint. I use this ability myself, for both HTTP and TCP/IP based services.

However, there are also scenarios where I prefer the self-hosting route. This is especially true for my more important and more powerful services, because those are typically the services I expose in a number of different formats and over a number of different protocols. In self-hosted scenarios, you generally have more options to expose the same service. For instance, I may want to expose a service over TCP/IP, HTTP (SOAP and REST), and MSMQ all at the same time. And yes, they are not all the same exact services (queued ones for instance, aren’t going to return a result, while SOAP services do, as do REST services, but they are still separate classes). Even so, they often are wrappers around the same business logic and generally go together. So self-hosting may be of interest there.

Using WCF, exposing services (SOAP and REST) using the HTTP(s) protocol in a self-hosted scenario is not very difficult. You simply create a host app, add the appropriate WCF ABCs (well, Address and Binding, mainly… the Contract will be the same exact thing regardless of how you host the service), and you are pretty much ready to go. (There actually is a bit of a gotcha when you compete with IIS for a URL, but I will blog about that separately).

The one thing that people often ask me when it comes to this stuff is “how do I call this from Silverlight”. Silverlight by default does not allow cross-domain calls. This means that a Silverlight component that is part of http://codemag.com cannot automatically access a service on http://www.epsservices.net. To do this, the domain that hosts the service (www.epsservices.net in this example) needs to define a cross-site access policy. It explicitly needs to opt in to allow services on that domain to be called from another domain.

Note that in these types of self-hosted scenarios you almost always have a cross domain call. Even if you only have a single site that calls the service, it is unlikely that the self-hosted service grabs the same domain as the actual web site hosting the Silverlight component. It can be done, but just from an architectural and maintenance point of view, it tends to get very confusing.

Anyway: What you need is a ClientAccessPolicy.xml file in the root of the domain that hosts the service. The XML file content is fairly simple. Here is an example that allows for unlimited cross-site access:

<?xml version="1.0" encoding="utf-8"?>
<
access-policy>
<
cross-domain-access>
<
policy>
<
allow-from http-request-headers="*">
<
domain uri="*"/>
</
allow-from>
<
grant-to>
<
resource path="/" include-subpaths="true"/>
</
grant-to
>
</policy>
</
cross-domain-access>
</
access-policy>

Note that this leaves the server wide open. In the wild, it is better to limit callers to the exact set you actually need. Typically, that might mean limiting access to SOAP headers from 2 or 3 caller domains, or something like that.

On a side note, it is also possible to use a CrossDomain.xml file instead. However, this is an Adobe format which Microsoft supports. This is not a file specifically created for Silverlight and it doesn’t support the same options and Microsoft won’t be able to add anything to that file format if needed. You should only use a CrossDomain.xml file if you have a real reason and understand the implications. Otherwise, stick with the ClientAccessPolicy.xml file. Also, contrary to common misconception, it is not necessary to have both files. Just a ClientAccessPolicy.xml file is all you typically want/need.

Anyway: If your server is running IIS, you can simply put the ClientAccessPolicy.xml file into the root folder of the domain. Silverlight will then access the file to figure out what the server opts in for.

One scenario you may run into is that the WCF server does not run IIS at all. After all, if you have a server dedicated to running these services in a self-hosted fashion, then why even run IIS? Just to serve up one XML file? That is probably overkill, especially considering that this opens the server up security-wise, and you also might run into trouble with IIS competing for URLs and such. Not to mention that every service running consumes resources. So if all you need is serve up this XML file, then don’t run IIS. Instead. have your WCF service host serve up the policy file as well. Here’s how:

First, create a service contract that can serve up XML content:

[ServiceContract]
public interface IClientAccessPolicy
{
    [OperationContract]
    [WebGet(UriTemplate = "/clientaccesspolicy.xml")]
    XElement GetClientAccessPolicy();
}

There are some interesting aspects here. Fundamentally, this is a pretty simple WCF contract that happens to return an XElement. The interesting part is that this services – just like the REST service WCF can now host – supports simple web-get access, which means it can be accessed as a plain URL. The URL specified in this case is specified in the URI Template, and for this type of operation it is always the same (ClientAccessPolicy.xml in the root folder). So now, whenever someone goes to that file name in the root URL, this service can kick in and return a result.

As you can imagine, the actual implementation of this service is trivial, as all that’s needed is a single method that returns the desired XML as an XElement. A good, simple, and flexible way to do this is using LINQ to XML for this. But you can implement this any way you want. (In fact, you can probably use other return types that represent XML).

So now, all that’s left to do in your host application is to fire up this service using the WebHttpBehavior. Something like this will do fine:

Uri[] addresses = new Uri[] { "www.mydomain.com" };
var host = new ServiceHost(typeof(ClientAccessPolicy), addresses);
var endpoint =
    host.AddServiceEndpoint(typeof(IClientAccessPolicy),
    new WebHttpBinding(), string.Empty);
endpoint.Behaviors.Add(new WebHttpBehavior());
var smb = new ServiceMetadataBehavior();
smb.HttpGetEnabled = true;
host.Description.Behaviors.Add(smb);

There you have it! Now your self-hosted WCF service can host the client access policy “file”. No IIS needed or even desired.

 



Posted @ 7:10 AM by Egger, Markus (markus@code-magazine.com) -
Comments (1)


Monday, October 05, 2009
Dynamically Loading Resource Dictionaries in Silverlight 3

At this fall’s BASTA conference in Mainz, I presented a session on “Reusable Silverlight Components”. One of the things I showed in that session was how to create Silverlight components that can be hosted in different sites and also be completely re-styled and rebranded by means of dynamically loaded Resource Dictionaries.

Silverlight v3 is the first version of Silverlight that supports resource dictionaries. This makes it much easier to maintain resources generically in separate XAML files, and even switch between different sets of resources. One of the possibilities that often goes overlooked however, is that resource dictionaries can be loaded completely dynamically from any URL. I often use this in scenarios where I pass parameters to a Silverlight control, where one of the parameters is the URL of such a resource dictionary. I then load that dictionary dynamically, so everything in that application references that dictionary. The basic idea is the dynamic load process from a URL. This can be done like so:

WebClient request = new WebClient();
request.DownloadStringCompleted +=
    new DownloadStringCompletedEventHandler(request_DownloadStringCompleted);
request.DownloadStringAsync(
    new Uri("http://domain.com/mydictionary.xaml", UriKind.Absolute));

This triggers an asynchronous string download from the specified URL. The associated event handler fires when the download is complete and assigns the loaded resource dictionary:

void request_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
    string resourceXaml = e.Result;
    ResourceDictionary dictionary =
        Application.Current.Resources as ResourceDictionary;
    dictionary.MergedDictionaries.Add(
        (ResourceDictionary)XamlReader.Load(resourceXaml));
}

This accesses the current application resources (which should be a resource dictionary, although some error handling may be appropriate here) and then uses a XamlReader to load the retrieved XAML string, casts it to a resource dictionary (which it may not be, so more error handling is in order here) and then simply adds it to the collection of available resource dictionaries.

There are a few more things of interest here that are worth pointing out:

First of all, Silverlight 3 still doesn’t support dynamic resources. Static resources get assigned as soon as an interface loads and can’t be changed later. This means that the new resource dictionaries should be added before any real UI loading is done. I generally like to allow for a “resourcedictionaries” parameter passed to the Silverlight control, but I make the parameter optional. For this reason, I generally have this kind of code in my Startup event handler in App.xaml.cs:

private void Application_Startup(object sender, StartupEventArgs e)
{
    if (e.InitParams.ContainsKey("resourcedictionary"))
    {
        var content = new Grid();
        this.RootVisual = content;
        content.Children.Add(new LoadingAnimation());
       
       
WebClient request = new WebClient();
        request.DownloadStringCompleted +=
            new DownloadStringCompletedEventHandler(request_DownloadStringCompleted);
        request.DownloadStringAsync(
            new Uri(e.InitParams["resourcedictionary"], UriKind.Absolute));
 
    }
    else
    {
        var root = new Page1();
    }
}

This code checks for the parameter. If it isn’t present, the root UI (Page1.xaml in this case) is loaded right away. Otherwise, I create a Grid() as a root container (the RootVisual setting can only be assigned once, so I am using the Grid object as a container which I can then use to load other UI into) and I then load a temporary loading screen while resource dictionaries are downloaded (you never know how long that might take). Then, when the dictionary is downloaded, I merge it into the resources and then I load the real UI into the Grid:

void request_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
    string resourceXaml = e.Result;
    ResourceDictionary dictionary =
        Application
.Current.Resources as ResourceDictionary;
    dictionary.MergedDictionaries.Add(
        (ResourceDictionary)XamlReader.Load(resourceXaml));

    var grid = this.VisualRoot as Grid;
    grid.Children.Clear();
    grid.Children.Add(new Page1());
}

Using this approach, the main UI (Page1) gets loaded after the custom dictionaries are downloaded and thus all static resources pick up the new styles.

Note: If you use the Implicit Style Manager, some of this is not as critical, since the ISM manually applies styles whenever it is invoked. However, since you are likely to still use named styles (which are always static), you probably still have the same problem.

Another interesting thing to note here is that I am simply adding the new dictionaries to the collection of merged dictionaries. The way Silverlight looks up resources, the resources added last are found first. So if my application already has a dictionary with a style called “StandardButtonStyle” and a dictionary that is added later also has a style of the same name, the one loaded last is found and used. This means that dynamically loaded resource dictionaries can define a few new styles as needed. Since the standard resource dictionaries remain in place, Silverlight will find all the default styles there, but the new dictionaries can override only specific ones. If you completely replace all of the application’s resources, then the newly loaded dictionaries would have to define every single resource or else the control would show an error and probably fail to load. So adding resource dictionaries in addition is generally a nifty technique that works very well in the real world.

 



Posted @ 12:14 PM by Egger, Markus (markus@code-magazine.com) -
Comments (4)


Monday, October 05, 2009
BASTA Session Materials

OK, this took a bit longer than expected, but here are my session materials from the German BASTA Conference in Mainz. The download includes all 4 sessions (C# 4.0 Dynamic, WPF & Silverlight Styles, Silverlight Reuse, and iPhone Development for .NET Developers).

Click here to download

Enjoy!

 



Posted @ 11:33 AM by Egger, Markus (markus@code-magazine.com) -
Comments


Wednesday, September 09, 2009
Horizontal Scroll Bars and Favorites Folders in Outlook

Yesterday, I learned about a little detail in Outlook that I wasn't previously aware of. You may be familiar with this already, but I thought I'd share it anyway:

There are 2 things I do not like all that much about recent versions of Outlook (up to 2010): 1) the tree of mail items does not have a horizontal scroll bar for some reason, and 2) I never use the favorites, but can't get rid of them.

As it turns out, there is a workaround for both issues, and by some odd coincidence, they are the same workaround. If you switch to the "Folder List" view (which shows everything and not just the mail items), you get your horizontal scroll bar (no idea why it is there in one view but not the other, but this seems to have been consistent for the last few versions) and the Favorites node is not there taking up space if you don't use it.

So that's cool. Not quite as nice as having actual options to turn these things on and off (and what's up with the horizontal scroll bar anyway?!?) but it still gets me where I want to be.



Posted @ 12:14 AM by Egger, Markus (markus@code-magazine.com) -
Comments (3)


Monday, September 07, 2009
Developer/Contractor Work and Training Opportunity at EPS/CODE

We have another interesting opportunity for developers at EPS Software and CODE Magazine/ CODE Consulting/ CODE Staffing: Basically, we offer the opportunity to become part of EPS/CODE as either contractors or possibly (later?) employees and pick up some (or a lot of?) work during the current tough economic climate. We are offering the opportunity to align yourself with EPS/CODE and get a lot of benefits for free out of this. If you are interested, you get some free training and mentoring, regardless of whether you actually end up doing work for us. So right there might be an interesting benefit for everyone.

CODE Consulting and CODE Staffing

You may have heard of this by now: We are in the process of re-booting our consulting division at EPS. The core of EPS has always been our consulting division (with custom software, mentoring, staffing, and all that…), and we have always tried to be at the forefront of modern software development, both in the technologies as well as the process we are using. To remain at the leading edge, one has to re-think one’s approach every so often, and that is what we are in the process of right now. We are doing some hard thinking about “how should software be built today”, and “what technologies should we use”, and “what is our software development paradigm”. (And yes, these are things we are always thinking about, but right now, we are making a very active push for this).

In a lot of ways, we are making a software developer’s dream environment.

The Unique Opportunity

At the same time, we are gearing up for what we expect to be “better times” and we thus believe we will need more developers, whether they are internal or external developers. We are doing some of that by hiring employees (if you are interested in that, send me an email to megger@eps-software.com). However, the opportunity I am currently talking about is not the employment one. At least not directly. This is about the opportunity to align yourself with EPS/CODE and become part of the organization at an informal level, and thus get a lot of the benefits our staff gets, and also have the opportunity to pick up some work.

Our goal with this is to grow our network of people we can draw from for the projects we are working on, so we can bring these people in as contractors when the opportunity arises. Of course we are interested in making sure that group of people is well trained and we have a good idea of the exact skills each individual has. So we simply want to offer the opportunity to be part of all our internal training (such as actual training sessions, brown bag meetings, paired-programming, “tag-along programs”, technical discussions, being able to ask internal questions and draw from our resources/expertise, and all the other stuff we are doing…) as well as our normal CODE Training classes. If you are part of this program (which we informally call the “CODE Network”), you of course get all of that free of charge.

Heck, we consider all members of the “CODE Network” to be “one of us”, so you are free to come to all the cool stuff we are doing, such as team BBQs and all that. Frankly (without wanting to sound like a conceded jerk), it has never hurt to be associated with us and have “I worked with EPS/CODE Magazine” on a resume. Plus, you get to use all our resources and connections. For instance, if you are interested to write for magazines or break into user groups or conferences as speakers, or anything along those lines, we can probably greatly help you in that.

Also, one interesting angle is that this opens the door for people who run into larger business opportunities and projects than they can normally handle, to use EPS/CODE to handle these projects and get referral fees in addition to their normal income.

What We Want in Return

Our main goal is to grow our network and have well-known resources available (which went through EPS/CODE training) whenever we need them. So that is exactly what we expect in return: We want people that become part of this program to be generally available as contractors for a price we agree upon ahead of time (hourly rate). We do not have a set hourly rate in mind. That is something we would negotiate based on your skills, and it will also change over time as people who are going through our training become more capable. (Of course we expect the increase to be within reason, since the know-how comes from us). We are also generally assuming contractors are available to work either on-site at EPS or a customer’s location. (Some projects may also support off-site scenarios, but one can never count on it…)

Of course we do not expect that you sit around doing nothing until we call. It all has to be within reason. So we do not expect that you would drop working with another customer. But we do expect you to fundamentally be in the market of picking up contracting work. If you are a full-time employee with some other company and have no interest in changing that, then this opportunity is probably not for you… ;-)

We haven’t decided all the details yet (and some of it is different for each person), but we like to sign a very short “letter of understanding” that says “yes, I am available for contracting and charge $X per hour”.

Who Qualifies?

We are looking for independent contractors or small consulting firms. Obviously, we do not want to train competitors for free. If you own a consulting company together with your brother (for instance), and it’s just the 2 of you, then this might be for you. If you are the manager of a larger consulting organization that competes with us and you are looking to send a bunch of people for free training, then expect to be turned down :-).

In short: You have to be really in the market to pick up some work like this.

Obviously, we are not interested in training competitors. Of course there always is the possibility that you will end up getting hired by a competitor. Such is the real world, and we obviously don’t like it, but we can live with it. There are some scenarios we obviously want to protect ourselves from. All common sense stuff.

 

So that’s it. I think this is a really cool opportunity for people who are looking to further their career and get the opportunity to pick up extra work and income. Of course all the people who are part of this program are generally the first in line to get work from EPS, even if that is just working on our internal projects (which we have several of).

If you are interested, send me an email at megger@eps-software.com.

 

Posted @ 2:43 PM by Egger, Markus (markus@code-magazine.com) -
Comments (1)


Monday, August 17, 2009
My Email/Office Problems on the Mac

As some of you may have heard, I bought myself a Mac a little while back. I mainly did this because I wanted to do some iPhone development (and still do). Secondly, I did it because I am a UI guy, and as such I thought I’d probably get a lot of good ideas from the Mac. I expected an awesome UI experience that “just works”. That did not work out that way, and to be perfectly honest, some of the UI things on the Mac are just so plain dumb and bad, it is outrageous. But that shall be the topic of a different post. Today, I want to tell you about my Office and email problems and what the exact details are behind them, so you may be able to avoid them yourself.

The basic setup is that I bought Microsoft Office for the Mac. The main reason for this is that I wanted to have a real Exchange client. I know that there are other email applications, but it is important to me that I simply access Exchange natively from whatever email app I use on the Mac, just like I do on Windows, the Web, or on Mobile Devices (including the iPhone). It would not be acceptable to me to have an email client that did a POP download into a local store so I would then have a copy of that email. I wouldn’t want to mark an email as read on the Mac and then go back to Outlook on Windows and still see the message as unread. I also wouldn’t want to file a message into a folder on the Mac and then not have that reflected in Exchange. Similarly, I would not want to send a message from the Mac and then not have that show up in my Sent Items in Windows.

Note that I am the first to admit that I am not a Mac specialist. There are tons of things I do not know about the Mac. I have asked several people for other Mac email options and they all say “I use xxx…” or “I use yyy…” and people claim to access Exchange with those tools. But when we start looking at the details, it always turned out that they are not using Exchange in the typical Exchange way, thus not fulfilling the criteria listed above, which makes the solution unacceptable to me. Perhaps there are ways to get around this and none of the people I know understand those ways (and if you have an idea how to do this, please post a comment here, as I would be really eager to learn it), but I simply have not been able to find a way. (And please don’t post anything that says “switch away from Exchange” as I have no interest in that and Exchange has served us very well otherwise…).

So here is what happened with my Email store: The other day, I open up Entourage (or more accurately, I am bringing my Mac out of sleep mode with Entourage already running). After a few moments, I am shown an error message that says something along the lines of “your Office database is corrupt and needs to be rebuilt”. OK, so far so good. I wasn’t overly concerned and clicked “OK”. Now, the Mac went into 15+ hours of rebuilding its database, at the end of which, it all seemed to be OK. It took a long time, but no errors occurred or anything like that. However, as it turned out, during this process, the Mac eliminated a bunch of folders from my mail store. Apparently, the corruption must have been such that the local offline cache lost those folders. That in itself should not be a big problem, one would think. After all, those folders still exist in Exchange and it should be straightforward to simply sync them back down. But alas, that assumption is wrong! Instead, Entourage apparently decided to remove those folders from the Exchange store completely. (This btw also happened for a few messages, such as my inbox items for the last 2 weeks I still had to reply to, and not just entire folders). Those messages and folders are not in deleted items, and I cannot find them with any of the other message restore tricks I am aware of. They are simply gone without a trace! (Note: This has now happened twice to me… but the first time I wasn’t quite sure why it had happened).

Frankly, this is unacceptable. When was the last time you lost data in that fashion on any other platform? Even cell phones and other mobile devices do not fail at such a pathetic level. This is 2009 for crying out loud! Data loss like this just simply cannot happen anymore. And what makes all of this worse is that it is random stuff that has been removed. I have no way of restoring things from a backup, because there is newer stuff mixed in, and I do not even know all the things I lost in the first place. This is worse than losing my entire mailbox. It totally sucks!

And this is not the only way I have lost data on my Mac. Just 2 days ago, Word for the Mac crashed 3 times in a single day (!!!) and not just did the app crash, but it corrupted my document on every occasion. (We did I even give it a chance to do it 2 more times after it crashed once? Because I only had the Mac with me and needed to get work done). I lost several hours of work just that afternoon alone.

Now before any zealots give me a hard time about this “being no surprise since this was crappy Microsoft software”: The same crap happens with other apps on the Mac too. I had Finder crash on me. I had Xcode crash on me and lose changes. I had Skype crash on me as well. And none of this is acceptable. When was the last time your Windows PC crashed? I have never seen a blue screen of death on Windows 7 and I am not even sure I have ever seen one on Vista. I don’t even remember the last time Word crashed on me. It certainly hasn’t happened in the last 5 years. And I sure have not had any file corruptions from an Office app crashing this millennium. And when you really think about it: Why would you?!? Just because an app comes to a screeching halt (“crashes”), why would it corrupt the file at hand? Losing unchanged work, that I understand. But corrupting previously saved stuff?

Needless to say, I am very disappointed with all this. I am now using my Mac only to browse the web and to use TweetDeck for Twitter. I guess at the end of the day, that is what many consumers do, so maybe that is an explanation of why they seem to like their Macs… :-(

In any event: If your Mac ever wants to rebuild an Office database: Stop it! Pull the plug or do whatever it takes so it can’t. Delete your files and start over. Even if you have a few unsent messages or something. That will be much preferable over what happened to me.

Update: Here is a link with some more information and potential solutions: http://www.macwindows.com/Handling-Entourage-2008-database-corruption.html

 

Posted @ 4:46 AM by Egger, Markus (markus@code-magazine.com) -
Comments (2)


Sunday, July 19, 2009
NY User Group Tour (State of .NET) - Slides and Examples

Last week I wrapped up my user group tour through upstate New York (Buffalo, Rochester, Syracuse, and Albany). This was a "mini State of .NET tour", looking at various .NET technologies and why and in which scenarios they are important.

For those of you who attended one of the presentations, don't forget to sign up for a CODE Magazine subscription using one of the special URLs provided. For those of you who weren't there, you can still get a great CODE Magazine offer here. Also, don't forget to subscribe to the free CodeCast podcast

Here is the slide deck for these talks:

Also, I promised additional examples to download, so here they are:

Also, for more information on Silverlight and related Expression products, see www.Silverlight.net/GetStarted

For more information on our Tower48 escrow company, check out this post, or go to www.Tower48.com. Also, here is a video on the Tower48 stuff:

And here is a video of the Silverlight hockey app:

The external download link for the video is this:
http://www.youtube.com/watch?v=BD8OPqtHYdg



Posted @ 1:15 PM by Egger, Markus (markus@code-magazine.com) -
Comments


Saturday, May 30, 2009
Unique Office Sub-Lease Opportunity at EPS/ CODE Magazine

We recently re-signed our office space deal at EPS (Houston). In anticipation of future needs, we signed for a space that is larger than we currently need, which opens up a sub-leasing opportunity that might have some very cool advantages for those with matching needs!

The basic deal is this: We have 2-3 individual office rooms available for sub-lease. They are all different sizes, One fitting 1 person, another fitting 2 people, and the largest probably offering enough room for 4 or more. As all our offices, they are window offices, one even a corner office. Our office space is pretty cool and we are always happy taking people to our offices as I think the setup is professional and cool and modern at the same time.

So far, so good, but what is so cool and unique about this deal? Well, for one, the way the office is set up, we have other facilities you can use as they are available, without having to pay for them. We have 2 sizable conference rooms that can be used when they are available. (To be clear here: We are not going to interrupt a training class when you need the conference room for 30 minutes, but when the room is available, you can have it… it is mostly a scheduling matter). Also, as long as we have capacity (and I don’t see us run out any time soon), you can use our Internet connection and other infrastructure. As long as we have capacity and your needs are reasonable, you can probably even put your web site up at our data center right in our office. So there is lots of little stuff like that that otherwise, you would have to arrange and pay for yourself, that is simply available. Anything from restrooms to power.

Furthermore, this is an opportunity to associate yourself with EPS Software Corp., CODE Magazine, and all the other stuff we do at EPS. You are more than welcome to attend our internal training sessions and our brown-bag meetings and all the like. If you want, you can even try to kick our butt on our xbox 360 ;-). What might be even more interesting is that whoever is most accessible to us is first in line to pick up contract work from EPS (and people that have their offices inside of our offices are pretty accessible). No promises of course, but it just makes sense.

I envision that there might be a range of people who might be interested in this. It is probably not ideal if you are looking to start a 20 person company, but if you have smaller needs, this may be great. In particular, if you do any programming (especially .NET) or graphics design type of work, or maybe even sales stuff, this may be an excellent opportunity for you.

If you are interested in this, ping Ellen@eps-software.com over email. The actual rate is to be arranged on a case by case basis, as is the length of the lease, which we are very flexible with. (Note: We are not looking to make a profit of this. We are simply looking to reduce our own expense until we need the space ourselves).

There you have it. I think it is a cool deal for the right people with some very unusual benefits that don’t come along just any day.

 

Posted @ 1:08 PM by Egger, Markus (markus@code-magazine.com) -
Comments (2)


Monday, May 11, 2009
Tower 48 - Our New Software Escrow Company

Some of you – especially those of you who are either on Facebook or Twitter – may have already seen this: We are launching a new company at TechEd 2009 called “Tower 48”. I would like to give you a quick overview of what we are doing and why I think it is cool and why I am so excited about it :-).

So basically, what we are doing with Tower 48 is Software Escrow. This may sound like boring legal stuff, but read on! It actually gets pretty cool. If you never had to deal with escrow, here is the quick explanation: Has a customer ever asked you “what happens if you get run over by a bus?”. The answer to this is “we put all our stuff into escrow, so if something happens, you get it all”. The customer is protected, and you don’t have to give anything up you don’t want to give up. The trouble with escrow in general is that it is an expensive legal hassle. We are changing that. And not just that, but we are actually turning it into something that can turn into a profit center for you!

For one, we are making things less expensive and going through the whole process takes just a few minutes. While with most escrow companies, you will spend thousands of $ a year and you are charged every time you update the stuff you have in escrow, and so forth. With us, the default deal is that for about 30 bucks a month, you can put up to 5 products into escrow for 5 people, as long as you don’t use up more than 5GB of storage (which is a lot of source code or other digital assets... you can put anything into our escrow system that is a file). Secondly, it is all high tech, and SOA based. No more of this “put a box into a secret underground vault” nonsense. Use our web site, or use our services to integrate into the build process or your ecommerce web site.

But here is the real kicker: With Tower 48, you can add escrow automatically to your sales process and actually make a profit of it! For instance, if you are selling a $199 product, you could add a little checkbox to your web site that says “for an extra $X, we will put the source code into escrow”. Make X whatever it needs to be to sell. 99 bucks? No problem. $9.95? Sure! $5,000? No problem either. We will work out a deal with you where you can charge an appropriate and reasonable amount, regardless of whether you are selling a $1.99 iPhone app, or a product with a $500,000 license fee. (And keep in mind that there are other things that can be put into escrow. Whether that's additional documentation and information, or whether it is DRM free versions of digital content you sell, and so forth...). We want you to keep most of that fee as pure profit, and we are taking a cut of it to perform the service. Doing it is very simple, and in times like these, it sure doesn’t hurt to add a potential profit stream with no cost associated if nobody ever buys it, does it?

You can check it out at www.Tower48.com. We also have a video that explains the system on that site at www.Tower48.com/videos.aspx. For those of you who can get videos in their RSS feeds are are reading this online, here it is:

Anyway: If you are at TechEd, stop by one of our booths. I will be either at the CODE (isle 100) or Tower 48 (isle 600) booths a good amount of time.

 



Posted @ 12:23 PM by Egger, Markus (markus@code-magazine.com) -
Comments (3)


Saturday, May 02, 2009
A Preview of my TechEd 2009 Samples

I will be presenting a session about Expression Blend for Developers at TechEd 2009. You can now download a preview version of 2 different sample apps (one for Silverlight and one for WPF) that I will be using at the conference. Here are the download links:

Both examples show a real world middle tier accessed from both WPF and Silverlight clients. The example presented here however has a fake middle tier, so it can easily be used without the need to set up the whole systems (not to mention the licenses needed).

Also, I recently uploaded a video of the result of something very similar to the Silverlight example I will be using.

I recently blogged about it, but here it is again, just in case:

The external download link for the video is this:
http://www.youtube.com/watch?v=BD8OPqtHYdg



Posted @ 10:12 PM by Egger, Markus (markus@code-magazine.com) -
Comments


Saturday, May 02, 2009
Downloading Files from a Silverlight Application

It seems that recently, I have been doing a lot of Silverlight development that includes uploading and downloading files of some sorts. File uploading of course is always a touchy subject in web applications (and I may blog about how we do that separately), but it may come as a bit of a surprise that even file downloading has it's problems in Silverlight.

Normally, when you offer a file download on a web site, you simply upload the file to its location, and then provide a link to it. When the user clicks that link, the browser starts a navigation away from the current page and to the linked URL, but then it realizes that the new address is a file download and not an HTML page, and it thus stops navigation (the current page remains visible) and a file-save dialog is displayed, usually allowing the user to either save or open the file.

In Silverlight, things are fundamentally similar. The main difference is that in Silverlight applications, one usually doesn’t navigate around in the browser as much. Instead, Silverlight code runs on the client, and instead of clicking on a link, Silverlight may offer up a button-click that initiates the download. The trick here is to programmatically initiate browser navigation from within that click event.

The following is a hypothetical click handler that initiates a file download:

HtmlPage.Window.Navigate(new Uri(“http://…”));

Note: Very often you may want to download from a location relative to where the current Silverlight application is launched from. For instance, if the app is on www.MarkusEgger.com, you may want to download from www.MarkusEgger.com/Downloads/File.zip. You can relatively easily find out a relative path to that file like so:

var uri = new Uri(Application.Current.Host.Source, "../Downloads/File.zip”);

Note: The root of the app is usually one folder up, since the Silverlight control is deployed to the /ClientBin folder.

Now, while this fundamentally works fine, there is a problem here. If the browser that runs the Silverlight application is Internet Explorer, one has the additional issue that Internet Explorer may intercept the download and show a special security message. The user can then dismiss this message, but that can cause IE to re-load the current page. Theoretically, the download can then be re-initiated. This works kind of OK, in HTML pages where the same page is simply loaded again. It can be a problem with AJAX-heavy pages that may have drastically changed the page state since navigation. And it is a real problem with Silverlight, since that means that the page hosting the Silverlight control is re-loaded and put into its initial state.

This is unacceptable for Silverlight apps, because it is the equivalent of re-launching a windows app, and it may put the user at a completely different place from where they were before. Worse, it may even cause loss of application state and associated data. A nightmare!

The only solution I can offer to this problem is to open a new window programmatically when IE is the host, and perform the navigation within that window. IE will notice that the URL of the new window is a file and it will then close the window and instead show the save-file dialog. It all looks slightly odd, but it isn’t too bad, and it avoids the data loss issue. Here is a code example:

if (HtmlPage.BrowserInformation.Name == "Microsoft Internet Explorer")
{
    HtmlPage.Window.Navigate(uri, "BlaBla");
}
else
{
    HtmlPage.Window.Navigate(uri);
}

This still isn't the entire story though. In many instances, IE will still block this, so what we resorted to is first navigating to another ASPX page instead of the actual file URL, and then redirecting to the real file URL.

There you go. Not the most elegant thing I have ever done, but it solves the fundamental problem…

 

Posted @ 10:03 PM by Egger, Markus (markus@code-magazine.com) -
Comments


Monday, April 20, 2009
My Silverlight and WPF Examples from DevConnections

At this spring's DevConnections conference in Orlando, I did 3 different sessions that were all UI related:

  • General UI design
  • Silverlight Business Applications
  • Expression Blend for developers

You can now download the sample code for these. WPF is here. Silverlight is here. (The UI design session didn't have any code).

I also recorded a short video showing the Silverlight demo app, which was kinda cool. Here it is (view in HD for the best experience):

The external download link for the video is this:
http://www.youtube.com/watch?v=BD8OPqtHYdg 

 

Posted @ 10:56 PM by Egger, Markus (markus@code-magazine.com) -
Comments


Sunday, April 19, 2009
Thinking about Advertising

I am thinking a lot about advertising. This is due to a number of factors. For one, I own a magazine (and the associated online components), but for the other, I also run a software company (EPS) and a few related properties such as Tower 48 and Xiine. Oh, and I have a substantial family history around marketing and ad agencies, and I have a little bit of a personal history in that department. So I am in a position to be both, a seller and a buyer of advertisement. And as such, I am thinking about a lot of things such as print vs. online ads, or direct mailing vs. viral marketing. (And it also makes me a party that is partial to all this. I am trying to present an accurate "brain dump" of my thoughts here, but I thought I might point that out ;-))

So the question is what advertising works best?

Now that literally is the million $ question, and there is no clear answer to this. Generally, about 50% of all ad and marketing budgets are wasted. It's just that nobody really knows ahead of time, which 50% that is. However, there are a few things that are known to work better than others across the board.

In general, people absorb ads better when they are bored. If you are standing in a mall, waiting for your friend (or wife? ;-)) to come out of a store and meet up with you, your mind and eyes are likely to wander around, absorbing just about anything there is to absorb. Store signs, ads, people. That's what the bored mind does. It looks for something to entertain itself, or keep itself busy. On the other hand, it is difficult to get the attention of someone who is focusing on something else. Race car drivers probably don't spend a lot of time thinking about billboards they speed past for instance.

In terms of software or service sales, this roughly translates to the following: When I lay in my hammock in my back yard on a Sunday afternoon reading a magazine for fun (as I just did a few minutes ago) or when I sit in a plane reading a magazine before take-off to kill some time, I am in a mode where I *want* to absorb everything the magazine has to offer me. I read mostly the articles, but if an ad catches my interest, I read it all the same. That's because I am explicitly in a mode where I try to give myself (or my brain) something to do and absorb. A very similar thing happens when one stands at a bus-stop or a subway station waiting for the bus, with little ability to do anything else. Receptiveness to marketing messages (and all other kinds of messages) is very high at that point. (Not quite that much in an airport, btw, as the interested target audience for the software field tends to bring out a laptop... this would be much harder to do at a bus-stop, but then the % of developers using public transportation is somewhat lower than say students). So poster ads at these "waiting points" are usually pretty good value as well.

Then there is online advertising on the other hand. Imagine this scenario: You sit down in front of Visual Studio and try to get a new program to work that uses this new technology you just started discovering. However, something doesn't seem to be working, so you set out with a web search to find an answer to your problem, so you can wrap things up and go home. You find a few articles about the subject matter and click to the site, use the browser's find feature to find a few specific points, and there is your solution! Oh, and btw, there also is a banner ad in the right hand column. How likely do you think you are clicking on it, or even noticing it? Yeah, probably not much. I'd think you are more likely to click it by accident than deliberately. Usually, especially for technical things, people tend to be in a mode where they are highly focussed on a specific task, and getting them sidetracked with a product or service offering is a pretty long shot (unless your product fixes the very problem at hand... but even then, chances the user will see it are slim). Now admittedly, the online problem doesn't apply to all sites equally. If you are routinely reading a few blogs for instance, you are probably in a different frame of mind than when you are looking for a solution to a problem that plagued you. Or when you browse your favorite news site every morning, you are probably also more in a receptive mood.

Another option is email marketing. This one is a mixed bag. If you can deliver something of interest (such as an actual article), people may end up keeping the email and read it when they have more time (at that point they are in a more receptive state of mind, which is good). A very large percentage of email messages however goes unread, because the typical state of mind people are in when they go through their inbox these days is "I got to get rid of as many of these messages as possible, because I already can't handle them all anymore...". And that's if you get through the spam filter. (And if people perceive your email as spam, you are fighting a losing battle anyway... you need to offer value!). Maybe you can piggyback with a provider of email articles (such as CODE Magazine <cough>... :-)).

There are a lot of things one can do to advertise, and the online approach has seemed pretty appealing over the last few years. (And many of the potential advertisers for our magazines tend to go with a lot of online advertising). However, I have to admit that the click-through rates are pretty pathetic. We are advertising some of our own stuff on various sites (including Facebook and Google), and it takes an ungodly amount of "impressions" (displays of a banner) to get just a few clicks. And I guess that isn't a surprise. On the other hand, many online models charge only when clicks happen, so at least there is a protection mechanism built in for the ad buyer.

Then there is viral advertising. Microsoft's "I Love Bees" campaign comes to mind, which they used to advertise Halo. However, while those campaigns work great, it takes considerable clout to get them off the ground, and they only work well because they are so unusual. In other words: Extremely difficult to pull off, and only a few of those really ever work well.

Let's take one example scenario I am currently thinking about a lot: We are about to launch a new company called Tower 48. Tower 48 is a software escrow company which we will launch within the next few months. Do you have a software company or offer software services? Has your customer ever said "that's all great, but what do I do if you get run over by a truck?". Well, that is exactly what software escrow solves for you. You can put your code into escrow and if something happens (such as you close down your shop, or you get run over by a truck), the software is released to your customers. This way, they are protected without you having to give up the crown jewels. Tower 48 makes all this affordable and high tech. You can automatically escrow your software as part of the Visual Studio build process for instance.

Anyway: Question is how to get the word out about Tower 48? We certainly want to do some online banners and such. However, we are very seriously considering magazine ads, since they will reach a lot of people and people will consider us a much more serious undertaking. ("Everyone can run an online banner, but only serious companies run print ads..." people think). The web is a great place for a small guy to look large, but what happens mostly is that it makes the large or serious guys looks small. Looking for a real good way to look professional? Run a print ad! (It's not nearly as expensive as you think, and with the current economy, you can probably get some good deals!). Print ads also tend to give you longer exposures. Especially technical publications tend to not be thrown away. A lot of people keep them or at least come back the PDF versions (or Xiine versions in our case). With CODE Magazine for instance, people automatically get 2 months of exposure at the very least, but I would argue that the average is much longer as we know that a lot of readers collect all the articles. We also take multiple issues of the magazine to trade shows. And CODE Focus magazines often are given or mailed out for more than a year. And how many print magazines do you think there are compared to web sites? Especially with the recent "thinning out" of the market for developer publications, you can advertise in one or all of the remaining ones and have a large part of the market (or the whole market) covered. That is a pretty good deal! Not many outlets provide such wide coverage at this point.

The one downside of print ads is that it is harder to measure results though, so make sure you provide a unique offer in your ad that is linked to a specific URL, so you can run statistics as to how much the ad produced!

So we will def. do that, but we are even thinking about direct mail again. This was something we didn't do at all in the past few years, but with email being just about useless for marketing these days, snail mail is starting to look a whole lot better again. It is expensive (especially with recent rate hikes), but hey, I would rather  have something that is a little more expensive if it produces results, than having something cheap that doesn't work!

One of the other things we are thinking about is something new we are starting with CODE Magazine: We have in the past published CODE Focus magazines, which had a ton of great content about specific Microsoft technologies. They are free, and people love them. It is some of the highest rated content we produce. So why not do the same for other people's products? In this specific case, we could do a special issue around Escrow. It would be clearly sponsored (paid for) by Tower 48, but it would have content produced by regular editorial staff, with CODE Magazine having full editorial control. It would talk about escrow in general, but it would also talk about the Tower 48 offerings, such as how to use the Tower 48 web services to integrate with the escrow solution. It would be of great value for the interested reader, and it would be a great way for Tower 48 to get the word out. It would certainly be something people wouldn't just throw away if they had at least a remote interest in the topic. I think it is a great deal for anyone involved! So that will be a big part of the Tower 48 campaign and from a CODE Magazine point of view, we will make the same thing available to other vendors and products.

What else? I have heard some people considering fax campaigns a good idea again. I am not so sure about that. Fax campaigns produce cost and considerable hassle (more so than snail mail and email) on the receiver end, and thus produce a large amount of ill-will. Personally, I hate it when I need to change the paper in the fax just because some company I do not care about sends me a lengthy fax ad. Plus, legal hassles around fax campaigns tend to make it more trouble than it's worth.

Another option is tele marketing. I am no fan of tele marketing. It never produced great results for us, and it is a massive annoyance for the recipients. And after all, you do not intend to annoy anyone. You want to get the word out, but if someone has no interest, you can safely remove them from your list. All these people do is add to your expense and they will never buy anything from you. And from their point of view, you are just one of those annoying sales jerks. Better for both sides to not touch base again.

So there you have it! It is my personal view of the ad world today (April 2009) and I am sure it is somewhat biased to what we do. (Personally I like to think it is the other way around: We do things, like producing a print publication, because we think it works well). I hope it provides some valuable ideas.

 

Posted @ 6:02 PM by Egger, Markus (markus@code-magazine.com) -
Comments


More Posts: Older Posts

 

 

 

 

 

 

My Twitter Status

    follow me on Twitter  

    Syndication
    RSS 2.0 RSS 2.0

    All My Blogs:
    My personal blogs:
    Dev and Publishing Dev and Publishing
    Travel and Internat. Living Travel and Internat. Living
    Other blogs I contribute to:
    Milos Blog (US) Milos Blog (US)
    VFPConv. Dev Blog (US) VFPConv. Dev Blog (US)
    VFPConv. Dev Blog (DE) VFPConv. Dev Blog (DE)

     

    Blog Archives
    2010
        February (5)
        January (1)
    2009
        October (4)
        September (2)
        August (1)
        July (1)
        May (4)
        April (6)
        February (1)
        January (1)
    2008
        December (3)
        November (11)
        October (8)
        September (1)
        July (1)
        June (3)
        May (3)
        April (6)
        March (6)
        February (4)
    2007
        December (1)
        November (1)
        October (5)
        September (1)
        August (1)
        July (6)
        June (3)
        May (3)
        April (1)
        March (2)
        January (2)
    2006
        December (3)
        November (4)
        October (1)
        September (2)
        August (2)
        July (4)
        June (1)
        May (2)
        April (10)
        March (2)
        February (3)
        January (1)
    2005
        December (6)
        November (7)
        October (6)
        September (8)
        August (10)
        July (6)
        June (9)

    Blog Roll
    Partners and Co-Workers
    Claudio Lassala
    Rod Paddock
    Rick Strahl
    Mike Yaeger
    Ken Levy
    Gary Short
    Steve Smith
    Developers and Designers
    Nick Landry
    Rocky Lhotka
    Dr. Neil
    Tricky
    Publishing
    Melanie Spiller
    Business
    Guy Kawasaki
    Seth Godin
    Personal
    Sunhild Haitzmann

     

     

     

    This Blog is powered by MilosTM Collaboration Components.