Steven's profileDevelopmentalBlogLists Tools Help

Blog


    29 January

    Getting Ready for 2008

    A new year comes with a new job and a new perspective.

    One of my personal goals this year is to increase my community involvement. There are lots of user groups in Brisbane, and similar opportunities Australia wide. I've filled in my Outlook calendar with all the upcoming events and thought I'd share the list with you as well (for the next month):

    • 30/1/08 5:30pm : BizTalk user group - Mark Daunt on RFID support in BizTalk
    • 01/2/08 7:30am : VSTS user group - Grant Holiday on securing TFS
    • 19/2/08 5:30pm : QLD MSDN user group
    • 28/2/08 5:30pm : SQL Server user group

    Also, in April (26th and 27th) is CodeCampOz. Although I've never been before, I'm aiming to drive down this year. Want to car pool? CodeCampOz has been described to me as a mini Tech.Ed except without the advertising.

    Readify provide presentations called RDNs which I hope to also get moved to Brisbane in the not-so-distant future. RDNs are like user groups, but the content can have more depth. Getting these in Brisbane will be great for the local development community.

    My blogging will hopefully increase in both quantity and quality. Currently I am working with Notification Services, Visual Studio 2008 and .Net 3.5. All new technologies for me, which means more tidbits to learn and share with you.

    I've also decided to move my blog to Windows Live Spaces. As portals go its not too shabby, and has a nice layer of extensibility. The official link is here. If you have a windows Live account then its easy for you to leave comments. Oh, and add me as a friend! I am currently cross posting to both old and new blogs for now, but you should definitely subscribe to the new version as soon as possible.

    There's some projects I'd like to attack this year. I've found a podcast receiver that works on Vista called PrimeTIme Podcast Receiver, but am not wowed by it. So one of my plans this year is to build a podcast subscription tool. Could be a good candidate to learn some WPF as well.

    I also want to work on a patterns web site that provides code examples in multiple programming languages.

    Most importantly, this year I will get certified. I've delayed it for too long. I have a few certifications in mind long term, but currently I am aiming for MCTS in Web Applications.

    Let me know if there is something you would like me to cover in my blog. Otherwise the direction will be random (as it has been). Also, if you would like to provide feedback on how to improve my writings/content, please feel free to be open and honest since it will only benefit you when my style gets better.

    Watch this space.

    24 January

    Notification Services - Part 1 - Technology Overview

    Sql Server 2005 is more than just a relational database management system (RDBMS). It also contains a reporting engine called Reporting Services (SSRS), a data warehousing system called Analysis Services (SSAS), an engine for selectively pulling data from various sources called Integration Services (SSIS), and a subscription based notification engine called Notification Services (although I've not seen this notation, I presume we can say SSNS for short?).

    Each of these items are a technology unto themselves and take time to learn and master. Recently I started with Readify and my first job was to do a proof of concept for an internal project. It involved Notification Services and I was able to learn some cool stuff to share with you.

    SSNS is available in all versions of Sql Server 2005 ; all my development was done with Developer which costs around $80AUD. The core components of a SSNS instance are as follows.

    Subscribers
    Users must be in the subscriber list to add subscriptions. This is essentially a 'User' table in SSNS.

    Subscriber Devices 
    Users can receive their notifications in different ways. For example I might get a full detailed notification in my email, just the 1 line title on my MSN messenger, and a summary of all of the days alerts on my PDA.

    Subscriptions
    A subscriber can subscribe to a particular field in an event. For example, they may want to receive notifications when someone posts a comment on their blog that contains swear words. So the subscription uses a SQL query to look for key words in the blog comment, and if it finds them, the user will be notified.

    Events
    Events are the things occurring that may or may not cause notifications to go out. In the above example, the Event is the comment being posted. Every comment that gets added to the blog causes an event in Notification Services, but only the events with swear words in the comment field will cause notifications to go out.

    Notifications
    These are the content that are sent to users. They occur as a result of an event matching a subscription. They are sent on a channel such as email, file, service, etc. The notification is formatted with XSLT, and can use event data as necessary.

    How It Works
    So there's no real programming involved here. Essentially its all declarative via 2 XML structures. The first simply specifies the applications; its kind of like a solution in Visual Studio. It specifies what applications will exist, and also allows you to specify parameters for your XML files. Then you need 1 XML file per application. This file will contain XML schemas of your Events, Subscriptions, and Notifications. It also allows you to specify how notifications can be sent, and how events can be submitted.

    Don't I Get To Write Code?
    Yes you do. The API is very open to fiddle with. When you upload your XML files to SSNS it will create 2 databases, with lots of tables and stored procedures. The good news is that you don't have to touch those items. If you maintain your schemas in your XML files, it will ensure the tables are created correctly.

    However, some of the stored procedures are there for you to call; particularly around submitting subscribers, devices, subscriptions, and events. So you could call those sprocs, or you could use the managed API for Notification Services. This is just an assembly you can add a reference to in your application. For example, create a windows app that provides the interface for logging in and adding/removing subscriptions. With a few quick method calls you have connected to your SSNS application and not had to write any SQL! I can't stress enough how easy it is to use this API. You can do everything you need, and its very logical to use.

    Pulling It Together
    Ok so think about this example. I want to receive email updates whenever anyone adds a comment on my blog that mentions 'Notification Services'. So I create an event schema that allows for a comment ID and content to be sent to SSNS. Then I create my notification schema with just the comment data field (since I don't need the ID in my email). Thirdly I create a subscription schema where I specify a field called 'SearchPhrase' and an SQL statement that inserts data into the Notification schema by searching the Event comment data for the search phrase.

    Now I just need to specify how the event data gets into the event schema in SSNS. I have lots of options here:

    • My comment code just calls a sproc, so I can change that sproc on the server to include a call to insert the event data into SSNS via a sproc
    • I could add a trigger on the comments table in my database such that when data is added, it will also add that data to SSNS via a sproc
    • In my .Net code I could just call the sproc to insert the comment data after I have added it to the database
    • Or I could use the API mentioned earlier to add the subscription so I don't have to worry about nasty sprocs!

    Oh I need to add a subscription too; since I now know SSNS well enough, I can just insert this into the right table; I don't plan on subscribing/unsubscribing continuously.

    Notification Services Series
    Notification Services - Part 1 - Technology Overview
    Notification Services - Part 2 - Example Overview and Instance XML
    Notification Services - Part 3 - Application XML
    Notification Services - Part 4 - Managed API

    Further Resources
    Notification Services tutorial: http://msdn2.microsoft.com/en-au/library/ms170337.aspx
    MSDN help: http://msdn2.microsoft.com/en-au/library/ms172483.aspx
    API reference: http://msdn2.microsoft.com/en-au/library/microsoft.sqlserver.notificationservices.aspx

    Ready For Readify

    Thought I'd post this before I go on vacation. Today I resigned from my position as a Lead Developer for Zap Technology. I've been offered an excellent position with Readify, a company I've viewed from afar for about a year and a half now.

    One of the things that sold me on Readify was their attitude towards the development community. Most people who attend user groups (anywhere in Australia) will have seen a Readify presentation. They hold a large percentage of the Microsoft MVPs in Australia and empower their employees to do the same if they so desire. In fact they even give you incentives to get active in your community.

    These are all the things I love to do: And they want to pay me to do it!

    Well I start with Readify in mid January. I was planning to move this blog to Microsoft Live Spaces when I got back but I'll reconsider this move now. One thing's for certain is that my postings will increase in frequency and in quality. Hopefully they'll sound less like a letter written to my mother, and provide more technical information.

    I also have a personal mission that I have challenged myself with: To drive the Brisbane/QLD development community, to the point where the other states get jealous. I hear so much about what's happening in other states on various blogs, but never Brisbane. This might be because I read the wrong blogs, but I'm a patriot none-the-less, and I want to see user groups with turnouts in the hundreds! I also want to see some deviation and expansion. Perhaps a Rich Web user group? Or a group dedicated to code quality (which fits with another idea I hope to act upon next year)? All ideas are welcome, and if you have any ideas for an open source project, I'd also be keen to hear.

    I'll use my holiday to think through some strategies for how to achieve these meager goals.

    I wonder if Readify have an indoor soccer team?

    Books Books Books

    I'm sorry! I've been so busy, posting has suffered.

    I am now the Lead Developer for our primary Business Intelligence product at Zap Technology. My 3 month review at Zap resulted in this promotion which I happily accepted. Those who know me know that I was in a Lead Developer position prior to Zap.

    This post though is more of an encouragement to all you fellow Australian developers. The Australian dollar is doing quite well against the US dollar. Now is a great time to buy those technical/reference books you always wanted! My recent Amazon order went in when the dollar was at USD $0.92. Normally I purchase theory related books but saw this as a good opportunity to get some reference books as well. Here's my order, some of which have already arrived:

    Hopefully you recognize some of the names. Kent Beck has been around the code quality scene for ages, and this new book of his is due out in January. Darren Neimke works for Readify, a Microsoft Gold-Partner consulting firm in Australia. Jon Skeet is a Microsoft MVP based in the UK. I respect Jon's commitment to the community and enjoy is writing style in news groups, and am looking forward to his first .Net related book in January.

    So get those orders in! Create yourself a wish list and get your family to buy you some books for Christmas.

    This will be the last blog post until after the Christmas season, so happy new year to you all!

    Technorati Tags: ,,,