Day 3 - Windows Azure Platform - Fabric Controller

by Kev Ritchie 3. December 2010 00:01

 

WAP

On the third day of Windows Azure Platform Christmas my true love gave to me the Fabric Controller.

And I’m quite glad she did, as this is one the most fundamental aspects of Windows Azure.

I briefly mentioned on day one about the Fabric Controller and one of the main functions that it provides (Virtual Machine/Role scaling). Today I’ll expand a little on that.

What is the Fabric Controller?

The Fabric Controller is a new innovative technology that acts on-demand and is, in many ways the brain of Windows Azure. It controls, maintains, allocates resources…well to cut it short, it looks after your Azure application and environment for you. That’s not to say it will make a badly written application better Winking smile

So, expanding on Virtual Machine scaling, let’s say for instance, when you deploy your application to Windows Azure, you specify that you want a single Web Role, the Fabric Controller spins that Virtual Machine (VM) up for you, nice Smile Now the magic, imagine that you have a web application; let’s say an e-Commerce site, and it handles quite a large user base everyday. If the application or the server the application was on happened to fail or throw an unhandled error, it could be quite costly. Well, with the Fabric Controller, if it notices that your application (Web Role) has failed, it will spin up another VM to maintain the total number of instances required for your application; seamlessly. Nicer! Smile

One of the other features I really love about the Fabric Controller is its ability to maintain, upgrade and patch the environment (VM) in which your application runs. No more tedious administration tasks!

With just these little snippets I’ve given you, you can really see why Windows Azure is the perfect PaaS (Platform as a Service).

Tomorrow’s installment: CDN (Content Delivery Network)

P.S. If you have any questions, corrections or suggestions to make please let me know.

Reflection and Non-Public Properties

by Kev Ritchie 23. November 2010 11:34

Ever wondered how to get to those Non-Public properties of an object?

With Reflection, here’s how you do it:

object propertyValue = anyObject.GetType().GetProperty("TheProperty", 
BindingFlags.Instance | BindingFlags.NonPublic).GetValue(anyObject, null);

All you need to do is replace “anyObject” with the name of object you are trying to get the Non-Public property from, then change “TheProperty” to the name of the Non-Public property you are trying to access.

A little explanation.

When we call the GetProperty method on a type, we supply some parameters to search the associated object with.

Our first parameter is the name of the property that we’re looking for.  The second parameter; BindingFlags, is a bitmask comprised of one or more BindingFlags that specify how the search is conducted; in really basic terms, a filter.  In the example above, we are specifying a Binding Flag of Instance, this must be specified in order to get a return from the search.  We are then using an “Or” operator to tell the search that we want to include Non-Public properties.

The GetValue method is then called to return the value of the property you were looking for.

Hope this is of some use to someone and if anything else will be a little reminder to myself in case I forget Winking smile

jQuery Festivities…yes it’s nearly Christmas!

by Kev Ritchie 18. November 2010 13:39

After reading The Beebs post on how to create a jQuery rollover like the one on Dribbble.com.  It got me thinking about how this or other effects could be used to create an Advent Calendar.

The animate function has been in the jQuery library for a while now (v1.0 I think, correct me if I’m wrong), but I thought that even though it’s not a new function of jQuery, it’s exactly what I need to achieve my goal…a door sliding effect.

Click here for a demo

If you want to replicate it, here are a few steps to help:

1. Add a reference to the jQuery library:

<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.4.min.js" language="javascript"
        type="text/javascript"></script>

2. Next write a little HTML mark-up to build each of the calendar doors:

<div class="day">
    <div class="overlay">
        <img src="bells25.jpg" />
        <h2>1</h2>
    </div>
    <img class="image" src="1.jpg" />
</div>

3. And now for some styling.  Or in my case an attempt Smile

<style>
        .day
        {
            position: relative;
            border: solid 2px black;
            width: 150px;
            height: 150px;
            display: inline-block;
            overflow: hidden;
            margin: 5px;
        }
        
        .overlay
        {
            font-size: 2.0em;
            text-align: center;
            width: 150px;
            height: 150px;
            background-color: #ffffff;
            /*  Setting the position to absolute here keeps the image and text on top */
            position: absolute;
            z-index: 1;
        }    

        .image
        {
            position: relative;
            width: 150px;
            height: 150px;
        }

        h2
        {
            color: red;
        }
</style>

4. Now for the jQuery magic.  In step 2 we defined our layout using DIVs, each DIV had a class name, these names are important for this step to work.

First we add a jQuery ready function that will fire when the document is ready.  In this function, we immediately start to hook up our methods to create the “sliding door” effect.  We search the document for a DIV called .day and attach a hover function to it.  We then search that DIV for another DIV called .overlay.  When this element is found, we add the animation using the animate function.

We use two animate methods.  One to change the position of the overlay to the day DIV width and the second to set it back.

<script>

    $(document).ready(function() {

        $('.day').hover(function(){
        
        /* Get the day div width */
        var width = $(this).outerWidth();
        
        /* Change the position of the overlay to the day div width with an animation effect */
        $(this).find('.overlay').animate({ right : width },
                {queue:false,duration:300});
    }, function() {
        /* When the mouse is no longer hovering over the div set the position back. */
        $(this).find('.overlay').animate({ right : '0px' },
                {queue:false,duration:300});
        });

        /* queue:false = start the animation immediately, it won't wait for the previous 
animation to stop */
        /* duration:300 = how long the animation will take to finish in this case 0.3 
seconds. */
    });
    
</script>

Try the demo above.  Feel free to add to it criticise it, let me know how you get on!

MS Access vs. Visual Studio LightSwitch

by Kev Ritchie 14. November 2010 11:59

On 3rd August at VSLive! 2010 in Redmond; Corporate Vice President of Visual Studio, Jason Zander, unveiled Visual Studio LightSwitch.

Yes, it’s taken this long for me to get around to writing about it.

What is LightSwitch?  LightSwitch is a member of the Visual Studio family targeted at developers who need to rapidly build LOB (Line of Business) Applications.

What relevance does this have to Access?

Well, recently a colleague of mine was asked to look into LightSwitch as an alternative to building database applications using Access.  Yes, there are still applications in use today that use Access!  So, I thought I’d take this opportunity to find out if LightSwitch really is; what has been seen by some developers, as a replacement for Access.

It seems that even though Access was developed as a package to help business end users store, report on and share business data with other business end users, the Access package has been leveraged by developers to create what you could class as LOB applications.

This brings to light a common issue with this type of development. Whilst this method of application development fits personal or small business usage, scalability of the application is limited.  As a business grows the reliance on the application grows and with it the data.  It wouldn’t be long before you had to compress and archive off the data, to allow for further storage.

Oh, and let’s not forget, have you ever seen a nice looking Access application UI? J  If you have or have created one, then I apologise.

To overcome the issues of using Access as a platform for developing business applications, I believe, is where LightSwitch comes in.

I fully understand that at first glance, LightSwitch seems to be a glorified version of Access with a Visual Studio IDE.  But look closer!  You are getting so much more.  Here are a few that I thought were worth mentioning:

Out-of-the-box you get a classic three tier architecture built on top of .NET (WCF, RIA Services and Entities), ASP.NET and Silverlight. Nice!

Microsoft are also working with Partners, like Infragistics, to develop Shell and Theme components that developers can install to dramatically change the look and feel of their application at the click of a button.  If you’re rubbish at UI design like me, this is a brilliant addition.

You also have the ability to connect to data sources such as SQL Server and SharePoint.  But Access 2010 can do that as well, so why was it worth mentioning?  Well, really to highlight the point that the major difference between the two packages is that LightSwitch is capable of connecting to the Cloud (Windows Azure and SQL Azure Platform) albeit Post beta.  Ah, scalability!

So, is LightSwitch a replacement for Access?

In my honest opinion, LightSwitch is not a replacement for Access.

LightSwitch is a product that gives developers the tools to provide feature-rich and scalable business applications that can be deployed to multiple platforms.

Access is a product that; as I mentioned before, is for allowing business end users to store, report on and share business data.  It was never intended to be a platform to build business applications.

Now that LightSwitch is here, the weight of being a business application can be taken off of Access’s shoulders!

The lines are clearly defined between these two products and both are here to stay.

For more information on LightSwitch and the Keynote from VSLive! head over to http://www.microsoft.com/visualstudio/en-us/lightswitch. You won’t be disappointed.

Windows Phone 7–And the winner is…

by Kev Ritchie 13. November 2010 10:19

…Me!! Open-mouthed smile

http://ubelly.com/2010/11/the-winner-of-the-techin8-wp7-competition-is/

Thanks to all the guys and gals at ubelly.com

Powered by BlogEngine.NET 2.5.0.6
Theme by Mads Kristensen | Modified by Mooglegiant