Bookmark and Share

ASP.NET MVC 4 Preview Released

One of the things previewed at the BUILD Day 2 Keynote was ASP.NET MVC 4, and Microsoft wasted no time in releasing a preview for developers to begin using.

I haven’t gone through the preview entirely, but there are a couple of features I should note. First, the default template actually looks good now.

MVC4DefaultTemplate

I’m not a UI designer, and for my custom websites I always feel like it somehow looks rather plain. With this template, I at least feel as though my site doesn’t look dated.

Another really cool feature is bundling and minification. It’s incredibly easy to find yourself dropping in a CSS or JavaScript file and forgetting to link them in the layout file. We tend to expect it to work by convention, and the unwary developer can be caught off-guard when it doesn’t work that way. This is no longer the case. Dropping a CSS or JavaScript file in configurable locations (typically Content or Scripts) causes them to be automatically picked up and minified to preserve bandwidth.

There are many more features such as better support for mobile websites and asynchronous controller methods. Browse the release notes to see what you can expect from ASP.NET MVC 4!

Bookmark and Share

The Windows 8 Developer Ecosystem

Windows 8 brings a style of applications familiar to us using Windows Phone known as Metro. Although Metro Windows Phone apps were built in Silverlight, many predicted the demise of Silverlight since early previews of Windows 8 focused solely on HTML5 support. The keynote of the BUILD conference dispelled this notion by presenting us a full picture of the applications supported in Windows 8.

Windows 8 Platform and Tools

Windows 8 supports applications that run on Windows 7. It also supports the new style of applications even using HTML5 and JavaScript. This will open the doors to developers with skill sets not traditionally associated with the Windows developer. Accessing essential resources such as printers and services is provided over the WinRT APIs. Since the next version of the .NET framework is 4.5, it is likely that these APIs will be provided in assemblies that operate on top of the .NET 4 assemblies.

It’s interesting to note from the diagram that Silverlight is listed under supported Desktop apps, but only XAML is used under Metro style Apps. I’m not sure if this means the Silverlight brand is being dropped, Silverlight and WPF are both supported, or if metro XAML apps represent a new technology. I suppose we will discover this as the BUILD conference progresses.

Like the Windows Phone, applications can be distributed by the new Windows Store. This looked very similar to what we already have on create.msdn.com. The site to presumably sell applications in the future and to get info in the present is dev.windows.com.

Windows 8 introduces many terms such as charms. If you want to be able to talk to the talk, take a look at Windows 8 Features and Terminology. I recommend watching the entire keynote of the BUILD conference, but if you don’t have time, Todd Anglin shares the Top 10 Moments from BUILD Day 1 Keynote. Finally, keep up with the sessions through the Channel 9 site.

On another note, I just realized I will have 100 hours of videos to watch by the end of the week. Good luck!

Bookmark and Share

The HP Slate 500

 

It’s about time. I’ve enjoyed showing off my laptop that transforms into a tablet, but the keyboard and hard drive add a considerable amount of bulk. This isn’t really for coders, but it’s another device we must take into account when building software interfaces. This is also another reason to build distributed systems: tablets don’t have the processing power of desktops. Keep the business processes on a server and keep the GUI / presentation logic (plus logic that must operate in a disconnected fashion) in the client distributable.

Bookmark and Share

Major Drops for Windows Phone 7 and XNA

Microsoft has release all kinds of goodies today if you’re into Windows Phone 7 and XNA.

The RTM of the Windows Phone 7 developer tools is finally available! There’s a bit of a disconnect in the name: the docs say it’s the RTM, the site says it’s the RTW. I’ve never used the RTW acronym, so I’ll go with RTM. There appear to be a lot of changes between this release and the previous release. Be sure to read the release notes if you’ve been on the bleeding edge.

Luckily, the training kit has been updated along with the tools. I’ll check it out later to see if it has any new goodies to write about. If you’re just getting started with Windows Phone 7 or XNA for WP7, you will learn a lot just by using this kit.

If you want to make money with Windows Phone 7 but are afraid people won’t pay for it up front, you could always integrate advertising with the Microsoft Advertising SDK for Windows Phone 7. It uses Microsoft’s mobile Ad Exchange, which uses bidding type system. Most important to me, it has reporting features through Microsoft pubCenter.

And the grand finale: Microsoft XNA Game Studio 4.0. The real thing, not just for the phone.

Bookmark and Share

New Release of Pex and Code Contracts

Microsoft Research has released new versions of Pex and Code Contracts. You are required to go to DevLabs to download the commercial evaluation of Pex and Code Contracts. You can retrieve the academic version of Pex and Code Contracts from Microsoft Research.

Pex

Pex v0.21.50115.2 has a few bug fixes in it, but there is a major change to the Stubs framework. It has been renamed to Moles framework. ‘Stubs’ is now named ‘Moles’ and ‘Beaver’ is now named ‘Behaved’. Due to this change, any existing .stubx files will no longer work. Here are the steps to migrate from the previous version of Pex (from the release notes):

  • change the project reference from Microsoft.Stubs.Framework.dll to Microsoft.Moles.Framework.dll
  • rename all .stubx files to .moles, and
    • rename the top <Stubs xml element to <Moles.
    • Change the XSD namespace to http://schemas.microsoft.com/moles/2010/
    • Right click on the .moles file in the Solution Explorer and change the Custom Tool Name to ‘MolesGenerator’.
    • Delete all the nested files under the .moles files
  • Remove references to any compiled .Stubs.dll files in your project
  • In general, remove all .Stubs.dll, .Stubs.xml files from your projects.
  • Rename .Stubs namespace suffixes to .Moles.
  • replace all [HostType(“Pex”)] attribute with [HostType(“Moles”)]
  • in PexAssemblyInfo.cs,
    • rename using Microsoft.Pex.Framework.Stubs to Microsoft.Pex.Framework.Moles
    • rename [assembly: PexChooseAsStubFallbackBehavior] to [assembly: PexChooseAsBehavedCurrentBehavior]
    • rename [assembly: PexChooseAsStubFallbackBehavior] to [assembly: PexChooseAsMoleCurrentBehavior]
  • In general, the ‘Fallback’ prefix has been dropped in the following methods:
    • rename FallbackAsNotImplemented() to BehaveAsNotImplemented()
    • rename class MoleFallbackBehavior to MoleBehaviors
    • rename class StubFallbackBehavior to BehavedBehavors

    Code Contracts

    Code Contracts 1.2.30118.5 is a quick bug fix to address issues with last week’s release. I’m kind of curious about this one fix: “Auto-properties containing && ||, or ? should now be handled properly.” How does an auto-property get one of those symbols… obfuscation?

    Last week’s released dropped support for Silverlight 2 and adds it for Silverlight 4. A new set of reference assemblies have been added to allow contracts on newer APIs. The issues with referencing v3.5 assemblies with contracts from v4 projects are now corrected.

    An interesting development is the ability to use auto properties with contracts. Using invariants, which now must be private, on an automatic property are assigned to pre and post conditions of the compiler generated getter and setter methods (which was the reason for the quick bug fix).

    Bookmark and Share

    Visual Studio 2010 Beta 1 Available Today

    Mike Ormond has announced that Visual Studio Beta 1 (including .NET Fx 4.0)  will be available to MSDN subscribers later today.

    He also posted a few screenshots. I admit that I'm somewhat saddened by the removal of the triangles.

    Bookmark and Share

    Visual Studio 2010 UI Revealed

    Jason Zander has revealed the new UI for Visual Studio 2010.

    Here are some of the features of the improved IDE:

    • Reduced clutter and visual complexity by removing excessive lines and gradients in the UX and modernized the interface by removing outdated 3D bevels
    • Placed focus on content areas by opening negative space between windows and drawing attention to the current focus with a dominant accent color and a distinctive background
    • Added an inviting new palette to make VS 2010 more distinctive
    • Triangle glyphs in the margin are used to collapse or expand your code blocks
    • Collapsed sections of code are marked with an empty triangle (pointing straight) as well as a set of ellipses
    • Colors on the margin indicate edits that have been made
    • New Project dialog has updated to include online template viewing, a search box, and easier navigation
    • New Extensions Manager to improve searching and installing VS extensions

    It's looking pretty good. I can't wait for a new ctp or beta release to update The Future of Managed Code presentation.

    Bookmark and Share

    Parity Between Languages

    The next versions of C# and VB will have improved parity between them. From the consultant perspective, this is important because one can't always choose which language to use. Although a seasoned C# developer can program in VB as well, it seems that gotchas appear and you have to refer to the documentation to figure out how do something that you wouldn't even need to think about in your primary language.

    The goal of the Visual Studio Managed Languages team is to maintain the character of each language while introducing the same new features to both. In keeping with this spirit, they've introduced features from one language to the other while maintaining the target language's style and feel.

    New C# Parity with VB

    Late Binding - Although the new dynamic type isn't the same as late binding in VB.NET, it is similar in many respects.

    Named and Optional Parameters - No longer will you need to chain tons of overloads. VB developers have mocked us C# developers a while about this. It also cuts down on the number of parameters you have to pass to COM method calls.

    New VB Parity with C#

    Auto-implemented properties - These are idential to C#'s auto-implemented properties in that the compiler will create a backing private member for you. However, VB does not get read-only or write-only auto-implemented properties.

    Collection Initiliazers - No more have to call List.Add(...) over and over.

    Array Literals - The compiler will now figure out what kind of array it is based on the types used to initialize it. 

    Multiline Lambdas - The compiler accomplishes this by figuring out the widest type returned from the multiline function.

    Implicit Line Continuation - C# has implicit line continuation for everything, since line termination is denoted by a semicolon or the ending of a block of code (curly braces). VB, in contrast, implicitly terminates lines and oftentime requires a line continuation character (underscore). The line continuation character is now eliminated for scenarioes where it makes sense that the line should continue. The rules for this are as follows: after an attribute, after a comma, after a dot, after a binary operator, after a LINQ query clause, after a parenthesis, after a curly brace, and after a <%= or %>.

    New features added to both

    Generic Variance - Remember the question about assigning a list of strings to a list of objects? Well, you still can't do that due to type safety. However, sometimes the generic only goes out. Conversely, sometimes it only goes in. You will soon be able to declare your generics that way, and it will allow things like an IEnumerable<string> to be assigned to IEnumerable<object>.

    Compiling without Interop Assemblies - It used to be that a primary interop assembly (PIA) had to be distributed as another artifact with your application. This is terrible when you're using a small subset of the functionality: it could dramatically increase the size of your distributable. Worse still, it is possible to run into a dll hell situation with different versions of the pia. In .NET 4.0, you can have it compile the piece of the primary interop assembly used by your application into the executable, greatly reducing distributable size and versioning issues.

     

    Most of these features are demonstrable in the Visual Studio 2010 CTP; with the exception of in and out generics. These features appear to be very useful and stable. Although CTPs are subject to change, I suspect these features will make it to the final release.

    Bookmark and Share

    Announcing Windows Azure

    I just learned that Windows Azure has been announced, presumably at PDC 2008. It's brand new, so visit the site to learn more and download the ctp.

    Windows Azure is a cloud services operating system that serves as the development, service hosting, and service management environment for the Azure Services Platform. Windows Azure provides developers with on-demand compute and storage to host and manage web applications on the internet through Microsoft data centers.

    Between this and Live Mesh, I feel as though we're in the middle of a huge paradigm shift.

    Bookmark and Share

    Expression Blend 2 SP1 Preview Released

    The Expression Blend team announced the released of of Service Pack 1 for Expression Blend 2 today. Here are the details for this release.

    This Service Pack provides you with all of the functionality you had with our earlier Expression Blend 2.5 June 2008 Preview. Besides allowing you to create new projects for WPF, Silverlight 1, and Silverlight 2 RC, we are also exposing new platform functionality like Font Embedding / Subsetting for Silverlight 2 projects.

    You can download the service pack here.

    KodefuGuru.GetInfo()

    Chris Eargle
    LinkedIn Twitter Technorati Facebook

    Chris Eargle
    Telerik Developer Evangelist, C# MVP

    JustCode

    Telerik .NET Ninja

     

    INETA Community Speakers Program

     

    MVP - Visual C#

     

    Friend of RedGate

    World Map

    Tag cloud

    Month List

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

    © Copyright 2010
    Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way.