“Visual Studio 2010 SP1 Beta IIS Express Integration” and other links…

Ibrahim Hashimi: “After you have enabled IIS Express to be your projects web server, when you start debugging, or just start running your app, from Visual Studio you will see a new system tray icon appear (image). You can right click on this icon to to quickly see what applications it is hosting. Each hosted application will have its own context menu. From this menu you can browse out to the application as well as stop it quickly.”

“Authorization and Authentication using WCF Security—Silverlight”

Mahesh Sabnis: “In my previous articles Silverlight 4.0 – Calling Secured WCF 4.0 Service hosted with SSL and Self-Signed Certificate, we saw how to consume WCF SSL enabled service in Silverlight 4.0 client and in the article Silverlight 4.0 – Secure Communication to WCF service using Custom User Name and Password Validator, we saw how to authenticate a user using by using custom user name and password. As an extension to these articles, we will now  explore how to authenticate a Silverlight user against WCF service to perform business operations like Read All and Insert etc.”

“Hosting Razor outside of ASP.Net (Revised for MVC3 RC!)”

Andrew Nurse: “We recently released the latest preview release of MVC 3, including an updated version of Razor.  One of the things we did in this release is simplify the hosting APIs dramatically.  I did a demo of these new APIs in a pre-recorded PDC10 talk I did with Scott Hunter, which is available to stream here: http://bit.ly/ac7B0P.  As I promised in that talk (and a few others before and after it Confused smile), I’m finally blogging about the sample I showed in that talk!”

“Paging WCF Ria Services entities in Model-View-ViewModel applications”

Andrea Boschin: “[Together] with WCF Ria Services there are a set of components that are not so useful to consume services. Particularly I usually prefer not to use components like DomainDataSource because it brings my queries directly into the Views and it is a very bad thing. Microsoft has spent long time to create similar components—I remember SqlDataSource and LinqDataSource in ASP.NET—but they are targeted for very simple applications that have a short lifecycle. Someone found ways to use the DomainDataSource in MVVM scenarios but my feel is again bad because of its [intrinsic] slowness and because many thing I have to do are not strongly typed and this opens the way to runtime errors I wouldn’t want to deal with. [watch/download video]”

“Mono Tools for Visual Studio”

Miguel de Icaza: “Today is a big day for the Mono team, we just released the Mono Tools for Visual Studio. The goal of this release is to make it simpler for Visual Studio developers to deploy their applications on Linux. ASP.NET, Windows.Forms, server and console applications are supported…” Yes, my record of this announcement is a bit late…

“JavaScriptMVC 3.0: Good To Go!” and other links…

Article Tweeted from Chris Sells: “Despite JavaScriptMVC’s tight integration, we’ve long understood that some people might not be able to use the entire framework. With 3.0, every part works standalone. So no matter the project, you can start benefitting from JavaScriptMVC’s goodies.” I ran into this MVC-in-JavaScript concept while doing an odd job for a magazine company (actually a B-to-B media company). I admit that I laughed at it but with Chris Sells tweeting about this maybe something else is going on…

“Loading Javascript Modules”

Article Tweeted from Chris Sells: “Sooner or later, every Javascript developer encounters the Module Pattern. It isn’t always used for modules in the conventional sense, but even when it is used for modules, the files in which those modules reside are still often loaded by carefully hand-listing script-elements, in dependency order, in a HTML page. I have just been through the process of moving one of my own projects from a naive file-as-module project structure (with implicit dependencies and explicit loading) to a structure with explicit modules, explicit import/export dependencies and automated loading in dependency order.”

“jQuery Templates—{Supported Tags} ”

Hajan Selmani: “I have started with Introduction to jQuery Templates, then jQuery Templates – tmpl(), template() and tmplItem() functions. In this blog we will see what supported tags are available in the jQuery Templates plugin. …”

“Lettering.js—A jQuery plugin for radical web typography.”

What’s the catch? I find this too “good” to be true. IE8 renders the samples poorly.

Wikipedia.org Moment: “Same origin policy”

“The concept of same origin policy dates back to Netscape Navigator 2.0. Close derivatives of the original design are used in all current browsers and are often extended to define roughly compatible security boundaries for other web scripting languages, such as Adobe Flash, or for mechanisms other than direct DOM manipulation, such as XMLHttpRequest. …JSONP is a popular cross-domain alternative to XMLHttpRequest (Ajax).” By the way, the absence of JSON support in jFeed makes it kind of not useful to me.

JSONP

“The way JSONP works is simple, but requires a little bit of server-side cooperation. Basically, the idea is that you let the client decide on a small chunk of arbitrary text to prepend to the JSON document, and you wrap it in parentheses to create a valid JavaScript document (and possibly a valid function call).”

“JSONP: JSON With Padding”

Michael Mahemoff: “So this is where JSON with Padding comes in. Bob wants to make these remote scripts more flexible, so a client can control how they work. Under the proposal, our script would simply tell the remote script what to output before the data object.”

“How to distribute a Silverlight OOB Application?” and other Google Starred Items…

Kunal Chowdhury: “One of the new features introduced in Silverlight 4 is the silent installation of Silverlight Out-of-Browser application. This means, without user intervention, you can directly install them to their machines. You don’t have to open the browser window to install the OOB app. This is perfect for CD-ROM distribution. You can even automate the process from the CD/DVD media; if the user already has permission to auto run external media.”

“Silverlight Installation and Upgrade Experience”

Mike Taulty: see “Better Silverlight 4.0 Installation and Upgrade Experience” by Andrew Tokeley: “In my example, I’ve created a page specifically tasked with checking for updates. This page is loaded every time the application starts and advises the user if a new update has been installed, otherwise it simply redirects to the main application page. ”

“Download ‘Xap’ Packages on Demand in Silverlight”

Dr. Song Li: “This article introduces a method to download and use ‘XAP’ packages on demand in Silverlight with a Visual Studio example. The Visual Studio solution that comes with this article is developed in Visual Studio 2010 and Silverlight 4. This article assumes the readers having some basic experiences with Silverlight development. If you are new to Silverlight, Scott Guthrie’s blog is the default place for you to get started.”

“Checking if a Remote (HTTP) File Exists”

Kirupa Chinnathambi: “Things are a little bit more tricky when you try to check if a remote file such as something on a HTTP server exists though. Given the nature of requests traveling over a network, there are two things to keep in mind that make performing this check non-trivial…”

“Silverlight book: Silverlight 4 User Interface Cookbook”

Vibor Cipan: “I won’t go into too many details—I suggest you go and learn more about the book on the Silverlight Book webpage that my friends from the FatDUX Zagreb office have kindly prepared for me…”

“Introduction to Shapes in Silverlight 4”

Kunal Chowdhury: “In earlier versions of Silverlight, there are very few shape controls like Rectangle, Ellipse available. But think on creating other shapes like Triangle, Polygon, Ring etc. If you need one of them in the earlier Silverlight version, how will you implement them?”

“File Explorer using Silverlight 4 COM Interoperability”

Kunal Chowdhury: “Earlier to Silverlight 4, we are able to only get file access to some of the location of your Windows Operating System like My Documents. In new version of Silverlight i.e. in Silverlight 4 you can able to access any files and/or folders. Not only this, you can able to get information of any drive, files and folders. Though there is a restriction to run the Silverlight application in Out-of-Browser mode, but it actually benefited for those who want to run it outside browser.”

“Simplified MEF: Dynamically Loading a Silverlight .xap”

Michael Washington: “This article covers material, and uses code, from Glenn Block and Davide Zordan. You will want to read their articles after this one because they go much deeper into what you can do with MEF. The difference with this article is that we will walk through all the steps and we will also use View Model Style for everything.”

Flippant Remarks about Windows Azure

As of today I’m sticking with Windows Azure. Besides the obvious Mark-Russinovich-in-the-cloud-thing, two features of Azure keep me interested: (i) Table Storage as the scalable data source driving OData feeds for all Songhay System web sites and (ii) Blob Storage of Silverlight (and Flex) sites for all Songhay System rich-media experiences.

Maybe a month ago I was very excited about Azure Web roles. However, when the first bill for having an idle Microsoft cloud web site came in, my excitement faded fast and I sent wild Twitter messages to Steve Marx. I should have done my research but I was more into the coding than into the penny pinching. I was not the only one. Take Paul Mehner:

To give you some idea, my Windows Azure bill has been running over $500 per month for four hosted services and four storage services (plus a few extra instances in staging environments). This is for mostly idle instances (used for demo and training purposes). There are many variables in pricing outside the scope of this short blog post, so your costs could be much different. My purpose in drawing your attention to it here is to give you some financial sense as to why I view the information in this blog post important.

Chris Pietschmann hits closer to home:

If your application is racking up “Compute” time whenever it is “live”, then that equals a total of approximately 720 hours of “compute” time for a total of $86.40 per month.

In “What I Would Change about Microsoft Windows Azure” the problem I’m having with Azure is excellently summarized:

The Windows Azure deployment model works for big businesses with large numbers of users, or for Web sites which huge spikes in demand. For small businesses though, we would end up paying for a lot hardware that is completely under-utilized. I thought the cloud was supposed to allow me to pay for only the hardware I needed at any moment in time.

I was wondering why, say, Carl Franklin—and Netflix for that matter—passed on Windows Azure. Many dismiss it with, “The conclusion for Windows Azure is that it’s too expensive…” My flippant response to this reality, in spite of me charge-carding upwards of $200 bucks (over the last two months) comes in these points:

  • I think we all have underestimated Windows Azure Table Storage as a complete replacement for SQL Azure (which costs ~$9/month per instance). Yes, I know this can sound crazy—and actually be crazy.
  • I’ve just joined the Extra Small Compute Instance beta program. Which is supposed to cut my Web role costs over 50% (from 12¢/hour to 5¢/hour).

Flippant Remarks about Windows Azure Table Storage

In “Azure Table Storage, what a pain in the ass,” Oliver Jones writes:

Microsoft have wrapped this in the ADO.NET Data Services API. So it looks fairly full featured. However it is not. At almost every turn I have ended up bashing my head against a Table Storage limitation. Debuging these problems has been a bit of a nightmare.

My chief problem is that Windows Azure Table Storage does not let you store data of “any type you want” (which is what I swear I heard somewhere). There are a limited number of types supported in Azure Table Storage name-value pairs. The list of supported types in Jim White’s “Windows Azure Table Storage vs. Windows SQL Azure” does not include Nullable types as of this writing—I appear to be using Nullable types just fine as of this writing.

I was fully expecting to persist POCO Entity Framework types as Azure Table Storage objects. Expectations like these are less frequent but they can still sting quite a bit. So what has actually happened is a situation that makes Ruby people scoff: for every POCO type Foo, I’m going through the “ceremony” of defining a corresponding type, TableStorageFoo. For example, here is the “noise” for my TableStorageDocument:

public class TableStorageDocument : TableServiceEntity, IDocument
{
    //more noise, noise, noise…
}

What is implied here is that IDocument is an interface extracted from my POCO Entity Framework type Document. This implication reveals yet another stinging expectation that the latest version of Entity Framework should prevent me from needing an interface this way.

(Hold on. Let me get seriously incoherent for a moment: It is possible to persist POCO entities in Azure Table Storage as serialized strings (XML). However, this .NET serialization process would require a .NET-aware deserialization layer—this adds complexity and makes the whole OData/JSON access story slightly miserable but not impossible.)

(By the way: I have written a little utility, FrameworkTypeUtility.SetProperties, which uses reflection to set properties of the same name. This means that passing in an instance of IDocument into the constructor of TableStorageDocument does not force me to set properties ‘manually’:

public TableStorageDocument(IDocument baseDocument)
{
    FrameworkTypeUtility.SetProperties(baseDocument, this);
    //noise, ceremony, syntactic sugar, etc.
}

I am sure I’m not the first dude on the planet to “discover” this use of Reflection and there are surely a couple of open source .NET projects based on this use of Reflection.)

All of this work I’m doing to get Azure Table Storage to ‘work’ might be a symptom of what Rockford Lhotka writes about in “Some thoughts on Windows Azure”:

But there’s also the lock-in question. If I built my application for Azure, Microsoft has made it very clear that I will not be able to run my app on my servers. If I need to downsize, or scale back, I really can’t. Once you go to Azure, you are there permanently. I suspect this will be a major sticking point for many organizations. I’ve seen quotes by Microsoft people suggesting that we should all factor our applications into “the part we host” and “the part they host”. But even assuming we’re all willing to go to that work, and introduce that complexity, this still means that part of my app can never run anywhere but on Microsoft’s servers.

So it’s clear that what Rocky—or someone else just as cool as Rocky—has to do for me is build a conventions/attributes/magic-based persistence layer between my server-independent POCOs and Azure Table Storage. This is far from impossible and it may actually come from Microsoft (because the Entity Framework team might find this useful). I’ll be looking out for it. Until then, I am literally writing two sets of classes for one data access object.

But this situation is not terrible because I use less than ten data access objects for all of my personal projects—and I currently have no clients/jobs demanding custom Azure-based solutions.

The reason why I use so few data objects is because my data, Songhay System data, model the document concept. Modeling around the document is quite open as documents are inherently free flowing. It is my document-centric bias that makes Azure Table Storage so attractive to me. I have the expectation that I can store relatively static documents in the cloud, based on a single OData-based access solution. This single document-storage solution should drive all of my document-based projects. This is one of many reasons why my little company is called Songhay System—the word system is singular.


DAR and GenericWeb Documents 12-3-2010 12-16-28 AM

Single point failure for a single cloud owned by a single company is not impossible but hardly individual—more conspiratorial…

The ‘Links to Non-Silverlight’ Folder

One of my arguably neurotic mental background tasks for weeks (months, probably) kept provoking the question, ‘How the hell will my Silverlight BiggestBox project package nicely for CodePlex.com?’ To place this question in some kind of relevance:

  • The concept of the ‘Biggest Box’ is my way to approach the interactive User Interface, which starts in CSS and then moves into XAML.
  • My Visual Studio document image has Solution Files (*.sln) sharing the same folder. This arrangement allows multiple Solutions to load the same Project. This is hostile to Team Foundation Server and the default Visual Studio option covered in “How to: Create Directories for Solutions.” (More on this below…)
  • Since Silverlight compiles for a different runtime than .NET for Windows many of my .NET libraries cannot compile. However, there are many, many, many types that do compile. To avoid copying these files into Silverlight projects, my preference is to make links to these files. These links lead to Visual Studio projects. These Visual Studio projects can be rolled up into a logical Visual Studio Folder. Thinking about this leads me to call this logical folder the ‘Links to Non-Silverlight’ folder.

How the hell will my Silverlight BiggestBox project package nicely for CodePlex.com? How will my ‘Links to Non-Silverlight’ folder package ‘nicely’ for CodePlex.com? These look like an answer:

  • Visual Studio Project files use relative paths by design.
  • NAnt is already in my regimen to automate packaging nicely.
  • The number of non-Silverlight projects should not greatly exceed the four projects in my BiggestBox project (because non-Silverlight project growth should be for data access and “business” logic).

The Four Non-Silverlight Projects in My BiggestBox Project

Songhay

My most primitive .NET library of reusable, static utilities. (The term Utility is meant to get away from the word Helper, which refers to HTML Helpers for ASP.NET MVC as far I’m concerned.)

Songhay.Composition

Definitions for MEF Composition and something I’m calling ‘Composition Messaging.’

Songhay.Data.Linq.Opml

Yes, I wrote my own OPML library under what some would call the “crazy” assumption that the OPML outline is a great data format for menu item meta data. This use of OPML is dramatized most effectively in my UriTree project. This is where any accusations of “over-engineering” directed toward me are not easy to dismiss out of hand.

SonghayCore

My most primitive .NET library of reusable, static utilities for 3.5, 4.0 and beyond. I’m not moving my older Songhay stuff out of .NET 2.0 because of my historical concerns for Mono among other things.

Why Multiple Solutions Sharing the Same Project?

It became clear to me that many professional developer teams prefer to use source code over binaries in their version control systems. Indulging in this preference with my code, leads to multiple solutions sharing the same project.

What’s deeper into my personal preference is finding out that, say, approaching an XML utility library from ASP.NET is different from using it in WPF. Ensuring that such a library works in both contexts makes the library ‘stronger’ or more generic, more versatile…