Liveblog from Microsoft Mix 11 – Keynote

[10:29] New in Windows Azure – Access Control Service, Caching, CDN, Traffic Manager.
We saw Facebook & Twitter icons around ACS. Hopefully, it wasn’t just clipart and they are supported.

[10:26] Umbraco CMS demo. Another .NET based open source project. The twist – running on Windows Azure cloud. Currently used by mainstream sites like vogue.co.uk.
Allows you to scale the instances and looks like it gives you a lot of control on the cloud.

[10:12] Orchard CMS Demo. Open Source project that Microsoft is contributing to.  It’s no Sitecore, but still worth taking a look at.

[10:10] WebMatrix helpers

[9:58] Microsoft WebMatrix Demo. It’s your basic website in a box. TemplateMonster sells WebMatrix templates. You set up your site by choosing the packages you want. Packages are like WordPress plugins.

[9:51] Looking at a demo with MVC3.  Awesome integration with HTML5.  Didn’t see the need during MVC v1 or v2, but this may be worth taking a look at.

[9:45] ASP.NET MVC3 Tools Update

[9:43] Scott Gurthrie. Starting off with a bang?? Charlie Sheen #WINNING/tigerblood joke. really? Talking about the Microsoft Web Platform

[9:41]IE10 Recap Slide

[9:39] Looking at SVG canvas video performance on IE10 vs. Chrome. IE10 does it faster.

[9:37] Microsoft PDC announced – Anaheim, CA – Sep 13-16, 2011.

[9:31] CSS3 columns, “Strict”, CSS gradients – all looks great on IE10.  What happened to IE9? More markup needed to do the same on Chrome than IE10, even though Chrome can do it.

[9:27] Looking at IE10 demo.  I need to call my QA team ASAP and get them to start cross-browser testing.  Another jab at Chrome not being able to support video hardware acceleration.

[9:26] It’s not about how many releases there are. It’s about how much progress is made.

[9:23] Wow. Xtranormal animation mocking Chrome and Websockets. Yes. This is really happening.

[9:21] Native experiences are better.  IE9 delivers that. Browsers that optimize for the operating system are better. IE9 with Windows 7 is better.  Browsers that spread themselves over multiple OS’s can’t concentrate on optimization (really? This guy is telling Chrome to go eff itself)

[9:18] IE9 vs. Chrome – IE9 has hardware graphics acceleration.  Painball demo is much faster.

[9:13] Looking at some great HTML5 sites.

[9:07]  Dean Hachamovitch, Corporate VP, Internet Explorer. Fan and Evangelist of HTML5.

  • Native Experiences – best experiences
  • Web experiences – most important experiences.
  • Best web experience – IE9 with HTML5

LiveBlog from Microsoft Mix 11 – jQuery Bootcamp

UPDATE [4/18/2011] – Joe posted the slides on his website: http://joemarini.com/downloads/Presentations/jQueryBootCampMIX11.zip

64,000 ft. View of jQuery

  • It’s awesome
  • It hides browser-specific functionality, meaning you don’t have to write a function for each browser that does the same thing.  This is done for you.
  • It’s a library, not a framework.

8 elements of jQuery

  1. core functionality
  2. selection and traversal
  3. manipulation & css
  4. events
  5. effects
  6. AJAX
  7. UI
  8. Extensibility

Window.OnLoad vs. Document.Ready

- window.onload – fires after all images have been loaded on the page (could take a while)
- document.ready – fires when the DOM has been loaded.

Code Overview & Samples

We just dove into some great stuff. Joe Marini promised slides and code samples at the end of the bootcamp, so I will post it after they become available.

Breaking News (sort of)
jQuery Mobile is coming! What jQuery did for cross-browser compatibility, jQuery Mobile is going to do for mobile browsers/devices.  I don’t like to throw around the term “game changer,” but I think this deserves it.

LiveBlog from Microsoft Mix 11 – Cloud Bootcamp

64,000 ft. View of the Microsoft cloud a.k.a Azure

  • Development Platform agnostic – in addition to .Net, it can run Java, PHP, etc – basically, anything platform that you can install on a windows box.
  • Machine Abstraction – your application may run on 1 machine or 1,000.  The beauty of the cloud – it’s abstracted, so it’s taken care of and you need not worry during development.
  • The cloud virtual machine consists of 3 levels
    • IIS (in web roles)
    • Your app code + role runtime
    • Windows Azure OS

Requirements for Azure development

  • .Net 4.0/3.5 SP1
  • Visual Studio 2010/2008
  • MVC 2.0/3.0 (optional)
  • Powershell
  • IIS7

[Short Demo]
Azure comes with an emulator – you can see and manage instances of your VMs to get an idea of how they will run when you publish to the cloud.

SQL Azure

Why do we need a special version of SQL Server for the cloud? Database connections are stateful (opposite of stateless).  That means that once it makes a connection, it needs to persist it. Since the data connection for a single given session can come from random servers in the cloud, you need a special way to handle that in the cloud.  SQL Azure takes care of that for you.

SQL Azure Reporting Services are in beta

Azure Storage Overview

Virtual Machine Role

So, what happens when you have a third-party component that is not compatible with Windows Azure? One of your options is utilizing the Virtual Machine Role. Essentially, you are creating your own VM and upload the VHD file to Azure.  With this option, you

  • are solely responsible for it
  • have to have it running on Windows 2008 R2 Enterprise (license $$)
  • acknowledge that it’s in beta form.
  • should really consider if it’s worth the hassle.

Data Market
In the cloud with your app,  you have data providers; some paid, some free.  If your app uses data like zip codes, census information, or other data, it may be available from vendors in the data marketplace.

Azure Security

Microsoft handles DDoS and other attacks for you within the Azure platform.


Second Portion – Demos

Check out the speaker’s (Vishwas Lele) blog for a full demo of the Cloud Portal here – http://vlele.wordpress.com/2011/04/11/windows-azure-boot-camp-at-mix/

Conclusion

Stay tuned for the slides I’ll post after the event.

The Future of Web – Microsoft Mix 11

During the last couple of weeks, there was a lot of buzz around the new browser releases – IE9, Firefox 4, and Chrome 11 beta. In part, it could be looked at as a popularity contest and a race to the top. Looking past the smoke and mirrors, it is a more of a race to keep up with the evolving technology – HTML5, CSS3, jQuery, Cloud, {insert more buzzwords here}. Face it – the web is definitely evolving.

That future is this topic of conversation, as well as break-out sessions and bootcamps, at Microsoft MIX 11. April 12 – 14. Mandalay Bay. Las Vegas. And I am there.

I am happy to report that I will be live-blogging the non hands-on sessions. The hands-on lessons learned will be posted sometime after the event.

I will be attending the Cloud Computing and jQuery boot camps.

Cloud Computing Boot Camp

In this half-day workshop we will begin by discussing the what, why and how of cloud computing. After we have covered the fundamentals of cloud computing, we will dive deep into the Windows Azure platform. This will include a discussion of various building blocks, features, and tooling. Next, through a series of demos we’ll review a variety of features of the platform and patterns that can help you move your on-premise workloads to the cloud. Finally, we will discuss the economics of cloud including cost and SLA.

jQuery Boot Camp

In this session, Joe Marini will show you how to get started using the power of jQuery and its sister library jQueryUI to build your next-generation Web applications. Whether it’s animation, dynamic formatting, AJAX, or complicated UI, jQuery has the features you need to help tackle your hardest Web development problems.

I am still deciding on the sessions I will be attending but you will be able to find all posts related to MIX11 at here – http://blog.image0.com/tag/MIX11.

How to get around OpenXML error: Can not replace the OpenXmlElement “newChild” because it is part of a tree

Repost from caughtinthedotnet.blogspot.com

I was recently working on a MS Word doc generation project and kept getting this error.

It took me a while to figure out the source of the problem, but it made total sense…
When you are a building a document tree (example below), you are creating new elements like

var myRun = new Run(new Text("reusable text"));
var myParagraph = new Paragraph();
myParagraph.AppendChild(myRun);

The 3rd line above ties in that Run object into the Paragraph object, so if you try to reuse the myRun object by appending it somewhere else – you will get this error.

I also tried creating a new Run() object using the old one as the object initializer:

var myRun2 = new Run(myRun);

That will throw the same error.
Why? Because the above line copies instantiates myRun2 with the reference of the myRun object so when you try to Append it elsewhere, you will get the error because it’s technically the same object.

Workaround
There is a very handy property that most OpenXML elements have – OuterXml. The other handy thing about it – it’s in most class constructors so it can be used to instantiate an object.
In lamens terms, instead of

var myRun2 = new Run(myRun);

try

var myRun2 = new Run(myRun.OuterXml);

Sample tree:

  • SdtBlock
  • - Paragraph
  • —-Run
  • ——Text
  • —-Run
  • ——Break
  • —-Run
  • ——Text