Thursday, 7 May 2009

ASP.NET Core Tips

There is so much to .NET it hard to know what to keep it in your brain and to know what to let go, its sometimes such an issue for me I end up replacing everyday memories with those of .NET. As soon as I can remember how to walk instead of creating generic types I will move away from this computer!

A good way of keep your brain free is to use reference cards, and even though these tend to be on the simple side we can all do with a little pointer now-and-again.  The guys over at RefCardz have seen this need and produced a free core ASP.NET reference card to download now.

The only downside is you have to print it, but never mind.

More info @ http://refcardz.dzone.com/refcardz/core-aspnet

DDD South West Agenda

For all of you who are attending DDD South West on 23rd May 2009, the agenda has just been released and its a fine piece of work.

You will find topics on Silverlight, XNA, AZURE, MVC and many more so go to www.dddsouthwest.com and have a look at the agenda and start planning your day.

What is DDD South West?

DDD South West is a free one day technical event for developers. It is a day of learning, discussing, contributing and being part of the community in the South West. Our goal is to provide free technical education, the opportunity to mix with peers and to make and develop relationships in the .NET industry.

By The Community, For The Community

http://www.dddsouthwest.com

Tuesday, 5 May 2009

IE8 Competition

The IE8 team are running a little competition, and in Mike Ormond’s own words “Fame and Fortune await for those who play with IE8”.

You can find the official terms and conditions here, but a brief synopsis on what’s required....

All you have to do is create an original accelerator, web slice or visual search provider for Internet Explorer 8. They’re incredibly easy to write and within no time at all you could have produced a winning entry. There are lots of resources available to help you on your way:

The criteria on which entries will be judged (eg innovative use of technology) are included in the terms and conditions.

The prize is for a brand spanking new Xbox360 elite no less!

For further details on how to enter, please visit Mike Ormond’s blog where you can find a whole lot more information

http://blogs.msdn.com/mikeormond/archive/2009/04/28/fame-and-fortune-await-for-those-who-play-with-ie8.aspx

The competition is open to all. The closing date is the Friday 29th May 2009.

Thursday, 9 April 2009

DDD South West – Vote for your favourite session

The sessions for DDD South West have already been selected but we need your votes to help us to select the best rooms for the sessions to try to ensure that the most popular sessions can be seen by all.

To vote for your favourites click here.

Remember DDD South West is happening Saturday 23rd May, if you have not registered yet there are still some spaces left but do not leave it too long to avoid disappointment.  Remember there can be only one first time.

Hope to see you there.

DDDSouthWestBadgeMedium

Tuesday, 3 March 2009

DDD South West Registration Is Open!

Go! Quickly! Stop reading this and register now! Registration for DDD South West is now open. Be able to tell your grandchildren that you were there at the very beginning. Remember, there can be only one first time.

DDD South West is a free one day technical event on Saturday 23rd May 2009 at Queens College, Taunton with 13 top speakers providing 19 technical presentations.

Code Contract For .NET

Developing a framework can be hard as there is alot to think about, like a user interface you need to think of the different ways it may be used and only expose those methods which make sense to be called and because most people will never read you documentation (and why should they) you make sure that each public method is named correctly. 

As we all know those framework methods form a contracts between you and the consumer as to how the framework will be used, the consumer is obliged to supply certain details and the framework is required to return certain details.

I find creating frameworks interesting, this is mainly because I have never been a great interface designer, and I also find it easier as there are a finite set of rules for how to create them, all around me in .NET I can just emulate the same structure (I see how Microsoft have done it and I copy it).

Even though the creation of frameworks removes the need to understand how to lay text boxed on a web page or form you still need to do almost as much validation, you need to make sure that the values supplied to the methods are correct, when the are not you need to throw exceptions which can be caught or the alternative is you do not worry what is supplied, but surly no one does that! 

This is how we currently validate the input and sometimes the output of our framework methods and we just hope that the code calling us also validates our data.

Like all issues us developers have come across and found a way to deal with a small team in Microsoft have said ‘we can do better’ and when it comes to the issue of method contracts (validation of data in and out) they have done exactly that with the creation of the ‘Code Contracts for .NET’.

The code contracts framework is implemented through static classes which can define pre and post conditions for any method call, you own, and once implemented the compiler will come into play to warn you of code which breaks these conditions and at runtime the exception handling processes do the same.

For me to repeat the exact details of how this work and how to implement it would be foolish so to read a better explanation by Soma (Corporate VP of Microsoft''s Developer Division) go to his blog.

Or watch the Chanel 9 video here

Thursday, 26 February 2009

The .NET Developer Network – March 2009

When: Monday 9th March 2009, doors open 6:00pm, meeting starts 6:30pm

Where: UWE (University of the West of England), Frenchay, Bristol (see FAQ for directions and a map) - Room 2q49 (in Q block)

What: Windows Azure And SQL Data Services (SDS)

Who: Eric Nelson, Microsoft Developer Evangelist.

Why: Because Eric is Captain Database. It's what he does and he's very good at it. Also because SQL Data Services offers a world of potential that may be a life saver to your applications. Also also because Eric is very easy to listen to and he lives up to the very high bar set by all Microsoft UK Developer Evangelists.

How do I sign up for this meeting: Send an email to meetings at dotnetdevnet.com and quote your user name and the March meeting.

Abstract:
The Azure™ Services Platform is an internet-scale cloud computing and services platform hosted in Microsoft data centers. The Azure Services Platform provides a range of functionality to build applications that span from consumer web to enterprise scenarios and includes a cloud operating system (Windows Azure) and a set of developer services, including SQL Data Services (SDS).  Both Windows Azure and SQL Data Services provide data storage capabilities, the latter offering highly scalable and Internet-facing distributed database services in the cloud for storing and processing relational queries built on robust SQL Server technologies. This session will introduce the Azure Service Platform, discuss how to take advantage of it in your own applications and drill into the two storage options.

Bio:

After many years of developing on UNIX/RDBMS (and being able to get mortgages) Eric joined Microsoft in 1996 as a Technical Evangelist (and stopped being able to get mortgages due to his new 'unusual job title' in the words of his bank manager). He has spent most of his time working with ISVs to help them architect solutions which make use of the latest Microsoft technologies - from the beta of ASP 1.0 through to ASP.NET, from MTS to WCF/WF and from the beta of SQL Server 6.5 through to SQL Server 2008. Along the way he has met lots of smart and fun developers - and been completely stumped by many of their questions! In July 2008 he switched role from an Application Architect to a Developer Evangelist in the Developer and Platform Group. Currently Eric’s interests include digging into LINQ to Entities, ADO.NET Data Services and switching from C# to Visual Basic development. At home, he battles rat infestations, comes second to the family dog and uses any spare moments he has after 10pm to team up and play online with and against friends - keep an eye out for 'erknel' and say 'hi'.

Thursday, 19 February 2009

Bespin From Mozilla Labs

At the moment everything is moving into the cloud and I am still having a hard time seeing how this will all work or why I would do such a thing especially since I have spent so many years keeping everything firmly on the ground. 

Recently I came across a project called Bespin developed by the Moxilla guys, the same group of people who gave birth to FireFox, the aim of the project is to take application development into the cloud at first I was sceptical thinking of all those nasty HTML editors you get on some web sites but once I looked at their interface it was quickly apparent that this was the kind of IDE I would expect from a desktop application;

webkit-editor-medium

The aim of the project is not only to allow you to develop applications in the cloud but to also use the openness of the web to increase collaboration through an amazing process of collaborative desktops in the web browser!!

I have not had chance to use this new web application but have a look at their video on the home page and I think you will agree that these guys are doing some very interesting things with you web browser.

To see the detailed information go to http://labs.mozilla.com/2009/02/introducing-bespin/

Tuesday, 27 January 2009

DDD South West – Saturday 23rd May 2009

Are you a .NET Developer in the South West of the UK?

Do you want to attend a FREE one day event, covering all that is new and great in .NET?

The DeveloperDeveloperDeveloper (DDD) South West meeting is where you need to be, this event is held on a Saturday so you do not need to worry about taking time from your busy work schedule to attend.  For those of you who know the DDD events, which happen in Reading yearly, this event will follow the same high standards for speakers and topics covered. 

As we are aware that the South West has lacked this kind of event for a very long time we will be holding the event in Taunton at the Queens College.

The exact agenda for the day is still being finalised but rest assured as soon as it is you will know well in advance, to show you how we have organised ourselves our timeline for the run up to the meeting is as follows;

  • Tuesday 27th January - Website goes public, Call For New Speakers opens
  • Tuesday 3rd March - Registration goes live
  • Tuesday 31st March - Call For New Speakers closes
  • Tuesday 7th April - Vote for favourite sessions opens
  • Thursday 30th April - Vote for favourite sessions closes
  • Saturday 23rd May – DDD South West

To stay in touch with the latest news about the event or find more information about the venue and the team running it please visit the official website @ http://www.dddsouthwest.com

Tuesday, 13 January 2009

Web Client Software Factory (WCSF) Event Broker

To get the EventBroker to work with version 2.0 of the Web Client Software Factory read this blog.

Although the code change in the above blog entry allows the Event Broker to work you may still come across some problems, the one I recently encountered was related to generic method overloads.

Before generics you could not overload a method without changing its signature, but with generics you can alter the method signature with a type T return for example;

string Get(sting value1)

overload to;

T Get<T>(sting value1)

Now to the compiler the two methods are different, however when you use reflection to find methods and you use the Type.GetMethod, supplying the method name ‘Get’ with the correct types you will receive a ‘System.Reflection.AmbiguousMatchException’ exception. You receive this exception because to find the generic method you supply ‘Get’ and not ‘Get<T>’ which is also how you return the non-generic ‘Get’ method.

Due to the issue above when the Event Broker runs its sanity check by reflecting all your method the ‘System.Reflection.AmbiguousMatchException’ exception is raised when you have a generic overload to overcome this replace;

EventBrokerSanityCheck.cs, ln 147

interfaceInfo = @interface.GetMethod(subscribingMethodInfo.Name, types.ToArray());

With;

MethodInfo interfaceInfo=null;
try
{
    interfaceInfo = @interface.GetMethod(subscribingMethodInfo.Name, types.ToArray());
}
catch (System.Reflection.AmbiguousMatchException)
{
    //Bug fix for generic overloads
    interfaceInfo = @interface.GetMethods().Where(w =>
            w.Name == subscribingMethodInfo.Name
            && w.IsGenericMethod == subscribingMethodInfo.IsGenericMethod).First<MethodInfo>();

    ParameterInfo[] parametersInterface = interfaceInfo.GetParameters();

    if (types.ToArray().Length == parametersInterface.Length)
    {
        for (int i = 0; i < parameters.Length; i++)
        {
            if (parametersInterface[i].ParameterType != types[i])
            {
                interfaceInfo = null; //clear the interface info as we did not find the method
                break;
            }
        }
    }
    else
    {
        interfaceInfo = null; //clear the interface info as we did not find the method
    }
}

[Disclamer : I give no warranty to the correctness of this solution or that there is not a better way to do it, I just hope I help you out of a hole as it did with me]

Tuesday, 6 January 2009

Patterns & Practices - Pocket Guides

The Patterns & Practices team at Microsoft spend their time looking at the best methodologies to design and build software and as part of this they produce many frameworks to build software with and guidance documents which outline their proposed best approaches to designing certain software.

Some of these guidance documents have been made available in pdf format covering the following architecture topics;

  • Web Applications
  • RIA Clients
  • Services

Each guide gives practical guidance on what you need to consider when creating software for each environment, these should be your first stop when stating the creation of your software.

To download each guide go here

Thursday, 18 December 2008

The .NET Developer Network - January 2009

When: Tuesday 27th January 2009, doors open 6:00pm, meeting starts 6:30pm

Where: UWE (University of the West of England), Frenchay, Bristol (see FAQ for directions and a map) - Room 2q49 (in Q block)

What: Parallel Extensions to the .NET Framework (.NET V4.0)

Who: Mike Taulty, Microsoft Developer Evangelist and absolutely fabulous speaker.

Why: Because all new PCs have more than one processor and this is the future of computing. The problem that we have as developers is that our code is primarily single tasking so the other processors are going to waste. Parallel Extensions is part of the .NET Framework 4.0 and they allow us to make use of additional processors. Also because Mike is quite simply the best presenter on the UK user group circuit and you will be hard pushed to see a better example of how to present all year.

How do I sign up for this meeting: Send an email to meetings at dotnetdevnet.com and quote your user name and the January meeting.

Abstract:

The next version of the .NET Framework will come with new classes that start to chip away at the difficulties in building multi-threaded applications that are well placed to take advantage of the modern multi-core processor architectures and the future many-core architectures that are coming over the next few years. In this session, we'll introduce what that Parallel Extensions are, what they can do for you and take a tour around what's available in the current previews for you to start evaluating.

Bio:

Mike Taulty works in the Developer and Platform Group at Microsoft in the UK where he has spent the past few years helping developers understand and get the best from the Microsoft platform. Prior to this, Mike spent 3 years with Microsoft Consulting Services as a consultant on developer technologies.
Before joining Microsoft, Mike spent the previous 9 years working as a software developer for a number of enterprises, consultancies and software vendors working with a variety of operating system, client, communication and server technologies. Mike holds a BSc Hons (1st Class) in Computer Science from the University of Leeds.

Wednesday, 17 December 2008

Visual Studio Ora

Code navigation and organisation can become an issue in the real world of development, eventually most code files contain a significant number of lines.  Aware of this problem the Visual Studio team gave us regions which work great but only work to hide code in expandable sections.

At the begging of December a new version of Ora was released, Ora is a Visual Studio 2008 add-in which solves the problems of code navigation (I know I am using it).

With the add in running you are presented with an grouped overview of your classes, whith methods and properties organised by interfaces, scope etc.  The tool removes the need to encase your code in regions and makes the issue of navigating code files so much easier.

To download the source or binaries please visit the codeplex : http://www.codeplex.com/ora

orascreenshot.png

As good as a tool like this is, its no excuse for an unorganised file, please keep this in mind.

Tuesday, 16 December 2008

Visual Studio 2008 Spell Checker

For years I have been so grateful that Word comes with a spell checker, before it arrived I spent alot of time with a dictionary at my side. Although my spelling has greatly improved there are still to odd word I get wrong and these usually show up in my developments, and there is nothing worse than having a client call you up to tell you that your latest release has a spelling mistake (which is usually in a spurious label hidden away).

What we need is a spell checker that knows what to check and what not, well surprisingly there is, the Visual Web Developer Team have created such a spell checker.  The spell checker works only in Visual Studio 2008 SP1 and only for web projects so unfortunately WinDev developers are still out in the cold.

The tool is supports checking of text in the following areas;

  • HTML style comments <-- HTML -->
  • ASP.NET server side comments: <%-- ASP.NET --%>
  • JScript, C# and C++ comments: // C++ style comments
  • CSS and C style comments: /* C style comments */
  • VB and VBScript style comments: 'This is VB comment
  • The spell checker also has an ignore list and works for multiple languages.

    To read the full details and download please visit the Visual Web Developer Team Blog

    Monday, 15 December 2008

    50 CSS Tools

    Smashing Magazine have produced another one of their 50 useful tools posts, this one is concentrated on CSS tools and has a number of useful links. For example there is a tool for formatting text (through CSS) to any shape and a tool which will allow you to test your JavaScript in the browser in real time!

    To see the full list for yourself go to www.smashingmagazine.com

    Thursday, 11 December 2008

    Cheat Sheets

    How often do you need to know the life cycle of an ASP.NET page or you need to know what code snippets are in Visual Studio 2005, for me these kind of things make me head for google in hopes that someone has this information.

    Now you do not need to search google anymore Jon Sheehan has put together all the cheat sheets he has found related to .NET into one place.

    To see the following cheat sheets visit his blog http://john-sheehan.com

    • .NET Format String Quick Reference
    • ASP.NET 2.0 Page Life Cycle & Common Events
    • Visual Studio 2005 Built-in Code Snippets (C#)
    • ASP.NET Page Life Cycle Diagram (PNG)
    • ASP.NET Runtime Cheat Sheet 
    • Microsoft .NET Framework 3.5 Commonly Uses Types and Namespaces (PDF)
    • Visual Studio 2005 Default Keybindings C# | VB (PDF)
    • Visual Studio 2008 Default Keybindings C# | VB
    • Microsoft ASP.NET AJAX Library
    • Microsoft ASP.NET AJAX Client Life Cycle & Events (PDF)
    • LINQ
    • VB.NET/C# Comparison
    • SQL Server
    • HTML Character Entities
    • RGB Hex Color Chart
    • CSS
    • jQuery
    • JavaScript
    • XHTML (PDF)
    • Regular Expressions
    • Microformats

    Wednesday, 10 December 2008

    ASP Chart Control

    Almost every business application needs to support some kind of reporting, regardless of weather the stakeholders realise it.

    Microsoft realise that the ability to view data online is important to us and have just released a new Charting control which can produce charts like this;

    The control is free and Scott Guthrie has all the information in his blog

    Monday, 8 December 2008

    Microsoft Bluprints

    Creating code can be boring! Do not confuse this statement with the fact that enjoy my career immensely and I spend every waking moment reading, learning and doing.  The things that bore me the most is creating the same code over-and-over (boilerplate code), I know how to structure my RIA and my Web Services etc its all taken from best practices and my previous experience.

    To get me past the boring bits I will use software factories, they take the pain away and allow me to concentrate on solving the problems.  The current factory I am using is called "The Web Client Software factory (WCFS)" which uses the Guidance Automation Toolkit to create the wizard interface and hold the code templates for generation. 

    The use of the WCFS is great and really speeds up development and unification in code bases between developers, all I need to do to create another module of functionality is select a special menu option on Visual Studio, follow the wizards, make some decision on name etc and all the boilerplate is done.

    The Guidance Automation framework, on which the WCSF is built, has been around for quite a while however it has not really caught on and not many people use to create this own software factories, in fact this technology has never really hit the main stream even though so many people need a framework to build their own factories in.

    With the release of Blueprints Microsoft hopes to make the software factory work more accessible and replace the Guidance Automation Tool.  Blueprints is a tool for creating and using software factories however this tool seems to be better as it is easier to use by providing a unified environment to run your factories from, the factories can also be accessed from RSS feeds allowing you to always access the latent version.  Also unlike the Guidance Automation Toolkit this tool provides a creation tool already build.

    Blueprints is the next step into software factories so expect to hear alot more about this and code automation in the coming month as we start to become more educated against writing the same code over-and-over and spend more time dealing with the problems and getting though right.

    To read a full description of Microsoft Blueprint go here : http://msdn.microsoft.com/architecture/blueprints

    Download the tool here http://www.codeplex.com/blueprints

    Tuesday, 25 November 2008

    PDC 08 Videos

    Since I first heard about the PDC I have always wanted to go, its the event which Microsoft uses to promote its business and provide developers and architects with information on how the tools they use will evolve.  It is also held in Los Angeles, which is cool, imagine being sent to LA on work time!

    The PDC is not a cheap event and I suspect unless you have a boss who is enlightened to how important this event is and work for a fortune 500 company you are very unlikely to be able to attend, although if you can convince your family to holiday in LA then I am sure its a good way to combine the two!

    However do not fear for those of us with no holiday budget, other than a week in Skegness, and not working for fortune 500 you can still see every session at the PDC just by going to www.microsoftpdc.com.

    I have spent the last couple of weeks listening to the video sessions, while working, and the videos are great most of them include a small picture of the presenter and the slide deck so nothing is loosed in not attending.  The keynotes are the best videos, especially as if you had tried to attend the event yourself you would have had to content with looking over quite a few hundred people to get a glimpse of the stage.

    PDC 08 videos @ www.microsoftpdc.com

    Monday, 24 November 2008

    Windows Vista SP2

    Service pack 2 for Vista started development not long after SP1and contains fixes created since SP1 and new enhancements, these include;

    • Windows Search 4.0 integration
    • Bluetooth 2.1 feature pack
    • Blu-Ray enhancements
    • Windows Connect Now

    Vista SP2 is currently being beta tested by a number of developers but is not publicly available, however roomers suggest that Vista SP2 will be available in the first quarter of next year.