News Archives 
   
(click month to expand)
  

Recent Technology News Stories

Solentive News
I Think I Love LINQ  [click for more...]

I am beggining to really like to ease of using LINQ, On a project I am working on now I am storing configuration in an XML file like so:

<sites>
    <site id="1" sitename="foo">
       <domains>
          <domain url="www.foo.com" />
       </domains>
       <settings>
          <setting key="foo" value="foo" />
       </settings>
    </site>
</sites>

My original solution to load this involded looping over the nodes looping over the domains and settings and loading this into my Site object. Time consuming to write and looked messy. And then LINQ to XML steps in. My code to parse this XML file into my collection of Site objects now becomes:

Me.Sites = (From site In document.Descendants("site") _
                        Select New Site With { _
                        .ID = site.Attribute("id").Value, _
                        .SiteName = site.Attribute("sitename").Value, _
                        .Domains = (From domain In site.Elements("domains").Descendants("domain") _
                                    Select domain) _
                                    .ToDictionary(Function(domain) domain.Attribute("url").Value, Function(domain) domain.Attribute("url").Value), _
                        .Settings = (From setting In site.Elements("settings").Descendants("setting") _
                                    Select setting) _
                                    .ToDictionary(Function(setting) setting.Attribute("key").Value, Function(setting) setting.Attribute("value").Value) _
                        }).ToList()



The speed of this is actually pretty fast and I tested with some large XML files and was happy with the performance. And I dont think life can get easier....


Cheers

Stefan
 

25/12/2007   [Link]
Merry Christmas Everyone  [click for more...]

Hi All!

Just wanted to say Merry Christmas to everyone. I know l stopped blogging about 6 months ago but the reason behind that was I became a dad for the first time and little Sofia came into our lives.

 Now everyone says this and I can vouch that it is true, when you do have a kid it is fantastic (yes there are sleepless nights although we have been very lucky in that respect) and you put many other things to the side.

I'm manage to squeeze in some time to stay up-to-date on the latest .Net tech (and some non .Net related things) but haven't had the time to keep my Points of interest posts going (possibly in the new year).

I've been following Silverlight with great interest and I'm glad it has been rebranded as Silverlight 2.0 as 1.1 didn't sit right. I'm also glad about the extended feature set but hope they include some of the features I feel would ease adoption (printing support [add your vote] http://silverlight.net/forums/t/516.aspx etc).

.Net 3.5 is out which is great (just need to find a project where I can actually use it) and I've been following the Fran's posts (http://weblogs.asp.net/fbouma/) about Linq to LLBLGen Pro with interest. I've used every release Fran's has put out but feel he is going to gain a much bigger audience when he has a friendlier way of utilising the code LLBLGen generates.

Anyway have to keep this short and sweet as I'm at the in-laws for Christmas dinner in Denmark.

Merry Christmas and a Happy New Year to you all.

Roll on 2008.

John

25/12/2007   [Link]
Exploring ListView Control in ASP.NET 3.5  [click for more...]
This article explains some of the useful features and properties of the new ListView control in ASP.NET 3.5.
25/12/2007   [Link] Mustafa Basgun
Hunting down bad try..catch blocks  [click for more...]

Way too often developers take the easy solution to use try..catch blocks to silence and ignore exceptions.

There are two things to do when you see this happening:

  1. Explain the developers why it's a bad practice (exceptions are costly and their use should be reserved to exceptional cases), and teach them how to do better (use TryParse, test upfront for known problematic values, etc.)
  2. Hunt down the bad blocks and remove them whenever possible

To spot try..catch blocks with empty catch statements, you can use something simple: Visual Studio's search feature, which allows you to search in files. Of course, you can start by looking for catch{} and catch {} and catch { } and catch {}, but that makes several cases, and doesn't cover the cases where there are line breaks. Luckily, Visual Studio's search support regular expressions, so you can devise one that would match all cases. To get you started, here are some you can use catch.*:b*\n:b*\{:b*\n*:b*\} and catch.*:b*\n:b*\{\} and catch.*:b*\n:b*\{.*\}

I wrote these quickly, so they can be improved. Any expert in regular expression should be able to write a single expression that matches all cases... This could be further improved to include the catch blocks that contain comments such as // ignore exceptions or /* simply ignore this problem */.

25/12/2007   [Link]
Three New Videos on Event Handlers and Custom Health Monitoring Events  [click for more...]
Chris Pels will show how to create event handlers for ASP.NET web pages and web server controls, as well as how to extend the standard health monitoring events in ASP.NET to create custom events.
25/12/2007   [Link]
Simple way to pack your .NET code into single executable  [click for more...]
C# and C++ source code for .Net application packer tool
25/12/2007   [Link] SteveLi-Cellbi
IBM Snags Apax-Backed Software Company  [click for more...]
Big Blue agrees to acquire in-memory database software provider Solid Information Technology, backed by Apax Partners and CapMan, for an undisclosed sum.
25/12/2007   [Link] info@redherring.com (Red Herring)
Building a Web Message Board using Visual Studio 2008 Part I - The Basic Message Board  [click for more...]
This article builds a web based message board and uses several new technologies introduced with Visual Studio 2008 such as LINQ, WCF Web Programming, WCF Syndication, ASP.NET ListView, ASP.NET DataPager etc
25/12/2007   [Link] Rama Krishna Vavilala
DSA 0.3 released!  [click for more...]

Just before Christmas as well :-)

Download DSA 0.3

New features for this release include:

  • Probability Search
  • Power algorithm
  • Greatest common denominator algorithm
  • Reverse words algorithm
  • Set collection (will be renamed to OrderedSet in DSA 0.4 and an unordered Set will be introduced in DSA 0.4 as well)
  • Sequential search
  • Merge sort
  • Merge ordered

Some other not so major features include:

  • Pseudo code for around 75% of everything to enable easy language ports (100% of everything will be in DSA 0.4 - the paper to screen conversion is taking a while)
  • Queue and Stack have been dropped - DSA will only support collections not in the BCL
    • ArrayList is being dropped in DSA 0.4
  • Complete XML documentation for every public algorithm/data structure - also private methods are XML doc'd as well.

Also this is the first release to include offline documentation (or documentation of any kind excluding XML docs).

Data Structures and Algorithms Documentation

Download DSA 0.3

DSA 0.4

This release will be out mid February and will introduce some new key algorithms and collections.  I am in the process of finalizing the features to be added in DSA 0.4 but you can expect more tree data structures as well as balancing algorithms to further optimise tree data structures.  I will post something when this is finalized - will be the back end of December.

Download DSA 0.3

Thank you for your support and if there is anything you would like to suggest then it is not too late...also if you find any issues please let me know.

25/12/2007   [Link]
Developing of silverlight-enabled ASP.NET controls  [click for more...]
This article shows you how to bring revolutionary UI provided by MS Silverlight to the world of ASP.NET control development with the help of recent released ASP.NET 3.5 Extensions CTP
25/12/2007   [Link] Aleksey Zaharov
Silverlight Controls - The Path to Reusable XAML  [click for more...]
An article about Silverlight Controls - The path to reusable XAML
25/12/2007   [Link] Justin-Josef Angel [MVP]
Online Circular Chess in Silverlight, ASP.NET Ajax, WCF Web Services and LINQ to SQL  [click for more...]
An application for users to play Circular Chess over the internet based on Silverlight, ASP.NET Ajax, WCF Web Services and LINQ to SQL
25/12/2007   [Link] Perrin01
Configuration Merge for WCF  [click for more...]

One of the blog's readers from Italy, Fabio Cozzolino has written a interesting host for WCF that gets and merges configuration from different configuration files. You can download the code from his post, which is completely in Italian. (Anyway, the code is not, it is English).

This could be a good solution to separate the configuration in logical partitions or divisions, and then, have a central host that consolidates all the configuration (It is a server side solution).  

25/12/2007   [Link]
Aspect Oriented Programming in JavaScript using Humax Web Framework  [click for more...]
Using Humax v0.2, this article is going to explain how to write and apply aspect-oriented/metadata driven programming in JavaScript.
25/12/2007   [Link] M Sheik Uduman Ali
VS just got served!, aka The ??? Shift, aka 'Converting a project to Unicode???' No, it's 'Converting a project??? ToUnicode!!!'  [click for more...]

Regular readers might remember my whole Converting a project to Unicode series in nine parts:

  • Part 0 (The introduction)
  • Part 1 (Business before pleasure)
  • Part 2 ('Sorry, you're not my type.' 'Um, maybe I could change that?)
  • Part 3 (Can I quote you on that?)
  • Part 4 (/Delightful, /Delicious, /DUnicode!)
  • Part 5 (Are we there yet? Well, not just yet)
  • Part 6 (Upon the road not traveled)
  • Part 7 (What does it mean to fit things to a 'T', anyway?)
  • Part 8 (Fitting MSLU into the mix)
  • Part 9 (The project's postpartum postmortem)
  • One of the lingering questions in many people's minds (now that they can't ask anymore why no useful samples exist!) is why there aren't more tools to help with this process.

    Luckily, MVP Mihai Nita is not sitting around waiting for such tools to be built!

    Take a look over on his site at ToUnicode – Automating some of the steps of Unicode code conversion (Windows), for a tool that takes many of these steps and tries to automate them.

    This strikes me as an effort that can only get better over time. and one that needs to keep on getting better as the need becomes greater and greater....

    Now this does not let the people who ought to be doing more here off the hook, believe me. But the better the external efforts get, the more foolish the internal folks look for not doing more here.

    And Visual Studio just got served!

    Thanks Mihai -- I not only owe you a book, I now also owe you a beer! :-)

     

    All of the characters in Unicode have taken off for Grand Cayman for the Christmas holiday weekend
    (they are staying at the Marriott Grand Cayman Beach Hotel in case you are there and are curious at all the characters hanging out by the pool!)

    25/12/2007   [Link]
    Merry Christmas MVPs!! (+gift inside)  [click for more...]

    Are you a Microsoft MVP ?
    Are you running Vista ?
    Planning to go to the Summit ?

    Then download my MVP Global Summit Countdown Gadget for Vista!!
    http://gallery.live.com/liveItemDetail.aspx?li=c36fa782-4ab9-4383-aaff-81b1b2a27314&bt=1&pl=1

    MVP Global Summit Countdown

    This new release supports 3 languages (english, spanish and french) and the flyout window shows latest entries from the MVP Summit event rss.

    Enjoy, and Merry Christmas.

    25/12/2007   [Link]
    Build .NET Applications Without Hand-coding  [click for more...]
    Iron Speed Designer builds database, forms, and reporting applications for .NET – without hand-coding. Quickly create feature-complete custom applications that integrate Web pages, controls, data access, validation and security. Accelerate development and eliminate infrastructure programming.
    25/12/2007   [Link] Miles Gibson
    ASP.NET AJAX Controls and Extenders Tutorial  [click for more...]
    This tutorial examines the new Visual Studio 2008 Server Control and Server Control Extender. A compendium of tips, tricks and gotchas, it is a comprehensive tutorial that will provide readers with the skills necessary to start building advanced AJAX-enabled custom controls with Visual Studio.
    25/12/2007   [Link] James Ashley
    Extending Office 2007 with Tangram Extension Tools for Application  [click for more...]
    A new method for Extending Microsoft Office 2007 User Interface using MFC/ATL and .NET technologies.
    25/12/2007   [Link] sunhui
    High Performance Applications with Advanced Numerical Analysis on the .NET Framework  [click for more...]
    This article looks at strengths of the .NET platform regarding numerical analysis, tips for increased performance of .NET applications, capabilities of IMSL C# Numerical Library for Microsoft .NET applications, and features that allows the .NET Framework to be used for advanced analytics.
    25/12/2007   [Link] Visual Numerics, Inc.
    Copyright © 2007 Solentive | Disclaimer | Contact | Home