Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

04 Jul 2006 - Developer Blogs in United Kingdom

Blog Entries (04 Jul 2006) RSS << Earlier | Later >>

  • Easing the money in

    Published on 04 Jul 2006 from

    Last month, however, just after the official 30 days' payment had passed, I popped a pleasant letter in the post asking for the account to be brought up to date.... So with the payment date of the second, much larger invoice approaching last week, I though it wouldn't hurt to stick a little reminder in, this time before the due date.

  • Antigen for Sharepoint

    Published on 04 Jul 2006 from

    Now this is interesting... Antigen for Sharepoint available for download here....So you can now identify potential threats and secure your sharepoint environment.  We're building up quite a few datasheets for Antigen - certainly worth a browse around the site. Volkan has the roadmap all laid out on his blog too...

  • Shuttle Discovery races skyward

    Published on 04 Jul 2006 from

    The Discovery orbiter blasts away from the Kennedy Space Center - on a hot and sunny US Independence Day.

  • WSS Custom Search Results Page

    Published on 04 Jul 2006 from

    An article on how to create a custom search results page in a Windows SharePoint Services site ... SharePoint Custom Search Results Page by Kris Rudin.

  • Tutorial 2: Using WCF to Connect a Web Site to an Application Server

    Published on 04 Jul 2006 from

    This is the first part in multi-part tutorial.

    Introduction

    I recently wrote a four-part tutorial covering a common enterprise architectural pattern where a web site passed off some customer information captured through to the user interface to an application server for business processing. A Microsoft Message Queue (MSMQ) was used to connect the front-end to the back-end.

    This will also be a multi-part tutorial which will adapt the previously outlined solution to use Windows Communication Foundation (WCF) to connect itself together. This part of the tutorial will present the theory, and then I’ll look at the code in the upcoming parts.

    Windows Communication Foundation is Microsoft’s new unified, managed, platform for connecting systems together. It's the unification of ASMX/WSE web services, Remoting, Enterprise Services, MSMQ into one platform that you can use to perform distributed programming in a secure, transactional, scalable way.

    The “Application Server”

    The previously outlined application server consisted of a simple Windows Service which listens to the queue for messages it recognises (crudely, in the example, it checks the Label property of a message for a particular value). It then deserialises out the body of the message into an entity class called CustomerMessage and passes this to a business logic component called CustomerProcessAgent.

    The new solution will work a little differently: It will expose the business logic to external systems through a WCF service. These external systems, including the web site, will then communicate with the WCF service. The WCF service will be hosted inside the existing Windows Service which we’ve already built.

    In the first iteration, the web site will communicate to the WCF service using TCP. However, I could just as easily set up the service to use basic SOAP (so it acts as traditional standards-based web service) or the WS-* protocols or a named pipe. This is because WCF is not tied to any particular transport modal. In fact, you design your WCF service without worrying about which transport modal will be used for communication.

    Finally, I will configure my WCF service to so that incoming communications with it go through a MSMQ, which is supported by WCF out of the box. This will bring the functionality of the new solution right back around to what was offered in the initial tutorial – except it will implemented on the new, flexible communication infrastructure offered in Windows Communication Foundation!

     

    In the next part: code!

  • SharePoint User Group Meetings

    Published on 04 Jul 2006 from

    With the World Cup drawing to a close it’s time to get back to normal work activities and get together for a couple of SharePoint User Group UK meetings. We’ve got two arranged for the end of July in Reading and South Leicestershire. For more info please check out the user group website:

    http://suguk.org/blogs/sharepoint_blog_1/archive/2006/07/04/919.aspx

    Apologies for not writing more recently but it’s just too damm hot!

  • Are you ready for Vista?

    Published on 04 Jul 2006 from

    Want to know if your PC is up to the job of running Windows Vista? Or should you start saving your spare change to ensure you have enough pennies to buy a new PC when Vista reaches general availability early next year?

    Head to http://www.microsoft.com/windowsvista/getready/upgradeadvisor/default.mspx where you can download and run a small (4MB) beta application that will test your current PC and report on how Vista-ready you are. It will also let you know which version of Vista will work best for your needs and your hardware, and tell you if any of your devices are unsuitable for the new operating system.

    Very useful technology!

  • UI of MCE on Vista

    Published on 04 Jul 2006 from

    It should come as no big surprise to you that I like Vista and our products in general, but Rustam commented about the Vista MCE user interface.

    Rustam: I agree with you, the new Vista MCE interface is more confusing to me and less slick or clear and more cluttered than MCE 2005. Your comment encouraged me to make sure I feed this back to our development teams! Thanks :)

  • UI of MCE on Vista

    Published on 04 Jul 2006 from

    It should come as no big surprise to you that I like Vista and our products in general, but Rustam commented about the Vista MCE user interface.

    Rustam: I agree with you, the new Vista MCE interface is more confusing to me and less slick or clear and more cluttered than MCE 2005. Your comment encouraged me to make sure I feed this back to our development teams! Thanks :)

  • Anti-piracy tool confuses users

    Published on 04 Jul 2006 from

    An anti-piracy tool for Microsoft Windows XP is causing problems for some users of the system.

  • National learning 'grid' scrapped

    Published on 04 Jul 2006 from

    The UK government's school computer agency is no longer talking about a National Grid for Learning.

  • BBC to offer 'personalised' radio

    Published on 04 Jul 2006 from

    The BBC's director general reveals plans for audiences to create their own radio stations from BBC content.

  • Spell checker for Flexwiki

    Published on 04 Jul 2006 from

    FlexWiki has no spell checker included, but I've found an cunning way to add one: the Google toolbar.

    Google toolbar

    Next to the page rank, there's a spell checker button that spell checks form fields. Editing a flexwiki page is done in a really big form field, which the spell checker can check.

    Obvious when you think about it.

    [Tags: ]

  • Al Gore to address UK TV industry

    Published on 04 Jul 2006 from

    Former US Vice-President Al Gore is to speak on the digital future of TV at the Edinburgh TV Festival.

  • Using using

    Published on 04 Jul 2006 from

    Daniel Moth has been experimenting with using the "using" statement to perform common entry and exit code. The using statement calls the constructor of a class at the beginning, and Dispose() at the end. The before code (status bar and wait cursor in his example) goes in the constructor, and the after code goes in Dispose(). Clever trick.

    I post this because Daniel finishes his post thinking the approach is "wrong" and asking for feedback, but doesn't seem to have comments enabled. I'll post my thoughts here instead.

    I think it's quite neat, and as the original developer, there's one less thing to think about when doing something, which is always useful. The problem comes with maintainability. He mentions the problem that no memory management actually takes place, and the leap would have to be made to understand that. This would only come to light when looking at the class.

    If the maintenance coder didn't look at the class, just the using statement, she would assume that there was some memory stuff going on, and wonder where the heck the status bar text was getting changed. Eventually she'd have to look at the class, and realise that the original coder was a blatant liar. "Hey punk, there's no memory management here!". From that point on, she trusts the original coder a whole lot less, and has to check more classes just to confirm that they do what they say they do.

    In this (admittedly contrived) example, a better approach would be to explicitly state what the code was doing by using meaningful method names:

    SetGuiWaiting();
    DoTheThing();
    SetGuiReady();

    or

    guiController.SetWaiting();
    DoTheThing();
    guiController.SetReady();

    Now the maintainer can just read what's going on without having to visit the other code. Not quite as pleasing for the original developer, but a lot easier to maintain. Still, an interesting idea, and it's always worth experimenting with things like this.

    As for a class with only a constructor and a Dispose(), I'm not bothered by that, if the abstraction requires nothing else.

    [Tags: ]

  • Fixing Visual Studio setup projects

    Published on 04 Jul 2006 from

    Welcome to new blogger Mike Wade, who says:

    I am a developer with the Deployment team. We are the team that enables the generation of installers for applications built by Visual Studio.

    and Mike adds:

    The Deployment team is contained within the VB product organization. Why? Other product units like to make things complicated and powerful, whereas VB likes to keep things simple and effective. And this is the model we want for our installers.

    Mike, take a look at Wrestling with the Windows Installer. And read the comments.

    The trouble is, the Visual Studio setup and deployment project is half-baked. Some things which should be easy are difficult or impossible, and when you try to fix these issues by editing the generated Windows Installer MSI file, you enter a world of pain.

    I revisited this recently. I wanted to have a conditional shortcut. You know the type of thing: the installer has a dialog that says, "Check here to have a shortcut on the desktop."

    You can do the dialog just fine in Visual Studio, but making it work is another matter. Here's one approach. The problem is, you can't have a condition on a shortcut. You can only have a condition on a component. But you can't have a component that is just a shortcut. So you have to do a custom action, which means running a script, which might break if some wretched anti-virus product has mucked around with the Windows Scripting Host; and you'd better run another script on uninstall otherwise the shortcut hangs around afterwards.

    I actually chose a different solution. I have a component which is just a pointless readme file. I attach the condition to the component. I set up a shortcut to the component. Then I post-process the MSI file to change the target of the shortcut from the readme file to that of the executable.

    Mike, this has to get better. Maybe the setup project is not meant for serious use. If so, then remove it. Alternatively, list out the top ten things people often want to do in setup routines (things like conditional shortcuts, or auto-starting the app after setup ends) and implement them.

    I really think the Wix project could help here. If a setup project were a two way designer/code editor for Wix, then we could modify the XML to accomplish what we want, rather than attempting to post-process the MSI.

    Either way, this does need attention. I'm disappointed that little changed in Visual Studio 2005, though at least you can now install for "Everyone" by default.

    Tags:

  • Music industry to sue Yahoo China

    Published on 04 Jul 2006 from

    The music industry is to sue search engine Yahoo China for providing links to pirated tracks.

  • Checking for compliance

    Published on 04 Jul 2006 from

    We talk a lot about compliance at Microsoft,  We throw acronyms at you like SOX, and HIPAA and expect you to nod knowledgeably about how your company is complying with the compliance regulations.  But you may not be.  You may not be all that up to speed on what you need to do to comply with all of these compliance rules.  Well, here's a collection of documents to get you started on the road to compliance and what you need to do.  Its not as fierce or scary as you may think it is...
    IT Audit Process 
    By Bill Canning, Program Manager, Microsoft Corporation Audits are a critical component of the regulatory compliance process. Understanding how the audit process works and how auditors operate is important because it informs IT managers how to establish an environment that is compliant and easy to audit. This tip focuses on how auditors conduct the IT audit process.

    Regulatory Compliance Planning Guide 
    The Regulatory Compliance Planning Guide is designed to help IT managers and Microsoft customers meet specific IT compliance obligations that directly relate to major regulations and standards. The guide introduces a framework-based approach that you can use as part of your efforts to comply with these regulations and standards. The guide also describes Microsoft products and technology solutions that you can use to implement a series of IT controls to help meet your regulatory obligations.

    Regulatory Compliance Demystified: An Introduction to Compliance for Developers 
    For a developer, understanding the issues around regulatory compliance can be a difficult and frustrating endeavour. This article makes sense of regulatory compliance from a developer's point of view. It examines Sarbanes-Oxley, HIPAA, and other regulations, and covers the most important best practices that are common across multiple pieces of legislation.

    Regulatory Compliance and Security Updates 
    Learn why organisations can and should bring their security and management teams into the process of building policies and procedures to support their regulatory compliance and provide system administrators with the flexibility necessary to meet threats as they arise.

    Creating a Systemized Approach to Regulatory Compliance at Microsoft 
    The purpose of this white paper is to share some of the processes and tools that the Microsoft IT group currently uses to systematize the approach of supporting regulatory compliance activities at Microsoft.

    A great start - all in one place...

  • Enterprise Library - The Log is Full

    Published on 04 Jul 2006 from

    What an utter pile of wank.

    I've spent DAYS on this one. I was using .NET Tiers (nettiers) with .NET 2 and it in turn uses the Enterprise Library - EntLib.

    I have had to INSTALL the .NET 1.1 assemblies for them to work - which is really bloody stupid.

    Anyway, I found the answer here: -

    http://blogs.msdn.com/tomholl/archive/2005/02/18/376187.aspx

    Thanks Tom - much appreciated, if I ever meet you - I shall take you to a pub, and buy you a pint of whatever takes your fancy.

    Share this post: Email it! | bookmark it! | digg it! | reddit!

  • using pattern

    Published on 04 Jul 2006 from

    Previously we described the using statement. After showing a quick code example and describing the intent of the construct, we proceeded to a more pragmatic description of what it does which I repeat here:
    "The using statement accepts as an argument an object that implements IDisposable; it defines a coding block where the ctor of the said object is called at the start and the Dispose method is called in the end."

    Taking the definition above, a design pattern is formed (or to be more precise in this case, an idiom):

    Sometimes you have a piece of code that has to be enclosed between two code blocks A and B. Code blocks A and B are repeated in multiple places in your project(s). When you recognise that, you can extract a new class with a ctor containing code block A and the Dispose method containing code block B. Replace all client side occurrences with a using block passing in the newly extracted class.

    As an example, instead of:

    void SomeMethod()
    {
    Cursor.Current = Cursors.WaitCursor;
    statusBar1.Text = "Busy...";
    button1.Enabled = false;

    // do some real work here

    button1.Enabled = true;
    statusBar1.Text = "Ready";
    Cursor.Current = Cursors.Default;
    }
    we write:
    void SomeMethod()
    {
    using (BusyTaskRegion bt = new BusyTaskRegion(statusBar1, button1))
    {
    // do some real work here
    }
    }
    ...after extracting the following class:
    class BusyTaskRegion : IDisposable
    {
    private Control _c1;
    private Control _c2;

    public BusyTaskRegion(Control c1, Control c2)
    {
    this._c1 = c1;
    this._c2 = c2;
    Cursor.Current = Cursors.WaitCursor;
    c1.Text = "Busy...";
    c2.Enabled = false;
    }

    public void Dispose()
    {
    this._c1.Enabled = true;
    this._c1.Text = "Ready";
    Cursor.Current = Cursors.Default;
    }
    }
    Another example would be measuring performance of some code (i.e. extract the timer setup and tear down into a class and then use it via using). I was trying to find the pattern formally documented online but I couldn't. However, I did find examples of its usage here, here and here (much better than my fictitious example above!).

    When I first saw this (at a previous project for some impersonation code), it felt wrong on two levels. First, it felt like using was being misused in scenarios that it wasn't originally intended for (e.g. when people read the client side code they have to take an extra mental step to digest that no memory management stuff takes place). Second, it felt wrong to define classes that have just a constructor and a Dispose method with nothing else in-between.

    What do you think?