Microsoft – Expression Web

MS recently released a suite of products under the Expression (Web, Blend, Media, Suite) name. It appears as if this suite of products is to go head-to-head with some of Adobe development tools (Dreamweaver, etc).

Yesterday I installed Expression Web, a Front-Page replacement and Dreamweaver competitor. Not being a fan of front-page I wasn’t holding out much hope for this little app but I must say within 30 minutes of using it I was extremely happy with it.

It’s a simple HTML editor, offering code and design views and aids the designer with a whole host of useful tricks to layout your designs in HTML quickly and standards based.

Using Visual Studio .Net for the last 4 years, I got sick of all the problems associated with using the designer mode for ASPX pages and instead always wrote my UI using declarative syntax (html, aspx).

Expression Web, offers a much improved simple interface for designing HTML/ASPX pages quickly and without any problems. The rendering engine is completely new and no longer the IE Trident engine.

That said, if I’m already working in Visual Studio 2005/Orcas I’m not really going to go open up Expression Web just to do my UI design. It really is meant for teams of developers that have a team dedicated to UI design.

Posted in Development, Uncategorized at June 6th, 2007. No Comments.

Introduction to the power of JSON


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>JSON Example</title>
</head>
<body>
    <form id="form1" >
    <div>
        <p>Hello Spidey!</p>
        <script type="text/javascript">
            var formatAddress = function(address) {
                return address.line1 + "\n" + address.line2 + "\n" + address.town + "\n" + address.country + "\n" + address.postCode;
            }

            var person = {  name: "Peter Parker",
                            addresses : [
                                {line1: "8 Legs Spidey Lane",
                                 line2: null,
                                 postCode: "8888",
                                 town: "Spiderville",
                                 country: "USA",
                                 toString: function() { return formatAddress(this)}
                                }
                                 ,
                                {line1: "1 Hulksux Avenue",
                                 line2: "Flat B",
                                 postCode: "666",
                                 town: "GreenGiants",
                                 country: "USA",
                                 toString: function() { return formatAddress(this)}
                                }
                            ]
                         };

            alert(person.name);
            for(var i=0; i < person.addresses.length; i++) {
                alert(person.addresses[i].toString());
            }

        </script>

    </div>
    </form>
</body>
</html>

Posted in Uncategorized at April 25th, 2007. No Comments.

Why Microsoft Wins…

Check out this article explaining some of the advantages of using a MS development options…

Posted in Uncategorized at April 25th, 2007. No Comments.

Source Control – Scenarios for Branching

I have come across many projects where source control versioning has not been utilized properly for maintaining multiple versions of the project – eg. development, system test, uat, production, and customer specific versions.

I think this is mainly down to the fact that source configuration management isn’t really taught as a university topic/subject and everyone’s first exposure to a SC system is their first multi-person project, usually on the job.

It also doesn’t help that a lot of dev projects, especially MS tech projects, use VSS 6.0 – a crippling source control system which limits the options available – trying to use the sharing/branching/pinning features of VSS is a nightmare.

Thankfully other quality solutions exist to help easy the pains of antiquated source control systems like CVS and VSS.

VSTF and Subversion are both a big leap ahead of their ancestors and provide very similar functionality to each other. If you’re looking for an open source system, than Subversion is your best bet, however if you’re an MS .Net developer using VS 2005, then you really should be using VS Team Foundation Server (VSTF) and VS Team Suite (VSTS); the integrated solution is fantastic.

Anyways, rambling on and not making much sense here, that said, install VSTF, then connect to it using Team Explorer. Migrate your projects across from VSS 6.0, and learn how to setup your VSTF projects so that you can effectively maintain multiple branches of your source trees at anyone time.

This link is a fantastic tutorial of common scenarios worthy of consideration for your own projects.

Posted in .Net, Development, Uncategorized at April 4th, 2007. 1 Comment.

Mono.Net on the Mac

Check it!

Posted in .Net, Development, Uncategorized at February 16th, 2007. No Comments.

Adding quotes to html attributes in VS 2005

Adding quotes to html attributes with Find and Replace

Not the greatest regex engine but this is what I could manage. It still matches on all attributes even if they are quoted though. If you know how to improve please let me know.

Posted in Development, Uncategorized at February 8th, 2007. No Comments.

Best Visual Studio Shortcut

A work colleague and I were discussing what we thought the best Visual Studio keyboard shortcut was.
The shortcut had to be a VS one and not that of a third party (eg. Resharper).

We came to the conclusion that Alt-Shift-Enter to enter into and out of Full Screen mode took 1st prize.

The shortcut to save – ctrl-s – is pretty handy too, but we decided this was not unique to VS and was more of a windows common-look-and-feel item.

What’s your favourite VS keyboard shortcut?

Posted in .Net, Daily Question, Uncategorized at December 22nd, 2006. 4 Comments.

Using Resharper Reformat Code on aspx pages

Today, I spent some time trying to debug an error I was getting with some of my ASP .Net 2.0 pages.

All of sudden IIS wouldn’t load my pages saying that they did not extend System.Web.UI.Page, when on inspection of the codebehind file I was sure they did.

The problem was that I ran a Resharper 2.0 – Reformat Code (ctrl-alt-f) on my web application with the shorten references item checked. This changed the way in which the page directive worked on the aspx page.

Following is an example that illustrates what the file was originally defined as and what the reformat did to it to cause the application to blow up.

Original syntax


<%@ Page language="c#"
               Codebehind="default.aspx.cs"
               AutoEventWireup="True"
               Inherits="Com.CompanyName.Default"
               EnableSessionState="False"
               EnableViewState="False"%>


  
    Don't use reformat code with shorten references checked.
  
		


Resharper Reformat


Resharper Reformat Code Syntax


<%@ Page language="c#"
        Codebehind="default.aspx.cs"
        AutoEventWireup="True"
        Inherits="Default"
        EnableSessionState="False"
        EnableViewState="False"%>
<%@ Import namespace="System.Web.UI.WebControls"%>
<%@ Import namespace="Com.CompanyName"%>


  
    Don't use reformat code with shorten references checked.
  
				


The reformatted syntax takes the namespace of the Inherits attribute in the Page directive shortening it to “Default” from “Com.CompanyName.Default”. To do this, it has imported the “Com.CompanyName” namespace into the aspx page.

Now because .Net 2.0 defaults non-namespaced elements to the global namespace, the designer file, no longer belongs to the Com.CompanyName namespace however the codebehind page still does.

This causes the conflict throwing the error.

The error message

A trap for young players.

Posted in .Net, Asp.Net, Development, Uncategorized at December 22nd, 2006. 1 Comment.
Quickduck logo