You are browsing the archive for 2010 April.

Ninject vs. MEF for ASP.NET MVC Apps

April 23, 2010 in ASP.NET MVC

This week I have been looking at using a dependency injection container for an MVC 2 application.  Since I am using .NET Framework 4 with Managed Extensibility Framework (MEF) built in, it is one option to consider.  I have also heard good things about Ninject.  So lets do a quick comparison between Ninject and MEF with the simplest of implementations.

Ninject

To start off, I downloaded the .NET Framework 3.5 release of Ninject assembly and then reference that as I recompile the Ninject.Web.MVC assembly for .NET 4. Then I created a new ASP.NET MVC 2 project and reference those assemblies:

image

Next I modified the MvcApplication class in Global.asax.cs to inherit from NinjectHttpApplication and use the OnApplicationStarted and CreateKernal overrides to wire Ninject


public class MvcApplication : NinjectHttpApplication
{
    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            "Default", // Route name
            "{controller}/{action}/{id}", // URL with parameters
            new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
        );

    }

    protected override void OnApplicationStarted()
    {
        AreaRegistration.RegisterAllAreas();
        RegisterRoutes(RouteTable.Routes);

        RegisterAllControllersIn(Assembly.GetExecutingAssembly());
    }

    protected override IKernel CreateKernel()
    {
        var modules = new INinjectModule[]
            {
                new WebModule()
            };

        return new StandardKernel(modules);
    }

 

To associate an interface to an implementation, I create a WebModule class that inherits from NinjectModule:

Read the rest of this entry →

Dell’s Flash, Thunder & Lightning: What do the buttons reveal?

April 22, 2010 in Design, Windows Phone 7

In a previous post, The 3 Buttons of Windows Phone 7 Series, I talked about the 3 required buttons at the bottom of every Windows Phone 7 device: Back, Windows, and Search.

image

Now there are rumor leaks of new Dell phones: Flash, Thunder & Lightning. But what do their buttons reveal?

According to Engadget and pocketnow.com, the Dell Flash will run the Android Froyo OS. The posted image shows 3 buttons that might be similar in functionality to the 3 Windows Phone 7 buttons:

image

Another phone leaked to run the Android OS is the Thunder and its buttons match the icons on the Flash:

image

The Lightning icons more closely match what you might expect on a Windows Phone 7 namely the Windows button and the Search button:

image

It is interesting that the 2 Android phones have 3-button designs. The first appears to be a Back button and the second a Home button. On the Windows Phone 7, the third button is Search which will bring up Bing. The Android phones’ third button appears to be a Menu button although some could argue that it represents search results.

Why has Dell chosen to have 3-button designs on phones for two different operating systems that mostly do the same thing?  I wonder how Microsoft feels about this dual usage of the 3-button design?

Quince Pro Quick Start

April 16, 2010 in Design, Quince

To get started using Quince Pro and share a private library with another user, follow these steps:

  1. Create an Infragistics login
  2. Launch Quince
  3. Sign up for a trial Pro subscription
  4. Create a library
  5. Share the library

 

Create an Infragistics Login

Go to the Infragistics New Member Sign Up page and create an account.  If you already have an Infragistics account, you can use it.

image

Launch Quince

Go to the Quince site at: http://quince.infragistics.com/

 image

Sign in with your Infragistics account.

Read the rest of this entry →

What is Quince Pro?

April 16, 2010 in Design, Quince

From the Infragistics site:

Quince Pro™ is a private, secure and organized way to collaborate, communicate and cultivate private UX design libraries to ensure consistent user experiences across teams, departments and companies.

First there was Quince, a free, interactive UI patterns and practices catalog.  Quince is still available, but now Quince Pro is available and allows companies to create private collections of their own UX patterns.

This video gives a quick 3 minute overview of the challenges that Quince Pro solves:

  Read the rest of this entry →