25 Jul 2009

ADO.NET Data Services Cheat Sheet (WCF Data Service)

ADO.NET Data Services (WCF Data Services) Cheat Sheet

Above is a screen shot of an A3 cheat sheet I created for ADO.NET Data Services (version 1). The poster covers the filters, methods and gives plenty of examples in a nice bright poster.

Direct Download

25 Jun 2009

Gallery2 + C#

Gallery2 is a web based PHP gallery system with a remote API for doing many things. I have been using it for a while, but have decided to change and so I wanted to export my images, which is harder than it sounds. To actually get this done I ended up writing a basic wrapper for the Gallery2 remote API and implementing a small console application to do the export.

If you are interested in the wrapper or the tool itself, I have setup a CodePlex project for it where you can download those: http://gallery2.codeplex.com/

The reason it is there, is because I have decided to open source it because it is useful to people besides me and I have gotten what I need from it, so I doubt I’ll spend much time getting it feature complete. This way someone else can get the tool (if that is all they need) or get the source and add to it.

FileDownload[1]

Screen shot of the tool running.

11 Jun 2009

Reading and writing to Excel 2007 or Excel 2010 from C# - Part I: Primer

[Note: See the series index for a list of all parts in this series.]

Over the past week I have been learning about the complexity of working with Excel 2007 native file format - XLSX or as it is known correctly, SpreadsheetXL. There is three ways to work with it, firstly build your own parser - just too much work for me or second use OpenXML SDK format which Microsoft provides. The current version, at time of writing that was version 1, of the SDK is not great: there is very little (if any) benefit of using it over the third method. There is a V2 SDK currently in beta which looks brilliant and frankly when released would be the recommend route.

The third way, which is the way I chose is the uses new features introduced in the .NET Framework 3.0.

What is a XLSX file? A XLSX file is actually just a ZIP file which contains a number of XML files in it.

image

This means all you need to do is open the XLSX file as a ZIP file, get the right XML files (or parts as they are referred to) out of it and parse those.

If you are thinking this is a .NET only solutionthe chart below is from Doug Mahugh which shows a number of ways across a number of technologies/OS’s to do the same thing. This series will focus on the .NET way.

image

What is nice about using System.IO.Packaging to read the file over the direct ZIP options, is that there are some helper methods to make it easier when working with any of the new formats (docx, xlsx etc...)

image

08 May 2009

My Presentation @ Dev4Devs

If you are attending Dev4Devs on Saturday (or are here after the event) and you are looking for a copy of the slides and code you can get them below! If are looking for the ADO.NET Data Services cheat sheet I mentioned then you need to go here.

Code

The code here is also different from what I presented in the following ways:

  • There is a timer control in it - so if you add items to the DB while on the site, it updates and shows those changes within 5 seconds.
  • The layout is slightly bigger (bigger header) and has buttons (to make it look like an email client) - these were removed because it doesn’t work at 1024x768 (aka the projector resolution). So they back in their graphical beauty.
  • There is a feed button which links to a ATOM feed for the last 10 emails - something I mentioned you could do, well now you can see it.
  • There is a database creation script, but no data. You need to create your own data.
Slide Show
07 May 2009

Some Free Posters I've Created Recently

One of the things that I do at BB&D, is produce guidance posters. So far I have produced two of them and both are publically available on the BB&D developer guidance site DRP. The first is “Outlook + Exchange = Better Together” and the second is “ADO.NET Data Services Cheat Sheet”, not two things you think about together often.

Outlook + Exchange = Better Together

The title is a bit marketing-ly, but the poster is really a nice over view of the 8 key areas of Outlook namely

  • Email
  • Contacts
  • Outlook Web Access
  • SharePoint
  • Calendars
  • Tasks
  • Outlook Features
  • RSS

The poster looks a little busy, but when printed at A3 it’s not bad at all. It also includes three areas (OWA, Mailbox size, SharePoint) where you can write in your organization details so if you print them out and put them on the wall they have some organization context.

poster

Download

ADO.NET Data Services Cheat Sheet

The next one I developed when learning with ADO.NET Data Services and it’s a bright and fun cheat sheet for it. It includes information on the query operators (with samples along the border), a list of functions, a list of comparison operators (like less than), query order, keys, and $value. I’ve found it very useful to print out and put up. It is designed for A3, but I have it printed at A4 (in grey scale) and it works just as well.


ADO.NET Data Services Cheat Sheet

Download

04 May 2009

Free SharePoint Developer Training

CLIPART_OF_10926_SM On May the 23rd InformationWorker and Inobits are getting together and offering FREE SharePoint developer training. It is a full day event where Inobits will be providing a number of lab based training sessions focused on developing with SharePoint. Also being a full day event there will be some lunch provided for everyone (special thanks to 3Fifteen for sponsoring it). It should be a really great event for everyone, because you pick the lab/s you want to do which means if you are a beginner or expert you do the ones that will benefit you.

Because of all the effort to prep for this, you much register for it at http://www.informationworker.co.za/Pages/SLABSRegistration.aspx 

A sampling of labs available is:

  • Web Parts
  • Data Lists
  • Event Handlers
  • Workflow
  • Silverlight
  • Page Navigation
  • Page Branding
  • Web Services
  • Content Types
  • User Management
Hope to see you there!!!
29 Apr 2009

Glimmer - jQuery IDE

image

jQuery is a fairly easy to use if you understand CSS or been working with HTML for a while, but what if you are a drag & drop developer? Who never has done that? Or if you want to just whip up a nice effect quickly? Well the guys from Microsoft have recently launched Glimmer which is a free jQuery effects IDE. 

image

When you launch the very good looking WPF application (read:SLOW) you get four templates, which 3 of them have a wizard interface to set it up.

  • Image Sequencer (click here for the demo of this effect): This creates a rotating image box. Think of use for banners where you want to have each image go to a different URL or for a picture rotate/slide show. This one has four steps:
  1. Description (where is the “Do not show this again” checkbox)
  2. Select the images and set the URL for them  image. What is nice here is the live preview window on the right hand side.
  3. Set how long to delay between images and what the image size should be (say if you need to resize)
  4. Lastly the save page. The UI is a little odd here, since there is no finish button. You need to use the (large) save button. When you save it you get a folder with an images sub folder (containing your images), a CSS file, an image for the button (to manually switch between images), jQuery 1.3.2, a minified js file of the effect you have done and a html page for testing/usage
  • Dropdown Menu Wizard (click here for the demo of this effect): This creates a drop down menu. It has 3 steps:
    1. Description (no “Do not show this again” check box again)
    2. Set up the top level menu options image
    3. Add second level options and save. The output is pretty much the same as with image sequencer - minified js file of your effect,  jQuery and an HTML page.
  • Custom: The non-wizard of the group. This guy is powerful and will let you build a lot of effects together, but you need to have an HTML file to start with as it will give you a list of the tags/id’s available - no page, no tags, nothing to work with: . If gives you a single page to wire up the events and I think this would be useful for people needing something special. image
  • Tooltip Wizard (click here for the demo of this effect): Two step wizard to add tool tips to text/images.
    1. Description (no “Do not show this again” check box again)
    2. On step two you put in the text/image and the tool tip and save it.

    I do like the menu option “Clean Code Mode” (under the options menu) which disables the minifi-ing of the code it generates. This will be very useful for people using this to learn from.

    Overall this is a good first drop, although it should be viewed as a beta. The performance is terrible, there is so much more you could do with jQuery that it doesn’t do, it is unaware of plug-in’s which is important for jQuery and the UI has many things that aren’t logical (there is no hint that the Custom needs a HTML page to actually do anything). However as a tool to train people, or give designers a tool to work with jQuery this will be very valuable and I will be demo’ing it at my jQuery talk.

    06 Apr 2009

    VSTT Reference Guide

    If you are looking for some serious guidance on Visual Studio test, then the Rangers have come to the rescue (again) with a lovely 83 page document on VSTT. Get it from CodePlex

    It sounds like a contraction that 83 pages is a reference guide but from my use this morning of it (couldn’t of come out at a better time for me), it isn’t. It is not meant to be read from beginning to end, rather you can easily skip between parts because the material is presented in a Q&A format which is easy to manage.

    What’s in it?

    • SETUP CONSIDERATIONS 9
    • WEB TEST CONSIDERATIONS 14
    • WEB SERVICE TEST CONSIDERATIONS 35
    • UNIT TEST CONSIDERATIONS 36
    • LOAD TEST CONSIDERATIONS 42
    • LOAD TEST RIG CONSIDERATION 56
    • PERFORMANCE DATA COLLECTION AND USAGE 66
    • LOAD TEST RESULTS STORE INFORMATION 73
    • TEST CUSTOMIZATION 76
    • ITEMS CHANGED OR FIXED IN VSTS 2008 SP1 77
    • GENERAL COMMANDS AND TRICKS (NOT VSTS SPECIFIC) 79

    Pages