Archive for the 'cinnug' Category

22
Dec

Why You Need To Attend MSDN DevCon In Detroit Jan 22nd

The Microsoft Developer Conference showcases all the new developer initiative out of Redmond. Take a look at what happened in Atlanta and make your plans to be in Detroit January 22nd. Here’s a draft of the vid compiled for the event. The final edition, along with its resting point, will probably change. If you were at the event, leave me some feedback!

- Andy

25
Nov

November CINNUG – Dan Rigsby and REST with WCF

Holy cow! How often do you get a chance to win a piece of $24,000 worth of swag at a user group meeting? November marks the end of the CINNUG membership drive. We’re giving away 2 MSDN subscriptions valued at approximately $11K apiece, and XBOX, year-long access to Safari books, and more. About 50 people in the room gearing up for Dan Rigsby’s talk on REST. And if we’re lucky, Levy will get his Azure app working in time for the end of the talk. Who else was there? The venerable Rob Eberhardt and Joe Wirtley, Phil Japiske from Pinnacle, Rich Rayburn, Mike Wood of SDS, Western Southern Life’s Matt Brewer, Telligent’s Leon Gersing, Peggy Krpata from Cincinnati Financial, Quality Gold’s Clarence Klopfstein, Maggie Longshore of Sogeti, Ellen Steiner, and more. And the pizza’s free! What can I say? CINNUG is really out of this world.

Services in the late 90s were all SOAP representing everything we needed. Then interop reared its ugly head and WS-* became complex. Roy Fielding proposed REST in his 2000 doctorial thesis. Can we build and architecture style on the web? REST is a style, not a standard, so there is no right or wrong way to do it.

4 Tenents of REST

  1. Embrace the URI – URI segments map to domain semantics
  2. HTTP verbs are your methods – GET is special because you do it most of the time
  3. Content-Type is the object model
  4. The status code is the result

HTTP can map to CRUD

  • GET is Read, and cacheable
  • POST is Create
  • PUT is Update
  • DELETE is Delete

High REST is the strict interpretation of REST. Every time you interact wiht a resource you use an HTTP verb. Low REST is not so strict. You might put a method inside the query string. RESTful means that REST is being used.

Why is REST important? MS embraces it. WCF, Azure, ADO.NET, AJAX all depend on REST. REST/POX (Plain Ol’ XML) is much more widely used. Amazon services 85% REST. Google maps all REST based.

What are advantages of REST? Long reach and interoperability, very light weight, scalable applications and cacheable calls, less work on the client, and a URI allows categorization of everything.

But there is no metadata. No WSDL. You need to parse the XML and figure out what it is. Also, no message level security as security is only at the transport level. WS* features don’t exist, but with most simple services it is fine to not have these things. A common standard does not exist. REST is not appropriate with large amounts of data.

So, with SOAP you kindly request formal data with all the platitudes. With REST you tersely order the recipient of the request around. Still, they work together, and all services could be implemented in both SOAP and RESTfully.

WCF added REST support in .NET 3.5 with new namespace System.ServiceModel.Web. The extensible WCF model holds as no existing code needed to change with the addition of REST support.

How WCF handles the Tenant 1 – System.UriTemplate where {} Holes represent the segment that maps to the domain semantic.

Tenant 2 – System.ServiceModel.Web.WebGet assumes GET, and .WebInvoke allows for any HTTP method.

Tenant 3 – didn’t catch this one. sorry.

Tenant 4 – WebOperationContext complements the OperationContext of WCF to set and get the status code.

Dan did 9 demos and showed a lot of code to help drill the concepts for us. DanRigsby.com has all the demo code under his speaking engagements section.

What can we use REST for? Syndication. RSS vs. Atom. Both XML Syndication formats that define distribution. Atom has more features, but RSS more accepted. Atom is growing now, and WCF understands both. So there is a need to create syndication objects independent of format. You can do this with the System.ServiceModel.Syndication.

MS released the WCF REST Starter Kit in October that includes Help, Representations, Caching, HTTP Verbs, Security, Error Handling, Hosting Settings, and Templates features.

After a bunch of demos we broke for pizza. On return, Mike Levy did a great talk on Azure. I mean REALLY Great! Did the code work? Does it really matter? It’s way cool. Eventually it did. Resources include the Azure SDK, Training Kit, and tools for Visual Studio.

Now for the swag.

- Andy

29
Oct

October CINNUG – Silverlight 2

Really informative and engaging CINNUG last night as Matt Casto demo-ed much of his work in Silverlight 2. Of course, with Mike out of town there had to be technical difficulties. We couldn’t get the projector working with Matt’s laptop. With a bit of finageling Tim Apke got Matt setup on his Mac.

A boatload of people attended including Rich Rayburn, Parag, Phil Japikse, Matt Brewer, Joe Wirtley, Nino Benevenuti, Peggy, Maggie Longshore, and Leon Gersing to name a few.

Ryan Cromwell from SDS kicked off the evening once we figured it might take a while to get Matt up and running. Ryan did a quick presentation on the visitor pattern.

Ryan Cromwell - Visitor Pattern

Ryan Cromwell - Visitor Pattern

The bottom line: Don’t muddy entities classes with unrelated logic, get away from single responsibility.

Matt Casto - Silverlight 2

Matt Casto - Silverlight 2

Most of Matt’s presentation was a demo of Silverlight 2, so there isn’t a whole lot to report on. Much of the night we spent modifying XAML and seeing what happens. Yet there were a few nuggets of valuable information.

Silverlight is the Microsoft browser plugin usually likened to Flash. From a developer perspective, the difference is that Silverlight is based on XAML, a declaritive language, to define UI, where Flash uses other descriptors. Silverlight supports vector graphics to ensure a detailed rendering at any resolution.

The XAML standard supports full 3D. Someone commented that perhaps you could load 3D renderings into XAML designer. A team somewhere is developing a Quake port to Silverlight.

WPF, the superset of Silverlight maybe, has a number of new user controls – announced at PDC – that make developing user interfaces in Silverlight a much less tedious process. When you write your own controls in Silverlight you wind up writing the same code over and over. The addition of Visual State Manager allows a developer to define styles that can then be applied to states. This paradigm reduces the amount of customization necessary for each individual control in the UI. Check out codeplex for details.

Expression Blend is the designer oriented tool for WPF and it contains a storyborad editor.

Parag using Expression Blend

Parag using Expression Blend

Other controls include the treeview, doc manager, view panel, auto complete, and others. Again, the code is available on codeplex.

Is Silverlight ready for the enterprise? What’s the standard technology answer? “It depends.” Some enterprises do WPF work now, so the integration of Silverlight may not be a big issue. A problem with Silverlight is that all the stuff resides in the .xap file, so a change requires a full download to the client. There are ways to split this up, but the problem is not solved yet. Also, printing doesn’t work consistently, or even well, across browsers. A kludgey work-around includes implementing a managed bridge to Javascript where you layout  elements in a div in the page the way you would want it printed out. Crappy, but it’s the best solution at the moment.

Can grids compare to the .NET grids? It depends. Silverlight runs in a mini-framework pared down. You don’t get all the functionality of .NET. Yet, it’s a 4.3MB download, so a tiny footprint.

Microsoft is partnering with Novell to develop Moonlight, a Silverlight for Mono implementation that targets non-Microsoft platforms.

The bottom line? Most IT shops don’t blink at Flash as a requirement, so Silverlight may be a targetable platform.

- Andy