Dan Rigsby – Coding Up Style

Developer.Speaker.Blogger

Archive for April, 2008

Specifying a different serializer per endpoint in Wcf

Posted by Dan Rigsby on 10th April 2008

I got a question recently on the MSDN forums about being able to specify a different serializer per endpoint in Wcf.  For instance, you might have a single service, but some clients want to access it with either XmlSerializer serialized or DataContractSerializer serialized data.  If want to know about more about these different serializers, I recommend you read "XmlSerializer vs. DataContractSerializer: Serialization in Wcf".

The problem is that to specify a service is to use the XmlSerializer you need to declare the [XmlSerializerFormat] attribute on the service or the contract.  Well since we want to use the same for both endpoints we can’t place it there, so we are left with placing it on the contract.  However, when it boils down to it, both endpoints are using the same service and vicariously the same contract right?

Well, it doesn’t have to be so.  You could have a contract A derive from contract B, then have the service implement contract A such that everything in both contracts is part of the service. For this example though, contract B will be our standard contract, and contract A will be an interface that just defines the [XmlSerializerFormat] attribute.

Here is a sample service and contract implementation which illustrates this:

[ServiceContract]
public interface IMyService
{
    [OperationContract]
    MyDataType GetData(int id);
}

[ServiceContract]
[XmlSerializerFormat]
public interface IMyServiceXmlSerializer : IMyService
{
}

public class MyService : IMyServiceXmlSerializer
{
    public MyDataType GetData(int id)
    {
        MyDataType myData = null;

        // Do logic to get data by id

        return myData;
    }
}

[DataContract]
[Serializable]
public class MyDataType
{
}

 

Here is the app.config for the service.  Note the 2 different endpoints are each specifying a different contract and therefore will use different serializers.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <services>
      <service name="MyNamespace.MyService" behaviorConfiguration="serviceBehavior">
        <host>
          <baseAddresses>
            <add baseAddress = "http://localhost:8080/MyService" />
          </baseAddresses>
        </host>
        <endpoint
            name="dataContractSerializer"
            address =""
            binding="wsHttpBinding"
            contract="MyNamespace.IMyService"/>
        <endpoint
            name="xmlSerializer"
            address ="xmlSerializer"
            binding="wsHttpBinding"
            contract="MyNamespace.IMyServiceXmlSerializer"/>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="serviceBehavior">
          <serviceMetadata httpGetEnabled="True"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

 

kick it on DotNetKicks.com

Posted in Wcf | 2 Comments »

Heroes {Community} Launch – Bloomington, IL

Posted by Dan Rigsby on 9th April 2008

I finished a Heroes {Community} Launch event in Bloomington, IL for the users group last night. This event was setup with 3 speakers. Paul Hacker covered Windows 2008 for 40 minutes, Dave Paulson covered SQL Server 2008 for 55 minutes, and I was left to cover everything that is Visual Studio 2008 in about 45 minutes. It was quite a daunting task!  The trip to Bloomington was about 2.5 hours.  Paul and I drove together and got there about an hour early to make sure everything was setup for the presentations. 

My talk over Visual Studio 2008 covered:

  1. What are the features in Visual Studio itself targeted to different types of developers: All, Windows Client, Web Client, Office, Mobile, and Server
  2. What are the changes in the .Net Framework 3.5
  3. What are the languages extensions introduced in .C# 3.0 and VB 9.0

The demonstrations included:

  1. New project properties
  2. Wpf Editor
  3. CSS Support
  4. Javascript Intellisense
  5. Javascript Debugging
  6. Web Programming Model in Wcf
  7. A very fast overview of all the new language extensions in C#

Overall, my presentation went pretty well.  I did feel quite a bit rushed and talked faster than I should have.  But by then end, I had covered most of what I wanted to cover, and I hope people got a lot out of it. It was really awesome to get to meet a lot of the developers out in Bloomington.  It was a small crowd, but there were some bright people there.  I really enjoyed the chance to network with them.  I hope they invite me out again in the future.

Here is the entire presentation including slides, before and after projects, code snippets, notes, etc.: http://www.danrigsby.com/files/Presentations/HeroesCommunityLaunch-Bloomington.zip

Also, if you are interested in learning more about Wcf, want to hear me speak, or what to hear some other great speakers, there are a few code camps and DoDN events coming up:

  • Central Ohio Day of .Net – Registration is still open.I am doing an Introduction to Wcf session here.
  • IndyCodeCamp – Registration is closed, but you can get on the wait list.  I am doing 3 sessions here: 2 on Wcf and 1 on Scrum
  • West Michigan Day of .Net – Registration is still open.  I am doing an Introduction to Wcf session here.

Central Ohio Day of .NETWM Day of .Net May 10, 2008 - I'll be there!

Posted in Community | 1 Comment »

Spring Speaking Engagements

Posted by Dan Rigsby on 7th April 2008

I have updated my list of speaking engagements for this Spring.  It looks like I’ll be  pretty busy for the next couple of months.  So far I am down for 10 speeches at various user groups and code camps in Indianapolis IN, Fort Wayne IN, Grand Rapids MI, Bloomington IL, and Wilmington OH.  Most of these sessions are either Heroes {Community} Launch events or speeches on Wcf.  I encourage you to attend any (or all) of these sessions with me.  I would love to see and hear from you.

Check out my complete list of upcoming speaking engagements here: http://www.danrigsby.com/blog/index.php/speakings/

If you or anyone you know is interested in having me come in for a speech, I am more than happy to help out.  I am not afraid of a little travel. I would just like the opportunity to reach out to the broader community.

I hope to see many of you this Spring!

Posted in Community | No Comments »

Love at first byte

Posted by Dan Rigsby on 4th April 2008

For as long as I can remember, I have been fascinated with technology.  I was born in 1975 in rural Indiana and as such, my first encounter with a computer was in second grade at school.  It was an old Apple 2 computer and I remember that we could only use it under constant supervision from the teacher. In 1982 there weren’t many computers in school and home computers were still few and far between. Those that the school did have were expensive, heavily guarded, and always in use.  I probably only got to work on it a couple of times a week.  I do remember begging the teacher to let me stay in over recess to work on the computer while the other students played outside.  This first brush with a computer quickly turned into a love, but I knew we would never have one at home.  It was such an impossibility that at the time, I doubt I even dreamt about owning one.  

It wasn’t until I saw the 1983 movie, WarGames, that my love turned into more of an obsession.  After my parents took me to see the movie in the theatre, I distinctly remember coming home, pulling out a box and an old blue toy typewriter, placing the typewriter at the base of the box, and pretending that the box was a monitor and the typewriter was a computer.  I spent hours playing with that setup as if it were real.  Many kids my age were playing outside or watching TV, but here I was pretending I was programming. At this point, I didn’t even really know what programming was, but I was entranced by the idea that you could key in some commands and the computer would process those commands into something visibly displayed on the screen.

For the next few months, all I could think about or talk about was computers.  I’m sure sure my parents would have called me “obessed”.  I got an early subscription to Byte Magazine and tried to read all I could.  Of course most of it I didn’t understand, nor could I put it in practice.  However that all changed in the Christmas of 1985.  My parents, to my utter shock, bought a Commodore 64 for myself and my brothers to share. 

Here is a picture of the blessed event.  I am in the back holding the computer and looking quite excited and proud.  How many 10 year olds could say they have a computer at home?  My brothers on the other hand, were too interested in a slinky that Santa had left them.  This trend continued, as I don’t ever recall either of them wanting anything to do with the computer. I do have to give my youngest brother, Phillip, props for wearing a Transformers shirt in this picture though.

For the next year, my time spent with the Commodore 64 involved me keying in Basic programs from the back of Byte magazine (which rarely seemed to work).  However, around the age of 11, my Mom’s boyfriend at the time had a friend he brought over who knew a few things about computers.  I spent a lot of time with him, and he showed my things on the computer that I didn’t know were possible such as programs to play music (very mono-instrument midi-like music) and software to create banners and cards.  As a young child in a small town, I was sheltered and was really oblivious to all you could do with this little computer.  The man invited me to attend a local user’s group with him called “Hoosier Hills Commodore Club”.  I went one week and couldn’t wait to come back again.  I wanted to be around others that were into computers and who could teach me more.  The membership fees were only $25 a year, and my parents were more than happy to pay this if it meant that I was actually getting out of the house and start building “social” skills.

Imagine, if you will, a club of about 12 people, most of who were men over 30 with the exception of a single woman and an 11 year old kid. I remember that a couple of the members included some people who worked at local electronic stores and at least one guy from the phone company. I’m sure it would have been quite a sight to see that group together.   One of our “field trips” as a club included a evening tour of the phone company, focusing on how it worked and what types of computers they used.  I had never seen so many computers in one place, and for the next several weeks wondered how I could get a job there when I got older.  Most of the time, the club pertained to software for the commodore, but the highlight was a multi-month training course on how to program in Basic.  We got a thick binder that went over every Basic command and included a number of sample programs.  This is when my eyes were really opened to what programming was and what I could do with it.  That week (with the Basic book in hand and my Commodore 64 in my bedroom) is where I can really say, “That is when I started programming”.

The story of my life with computers  continues on today, and there are a lot of other “geeky” stories to share been my time with Commodore 64 and today.  Perhaps I will write more about these times later, or if you know me and what to hear more, just let me know.

Posted in Personal | 7 Comments »

Heroes Happen {Here} – Indianapolis {Live Blogging}

Posted by Dan Rigsby on 3rd April 2008

I attempted to blog this event live.  However, Wifi access was confined only to the vendor room.  So the best I could do was to blog during the event, then run to the vendor room to upload it during the breaks.  This article consists of my thoughts on the event as well as my notes and comments about the sessions I attended.

The Event

This is the Microsoft launch event for Windows Server 2008, SQL Server 2008, and Visual Studio 2008.  These launch events are occurring all over the world.  The Indianapolis Event is at the Indianapolis Convention Center in downtown Indianapolis. The event is broken up into two sub events.  The morning event occurs from 8am to 11:30am EST and is targeted for IT and Database Professionals. This sub event has 3 tracks: IT Pro Infrastructure, Technical Decision Maker, and Data Platform.  The afternoon event occurs from 1pm to 4:30pm EST and is catered to Developers.  This sub event has 2 tracks: Developer and Partner.

Registration

image_00004 Registration opened at 7am was performed at over a dozen tables. I arrived at the event around 7:45 (15 mins before start) and found a line with only two people in front of me.  I was only registered for the afternoon developer sessions, but figured I would see if I could squeeze into any sessions open in the morning.  I knew that the developer track had sold out months ago, but to my surprise there were openings for both the IT Pro and DB Pro tracks. As I look around the event, I see a lot of developers attending the morning sessions as well.

Sessions

1. What’s new in Windows Server 2008 – Shawn Travers

The entire session was run using images installed on Hyper-V to jump between the different install flavors of Windows Server. The presentation was a good mix of slides followed by demonstrations.  It was definitely targeted for IT Professional and Network Administrators, however an there was plenty of content that would be interesting to a developer as well.

  1. Group Policy changes: over 700+ new settings, but includes new filtering support to allow easier finding of settings
    1. Can have a comment on each policy setting to explain why a setting was made.  Comments are searchable as well.
  2. Windows Remote Management: Allows managing of server with command line
    • Full WMI support
    • Management “Despite” firewalls can come in over HTTP/HTTPS
    • Windows Remote Shell: Create a secure shell that can run full commands
      • winrs.exe <Server> <Command> (ex. “winrs -r:pcl.bigfirm.com ipconfig”)
      • Event log messages to show when a user logs in remotely
  3. Demonstrated the deletion of a domain controller.  Overall the deletion was clean and it gave you many opportunities to back out of the deletion at every stage.  Normally I would find this number of confirmation screens to be annoying, but then again how often do you delete a domain controller and if or when you do, you want to be sure you know what you are doing.
  4. Powershell demonstration:  really nothing new here, but many IT Pros haven’t dived into Powershell yet.  He showed how you can pipe one command into another command and perform operations that are virtually impossible in VB script.
  5. Windows Server Core: This is an installation of Windows Server that has no UI except the command prompt.  Its a slimmed down subset of the executables and dlls.  This is targeted for the highest in security.  However systems such as SQL Server and Powershell (for now) won’t work on it since they require the .Net Framework.  This is really mean to be a pure domain controller, file server, etc.
    • Still has auto-updating support.  This is considered to be “essential” now with all of the security updates coming out.
    • RPC can be used to remotely configure.
    • Installation is around 500meg
    • Security suites are still available.  For instance you still need anti-virus software, but you need to make sure that is a version that can run on Windows Core.
    • No .Net Support!

2. Simply Management of Data Infrastructure -Jake McCarry

image_00005 This session again was mix of slides and demos.  The presentation focused on database administration and how you can manage, report on, and tune all your databases in a centralized manner.

  1. Manage by Policies – Policy Based Management
    • Managing a single instance is straight forward.  Just create a single policy and define some rules on it. Managing multiple instances across and enterprise is similar.  You can have a single policy with rules that dictate multiple instances across multiple machines.
    • A Policy is a set of conditions you set against facets that allow you to configure how a database should operate.  The could include things such as how object should be named, what data options can be used, security, etc.
    • Policies can be based On Demand, On Schedule, etc to check for compliance.  You could either prevent out-of-compliance actions or just log them.
    • SQL Exceptions can be thrown if policies are not met, but only if the Policy is setup On Demand.
    • Policy Definitions:
      1. Facets – Areas that you can build policy conditions on such as sprocs, indexes, logins, etc
      2. Conditions – Named condition sets that are defined to a single facet.  These follow the format of “And/Or, Field, Operator, Value” expressions that dictate the how the policy will work.  You can have multiple named condition sets per policy.  An example condition is “SQLCLR == True” or “table names must end in ‘%_tbl’”.
      3. Policies – Groups of policies
      4. Categories –
      5. Targets – How the policy is to be targeted, such as against every sproc or every database, etc.
  2. Monitor with Insight
    • Consolidate performance information and reports. 
      • You can use standard reports (user databases, disk usage, query statistics, and server activity) or custom reports
      • These reports are available right in SQL Management Studio.
      • Server Activity report shows CPU utilization, memory usage, disk IO, network usage, etc over time.  You an adjust this range to view some nice graphs showing when some of your resources might spike.
      • Query Statistics report shows the most expensive queries, how many times each query was executed, how much time it took, etc.  You can adjust the range to view usage over time.   This report can also show “missing indexes” which if implemented can increase performance of the queries.
    • Tune with best practices
      • Performance reports, SQL profiler, DB Engine Tuning Provider, etc.
  3. Manage Interactively
    • Visual Administration in SQL Management Studio:
      • Centralized management – This is a new management option whereby you can setup groups of servers to manage together.  You can then just right click on a group and apply a policy to all servers in that group. You could configure the entire group of servers as a single instance.  You can also run a single query across all servers in a group.  An example query could be “select @@version” which would return back a result set of all versions of all databases in that group.
      • Intellisense in SQL Management Studio.  This includes T-SQL commands, database objects, and parameter prompting.  The intellisense errors appear in an “errors list” dockable tool window or with standard hover-over tooltips like in Visual Studio.
    • Automate Management with SQLCMD, SMO, Powershell, etc.

3. Exploring Business Intelligence and SQL Server 2008 – Jake McCarry

Through both of Jake’s demonstrations I found him to be a big dry.  I would have liked to have had him get up off of his seat more and engage the audience and not be as “mono-toned”.  He did seem to have limited knowledge to the products outside of what was covered explicitly in the slides and canned presentations.  There were other Microsoft employees (and attendees) who were able to jump in and get all of the questions answered.  This second presentation seemed very rushed and by the end, we had covered only about 30% of the material promised in the initial slides.  It probably would have been better to either scale down this session or to break it up to do each of these features more justice.  I would have been happy with a general overview of features, but this presentation seemed to dive into the first things too long as to not leave time for items later.

Microsoft BI tools are built to hit these Challenges:

  1. Changing business needs
  2. Data is locked inside business applications
  3. Learning curve for specialized BI tools

Microsoft is touting an “End-to-End BI Offering” including Analysis services, PerformancePoint, Excel, SSRS, SQL Server, SSIS, and integration to applications such as Microsoft Dynamics, Oracle, SAP, Siebel, etc. The BI effort is built to provide business insights to all employees through Office and other reporting tools

The presentation focused on three areas:

  1. Unlock Your Data – Connect, Integrate, and Manage data
    • Change Data Capture (CDC): This allows you to capture all changes to data in a table into a tracking table.
      • CDC and CDT will probably only be Enterprise only features when SQL Server 2008 goes RTM.
      • Included a demonstration of CDC in Management Studio.  Basically you have to call “exec sys.sp_cdc_enable_db_change_data_capture” to enable CDC.  You can then can call similar sprocs to enable data capture on tables or other objects such as sys.sp_cdc_enable_table_change_data_capture which can be used to enable CDC tracking on a table.  In the demonstration, Jake showed a simple Windows Forms application where he added and changed data in the database table, then he queried the change data tracking table which showed what the operation was, what data changed, etc.
    • Change Data Tracker (CDT): This similar to CDC, but it doesn’t actually capture the changes made, but captures only that some change was made.  This could be useful for something like a table that contains a list of countries.  This data may not change often, but you want to know when it changes and may not care about what was changed.
    • Integrate Data:
      • Improved scalability with thread pooling and .Net support
      • Data Profiling: look for candidate keys, patterns, value distribution, etc.  or check for outliers.
        • Included a demonstration using SSIS to build a data profiling task against, then using Data Profile Viewer (a stand along application) to view the profiled data. They sample query was to mine data about users. The results showed outliers such as someone born before 1900 and a chart showing the distribution of years born or distribution of Male vs Female.
    • Data Caching: Allows persistent lookups
  2. Deliver Relevant Information
    • Designing Intuitively
      • Visual design tools and wizards such as the Analysis Services designers
      • Pr
      • Flexible report designing
    • Scale for the enterprise
      • Memory management – Per page management
      • IIS agnostic – Reporting is now IIS Agnostic as it can be hosted in SQL Server
      • Read-only, Scale-out
      • MOLAP writeback – Improved storage and performance because the writebacks aren’t just relational
    • Deliver through office
      • Analyze in Excel
      • Reports to Sharepoint
      • Render repots in Word
      • Collaborate and share through scorecards
  3. Drive Actionable Insights
    • Nice visual analysis tools that can be build into Office products such as gauges, data mining add-ins, report viewer controls, etc
    • Enhanced Report Builder: a lot of new controls
    • Improved eye candy in reports, snap-to lines, gauges, etc which are licensed through some of the Dundas controls you can find today

4. Reach End-Users with Next Generation Web Applications – Patrick Foley, ISV Architect Evangelist

image_00008 Developer launch track started with a keynote video which introduced the event.  Followed by the introduction of Patrick Foley and an attempt at humor about doing cartwheels or stage or something.  However, to everyone’s surprise he did a cartwheel about 30 mins into the presentation as a “spontaneous way to keep people awake”.

Overall this presentation focused on ASP.Net Ajax features and to a lot of developers, this was probably mostly information they already knew.  At least one of my co-workers left after this event thinking that it was a waste of time.  Personally, think the presentation was decent, however it was full of more “marketing slides” and it was catered more for people who have never seen ASP.Net Ajax.

Maximizing your web: Microsoft is targeting a single framework for developing for the 3 major areas of next-generation applications through Visual Studio:

  1. BI+Portal Applications – Office, Sharepoint, SQL Server
  2. Rich Client Applications – WPF, Compact Framework
  3. Rich Internet Applications – Silverlight

Developer applications need to focus on User Experience, Collaboration, and Productivity.  Visual Studio 2008 is encompasses these three areas and works to expand these in this latest release through the following:

Faster, easier development
  • Multi-Browser ASP.net Ajax support which includes client-script libraries that incorporate cross-browser ECMAScript support
  • AJAX web testing: all Http requests are captured for testing
  • Unit testing improvements: ability to run tests,
  • Javascript localization
  • Integrated code metrics such as cyclomatic complexity, lines of code, code analysis
  • Performance Profiler which now includes Wcf support

Here he demonstrated the ModalPopupExtender to have a link show an image, how to use watermarked textboxes, and some other ASP.Net Ajax controls.

Less effort, more effect
  • New HTML Designer: Spit View between html and display
  • CSS Manager: Intellisense for CSS, Filtered list of styles per page, ability to see styles before they are applied, right click on css class name and it will take you to the style
  • ASP.Net support for LINQ
  • Javascript debugging, Syntax coloring, and intellisense.  Since javascript is a dynamic language, it has been much harder to provide intellisense support than it was for statically types languages such as C#.

A modified version of the “Personal Website Starter Kit” was used to demonstrate some of the features such as the new Html designer, CSS Manager, javascript intellisense, javascript debugging, etc.  The “ASP.Net support for LINQ” was just a simple LINQ over objects query and data bounding the results to a grid control.

Breakthrough user experiences
  • Update Panels in ASP.Net Ajax:  Nothing new here, but demonstrated how ASP.Net Ajax is now a part of Visual Studio.
  • ASP.Net Ajax enabled Wcf Services: New attributes and bindings in Wcf allow for REST and JSON support for easy integration between ASP.Net Ajax and a Wcf service using the  AspNetCompatabilityRequirementsAttribute.

This demo included an update panel to show how a simple image viewing program can be created with an update panel so that displaying new images doesn’t require postback. The demo continued with a nice demo of javascript pulling data from a Wcf service which was defined in an asp:ServiceReference tag.

Patrick finished up the session by outlining 3 companies that are using Visual Studio 2008 today: Aprimo, DoubleTake, and the amazing Interactive Intelligence.

5. Creating Instantly Familiar Applications with the Microsoft Office System – Ron Cundiff and Bill Steele, Developer Evangelist

I found this session to be much more informative than the previous session as this showcased a lot of concepts and features that I haven’t been as familiar with.  It’s interesting to see how Microsoft is making it easier and easier to integrate with the Office Platform.

The presentation started by highlight some of the extensibility points in Office:

  1. Ribbon designers with “Office Ribbon Control Toolbox”.
  2. Custom task panes to help guide the user through your customizations to the application
  3. Outlook Forms Regions: These are basically custom regions that you can embed into the application such as custom sections that can be embedded right into Outlook while users are looking at data.
    • Addins cannot be created for Outlook Web Access at this time.
    • This feature can be very powerful.  Many knowledge workers live in Office and have to alt-tab between Office and other applications.  Bringing your applications into Outlook or Word makes allows for greater productivity.

The first demonstration was carried out by Bill Steele and featured a custom Outlook Forms region.  Through the “Add New Project” you can select to create add-ins such as an Outlook Addin. Bill pointed out that you can select templates for different versions of the .Net Framework.  Using the ThisAddin_Startup and ThisAddin_Shutdown methods, you can dictate what controls should be added and where.  There are 4 types of forms regions: Separate, Adjoining, Replacement (just the body), and Replace-all (the body, toolbars, statusbar, etc).  You can then just select the type of object to attach attach the region to.  Bill’s example was a simple control with a button that was placed at the bottom of each and every email message in outlook.

In the second demonstration Bill created a custom ribbon bar tab in Visual Studio that was targeted for Word.  He extended this by also adding a custom task pane to Word and then showed how to get this pane to integrate with the Word document.  Basically you just pass an instance of the Addin into the custom pane control and from there you can grab the Addin.Application.ActiveDocument and interact with it.

Solve Business Issues with OBAs (Office Business Applications)
  • OBAs bring together the front-office and back-office, its the intersection of Line of Business Applications and Office System Applications
  • Distributing knowledge:
    • Sharepoint helps promote collaboration and reuse
    • Expose spreadsheets and their formulas through Excel Services
  • Integrating Knowledge:
    • Business Data Catalog enables applications such as SAP or Siebel to integrate their data and expose it through Sharepoint Server 2007 with no code.
  • Acting on Knowledge:
    • Custom workflow in Sharepoint
    • Visual Studio allows easy customization of Office System products
  • Deployment:
    • ClickOnce support for RIA-like development
    • Complete end-to-end customization installation experience such as installing from CD, network shares, etc
    • Version independent security model built into the deployments, no need to rely on code access security models

The third demo was on how Office addins can be deployed via ClickOnce.  Not really anything new in ClickOnce, but Bill went over how to deploy and version a ClickOnce deployment package.  The nice thing about Office is that it does automatically check for ClickOnce updates of addins when the application is started.  If you select to install the update though, the application will exit out and the ClickOnce install will begin.

Addressing Critical Business Issues
  • Reusing VBA Investments:
    • Visual Studio 2008 supports VBA calling .Net code with intellisense in Word and Excel.  This is a major feature considering the number of VBA solutions that are already in existence today that developers just need to expand.

6. Defy Occasionally Connected Challenges with Smart Client Applications – Bill Steele, Developer Evangelist

Bill injected a lot of his light hearted humor throughout the presentation that has made him one of the most enjoyable speakers that speak in Indianapolis.  In one of his analogies he talked about a GPS unit that he used in Detroit that ended up navigating him through Canada only to find other issues such as new traffic.  Overall the experience was good for him through the UI, but the lack of data was bad.

This was probably the most enjoyable of the sessions, not only because of Bill’s humor, but also because of his more enticing demonstrations and his speed through the “marketing slides”.

Developers today are expected to maximize the web, but at the same time make the most efficient use of the PC as possible.

Connected Client Applications
  1. Right Experience: WPF, light up with Vista
  2. Fast, safe and reliable services: Offline synchronization is easily enabled in Visual Studio 2008
Great User Experiences
  1. WPF
    • There are differences between Developers and Designers
    • Any WPF element can be animated as part of a key frame
    • WPF allows full control over the visual tree of any element.  For instance, you make make a button look exactly like a textbox, or a pyramid, or anything else.
    • Any WPF control can be embedded into any other WPF control to allow some crazy things such as embedded textboxes in a listbox.
  2. WPF Designers and Expression Blend
    • XAML is used to mark up any hierarchy of items.  In WPF it is mapped to UI work to describe the UI.  For instance WF uses XAML to describe a workflow even though it doesn’t really have anything to do with UI.
    • Visual Studio and Blend interoperate seamlessly
    • Intellisense is enabled in XAML in Visual Studio and in Blend.
    • The WPF designer in Visual Studio features a split view much like that which you see in the new web designer.  It also has a document tree pane that you can use to navigate through the XAML in the code or in what is visually displayed.

The first demonstration was a simple hello world application using the WPF designer in Visual Studio and wiring up a button click event.  System.Windows is the WPF namespace.  Bill then took the XAML file and opened it in Expression Blend to show how to do more advanced things such as creating animations of a turtle image being flipped.

Productivity Breakthroughs
  1. Taking advantage of Vista from C++
    • MPC applications just need to be recompiled to take advantage of new Vista features such as new common dialog boxes, Aero look and feel, etc.
    • MFC Dialog Designer now supports Vista controls such as split button, syslink button, command button, etc.

The second demonstration was a simple MDI MFC application written in C++ using some of the new Vista controls such as the split button.  All of the new Vista MFC controls are integrated right into to the toolbar.

Connected Applications
  1. Windows Communication Foundation
    • WebServices in general are slower and harder to secure. Wcf solves this by extrapolating the pumping so you just worry about the data, and Wcf works out how it will be delivered and exposed.
  2. Building and Consuming Services
    • Integrated WF with WCF
Synchronized Experiences
  1. Sync Services and the Local Database Cache
    • Visual Studio provides a local database cache wizard that provides a simple SQL Mobile database that can be deployed with the client applications.  There is really no code necessary to get this going.
    • The syncing works through SQL Replication, but the setup of this is done automatically

The third demonstration showed a simple WcfServiceLibrary.  Bill showed the WcfSvcHost.exe and WcfTestClient.exe applications and how they are automatically enabled in some of the Wcf project templates.  He also showed the the Wcf Configuration utility.  The presentation then floated into a discussion about what the Metadata Exchange is in Wcf and how it compares to Wsdl.

The fourth and final demonstration was over the new Sync Services and showed how to create a “sync” file which you can use to link to tables to cache.  The cached data is going to be stored into a SQL Mobile database and this is all packaged up into the client application.

Overall Impressions

The event overall was worth attending and not just for the software.  Most of the sessions were informative and not just marketing slides.  However the speakers were more “hit or miss” and so was some of the content, but there was enough solid content and new ideas in each of the presentations it make it worth the time.  It was painfully obvious that a lot of people at the event were just there for the software.  Every attendee got a licensed physical copy of Windows Server 2008, SQL Server 2008, Visual Studio 2008, and Vista Ultimate with SP1.  That is quite a software package and well worth anyone’s time.  I really wonder how there were open slots in some of the morning sessions.

image_00006 One thing that upset me was that the closed down the vendor booth room well before the first break in the developer track.  Many of the vendors catered to the developer crowd, yet many developers never got a chance to check out the room.  I did hang out at the IndyNDA booth a bit.  However the table was shared by IndyNDA, Windows Users group, and IndyPASS.

I was also a bit upset to hear that Microsoft provided lunch to other Launch events, but not here.  Granted, the lunches aren’t that great, but I would have liked to have seen Indianapolis treated similarly.  Perhaps even to just pass on the savings in the form of food gifts cards like we had at the last MSDN Event.

Visit http://www.heroeshappenhere.com to download the slides and demonstrations that were used in this event and others.

Posted in Community | No Comments »