Contents tagged with Windows

  • Ales Holecek: Windows 8 Unplugged

    Ales Holecek opened the day at the p&p symposium this morning with a keynote address on Windows 8. Here are my live blogging notes that contain a mixture of his comments and my own commentary as he went along. Holecek is in charge of WinOS 8. He said that mobility was the primary driver for them when they started thinking about WinOS 8 back in 2009. Given that they promoted touch to a first-class citizen. Future releases will be optimized around touch. The holy grail for a future OS is speech but we're not there yet. Continue reading...

  • Greg Young on CQRS

    When Greg Young's talk on CQRS began I was prepared for a long look at patterns, reliability, transactions, MQs with Azure, WCF, and interface contracts and how Microsoft products were the best way to get you from Point A to Point B. But I was wrong. He showed no code. He didn't mention Azure once. In fact, he didn't talk about specific tooling or tech stacks at all. Continue reading...

  • ScheduleWidget Is Now Open Source

    I had no idea that in the few short months since ScheduleWidget went live on NuGet it would be so popular. That tells me that other devs have a real need for the tool just like I did in my own project. That's the good news. The bad news is the feature requests are coming in and I can't support it alone. So she's going open source! I've created a repo and done the initial commit into GitHub. The repo on github.com is here. When I have time there are two features that I want to add: Continue reading...

  • JQuery Mobile Madness with MVC 4 Web API

    In my last post I introduced MVC 4 Web API. In keeping with the spirit of things I'd like to throw a little JQuery Mobile into the mix for fun. As in my previous blog post fire up Visual Studio 11 Beta and create a new MVC 4 Web API project. Last time we posted a plain old string value back to the ValuesController. Now let's post a Widget class back. Go ahead and add this model to the project: Continue reading...

  • Seismic Shifts in Web Development

    Not really. But then again really. What I mean is the role of the web developer is changing fast and it's only been in recent months that I've looked up from my keyboard to see how the ground has shifted substantially. Some developer friends and I have often joked that the back end -- the database, object-relational mapping, domain model, business logic, and the controllers for the UI -- take us about a fraction of the time it takes us to get the UI right. We will sit for hours just to get the HTML right, float div tags, give up and go with the table tag, try again, move on, and so on and on. And now with awesome tools like EF and LINQ it's a breeze to do the sort of plumbing work that used to take weeks.  Continue reading...

  • Pattern Toolkit Builder (VSPAT)

    A few days ago Jezz Santos at Microsoft Consulting announced the release of Pattern Toolkit Builder (VSPAT) for Visual Studio 2010. Why not VSPTB? I think PA originally stood for "pattern automation" and the marketing folks just haven't nailed this down yet. Anyway, this promises to be the sort of game changer I've been looking for in my organization. I remember the software factory idea that the P&P team worked on a few years ago. It sort of died on the vine. The idea with pattern automation or "software factories" is that a very senior developer can create interactive, prescriptive (or merely helpful), project templates that junior developers can use to get started on a new project. The toolkit lets you create guidance and proven patterns in the actual code that gets unpacked from the project template so that junior developers aren't faced with the "blank slate how-do-I-get-started" problem.  Continue reading...

  • Polling with Knockout, JQuery, AJAX, and MVC

    Some colleagues and I have been taking a close look at Knockout, the javascript library that implements the MVVM pattern for rich client UI. Knockout takes advantage of the new custom data attributes (data-*) in HTML 5 to bind declaratively a javascript view model to UI elements. That's pretty cool. But even better, Knockout will update your UI automatically whenever the underlying view model changes. It does this when you declare your model as an observable: Continue reading...

  • ChannelFactory, IDisposable and Handling Faults

    In my last post (Poor Man's Publish-Subscribe WCF Service) I used the ChannelFactory to build a communication channel that I could use to call a WCF service. There's something about that implementation that I wanted to explain in more detail. Notice the try-catch block surrounding the using statement: Continue reading...

  • Simple and Custom Validation in MVC 3

    This is the first of a series on validation and business rules in MVC 3. I'll start out simple and we'll work out way up to the more complex. I'm going to build on the solution created in the previous blog post (Delete Like a Rock Star) so go there and get set up. Continue reading...

  • Delete Like a Rock Star with MVC3, Ajax and jQuery

    Sure you can be a chump and use the out-of-the-box delete functionality that the MvcScaffolding gives you. Or you can use a little jQuery and delete like a rock star. Get your project set up first. Create a new MVC3 web app in Visual Studio 2010. If you have SP1 you have a choice now: internet or intranet. I'll assume we're creating an internet app but it doesn't matter really. Next add a new model called Widget: Continue reading...

  • Render HTML for Menu in MVC 3 Using SiteMapProvider

    There are several good jQuery menu plugins but I like the old skool ASP.NET SiteMapProvider because I can declare my app roles in there and get security trimming for free. Add and configure the default XmlSiteMapProvider or customize one to override the IsAccessibleToUser method. Your choice. Then add this MenuHelper static class to your project:  public static class MenuHelper { public static MvcHtmlString Menu(this HtmlHelper helper) { var sb = new StringBuilder();  sb.Append("<ul id='nav'>");  // Render each top level node var topLevelNodes = SiteMap.RootNode.ChildNodes; foreach (SiteMapNode node in topLevelNodes) { sb.AppendLine("<li>");  sb.AppendFormat("<a href='{0}'>{1}</a>", node.Url, helper.Encode(node.Title)); if (node.HasChildNodes) { sb.AppendLine("<ul>"); foreach (SiteMapNode childNode in node.ChildNodes) { sb.AppendLine("<li>"); sb.AppendFormat("<a href='{0}'>{1}</a>", childNode.Url, helper.Encode(childNode.Title)); sb.AppendLine("</li>"); } sb.AppendLine("</ul>"); }  sb.AppendLine("</li>"); }  // Close unordered list tag sb.Append("</ul>");  return new MvcHtmlString(sb.ToString()); } } If this is the first helper for the project then add the namespace where your MenuHelper class lives to your Views Web.config file: <system.web.webPages.razor> <host factoryType="System.Web.Mvc. … Continue reading...

  • More Awesomeness: Post JSON to an Action Method

    Fortunately I came late to the party and didn't develop MVC 2 web apps. I understand that back in those ancient days (about 6 months ago) you had to walk uphill both ways to post JSON data back to an action method. Phil Haack has a great blog post on the topic. Basically, you had to write a custom filter, register a JsonValueProviderFactory in application startup, and decorate your action method with the JSON serializer attributes. What a pain. In MVC 3 it's super easy to use AJAX to post JSON back to an action method. Here are the steps. Continue reading...

  • Implement jQuery FullCalendar Plugin in MVC 3

    Let's implement Shaw's awesome FullCalendar jQuery plugin with an MVC 3 project. I'll assume you've downloaded the bits and have included the fullcalendar.min.js script in your project. Here I want to illustrate two things: (1) populating the calendar with events from the database; and (2) handling the calendar's dayClick event to create a new event. Continue reading...

  • Silverlight Problems: Yet Another Plug In

    So I labored mightily last December on TruthWidget.com. Wanting to be hip and happening I implemented it in Silverlight 4 and RIA Services. It worked out well. I was pumped. So post-launch I asked a few non-technical friends to take it out for a spin. And then the problems started. They told me it didn't work. I quickly discovered most didn't know that they needed to install the Silverlight runtime. I was counting on the blue box of joy to do the work for me but it wasn't explicit enough and many didn't even look at it very closely. So following Tim Heuer's lead I dove into a custom installation experience. But the detection script reports Chrome as an unsupported browser. I could hack the script of course. But the problem is much deeper: my friends didn't want to install yet another plug in. They didn't understand why they needed to do it, had questions about it, and finally hesitated to take the simple 30 seconds to do it. I realized that if this is how my friends reacted what would complete strangers do? In the end I decided I needed to port the app over to a web application. MVC 3 to be specific and it's going great. More on that later. My takeaway from this experience is if you cannot control the end user's browser then stick with tried and true web applications. If it's an intranet app where you know your end user's environment and they need a rich-client experience then consider Silverlight 4. Continue reading...

  • WCF Debugging Tip

    WCF Debugging from Silverlight client-side:WebRequest.RegisterPrefix("http://", WebRequestCreator.ClientHttp);Also, turn on debugging in the WCF service Web.config. You'll get detailed inner exception information. In the <serviceBehaviors> region: <serviceDebug includeExceptionDetailInFaults="true" />   Continue reading...

  • Active Directory Federation Services v2

    ADFS is based on Web Services architecture (WS-* specifications) and conforms to industry standards and protocols. This release supports Azure and would be a great choice for enterprises using AD as a credential store on the local domain who want to migrate to the cloud. Applications hosted on local IIS7 servers as well as in the Azure cloud can take advantage of single sign on over the extranet for the duration of the user's browser session. See MSDN for developing federation-aware applications. Continue reading...