Tuesday, August 12, 2008

Free ASP.Net and Winforms components

Joe Stagner links to a set of 60 free ASP.Net and Winforms controls now available from DevExpress.

Find them here:  http://www.devexpress.com/Products/Free/WebRegistration60/

Busy day for Microsoft...

It’s clearly a busy day for Microsoft today – just looking at the sheer volume of postings on the MSDN blogs should tell you that something’s up. But what?

Well, today is a major release day for the developer devision:

·         Visual Studio 2008 Service Pack  and the NET Framework 3.5 Service Pack 1 have both been released - good article by Somasegar here.

·         ADO.Net Data Services (formerly known as “Project Astoria” was released today too – see the Project Astoria Team Blog.

·         And finally, the Entity Framework has RTM’d as well. Their Team Blog has plenty of info.

Oh and don’t forget that SQL Server 2008 was released a few days ago as well.

Good times!

 

Thursday, August 07, 2008

Microsoft Sync Framework - RELEASED!

I spotted this on Eric Nelson’s blog first (thanks to his twitter feed) – the Microsoft Sync Framework has finally been released!

Why is this good – well, it SHOULD make things much easier when building occasionally connected applications. Now I just need to work out how to connect it to Oracle via my business services layer. Exciting stuff.

Read all about it: http://blogs.msdn.com/ericnel/archive/2008/08/07/microsoft-sync-framework-released.aspx

Get the goods: http://www.microsoft.com/downloads/details.aspx?FamilyId=C88BA2D1-CEF3-4149-B301-9B056E7FB1E6&displaylang=en

 

Tuesday, August 05, 2008

We're hiring!

We’re looking to hire a .Net developer to work on our next-generation product using the latest Microsoft technologies. Here’s the skinny – and if you’re interested, say you heard about the role from here!


Position

.Net Developer reporting to the Development Manager, based in Altrincham, Cheshire.

Candidate Profile

The development department has a flat structure with small teams formed according to the needs of the developments in question. This means that we do not have fixed team leader roles but allocate responsibility based on experience and skills. An ideal candidate must:

  • Be a self motivator with the drive and enthusiasm to take on new challenges
  • Be flexible and adaptable (but disciplined) when approaching tasks
  • Work well within teams and be able to foster good working relationships
  • Be prepared to take total responsibility for the completion of tasks
  • Be a good communicator, (both written and oral) and be confident making presentations on technical subjects to co-workers
  • Be technical rather than man-management oriented

The candidate must have a minimum of 1-2 years demonstrable experience in a commercial environment developing AJAX style ASP.NET web applications in C#. Experience with Silverlight 2.0 and WPF would be a significant advantage.

Role

To work in a team of analyst/programmers, developing and maintaining the in4tek’s next generation software products including work on customer specific portals, web services, integration projects and web applications using leading edge technologies form Microsoft and Oracle.

Approximately 80% of the time will be spent designing and developing new modules, with the remainder allocated to maintaining and enhancing existing software.

Specific activities within the role include:

  • Assisting with the production and review of User Stories and Functional Specifications
  • Working from Functional Specifications to formulate software designs and create Design Specifications
  • Working from Design Specifications to design and develop coded modules
  • Developing and executing Unit Tests to validate code.
  • Analysing and correcting software deficiencies and coding faults
  • Peer review of specifications, designs and code.

Personal development with the aim of obtaining Microsoft Certification will be encouraged.

Skills/Experience

KEY: R = required, D = desirable

Skill/Experience

Degree level qualification in IT or Business related subject

R

At least 1-2 years commercial .Net experience in C#

R

Demonstrable experience of ASP.Net 2.0/3.5 with AJAX

R

Experience of structured methodologies for software design and UML.

D

Experience of Agile methodologies of Software development

D

Experience of developing within a n-tier architecture

D

Experience of the design of n-tier architectures

D

Commercial Oracle and PL/SQL development experience (or equivalent SQL Server)

D

Database design experience (structure, relationships and triggers)

D

Experience of working to ISO9000 / TickIT standards

D

Knowledge of XML and its use in specifying and implementing software interfaces

D

Experience of Silverlight 2.0 and WPF

D

30 Essential PDF Documents

Rob Caron links to an excellent entry on the positivespace Graphic Design blog that gives “30 (actually more) Essential PDF Documents Every Designer Should Download”.

That’s bedtime reading sorted: http://www.positivespaceblog.com/archives/pdf-documents-designer/

How often do you check in?

Eugene Zakhareyev has an interesting commentary today on how often developers check their code into source control, and the control gates that some organisations can use to ensure quality of the checked in code.

Read it now or else: http://teamfoundation.blogspot.com/2008/08/check-in-your-stuff-now-or-else.html

 

Monday, August 04, 2008

Fun with dragging panels (a.k.a. Silverlight goodness)

Martin Grayson has started blogging about the silverlight controls that the MS CUI team developed for the Patient Journey Demonstrator.

This is really good news, because it gives us an insight into how some of the most compelling UI in the market has been developed (and a leg-up on doing it ourselves).

Silverlight goodness here: http://blogs.msdn.com/mgrayson/archive/2008/08/01/silverlight-2-samples-dragging-docking-expanding-panels-part-1.aspx

 

 

Friday, August 01, 2008

Thursday, July 31, 2008

Mike Taulty's been playing with Silverlight... Again.

More goodness from Mike Taulty - connecting Silverlight 2 (beta) to ASMX services.

Why is this important? Because it gives us a VERY quick and easy way of providing data to Silverlight from its hosting website.

One to remember for the (near) future.

Read about it: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/07/31/10659.aspx

The definition of "Done"...

Raymond Lewallen has posted an interesting piece on the definition of "Done" (aka complete, finished, good-enough-lets-just-ship-the-thing-and-worry-about-bugs-later) in terms of Agile and Lean methodologies, and in terms of the value "Done" brings to a company.

One point I agree with wholeheartedly is this:

As the people who write software, we might not always be aware of the value a product provides to its company, thus we might not understand why certain feature sets are created before others and it might not make sense to us. 

Definitely worth reading:  http://codebetter.com/blogs/raymond.lewallen/archive/2008/07/31/getting-done-the-lean-way.aspx

FW: Using client templates, part 1

Bertrand Le Roy has posted the first in a series of articles on the AJAX client templating features in the upcoming ASP.Net 4.0 release.

This will make things SO much easier for those cases where we want to get performance improvements over using UpdatePanels, but DON'T want to have to inject the markup from Javascript code.

Templating goodness here: http://weblogs.asp.net/bleroy/archive/2008/07/30/using-client-templates-part-1.aspx.

Onions and Architecture

We've been trying to do it all along, just not knowing it (or doing it right!)

Yesterday, Jeffery Palermo posted his second article on "Onion Architecture" - makes a LOT of sense when your application becomes not just a webapp, but an enterprise solution.

Interesting…

http://jeffreypalermo.com/blog/the-onion-architecture-part-1/

http://jeffreypalermo.com/blog/the-onion-architecture-part-2/

Discuss, compare, contrast - enjoy

Passwords - add salt to sage advice

Recently I've been spamming colleagues with nuggets, that should have been on here, so I'm going to start cross-posting from now on.

And with no further waffle, here's today's first nugget:

Karl Seguin has posted a neat little article on password strength - no rocket science here, but it's one of those things that's well worth re-stating to remind us as developers that we should always strive to meet or exceet best practice. And it's amazing the sites that DON'T require strong passwords.

A worthwhile read: http://codebetter.com/blogs/karlseguin/archive/2008/07/30/password-you-re-doing-it-wrong.aspx

Thursday, January 10, 2008

knom's developer corner : Behind the Scenes of LINQ - Part 2

In his latest post on the internals of LINQ, knom finally gives a tutorial explanation of Lambda expressions and how to use them...

Either that or I was just two dumb to get it before!

Read and enjoy: knom's developer corner : Behind the Scenes of LINQ - Part 2

Friday, August 24, 2007

Mix:UK 07

Not really .Net related, but I have to admit to excitement at the prospect of going to Mix:UK 07 down in London in September.

Interestingly, the social networking aspect is already hotting up, with a Backnetwork set up and a Facebook event starting to draw in the attendees. Will I go as far as to import those attendee contact lists into my PDA to take? Well, knowing my inability to remember and match names to faces, it'd probably be a good thing to do.

Technically, I'm really going to be interested in the Silverlight tracks - right now I'm almost desparate for the Silverlight team to implement the basic forms controls (buttons, text boxes, etc). Whilst better control support is planned, it does seem to be a very large omission from the 1.1Alpha release.

Of course, there have already been some community projects to rectify that deficiency, as well as commercial offerings, but how compatible would these be with Microsoft's own library, and how much effort would it be to back-migrate from a 3rd part library after the fact?

Anyway, roll on Mix and I'll see you in London!

Monday, June 11, 2007

Using a global ProductInfo.cs file

When a project gets beyond a certain size, it becomes impossible to keep the multitude of AssemblyInfo.cs files up do date, particularly for copyright and version numbers.

The solution to this problem is to use a single ProductInfo.cs file that every project links to, which contains the common data that would normally be duplicated across many AssemblyInfo.cs files.

Here are the contents of ProductInfo.cs

using System.Reflection;

using System.Runtime.CompilerServices;

using System.Runtime.InteropServices;

[assembly: AssemblyConfiguration("")]

[assembly: AssemblyCompany("My Company Limited")]

[assembly: AssemblyProduct("My Product")]

[assembly: AssemblyCopyright("Copyright © 2006-2007")]

[assembly: AssemblyTrademark("")]

[assembly: AssemblyCulture("")]

[assembly: AssemblyInformationalVersion("v1.0 alpha")]

// [assembly: AssemblyKeyFile("MyCodeKey.snk")]

 This allows the AssemblyInfo.cs file for any assembly to be pared down to the following:

using System;

using System.Reflection;

using System.Runtime.InteropServices;

[assembly: AssemblyTitle("MyCompany.MyProduct.MyAssembly")]

[assembly: AssemblyDescription("Description of MyAssembly")]

[assembly: ComVisible(false)]

[assembly: CLSCompliant(true)]

[assembly: Guid("b76c311c-f681-48d1-b2e0-9f691feb239f")]

[assembly: AssemblyVersion("1.0.0.0")]

[assembly: AssemblyFileVersion("1.0.0.0")]

There are 2 ways to add a link to the ProductInfo.cs to your projects:

1.Drag and drop (the easy option) 

This method simply entails dragging the linked ProductInfo.cs from an existing project and dropping it the Properties folder of your project.

2.Add Existing item (an alternative option)

This method includes add an existing item to your project, by right clicking on the project file and selecting Add -> Existing Item from the context menu. Then navigate to the directory containing the ProductInfo.cs file and select the ProductInfo.cs file. Finally (and  this is the clever bit) select the Add Link option from the dropdown attached to the Add button.

I tend to add a solution (virtual) folder called "Solution Items" to each large solution I'm working on and add the ProductInfo.cs file to that. I can then easily drag-and-drop as needed.

When this technique is coupled with automated Assembly versioning, your live becomes much easier!

Thursday, May 31, 2007

Numbers, numbers everywhere - fixing VS2005's Assembly Numbering Limitations

Assembly numbering isn't something that a developer will generally bother too much about - so long as your references are up to date and the code works, what does it matter if the AssemblyVersion or AssemblyFileVersion are permanently locked at 1.0.0.0? Unfortunately, with the complex interaction of class-libraries in large projects, we need to be a bit more deliberate about things.

The two properties in question, AssemblyVersion and AssemblyFileVersion, are controlled through assembly attributes in the AssemblyInfo.cs file for a class library. You can find this in the Properties folder of a project.

When you create a new Class Library project, these properties will be set as shown in the following snippet from AssemblyInfo.cs.

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.0.0.*")]
[assembly: AssemblyFileVersion("1.0.0.*")]

Visual studio lets you "default" the Build and Revision numbers using an asterisk (*) in the property. HOWEVER, it ONLY works for the AssemblyVersion property, NOT the AssemblyFileVersion property. This means that whilst your AssemblyVersion can automatically increment, the AssemblyFileVersion cannot.

Fortunately, there's a workaround from Microsoft - an additional MSBuild task that can be added to a project file which causes the two properties to be updated on every build.

Of course there's a downside - setting this up for every project involves adding a line to the .csproj file directly. What follows is a walkthrough of the process.
  1. Install the AssemblyInfo task downloaded from the MSBuild Tasks website.
  2. Create a customised build target file according to the instructions.

    I created a copy in the installation directory, but you can put it wherever you want - just be sure to update the path in step 3 below.

    My customisation was configure the task so that the AssemblyFileVersion had fixed Major and Minor versions, but the Build number represented the day and month the build took place and the Revision number again autoincremented.

    The critical code from the targets file is this:


    <PropertyGroup>
    <AssemblyFileMajorVersion>1</AssemblyFileMajorVersion>
    <AssemblyFileMinorVersion>0</AssemblyFileMinorVersion>
    <AssemblyFileBuildNumber></AssemblyFileBuildNumber>
    <AssemblyFileRevision></AssemblyFileRevision>
    <AssemblyFileBuildNumberType>DateString</AssemblyFileBuildNumberType>
    <AssemblyFileBuildNumberFormat>00MMdd</AssemblyFileBuildNumberFormat>
    <AssemblyFileRevisionType>AutoIncrement</AssemblyFileRevisionType>
    <AssemblyFileRevisionFormat>00</AssemblyFileRevisionFormat>
    </PropertyGroup>


    You can, of course, configure the task to modify the AssemblyVersion in the same way.
  3. Add the following additional target import to each project file (*.csproj) just after the default Microsoft.CSharp.targets import.

    <Import Project="$(MSBuildExtensionsPath)\Microsoft\AssemblyInfoTask\Custom.VersionNumber.Targets"/>

    This is the magic that instructs the compiler to run the AssemblyVersion task each time the project is build.
It's a small chore to update each project, but the result is a much more useful format for the two properties.

[assembly: AssemblyVersion("1.0.0.03")]
[assembly: AssemblyFileVersion("1.0.000214.02")]

The AssemblyVersion build number auto-increments, and the FileVersion includes the build date where before it was just a static value.

There's one slight wrinkle with this method of your project is under source control, however. The AssemblyVersion task it relies on being able to write changes into the AssemblyInfo.cs files just prior to compilation - so if your source control package write-protects files until you check them out, the process will error.

For TFS users, this post on the MSBuild Team Blog gives additional build targets to add to your project file that will check-out the relevant files, and then check them back in again afterwards. It's targetted at automated builds, but is easy enough to modify.

But the simplest method is simple to ensure that AssemblyInfo.cs is checked out before you build by using a pre-build script in each project. The following script works perfectly for TFS-controlled projects (note the quotes, tho', and the use of a relative path for the AssemblyInfo.cs file).
"$(DevEnvDir)\tf.exe" checkout ..\..\Properties\AssemblyInfo.cs

Of course, this won't check in the changed files, but that's sometimes a benefit!

The AssemblyVersion MSBuild Task allows fine-grained control of assembly and file version numbers - when this method is linked with that of a ProductInfo.cs solution file (on which I'll blog later), you gain real control over the meta-data embedded into your products.

Friday, January 05, 2007

Wierd compilation error - corrupt lines in FileList.txt

I came across a very strange error last night that flumoxed my for a while.

Compiling a solution, three of the sub projects failed to compile with the following cryptic error:
Files had invalid value "S....."
It turns out that the cause and solution are both quite simple, but neither is obvious.

Firstly, what does "Files" mean in this context?

Well, when VS2005 compiles a project, it reads a file in the obj directory named .csproj.FileList.txt, creating it first if required. This file contains a list of the DLLs and PDBs that will be generated, as well as one named ResolveAssemblyReference.cache, which (I assume) is passed to the command-line compiler used to actually perform the compilation.


As for the "invalid value", this turned out to be a corrupt line in the file, nothing more, so the solution is just to delete the obj\.csproj.FileList.txt file completely, clean the project and rebuild. Job done.

Strangely the only reference I could find to the FileList.txt file was in this posting by Sayed Ibrahim Hashimi, confirming that this is one of those undocumented "features" of VS2005.