Dear visitor, thanks for stopping by! If you want, you can follow all updates on Snowball.be via RSS. You can also follow me on Twitter or Facebook. More interesting posts from other Microsoft Regional Directors can be found at The Region.
Gill Cleeren     Personal | Programming     December 21, 2007    

BABD. This abbreviation of Become A Better Developer represents my intentions for the upcoming year 2008. Why you say? In the past months, there have been coming out so many new things, think of Ajax, Silverlight, MVC, WPF 3.5, WCF 3.5... that it's my opinion you need to structure how to keep up with all this.

After some thinking, I thought it would be a good thing to create a list of things I really want to achieve in 2008. Of course, new things will come along, but this list (I did check it twice) are the bare neccesities to become an even better developer that has a global knowledge of everything that is available, and a deep knowledge on selected topics, like in my case Silverlight for example. It's my opinion that this is what you need to do to keep up with the pace of releases.
Also on this list are some intentions that I want to achieve for the community, like blogging on a more regular base.

So, here's my list of intentions for my BABD initiative. Why don't you create your own and put it on your blog too?

  • Learn WCF and WF: I'm busy creating a software factory for my job, and I really need deep(er) knowledge on WCF and WF. If I'm successful, I hope by the end of this Christmas holiday, I will already have covered this topic partly, since I recently got me the "Learning WCF" book from O'Reilly, which after reading reviews on Amazon seemed the best buy.
  • Become MCPD/MCTS: I promised Ordina (and some other people too...) that in the course of the following year, I'd take all the exams to become MCPD, if possibly by June 30th.
  • Blog at least 3 times a week: I think I do this already, however, I do want to write on Snowball at least 3 times a week on news from the .net world.
  • 2 (I hope) articles on CodeFlakes.net every month: I started CodeFlakes back in September, but I must confess, I didn't have the time to do what I actually wanted to achieve with it this year. However, by the end of next year, I want it to have 25 articles of my own, so that's 2 a month. Topics will be Silverlight (duh), AJAX, ASP.net, LINQ... Webcasts might also be an option here.
  • 6-8 ChopSticks webcasts: MSDN Belux recently launched ChopSticks and my first webcast will be appearing shortly. I want to create at least 6 in the coming year, if possible even more...
  • Read more blogs and create a blogpost about it: I follow a lot of blogs, but it's sometimes hard to keep up. I therefore intend to clean up my list, and start using Tags to keep up. I would love to create a blogpost with the most interesting topics (which counts as a post for Snowball!!)
  • Create 1 .NET Magazine article: after my first publication this year on AJAX, I intend to write another one in 2008. That shouldn't be that hard...
  • Visug: I've doing a good job for the Belgian .net community. I intend to keep doing the same here, however I should find the time to create a new website.
  • Create a succesful Ordina blog. We're currently creating something new there (more on this later)
  • Patters and Practices: Also for my job, I need to pick up on the Web Client Software Factory and others. This is quite high in priority too...
  • Start something I can't really say a lot about yet... something completely new, stay tuned...
  • Buy a Full HD Plasma TV!
  • More will come, I'm sure...

Phew, that's quite a list. I hope that in one year from now, I can say that I really achieved all this.

What about you? Have your intentions ready yet? Post them here!

  Posted on: Friday, December 21, 2007 10:47:02 AM (Romance Standard Time, UTC+01:00)   |   Comments [0]
         
Gill Cleeren     Mix 07 | Programming | Silverlight | Visug     December 16, 2007    

I'm proud to annouce the Belgian availability of the first European Silverlight Challenge, organised by Ineta Europe. In Belgium, Visug, the Belgian Visual Studio User Group, is the usergroup that organises this challenge.

Header_ESC

Probably, you haven't heard of this competition yet. Well then, let me explain what you have to do in order to participate, and, maybe more importantly, what great prices are to be won!

The goal is to get more people developing Silverlight applications. As a participant, you can create whatever application you wish in Silverlight (may be in combination with another technology, for example ASP.NET/ASP.NET AJAX). You can upload your creation to our Belgian competition website, http://belgium.silverlightchallenge.eu. Do not upload it to the general website (www.silverlightchallenge.eu). The creations that reach us before January 31st 2008, will take part in the competition. A jury will then decide on 4 winners between the Belgian creations. The best creation will be entered in the European contest afterwards, where a jury will select the best participation over all countries.

 

Prizes_small

Ready to start creating your Silverlight application? Maybe you'll get even more creative when you hear what great prizes you can win!

For the Belgian competition, these are the prizes:

  • 1st Prize :
    • To be confirmed: MSDN subscription
    • IdeaBlade's DevForce Professional License
    • JetBrains's ReSharper + DotTrace bundle,
    • Wrike - 2 year 5-user subscription
    • Telerik RadControls for ASP.NET Developer Subscription and Source Code License.
  • 2nd Prize :
    • Infragistic's NetAdvantage for .NET
    • Jet Brains's ReSharper
    • Wrike - 2 Year 1 user subscription
    • O'reilly Book (to choose from this five books: Learning WCF Programming WPF Learning ASP.NET 2.0 Ajax Programming ASP.NET Ajax Head First C# - Please consider that this last book has still not been published and might not be available)
  • 3rd Prize :
    • Component One's DemoWorks licenses
    • Wrike - 2 Year 1 user subscription
  • 4th Prize (Students) :
    • 25 Silverlight Unleashed
    • Wrike - 2 Year 1 user subscription

     

    And finallay, the European prizes:

  • 1st. Prize :
    • MIX '08 ticket & travel,
    • 1 DevForce Enterprise License (without BOS)
    • 1 Telerik's RadControls for ASP.NET + WinForms + Reporting Developer Subscription and Source Code Licenses
    • 1 Component One's Enterprise Studio Subscription
    • Wrike  2 year 15 user Subscription
  • 2nd. Prize :
    • MIX '08 ticket & travel
    • 1 Telerik's RadControls for ASP.NET + WinForms + Reporting Developer Subscription and Source Code Licenses
    • 1 Component One's Enterprise Studio Subscription
    • 1 Red-Gate's NET professional bundle (ANTS Profiler Pro)
  • 3rd. Prize :
    • MIX '08 : ticket & travel FC
    • 1 Telerik's RadControls for ASP.NET + WinForms + Reporting Developer Subscription and Source Code Licenses
    • 1 Component One's Enterprise Studio Subscription
  • 4th. Prize (students) :
    • 1 Telerik's RadControls for ASP.NET + WinForms + Reporting Developer Subscription and Source Code Licenses

     

    Did I just hear your brains thinkering on what you should create? I think I did, dear reader! Whenever your creation is ready for publication, upload it to http://belgium.silverlightchallenge.eu . If you are in need for further assistance, you can contact me through the contact form on the challenge website or simply use the comments here.

     

    Here are some banners you can use to put on your own blog to promote our competition. Start spreading the word!

    ESC_Banner_468_60 

    ESC_Banner_120_240

    ESC_Banner_120_120 

  •   Posted on: Sunday, December 16, 2007 5:39:34 PM (Romance Standard Time, UTC+01:00)   |   Comments [1]
             
    Gill Cleeren     .net | .net 3.5 | ASP.net | Links | Programming | Silverlight     November 12, 2007    

    Here are some links you might find useful:
    -LINQ cookbook: series of solutions to specific scenarios, that the team comes across when writing code and using queries
    -Nice intro to ASP.NET MVC framework
    -Looking for a replacement for FreeTextBox? Maybe this newly created rich text box for ASP.NET is the solution: http://www.codeplex.com/rte



    -Automatic Properties and Initializers in C# 3.0: a nice introduction on these new features in C# 3.0.

    I hope you can find some use of these links. Feel free to post interesting links in the comments!
      Posted on: Monday, November 12, 2007 9:16:21 PM (Romance Standard Time, UTC+01:00)   |   Comments [2]
             
    Gill Cleeren     .net | ASP.net | Programming     January 1, 2007    

    In this first part, I will show you how to set up a portal with DotNetNuke.
    If you’re a beginner with DNN, you probably won’t be starting by cracking open the core of the framework. Instead, you’ll want to get your first DNN site up and running as soon as possible. Therefore, I advise you to download only the following files from the DNN site:

    • DotNetNuke 4.X Starter Kit
    • DotNetNuke 4.X Docs (optional)

    I included the Docs-download, since you’ll be needing that sooner or later anyhow, when you’ll be delving deeper into DNN (and I’m sure you will after reading my article!).

    The starter kit includes everything you’ll need right now: it’s a VSI (Visual Studio Content Installer) file, which will install a number of project and file templates to create your site and your modules in no time. In this very first part, we’ll be using the project template to create the site.

    So, go ahead, and let the installer to its work. It’s recommended that you exit Visual Studio while installing, to prevent files from being locked. Should you get a warning while installing, simply ignore and continue the installer.

    1.JPG

    Now, let’s open Visual Studio. By using one of the installed templates, we’ll have it create an entire web application for us. Remember that I said earlier that DNN was written in VB.net? Well, therefore, you will see the some templates only when you select VB.net in the language selector.

    Select “Create New Website” , and set the language to Visual Basic. You should now be able to select “DotNetNuke Web Application Framework”. Select the location for your site and give it a name and finish by clicking OK. For now, let it install on the file system. Depending on your computer, it will take up to a few minutes before your site is ready.

    2.JPG

    When finished, you’ll see a HTML page in the editor window of your IDE, where all the additional actions you need to do are explained.
    Because the explanations are not very long, I’ll go in a little more detail here.

    First, create the database. You can use SQL Server 2000, SQL Server 2005 or SQL Server 2005 Express. I’ll be using SQL Server 2005 for the rest of this explanation; the other versions are very similar.
    Open SQL Server Management Studio, and create a new database. I’ll name my database ArticleDemo, but you can name it whatever you like.

    3.JPG

    I use a “testuser”-account for the login on the database (so no trusted connection). For this, I created a login on the database server, and added this user to the users of the database.

    No further actions are needed on this database, all tables and stored procedures will be created via script when you first run your portal.
    Now we’ll be creating the site on IIS 7. Earlier, we let the site create on the file system. However, there is a known bug in DNN at the moment, that will make it impossible for users to subscribe on your site if you use the internal ASP.net server instead of IIS. Therefore, we’ll use IIS!

    Open IIS 7, and right-click on “Web Sites”, then select “Add Web Site”. In the dialog, enter the name of your site (I entered DemoDNN), and set the Physical Path to the directory where you let Visual Studio extract all the files. You can select to either use the DefaultAppPool, which is new in IIS 7, or you can use the IIS 6 model by selecting the “Classic .Net AppPool”, which is what I selected here.

    To end with, set the port to something else than 80 (for example, 81 is OK). If you use my settings, you’ll be able to browse to your site via this URL: http://localhost:81/DemoDNN .

    4.JPG

    To be able to debug our portal from Visual Studio, Windows Authentication must be enabled.Under Authentication for the new site, simply enable Windows Authentication. If you have not configured IIS 7 correctly, you won’t be able to select this! See my other article to do this!

    6.JPG

    Since I’m doing this installation with Windows Vista, I’ve shown the necessary steps to get DNN running on IIS7. If you’re using Windows XP, you’ll be using IIS 5.1. In 5.1, you can’t create more websites than the default web site. In this case, you’ll be creating a virtual directory under this default web site, and you’ll connect to http://localhost/DemoDNN . If you use Windows 2003 with IIS 6, the set up is analogue.

    To configure IIS 7 correctly to be able to debug from Visual Studio, see my other article!

    Only 2 things left to do now.
    First, we’ll make some changes in the web.config to make DNN use the newly created database. So, go ahead and open the web.config file. First, search for the connectionstrings-tag. You should see the following:

    <!-- Connection String for SQL Server 2005 Express -->

        <add

          name="SiteSqlServer"

          connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"

          providerName="System.Data.SqlClient" />

        <!-- Connection String for SQL Server 2000/2005

        <add

          name="SiteSqlServer"

          connectionString="Server=(local);Database=DotNetNuke;uid=;pwd=;"

          providerName="System.Data.SqlClient" />-->

    As you can see, this is a connection-string that’s OK should you be working with SQL Server Express and a datafile as database. In my case, it’s not what I need, since I’m using SQL Server 2005. So, comment out the first “add”, and uncomment the second one. Then, make the necessary changes to this one: use the correct server name, database name, user ID and password. I have created a login “testuser” on the database, with the password also set to “testuser”.
    In my case, this is what the connection string will look like:

    <connectionStrings>

        <!-- Connection String for SQL Server 2005 Express -->

        <!--<add

          name="SiteSqlServer"

          connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"

          providerName="System.Data.SqlClient" />-->

        <!-- Connection String for SQL Server 2000/2005-->

        <add

          name="SiteSqlServer"

          connectionString="Server=vista;Database=ArticleDemo;uid=testuser;pwd=testuser;"

          providerName="System.Data.SqlClient" />

      </connectionStrings>


    Now, you have to change this connection string on one other place in the web.config. In the appSettings-tag, you’ll see the following line:

    <add key="SiteSqlServer" value="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;"/>

    Change the value-attribute to the same connection string as above, so in my case, you’ll get:

    <add key="SiteSqlServer" value="Server=vista;Database=ArticleDemo;uid=testuser;pwd=testuser;"/>

    You can now save the web.config.

    The last thing we have to do before we can actually test the portal, is change the server on which your application should run.
    Right-click on the project in the solution explorer, and select “Property Pages”. In the left-menu, select “Start Options”. Under “Server”, you’ll see that it is now set to “Use default web server”, in this case, the internal ASP.net server. Remember that this is not what we wanted, so we’ll have it call IIS. Therefore, select “Use custom server”, and enter as Base URL the URL you specified in IIS (in my case: http://localhost:81/default.aspx ) .

    Finally, click OK to close.

    5.JPG

    That’s about it! Now, let Visual Studio build the project, for now, we’ll do a debug build. Simply hit F5, and the build process will start. After a few moments (the first build is normally quite slow, so it might actually take a few minutes…), your browser will open.

    At this point, DNN will start executing scripts (all called via code) and extracting files. This will also take a few minutes. Some versions of DNN throw an error here on the AppDomain being unloaded. You can ignore this however.

    If you’re using DNN 4.4.0 or higher like me, the install will be shorter, because less is installed by default.

    7.JPG

    To finally access your portal, and see the result of all your hard work, click on the link at the bottom of the page. You should see the following screen.

    8.JPG

    There you go, your portal is ready! The installation was not that hard, was it?
    In the next part, I’ll take you through the basic administrator settings, so you can start customizing your portal (because the standard is just… let’s say “standard”)!

      Posted on: Monday, January 01, 2007 3:34:52 PM (Romance Standard Time, UTC+01:00)   |   Comments [0]
             
    Gill Cleeren     .net | ASP.net | C# | DotNetNuke | Programming     January 1, 2007    

    Lately, I have been doing a lot of projects with Dotnetnuke. I first started using it for my own use, but lately, I have used it to create some large portal sites for some of our customers.

    To start with, let me first introduce Dotnetnuke (DNN). The very first sentence on the DNN homepage states the following: DotNetNuke is an Open Source Framework ideal for creating Enterprise Web Applications.

    Let’s analyze this sentence, shall we? For starters, it’s a framework that you can use out-of-the-box to set up a portal site. Included in the download package are a number of modules that are sufficient to build an entire portal. Modules included vary from a simple HTML module to an entire forum and an image gallery. Of course, these are not enough to build an entire enterprise application. But DNN is very versatile, and so for every need, new modules can be build.
    Since it’s an open-source project, it’s easy to tweak the framework where needed, to meet the needs of the application you are designing with it.

    Sometimes, if an web-application is needed very fast, nothing comes close to use a portal framework like DNN. Lately, I have built the new Visug (Visual Studio User Group: www.visug.be ) site with DNN. We needed a site quickly, and DNN brought us the solution.
    Some people I met are skeptical towards the use of DNN. The main concerns are mostly speed, reliability and not being in control. Personally, I admit that sometimes the latter can be true. I have had some problems with included features that are hard to override or undo. But since it’s open-source, I have been able to conquer them all.

    One little thing, though. DNN is written in VB.net (the core and the core modules, that is). If you’re like me and you don’t program in VB.net, but still want to develop modules, you can do so in C#! Since Visual Studio 2005, it’s not a problem to have a solution with VB.net and C# files. Should you require to modify some core settings, you’ll have to write your code in VB.net, however.

    So, now that I have been using DNN for several large projects, I have decided to share my knowledge on it via a series of articles.

    In the first article, I will discuss how to install DNN and create the first portal with it. In the articles to come, I will show you how to create a module, how to skin the portal and how to extend DNN to use it to create full enterprise applications where DNN is used in a SOA environment. Stay tuned!

      Posted on: Monday, January 01, 2007 3:29:31 PM (Romance Standard Time, UTC+01:00)   |   Comments [2]
             
    Gill Cleeren     .net | C# | Programming     December 26, 2006    

    Since I didn't spend much time on the computer these last days, I hadn't noticed that last Friday, December 22nd, Enterprise Library V3.0 CTP was released! Shame on me ;-)

    If you don't know what EntLib is, here's a short description: The patterns & practices Enterprise Library is a library of application blocks designed to assist developers with common enterprise development challenges. Application blocks are a type of guidance, provided as source code that can be used "as is," extended, or modified by developers to use on enterprise development projects.

    I used it myself in 2 projects, and I'm very pleased with it.
    In V3.0, some new features will (of course) be included, which will make it more complete. No complete lists is available, but here's an overview.

    Core

    • Source Code installer
    • Partial Trust Support
    • Strong-Named Binary Assemblies

    Validation Application Block

    • Core validation API
    • Minimal Validator Library
    • Attaching validators to objects via attributes
    • Attaching validators to objects via configuration
    • Not included yet (but in the works): Configuration tool support, complete validator library, integration with ASP.NET, Windows Forms, WCF etc.

    Data Access Application Block

    • SQL Server Compact Edition Support
    • New Database.UpdateDatabase overload with updateBatchSize parameter

    Configuration Tool

    • Visual Studio IDE integration
    • AppSettings support
    • Encryption support

    Application Block Software Factory

    • Templates and recipes for creating application blocks and provider libraries
    • Preliminary documentation

    Strong Naming Guidance Package

    • Recipes to assist in strong-naming and updating [InternalsVisibleTo] across multiple projects

    If you're like me, you are gonna play with it already! So, download it here on the new Codeplex-site!

      Posted on: Tuesday, December 26, 2006 12:36:34 PM (Romance Standard Time, UTC+01:00)   |   Comments [0]
             
    Gill Cleeren     Programming | Vista     November 20, 2006    

    Now that Vista is released, I have started to plan a launch event at my company, Ordina Belgium. This event will probably take place 25th January in Lummen and will be titlted:

    Programming (on) Windows Vista.

    As you can probably tell by the title, the event will focus some new programming concepts in Windows Vista, like for example the sidebar, or how to create Aero Glass applications.
    Expect more details within the next 2 weeks, when we'll make a full agenda publically available!

      Posted on: Monday, November 20, 2006 10:32:56 PM (Romance Standard Time, UTC+01:00)   |   Comments [0]
             
    Gill Cleeren     .net | C# | Programming | WinFX | WPF | XAML     November 7, 2006    

    The .NET Framework 3.0 has officially been released!  You can download the .NET Framework 3.0 components here:

    If you use Vista, they are installed by default.

    Th  If you have a previous CTP installed, please be sure to review the uninstall instructions

      Posted on: Tuesday, November 07, 2006 11:09:54 AM (Romance Standard Time, UTC+01:00)   |   Comments [0]
             
    Gill Cleeren     .net | ASP.net | C# | Programming     October 22, 2006    

    Today, I was programming on the new www.visug.be of which I recently became the webmaster.
    I needed a time picker control for ASP.net. I already downloaded Basic Date Picker, which includes a date picker for free and a time picker. Sadly, the time picker isn't free.

    So I searched a little, and stumbled on a free library of custom controls which can be found here: http://www.eworldui.net/ .
    It includes among others a very nice Time Picker control for ASP.net, that works under ASP.net 1.1 and 2.0.
    Great controls, I must say!

      Posted on: Sunday, October 22, 2006 10:22:22 PM (Romance Daylight Time, UTC+02:00)   |   Comments [1]
             
    Gill Cleeren     .net | ASP.net | C# | Programming     October 17, 2006    

    The november issue is available, free for download as always!

    This issue focuses on security and writing more secure code...

      Posted on: Tuesday, October 17, 2006 8:39:01 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | ASP.net | Atlas | Programming | Programming tools     October 2, 2006    

    From the site:

    Web.UI for ASP.NET AJAX is deeply integrated into the AJAX Library client-side type system:

    All controls inherit from the Sys.UI.Control client-side base class;
    All controls implement AJAX Library type descriptors, providing type information at runtime;
    The namespace and all types are registered with the AJAX Library type system;

    Web.UI for ASP.NET AJAX exposes comprehensive client-side APIs:

    An industry first, the same level of programmatic control is available on the client as on the server;
    The new APIs fully comply with the AJAX Library client-side syntax and semantics;
    State of the art client-side API reference documentation is included with the product;

    Web.UI for ASP.NET AJAX is optimized to work with the ASP.NET AJAX UpdatePanel control:

    All client-side programmatic changes are persisted to the server upon callbacks or postbacks;
    Proper client-side dispose mechanisms are used to optimize browser's memory consumption;
    Control footprint is highly optimized in order to provide the fastest callback response time.

    More here: http://atlas.componentart.com/

      Posted on: Monday, October 02, 2006 11:41:06 AM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | C# | Programming     September 29, 2006    

    Regular expressions... I don't like them. Or, no, let me specify: I don't like to WRITE them. Tools like The Regulator help create them, but they're not easy to use.

    I found a library in C# which contains a lot of predifined regular expressions: http://developer.coreweb.com/articles/Default15.aspx.
    Enjoy ;-)

     

      Posted on: Friday, September 29, 2006 9:20:23 AM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | Programming | Vista     September 27, 2006    

    Yet another .net related release today: beta 2 of Powershell is available as from now.

    Today Microsoft announced the availability of Microsoft Windows PowerShell RC2, the command line shell and scripting language that helps IT Professionals achieve greater productivity and control of system administration. Using a new admin-focused scripting language and consistent syntax and utilities, Windows PowerShell accelerates automation.  Windows PowerShell is easy to adopt, learn, and use, because it works with existing IT infrastructure and scripting tools. 

    This Release Candidate 2 of Windows PowerShell addresses numerous customer requests based on their evaluation of Beta3 and RC1 including:

    ·         Direct ADSI support to allow IT Pros to more easily administer Active Directory
    ·         Improved support for Windows Management Instrumentation through ability to change WMI properties via methods
    ·         Additional logical operators (XOR and binary XOR) that make it easier to write sophisticated scripts
    ·         Improved help content and help functionality including new views that make it easier to find the right information.
    ·         Windows PowerShell 1.0 will release-to-web in Q4 CY06
    ·         Windows PowerShell will be leveraged by Microsoft Exchange Server 2007 and System Center Operations Manager 2007.

     

    To download, go here.

      Posted on: Wednesday, September 27, 2006 8:54:31 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | ASP.net | Programming | Programming tools | Visual Studio.net     September 27, 2006    

    Microsoft has released a new add-in tool to help Visual Basic developers preserve Visual Basic 6 applications and breathe .Net into them.  Microsoft released its Interop Forms Toolkit 1.0 as a free add-in that simplifies the process of displaying .Net WinForms in a VB6 application.

    The new toolkit not only helps to preserve VB6 applications, but also lets developers add functionality to them through additional .Net forms. For example, a developer could provide more dynamic content by adding a WinForm that accesses Web services or RSS feeds, Microsoft said.

    Moreover, instead of upgrading the entire code base, VB6 applications can be extended one form at a time, Microsoft said.

    "The goal is a phased upgrade, with production releases at the end of each iteration containing both Visual Basic 6 and Visual Basic .Net forms running in the same Visual Basic 6 process," according to a Microsoft Web page describing the new toolkit.

    More here.

      Posted on: Wednesday, September 27, 2006 8:50:22 PM (Romance Daylight Time, UTC+02:00)   |   Comments [1]
             
    Gill Cleeren     .net | ASP.net | Atlas | C# | Programming     September 11, 2006    

    After a naming game, Atlas finally got its final name!

    -Microsoft AJAX Library:  The client-side JavaScript library that works with any browser and also supports any server-side framework, not just ASP.NET.

    -ASP.NET 2.0 AJAX Extensions: The server-side functionality that seamlessly integrates with ASP.NET and uses the same programming model familiar to existing ASP.NET developers.

    Atlas will also ship in version 1.0 (final) before the end of the year!!!

    Scott Guthrie has an entire article devoted to the Atlas roadmap. You can read it here.

      Posted on: Monday, September 11, 2006 10:43:40 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     Programming     September 11, 2006    
    A new tool, still in beta though, will be very handy for sniffing all network traffic.

    Network Monitor 2.1 is included as optional component in every Windows NT/2000 installation but has a severe limitation: it cannot put the network interface in promiscuous mode, preventing capture of all packets passing on the cable.
    To have a full version of Network Monitor 2.1 you have to buy Microsoft System Management Server (SMS) 1.2 or 2.0.

    Upcoming Network Monitor 3 will offer several new features and will finally be an uncapped, free, stand-alone application for Windows XP/2003/Vista/codename Longhorn (both 32 and 64bits):

    • Real time capture and display of frames
    • Simultaneous capture on multiple network adapters
    • Multiple simultaneous capture sessions
    • Network conversations and a tree view displaying frames by conversation
    • Enhanced capture/display filtering
    • A new script-based protocol parser language (NPL), and script-based parsers

    Enroll for the beta here and check dedicated beta newsgroup here

      Posted on: Monday, September 11, 2006 10:33:39 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | C# | Microsoft | Programming | Microsoft | Vista | Windows | WinFX | WPF     September 6, 2006    

    Is today "Release Day" or something? So many new releases...

    Let's begin with IronPython, which reached status 1.0:

    IronPython 1.0 has been released to the .NET community and is available on CodePlex.  IronPython is an implementation of the Python dynamic programming language.  IronPython is built on top of the .NET Framework and is interoperable with other .NET languages.  Binaries, source code, and tutorials are available at CodePlex.

    Click here to download IronPython at CodePlex.

    Another release is Expression Web Beta 1:

    We are pleased to present the Beta 1 release of Expression Web (formerly Expression Web Designer).

    Expression Web is a professional design tool that helps you create and work with:

    • Standards-based Web sites
    • Sophisticated CSS-based layouts
    • Extensive CSS formatting and management
    • Rich data presentation
    • Powerful ASP.NET 2.0-based technology

    To download, go here.

    Still going strong ;-) Next is WCF, which reached RC1 also.

    The release candidate 1 for the .NET Framework 3.0 is now available!  You can download the components for the RC1 here:

    More info on RC1.


    The Interactive Designer got updated, and now the September CTP is available:
    Microsoft® Expression® Interactive Designer September 2006 Community Technology Preview (CTP) is a professional design tool used to create engaging, rich user interfaces for desktop and Web applications.

    To download, go
    here.

    To finish, this one isn't actually released as of yet, but it's an interesting project being researched at MS:

    Microsoft researchers are experimenting with an automatic code zapper for the company's Internet Explorer Web browser.

    Researchers at the Redmond, Wash., company have completed work on a prototype framework called BrowserShield that promises to allow IE to intercept and remove, on the fly, malicious code hidden on Web pages, instead showing users safe equivalents of those pages.

    The BrowserShield project—the brainchild of Helen Wang, a project leader in Microsoft Research's Systems & Networking Research Group, and an outgrowth of the company's Shield initiative to block network worms—could one day even become Microsoft's answer to zero-day browser exploits such as the WMF (Windows Metafile) attack that spread like wildfire in December 2005.
    More here.

    That's all folks ;-)

      Posted on: Wednesday, September 06, 2006 10:12:58 PM (Romance Daylight Time, UTC+02:00)   |   Comments [1]
             
    Gill Cleeren     .net | C# | Microsoft | Programming | Software | Microsoft | Visual Studio.net     August 31, 2006    
    MS released XNA Game Studio Express (Beta), the first beta for this tool that can help every individual to become a game programmer.

    From the site:
    XNA Game Studio Express enables individuals and small teams to more easily create video games using new, optimized cross-platform gaming libraries for Windows and Xbox 360. This beta release targets the development of games for Windows. The final version of XNA Game Studio Express will be available this holiday season and will enable development of games which target Windows and upon purchase of a XNA Creators Club subscription, the Xbox 360 as well.

    While we’re very proud of this Beta milestone, it does not represent all of the great features we are enabling in XNA Game Studio Express which will be available in final release form by this holiday. Some of the key feature areas that were not able to make it into this beta include:
    - The XNA Framework Content Pipeline feature is not present in this release of XNA Game Studio Express (Beta). It will be made available in a future beta release of XNA Game Studio Express
    - Support for retail Xbox 360 game development. This feature will be made available upon final release of XNA Game Studio Express later this holiday
    - Additional starter kits and tutorials will be made available upon final release of XNA Game Studio Express

    It's a free download of 91MB. You can find it here
      Posted on: Thursday, August 31, 2006 5:11:34 PM (Romance Daylight Time, UTC+02:00)   |   Comments [1]
             
    Gill Cleeren     .net | Programming | WPF     August 31, 2006    



    My article on WPF reflections can also be read on CodeProject. Since it was put there, it received almost 2000 reads and a rating of 4 out of 5!

    Putting nice articles on CodeProject enhances your visibility, so if you're a blogger and write technical articles, it's a nice place to put them!

    Here is the link :-)

      Posted on: Thursday, August 31, 2006 8:28:45 AM (Romance Daylight Time, UTC+02:00)   |   Comments [1]
             
    Gill Cleeren     .net | Microsoft | Programming     August 20, 2006    

    Just came across a post that marks the completion of the book: Windows Developer Power Tools: Turbocharge Windows Development with More.


    From Amazon:
    There is a wealth of open and free software available today for Windows developers who want to extend the development environment, reduce development effort and increase productivity. Windows Developer Power Tools is an encyclopedic guide to more than 100 free and open source tools available to programmers who build applications for Windows desktops and servers, including web applications and services. With its unique task-oriented organization, this book will help you find the tools you need to solve common (and uncommon) problems. Each tool in the book includes a capsule summary -- a mini user's guide -- to help readers get up to speed quickly. Also, plenty of links point you to additional detail online if you wish to delve more deeply into features and functionality. This one-stop resource covers a wide range of open source and freeware tools to help you answer questions around planning, developing, testing, and rolling out great software.

    Here you can find the list of tools described in the book.

    This seems like a book well worth buying if you're a Windows developer like me. Publish date is November 1st in the US, so expect it here about 2 weeks later!

      Posted on: Sunday, August 20, 2006 9:41:36 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | C# | Programming | WinFX | WPF | XAML     August 18, 2006    

    In this tutorial, I'm going to explain several 2D effects that can be performed on images, using only XAML code. By the end of this tutorial, you'll know:

    • how to create image refections
    • how to skew images
    • how to drop shadows

    So let's get to it!

    Create an empty WinFX application. We'll use the Window1.xaml.
    Make the background of the image somewhat darker, so we can better see the effects we'll create further on. For this, simply use the Window.Background property. Also, set the Height to 600 and Width to 800.

    <Window x:Class="Reflection.Window1"
       xmlns="
    http://schemas.microsoft.com/winfx/2006/xaml/presentation"
       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
       Title="Reflection" Height="600" Width="800" 
       Background="#CCCCCC"
    >


    Add the image to your project
    Select an image to include in your project. I'll do this tutorial with the image included in my project, but you can of course use any image you want. The image has to be included in your project. Once included, go to the properties window, and with the image selected in the solution explorer, set the "Build Action" to "Content" and "Copy to output directory" to "Copy always". This ensures that the image will be available when running the project.

    Let's XAML
    Finally, we're ready to do some XAML'ing (don't know if that is already a word, but I vote it should become one though!).
    Since we will not be needing any advanced layout of the window, we'll use a simple StackPanel. By default, a stackpanel places all content it receives in 1 invisible vertical column. That's enough for this sample.

    So, delete the <Grid> and </Grid> and replace them with <StackPanel> and </StackPanel>.

    For the image effects, we'll need ... an image. Add an simple image element to begin with. Also, give it a name, we'll be needing this name later on. Use the following code:

    <Image Source="image.jpg" Width="200" Height="300" x:Name="myImage"></Image>

    We'll now start adding the reflection effect. For reflections, the VisualBrush is very handy.
    What is the VisualBrush? It's a brush, like DrawingBrush, but it can paint with the contents of any other visual element that derives from Visual. Since Visual is the base class of all UI elements in WPF, you can paint with almost any markup in a VisualBrush.
    Before we can reflect our image, we must add an element in which we can make the reflection appear. You can do this with a Rectangle, a Border...
    For now, I'll use the Border. Add the Border element to the same StackPanel where you put the image. Since it's a StackPanel, the border is put below the Image (you can visualize this by setting the Background to some color).

    <Border Width="210" Height="300"></Border>

    Now, we'll use the recently introduced VisualBrush to fill the background of the Border with the contents of the image (this is why we needed to name the image!).
    Add a VisualBrush to the Border like so:

    <Border.Background>
       <VisualBrush Visual="{Binding ElementName=myImage}">
       </VisualBrush>
    </Border.Background>


    You should now see something like this:

    Of course, for a reflection, we need a mirror effect. This can be achieved by adding a ScaleTransform on the VisualBrush. By providing a value of -1, the image will be flipped around the Y-axis.

    <VisualBrush.Transform>
       <ScaleTransform ScaleX="1" ScaleY="-1" CenterX="200" CenterY="150"></ScaleTransform>
    </VisualBrush.Transform>

    Now, to complete the reflection-part of this tutorial, we'll add an OpacityMask to the Border. With this in place, we can make the reflected image fade out into the backgroud, creating a nice effect.

    <Border.OpacityMask>
       <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
          <GradientStop Offset="0" Color="Black"></GradientStop>
          <GradientStop Offset="0.6" Color="Transparent"></GradientStop>
       </LinearGradientBrush>
    </Border.OpacityMask>

    This again uses a LinearGradientBrush, with the color being Transparant from 0.6 on. This means that at 60% of the reflected image, nothing can be seen anymore.

    We'll also add a border around the original image in this code. Add the following code around your image element:

    <Border BorderBrush="White" BorderThickness="5" HorizontalAlignment="Center" VerticalAlignment="Center">
    ...
    </Border>

    Your code should now look like the following:

    <StackPanel>
       <Border BorderBrush="White" BorderThickness="5" HorizontalAlignment="Center" VerticalAlignment="Center">
          <Image Source="image.jpg" Width="200" Height="300" Stretch="Fill" x:Name="myImage"></Image>
       </Border>
       <Border Width="210" Height="300">
          <Border.Background>
             <VisualBrush Visual="{Binding ElementName=myImage}">
                <VisualBrush.Transform>
                   <ScaleTransform ScaleX="1" ScaleY="-1" CenterX="200" CenterY="150"></ScaleTransform>
                </VisualBrush.Transform>
             </VisualBrush>
          </Border.Background>
          <Border.OpacityMask>
             <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                <GradientStop Offset="0" Color="Black"></GradientStop>
                <GradientStop Offset="0.6" Color="Transparent"></GradientStop>
             </LinearGradientBrush>
          </Border.OpacityMask>
       </Border>
    </StackPanel>

    And the result should resemble this:



    Skew and Shadows
    In the latest part of this tutorial, I'm going to add a shadow to the original image, and skew both the images, to create a 3D effect.
    First, the shadow. Shadows are created using a BitmapEffect. A bitmap effect takes visual content as input and produces a new surface by applying one or more image filters, such as a blur or a drop shadow. Currently, there are, among other, the DropShadowEffect, the BlurBitmapEffect and the EmbossBitmapEffect. More might be added later. We'll focus on the DropShadowEffect for now. Information on the other effects can be found in the Windows SDK.

    Add the following code to the Border where the original images resides:

    <Border.BitmapEffect>
       <BitmapEffectGroup>
          <DropShadowBitmapEffect Color="Black" Direction="20" ShadowDepth="25" Softness="1" 
             Opacity="0.5"/>
       </BitmapEffectGroup>
    </Border.BitmapEffect>

    This adds the dropshadow to the white border containing the image. These properties are self-explaining, so I'm not going any deeper into this.

    Now, to finish, we have to skew both the image and the reflection to create the effect of depth. For this, we'll again use a transformation, this time a RenderTransform. The Angle-properties provided indicate the angle for the rotation.
    The following code has to be added to the original image.

    <Border.RenderTransform>
       <SkewTransform CenterX="0" CenterY="0" AngleX="0" AngleY="10" />
    </Border.RenderTransform>

    The reflection needs a re-centering, so we provide a value for the CenterX and CenterY properties.

    The result you get should like the following:



    I hope this WPF example can help you in creating great layouts with this fantastic new language!

    The complete solution can be downloaded below.

    ImageEffects.zip (120.66 KB)

    Note that you need Visual Studio 2005/Visual C# Express with .net 3.0 installed. This code is tested with the June CTP.

     

      Posted on: Friday, August 18, 2006 11:15:10 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | C# | Programming | Visual Studio.net | WinFX | WPF | XAML     August 18, 2006    

    I'm through with learning WPF (Windows Presentation Foundation), so now I'll have more time to write some samples for my blog, so everybode can start learning a little on WPF (that double-U-P-F ;-) ).

    Today, I'm going to show you a small sample, in which I use a gradient and a storyboard to create a sort of a flashing circle. This could be used to draw the user's attention to something in the UI.

    Here is the sample code:

    <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
    WindowTitle="www.snowball.be - WPF Examples" Background="White">
    <DockPanel>
       <Ellipse Width="200" Height="200" Name="MyEllipse">
          <Ellipse.Fill>
             <RadialGradientBrush >
                <GradientStop Offset="0" Color="#CCCCCCCC" />
                <GradientStop Offset="0.5" Color="white" />
                <GradientStop Offset="1" Color="black"/>
             </RadialGradientBrush >
          </Ellipse.Fill>
       </Ellipse>
    <DockPanel.Triggers>
       <EventTrigger RoutedEvent="Page.Loaded">
          <BeginStoryboard Name="MyBeginStoryBoard">
             <Storyboard Name="MyStoryBoard">
                <DoubleAnimation Storyboard.TargetName="MyEllipse" Storyboard.TargetProperty="(Ellipse.Height)" 
                   From="0" To="200" AutoReverse="true"
                   RepeatBehavior="0:0:10" BeginTime="0:0:0" />
                <DoubleAnimation Storyboard.TargetName="MyEllipse" Storyboard.TargetProperty="(Ellipse.Width)" 
                   From="0" To="200" AutoReverse="true"
                   RepeatBehavior="0:0:10" BeginTime="0:0:0" />
             </Storyboard>
          </BeginStoryboard>
       </EventTrigger>
    </DockPanel.Triggers>
    </DockPanel>
    </Page>

    First, I create an circle, which is actually an ellipse with identical width and height (one could also use the RadiusX and RadiusY properties, the result would be the same).

    <Ellipse Width="200" Height="200" Name="MyEllipse">

    Then, we use a Brush, in this case, the RadialGradientBrush, to create a gradient fill in the ellipse. No longer are the "GradientStops" or the "GradientStopsCollection" tags neccessary (they were in previous CTP's, but now they can be omitted).
    To specify the colors, we use several GradientStop elements. The offset specifies where the color should "start". This is a relative value, and thus can't be more than 1. In this case, I specify 3 colors.

    <GradientStop Offset="0" Color="#CCCCCCCC" />
    <GradientStop Offset="0.5" Color="white" />
    <GradientStop Offset="1" Color="black"/>

    Now, to create the flashing effect, we have to use an animation. To start the animation, we use a trigger, in this case, an event trigger, which is routed to the Loaded event. This results in the trigger firing when the page loads.

    <EventTrigger RoutedEvent="Page.Loaded">

    For the animation itself, we use the storyboard. In this storyboard, which is like the name says, a series of steps that will be executed. You can compare it to a band of drawings that form a comic.
    The storyboard thus consists of several animations. In this case, I use a DoubleAnimation, because the property I'm going to change, is of value Double: I'm going to alter the Height and Width property of the Ellipse. These are indeed Double values.

    In the first animation, I specify that I want to animate the ellipse I created earlier, by setting the TargetName, and the property I want to change is the Height. In the From and the To properties, I specify what the values for the Height should be. In this case, I want the ellipse to pop up out of nothing, so I set the From to 0 and the To to 200.

    The RepeatBehavior property specifies how long this animation should repeat, in this case, I set it to 10 seconds. Note that several animations can have different RepeatBehaviors: one can go one longer than the other. The BeginTime simply specifies when the animation should start: you can build in a delay.
    Finally, the AutoReverse property indicates that WPF should reverse the animation after completed.

    The second animation does essentially the same, but for the width.
    Both these animations can't be grouped into one, which is a pity.

    The result looks like this:



    kick it on DotNetKicks.com
      Posted on: Friday, August 18, 2006 6:37:02 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | ASP.net | C# | Programming | Software | Visual Studio.net     August 17, 2006    

    Already added 2 posts about new stuff today, so I'm going to bundle these last 2 for today...

    Yesterday, while I was at Disneyland (you can see my pics on my Flickr account...), MS released SP1 for Visual Studio 2003. It's a 160MB download, and once installed, you can't return without uninstalling, so install with care!

    Go here for the download.

    Something I came across are Nuggets. In Disneyland, you might ask? Yes, there were Chicken Nuggets, but since this a technical blog, I'm not going to bother you with what I ate... I'm talking about MSDN nuggets, hosted by Microsoft UK.

    Don't have the time to read a 10-page how-to article or watch a full length webcast? Try an MSDN Nugget, a webcast that takes you step-by-step to discovering new functionality or exploring a hot developer topic, all in 10-15 minutes. View them online now or download for later reference.

    Head over here for a lot of good content!

      Posted on: Thursday, August 17, 2006 3:44:17 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | C# | Programming | Visual Studio.net     August 14, 2006    

    More and more languages seem to be getting "the .net treatment". Next on the list is PHP.
    Microsoft is hosting a project on its CodePlex site to deliver a PHP language compiler for the .Net Framework.

    The project's name is as Phalanger, the project reached Version 2.0 Beta 2 on July 30.

    The primary goal of the project, released under Microsoft Shared Source Permissive License, is to enable full functionality of existing PHP scripts on .Net without any modification, Microsoft said.

    Unlike the original PHP interpreter, Phalanger compiles scripts into MSIL (Microsoft Intermediate Language).

    The object model in Phalanger is compatible with PHP 5.0, and it lets developers combine PHP objects with .Net ones.

    In fact, developers can use a class written in PHP from a .Net application or to import a .Net class—that might be written in C# or Visual Basic—into PHP scripts.

    Currently, one of the major features is to incorporate Phalanger in Visual Studio.net.

    More on this can be found at CodePlex.com!

      Posted on: Monday, August 14, 2006 2:56:14 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | Microsoft | Programming | WinFX | WPF | XAML     August 10, 2006    

    As previously announced here, on September 25th, Microsoft is organizing an event on .net 3.0 in Kinepolis Brussels. David Boschmans announced the complete agenda on his site today.
    Today, the line-up and sessions are announced. A new item is that we, the visitors, can now vote which sessions we want to see.

    So, everybody, go vote AND PLEASE don't vote for the introductions!!

    Vote here.
    General information on the event can be found here.

      Posted on: Thursday, August 10, 2006 9:38:54 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | Programming     August 4, 2006    

    Resharper... almost every .net developer respecting himself (or herself for that matter!) , has it installed on the development machine.

    I had build #249 of Resharper 2.0 for Visual Studio 2005 installed. Problem was, since the installation, my Visual Studio opened very slow. Once it was up and running, I didn't notice any slowdown anymore.

    Yesterday, Gabriel pointed my to build #256. I installed it (it took quite some time uninstalling and then reintegrating with Visual Studio 2005), and then my IDE opened much faster!

    So, if you are having the same problems, update to the new build.

    Now that we are at it, I found a very interesting article on Resharper.

      Posted on: Friday, August 04, 2006 8:23:00 AM (Romance Daylight Time, UTC+02:00)   |   Comments [1]
             
    Gill Cleeren     .net | Programming | Vista | WinFX | WPF | XAML     August 2, 2006    

    People have been asking me questions about WPF, mostly how to get started.
    Since WPF is still somewhat obscure, in this article I’m going to try to make things a little more clear to get you on your way using WPF.

    As you might or might not know, WPF is part of .net 3.0, formerly known as WinFX. Other components included in .net 3.0 are WCF (Windows Communication Foundation), WF (Windows Workflow Foundation) and CardSpace (formerly InfoCard).

    For starters, you need an operating system supporting WPF. This can be:
    -Windows XP SP2
    -Windows 2003
    -Windows Vista

    I do recommend running .net 3.0 in a virtual pc environment! Since a lot of CTP’s, beta’s and RC’s are coming our way, it’s easier to just create a VPC with Windows XP or 2003 , and install .net 3.0! Since Virtual PC is free anyhow, I don’t see a reason why not doing it this way!
    Uninstalling beta software can be a real pain, so why compromise your precious production environment!?
    (For Virtual PC go here)

    On both XP and 2003, you need to install the runtime, to be able to run WPF applications. This can be a web-install (of around 2.5 MB, and then the rest is downloaded) or you might as well download the whole package.

    Now, there are some issues with the latest CTP of July… This latest release does not come with the Visual Studio 2005 extensions, required to build your WPF applications in VS.
    Therefore, if you want to start developing (or better, start playing around…), I suggest you stick to the June CTP, which has full support for all the tools.

    So, if you want to develop within Visual Studio, follow the next steps. If not, skip this section.
    The June CTP runtime can be downloaded here.

    To start developing, you might want to install the SDK. It’s a big download of around 1.1GB. It comes with lots of samples and tools, like XAMLPad. The SDK can be downloaded here.

    The SDK is however not required when you intend to develop in Visual Studio! For VS, Microsoft has released some extensions and templates, which will make your WPF-life a lot easier! If you don’t have Visual Studio, you can use one of the free Express editions.
    For the download, go here.

    We’re almost done!
    Microsoft is also preparing a set of designer tools for WPF, the Expression suite.
    The Interactive Designer outputs XAML code, which can be used to enhance the layout of your applications, without even knowing XAML!
    For the Interactive Designer, go here.
    The Graphic Designer allows you to create images and export these as XAML code to be included in your WPF projects.
    This can be downloaded here.

    That’s it! Now, you are ready to start!

    If you want the latest release, and don’t care for the Visual Studio Extensions, go for the July CTP, which was released July 18th.

    The runtime can be downloaded here.
    And the SDK is found right here.

    I did find some work around to get this latest CTP working with Orcas, but since I didn’t try it myself, I cannot guarantee that it will work.
    The “fix” goes as follows:

    Instal Orcas in VS using the misexec override: msiexec /i vsextwfx.msi WRC_INSTALLED_OVERRIDE=1

    The override bypasses the installation version checking so you can install the extensions.

    After this you have July CTP installed and Orcas from the previous version. This works just fine.

    To solve your problem with the Orcas designer trying to open:

    Right click on a .xaml file in your solution and choose "open with...". Choose "xml Editor" and click on "Set as default". Now all .xaml files will open with the xml editor instead of trying to open the unfinished Orcas designer.

    In a next article, I’ll post some interesting resources to get you building WPF applications in no time!

    kick it on DotNetKicks.com
      Posted on: Wednesday, August 02, 2006 12:06:10 PM (Romance Daylight Time, UTC+02:00)   |   Comments [1]
             
    Gill Cleeren     Programming | Snowball     August 2, 2006    

    After my friend Kris Van der Mast published an article on making custom macros for dasBlog, I now added them to Snowball.be too.

    In fact, I added 2 more links: to DotNetKicks and Reddit.

    Here's the source code for these...

    public virtual Control Reddit(string linkText, string cssStyle)
    {   
       
    if(this.currentEntry != null)
       
    {
          
    string link = this.currentEntry.Link != null ? this.currentEntry.Link : Utils.GetPermaLinkUrl(this.currentEntry);
          
    return new LiteralControl("<a href=\"http://reddit.com/submit?url=" + link + "\" class=\"" + cssStyle + "\">" + linkText + "</a>");
       }
       return new LiteralControl("");
    }

    public virtual Control DotNetKickIt(string linkText, string cssStyle)
    {
       
    if(this.currentEntry != null)
       
    {
          
    string link = this.currentEntry.Link != null ? this.currentEntry.Link : Utils.GetPermaLinkUrl(this.currentEntry);
          
    return new LiteralControl("<a href=\"http://www.dotnetkicks.com/kick/?url=" + link + "\" class=\"" + cssStyle + "\">" + linkText + "</a>");
       }
       return new LiteralControl("");
    }

    Now, let the clicking start ;-)

      Posted on: Wednesday, August 02, 2006 10:44:24 AM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     Programming     August 1, 2006    

    JetBrains, creators of the the renowed Resharper suite, have introduced Team City.

    From the site:
    TeamCity is an integrated team environment which, following the tradition of IntelliJ IDEA, brings the software team productivity to a whole new level. As IntelliJ IDEA solves every-day needs of a single developer, TeamCity is intended to solve every-day needs of a development team by providing:

    • Workflow automation
    • Tight integration with build and test tools
    • Unit-test frequency and analysis precision
    • Server-side inspections and coverage
    • Seamless collaboration
    • And more...
    It appears to be a build management / continuous integration tool. However, it's works for both Java and .NET and seems to plug into most of the popular .NET tools.
    At the moment, no announcement on a plug-in for Visual Studio... That ain't good!
      Posted on: Tuesday, August 01, 2006 10:53:04 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     Programming     July 30, 2006    

    As a web developer, I often come acros situations in which Javascript is neccessary. I must admit, I am not a wizard with Javascript (shame on me...).
    Maybe this download will help me! Aptana is a free IDE for html/js applications, with lots of build in functions.

    Give it a try, I'm going too in a minute.

      Posted on: Sunday, July 30, 2006 12:28:06 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | Programming     July 30, 2006    

    Sandcastle is NDoc. No, not really, but it is very much alike.

    Like NDoc, it is a documentation compiler for .net. It's a plugin for Visual Studio 2005, and the first CTP can be downloaded as of today.

    Some information from the blog:
    Mission Statement:

    Enable managed class library developers throughout the world to easily create accurate, informative documentation with a common look and feel

     

    Sandcastle Overview:

    • Produces quality, comprehensive, familiar MSDN-like documentation.
    • Works with or without authored comments.
    • Supports Generics and .NET Framework 2.0
    • Sandcastle has 2 main components (MrefBuilder and Build Assembler)
    • MrefBuilder generates reflection xml file for Build Assembler
    • Build Assembler includes syntax generation, transformation..etc
    • Sandcastle is used internally to build .Net Framework documentation
      Posted on: Sunday, July 30, 2006 12:24:13 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | Programming | Software | Microsoft     July 26, 2006    

    Is it me, or is it like every day I have been announcing that Microsoft is giving yet some other software away for free?

    Maybe it's the heat that's getting to them?

    Anyway, a big thank you for all you not-MSDN subscribers to the big M, since they are giving away the complete MSDN library for free. You can download the May 2006 edition.

    Prepare your computer however, since the download is quite large, up to 1.7 GB!

    Go here for the download!

    Thank you Microsoft... What?? Again no thank you... Tssss.... ;-)

      Posted on: Wednesday, July 26, 2006 11:31:54 PM (Romance Daylight Time, UTC+02:00)   |   Comments [2]
             
    Gill Cleeren     ASP.net | Programming     July 25, 2006    

    Well, this is very cool! Converting an image, any image, to HTML on the fly! Never seen this before actually.
    The image is converted to html pixel by pixel, so the rendered HTML gets quite large if the image is too big... 

    See it for yourself here.

      Posted on: Tuesday, July 25, 2006 10:00:28 PM (Romance Daylight Time, UTC+02:00)   |   Comments [1]
             
    Gill Cleeren     .net | C# | Microsoft | Programming | Vista | WinFX | WPF | XAML     July 11, 2006    

    WPF not only stands for new fantastic tools for layout. There are also some very interesting new ways to implement databinding in your applications.
    In this article, I’m going to show how you can easily build an RSS reader using the new databinding features in WPF.

    How databinding works in WPF
    In order not to go too fast, first, let me explain some basic concepts of databinding in WPF.

    To keep data used in UI in sync with data in the datasource (for example a database), we can of course use properties. There is nothing wrong if you keep doing this under WPF.
    However, WPF provides very handy binding features, that will make your life a lot easier!

    We could bind the value of a textbox with the following code:
    <TextBox Text="{Binding Path=Age}">
    </TextBox>

    Databinding under WPF uses a Binding object. The above code declares a textbox in XAML, and assigns the text-property the value of a property named Age of an object that it is bound to. This is done using the Path property. The Path property refers to the property of the object we are binding too.

    To know to which object we are binding, we have the DataContext property. In WPF, every FrameworkElement and also every FrameworkContentElement has a DataContext property. It is of type object, so we can bind to whatever we like.
    The binding does however have some interesting behaviour: if no DataContext is specified on the object itself (like with our textbox), it goes up the tree in which the controls are nested. So if we add our textbox in a Grid, it will look if this Grid has a DataContext. If not, it goes up higher…
    This is of course very useful if we have more than one object (say 5 textboxes) binding to the same object.

    Let me show you how to declare an object to which we’ll bind in XAML code (this uses the new syntax, so to run this, you have to upgrade to beta 2 or higher!)

    <Window x:Class="Snowball.Window2"
        xmlns="
    http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="
    http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:Snowball"
        Title="Snowball" Height="300" Width="300"
        >
      <Window.Resources>
        <local:Person x:Key="Gill" Name="Gill Cleeren" Age="27"/>
      </Window.Resources>
        <Grid DataContext="{StaticResource Gill}">
          
          <TextBox Text="{Binding Path=Name}">
          </TextBox>
        </Grid>
    </Window>

    And in the code-behind:
    namespace Snowball
    {
        public class Person
        {
            private string name;

            public string Name
            {
                get { return name; }
                set { name = value; }
            }
            private string age;

            public string Age
            {
                get { return age; }
                set { age = value; }
            }

            public Person()
            { }
        }
    }

    What I have done here, is creating a Person object in XAML. For this to work, you have to provide a default constructor.
    First, we have to wire the CLR namespace to be known in XAML: xmlns:local="clr-namespace:Snowball".
    Now, we can use the tag “local” to refer to the namespace in which the Person class resides.
    Using the following line, we instantiate a Person using XAML:
    <local:Person x:Key="Gill" Name="Gill Cleeren" Age="27"/>

    The result is a textbox showing my name:

    Note that if you try this in Visual Studio at the time of writing, you get an error viewing the design view. Don’t worry, when running, it all works fine.

    Binding XML data to a list
    Most of the time, we bind data to a list: a dropdown, a grid… In this part, I’m going to bind an RSS feed from my website www.snowball.be to a list.
    To do this, we’ll need an XmlDataProvider.

    Data can be accessed by using a Provider. Currently, 2 providers exist: the XmlDataProvider and the ObjectDataProvider.
    An XmlDataProvider object must be declared within the resources, for example the resources of the grid:

    <Grid.Resources>
            <XmlDataProvider x:Key="SnowballRSS" Source="
    http://www.snowball.be/SyndicationService.asmx/GetRss" />
    </Grid.Resources>


    The x:Key assigns a name, which we can use in our code-behind.

    We can now use this object as a datasource for a listbox, like this:

    <ListBox ItemsSource="{Binding Source={StaticResource SnowballRSS}, XPath=//rss//channel//item }">
    </ListBox.ItemTemplate>

    We provide a value for the ItemSource, being an instance of Binding. For this Binding instance, we provide the Source property. Since we’re dealing with a resource that is defined in the XAML itself, we again use StaticResource and as value, the name of the dataprovider. A second attribute is the XPath expression, to locate the value we want to show in the listbox.

    This is the result:



    What happens, is that the entire XML tag is being read into a listitem. This is not desired, so we have to provide some kind of formatting, to tell WPF exactly what we want to show in the items.
    This can be accomplished using a datatemplate.

    We provide an instance of DataTemplate to be used as value for the ItemTemplate property of the listbox. In this datatemplate, we can specify what to show as listitem.
    In the following code, I’m telling to make each listitem consist of a TextBlock. The text to be shown is taken from the surrounding Listbox (remember searching for the data up in the controltree?). In the data it finds, which is an XML tag with subnodes, we can to take the title as the value for the item.

    <ListBox.ItemTemplate>
       <DataTemplate>
          <TextBlock Text="{Binding XPath=title}"></TextBlock>
       </DataTemplate>
    </ListBox.ItemTemplate>

    When we now run this, we get the following:



    Much better, isn’t it?!

    In the next part, we’re going to make the application a little bit more complete, providing a click event for the listbox, and making sure that some fields are filled in, again using databinding.

    Adding the detailsform
    We’ll now change the program somewhat to make it display the details of the item selected in the listbox.

    We’ll add a Grid to make it easy to display 3 rows and 2 columns with textblocks, labels and textboxes.
    This can be done with the following code:

    <Grid>
       <Grid.RowDefinitions>
          <RowDefinition Height="30"></RowDefinition>
          <RowDefinition Height="30"></RowDefinition>
          <RowDefinition Height="*"></RowDefinition>
       </Grid.RowDefinitions>
       <Grid.ColumnDefinitions>
          <ColumnDefinition Width="0.2*"></ColumnDefinition>
          <ColumnDefinition Width="0.8*"></ColumnDefinition>
       </Grid.ColumnDefinitions>
       <TextBlock Grid.Row="0" Grid.Column="0">Title</TextBlock>
       <Label Grid.Row="0" Grid.Column="1"></Label>
       <TextBlock Grid.Row="1" Grid.Column="0">Link:</TextBlock>
       <Label Grid.Row="1" Grid.Column="1" ></Label>
       <TextBlock Grid.Row="2" Grid.Column="0">Article</TextBlock>
       <TextBox Grid.Row="2" Grid.Column="1"></TextBox>
    </Grid>

    After adding the Grid, we’ll also have to change the rest of the markup a little. Take a look at the sample code provided with this article to see the rest of the layout.

    We now want the detail-fields display more info on the selected item in the Listbox.  Therefore, the Grid containing these fields should have its DataContext set to the item selected in the list. We do this with the following code:

    <Grid DataContext="{Binding ElementName=RSSList, Path=SelectedItem}" >

    The element is the name of the listbox, the path is once again the property within the source to which we’ll be binding the grid (and thus the detail fields).

    Now, every time we select an item in the listbox, the grid has its datacontext set to this selected item. The fields can now get details as follows:


    <Label Grid.Row="0" Grid.Column="1" Content="{Binding XPath=title}"></Label>

    <Label Grid.Row="1" Grid.Column="1" Content="{Binding XPath=link}">
                </Label>

    <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding XPath=description}"></TextBox>

    The result should resemble the following:



    Congratulations, you built your first databound application, using WPF databinding and a simple datatemplate!

    In my next (large) article, we’ll be looking at the styling tools provided by WPF to make this application look TONS better!

    RSS Reader.zip (45.32 KB)


    kick it on DotNetKicks.com
      Posted on: Tuesday, July 11, 2006 3:56:47 PM (Romance Daylight Time, UTC+02:00)   |   Comments [2]
             
    Gill Cleeren     .net | C# | Programming     July 11, 2006    

    I was today a small project to write Excel files from .net. As you might (or might not...) know, you have to reference the Office DLL's for that.
    I opened the project I made on a work-pc on my laptop, and all of a sudden, it didn't compile anymore.

    The Microsoft.Office.Interop.Excel was missing. However, Office (and thus Excel) 2003 is installed on my system. After some googling (it's an official word know, so let's use it ;-) ), I found out that I probably installed Office 2003 before I installed the .net framework 1.1 (shame on me...). If you install in this order, the PIA's are not installed with a typical install.

    The solution was simply run the Office setup, and install the .net Programmability Support. Problem solved... Another thing to remember when installing a new development PC!

      Posted on: Tuesday, July 11, 2006 11:55:48 AM (Romance Daylight Time, UTC+02:00)   |   Comments [1]
             
    Gill Cleeren     .net | Programming     July 7, 2006    

    Today, I had the oppurtunity to have lunch with 2 great Microsoft developers, Lutz Roeder and Peli de Halleux.
    If you are a .net developer, the name of Lutz Roeder might ring a bell... Ever heard of Reflector? Yes? Well then, then you heard about Lutz too. Reflector is like his "hobby" program, but for being a hobby, it's like one of the most useful programs for .net ever.

    Peli is Belgian, Lutz is German, they both work in Redmond for the big M itself. Peli works on the CLR, while Lutz has been on the Expression suite team for a few years now.

    We got some very indepth talk on programming topics, as well as some "lighter" ones, such as 'What's the weather in Seattle?' (it's very rainy, so they say...) or 'How is it like to work in Redmond'.

    A funny anecdote Peli told: it appears that in Redmond, one programmer can debug the actual bytes... If IL is not enough for him, he "simply" turns to bytecode... Go figure :-p .

    Over dinner, I got to talk to Lutz about the new Expression suite. It is actually the first program to be build in WPF entirely. He told me that building these applications wasn't always easy, since they went through the very early stages of the new platform. The Expression suite can thus be thought of as "the big test" for WPF.

    This talk was a unique chance to get to know people that you hear of, but rarely have the chance to meet. Thanks to David Boschmans and VISUG, I had this chance!

      Posted on: Saturday, July 08, 2006 1:11:20 AM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | ASP.net | C# | Programming     July 6, 2006    

    The August 2006 issue of MSDN Magazine is now available online here. And for those of you on the go, a downloadable CHM file of the entire issue is available here


     

      Posted on: Thursday, July 06, 2006 9:59:26 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     Programming     July 5, 2006    

    Did you know this little, but very interesting project on GotDotNet? It's called Guidance Explorer.

    Guidance Explorer is a tool to find and use relevant patterns & practices guidance. Guidance Explorer installs with a guidance library including performance and security topics for .NET and ASP.NET applications.

    The guidance library contains checklists and guidelines covering design, implementation and deployment topics. The tool and the library will evolve over time to include additional types of guidance.

    You can download it here for free.

      Posted on: Wednesday, July 05, 2006 6:18:45 PM (Romance Daylight Time, UTC+02:00)   |   Comments [1]
             
    Gill Cleeren     .net | C# | Programming     June 18, 2006    

    For some time, I have been wondering how to create flashing, animated notify icons that appear in your taskbar. Windows has a lot of these, like for example MSN Messenger uses one when a person signs in. Or the flashing network icon when there is traffic going in or out.

    I started thinking at first it used some kind of animated gif, but soon realized that that isn’t possible, since the NotifyIcon control in WinForms programs can only handle *.ico files or *.bmp files.

    Now I found out how this actually works: the key element is the Timer control. It fires events at a regular interval, and what actually happens is that the icon is changed at these regular intervals.

    To show “the magic”, I created a little demo-project.

    First, create an array of icons:
    private Icon[] icons = new Icon[4];

    Then, load in the images. It’s actually creating an animated gif, only that now, you have to programmatically change between the steps.

    icons[0] = new Icon("green.ico");
    icons[1] = new Icon("red.ico");
    icons[2] = new Icon("green.ico");
    icons[3] = new Icon("red.ico");

    Add a NotifyIcon and a Timer control to your program. Set the timer to an interval of 1000 (that is milliseconds).

    Now, create the Tick event of the timer, to fire the event that will change the icon displayed in the NotifyIcon.
    Since we have loaded the icons in an array, all we have to do is change the index in the array, and update the icon in the NotifyIcon accordingly.

    private void timerChangeIcons_Tick(object sender, EventArgs e)
    {
       animatedIcon.Icon = icons[currentIcon];
       currentIcon++;
          if (currentIcon == 4)
             currentIcon = 0;
    }

    Don’t forget to add the timer.Start() to the load of your form!

    I did however notice something strange in the behavior of C#. It appears that icons created with for example PhotoShop or Paint throw an error when loaded: "Argument 'picture' must be a picture that can be used as a Icon”. This appears that have been a problem already in C# 1.0 and it is not addressed under C# 2.0.
    To correctly display the created icons, you have to change the headers, based on Windows API documentation.
    A workaround I found, is simply to open the icons in Visual Studio and save them again. This worked correctly afterwards.

    The complete code can be found in the zip-file.

    FlashingNotifyIcon.zip (14.98 KB)

    kick it on dotnetkicks.com
      Posted on: Sunday, June 18, 2006 12:13:28 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | Programming | Vista | Windows     June 13, 2006    



    Soma announced a few days back on his blog that WinFX is to be renamed .net Framework 3.0. Kinda confusing, isn't it?

    When speaking to developers about WinFX one question that repeatedly comes up is, “WinFX sounds great, but what happens to .NET?” .NET Framework has becomes the most successful developer platform in the world.  Developers know and love .NET.

    Ok, that is true... But why not WinFX.net or something like it?

    The .NET Framework has always been at the core of WinFX, but the WinFX brand didn’t convey this.
    ...
    With this in mind we have decided to rename WinFX to the .NET Framework 3.0.  .NET Framework 3.0 aptly identifies the technology for exactly what it is – the next version of our developer framework.

    And... is the name all that changes? Appearantly yes...

    The change is in name only and will not affect the technologies being delivered as part of the product.

    Still, some things remained unclear...
    That's why I'll try to de-mistify some facts anout .net Framework 3.0.
    -The compilers used to compile 3.0 compilers are still the 2.0 compilers. 3.0 is built on 2.0,  including the CLR and BCL.

    -3.0 will NOT contain LINQ support. LINQ will be included in the Orcas release, which is due in Q4 2007. 3.0 will ship with Vista (Q4 2006).

    -It will install into %windir%\Microsoft.NET\Framework\V3.0. This is to be updated in the next CTP.

    -3.0 will install 2.0 in the same installer. This is to make things easier (yes, they are already quite complicated now).

    -For all the resources you need, Microsoft launched a community site: http://www.netfx3.com/ .

    A question that is still open: what version number will the Orcas release get then? 3.5?

      Posted on: Tuesday, June 13, 2006 10:49:18 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | ASP.net | C# | Programming | Software | Windows     June 13, 2006    

    The new issue of MSDN magazine is available. All articles can be read online for free here: http://msdn.microsoft.com/msdnmag/issues/06/07/default.aspx .



    This month, among others, 2 articles in particular are a very good read: the one on Ajax (on which I'll be doing a presentation later this week at Ordina Lummen) and one on WinFX.

    Did you also know that you can download a chm-copy of the magazine for free? Go here for this months issue or here for an entire archive on back-issues!

      Posted on: Tuesday, June 13, 2006 9:58:47 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     Database | Programming | Software | Windows     June 13, 2006    

    The first CTP (which is I guess now the official new word for Beta ;-) ) is available to download and test. Here you can get the image-file.

    More info can be found here.

      Posted on: Tuesday, June 13, 2006 9:45:12 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     ASP.net | C# | Programming | Windows     June 12, 2006    

    Tech Ed 2006 has taken off! Countless of speeches, demonstrations... are about to take place.

    If you want to see the keynote, go here.

    More on Tech Ed: http://www.microsoft.com/events/teched2006/default.mspx 

    Oh and btw, it is also time for some new designs of laptops Intel showed to the public. You can see them here.

      Posted on: Monday, June 12, 2006 8:20:55 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | C# | Programming | Windows     June 8, 2006    

    MSDN now has its official Wiki! Yes, it's true :-)
    For the "official" announcement, you should take a look at Soma's blog (http://blogs.msdn.com/somasegar/archive/2006/06/08/622875.aspx).

    In the MSDN Wiki beta, you can add code samples and content directly alongside the Visual Studio 2005 and the .NET Framework 2.0 documentation in a Community Content section that we have added to each documentation topic.  Right now the MSDN Wiki site only features English documentation, but we are planning to expand this functionality to the localized documentation in the future.

    Pay a visit to them at: http://msdnwiki.microsoft.com/en-us/mtpswiki/default.aspx .

    Great work, guys!

      Posted on: Thursday, June 08, 2006 11:02:01 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     Programming | Visug     June 7, 2006    

    Visug, the Belgian User group of Visual studio users, is organising a 2 day event on Visual Studio 2005 Team System.

    Some info:

    Description:
    This day and a half community event provides VISUG members with deep dive information on Visual Studio Team System 2005. During this event we will demonstrate the capabilities Visual Studio Team System 2005 in a way only user group can: not in theory but by live examples.
    Event Outline:
    Event Overview : Overview, Business value of VSTS, core scenarios, licensing
    Planning for VSTS: Hardware and software requirements, selecting projects or solutions
    Deploying & Maintaining Team Foundation Server: Installation, Administration, back up and restore
    Working with Team Foundation Server: Architectural overview, services, extensibility
    Team Projects & Reporting: Project planning, methodology, reports
    Process Template Customization: Process guidance, work item types, workflow
    Source Code Control: Overview, migration, administration
    Building Code (MSBuild): Overview, customization
    Architect Tools: Application designer, class designer, logical datacenter designer, SDM SDK
    Developer Tools: Profiling, code coverage, code analysis
    Testing Tools: Test management, test types, unit testing
    Integration Scenarios: Commonly encountered integration scenarios

    When:
    Friday 31 June 2006 from 13:00 until 17:00
    Saturday 1 July 2006 from 9:00 until 16:00


    More can be found on www.visug.be !

      Posted on: Wednesday, June 07, 2006 9:03:36 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | Office 2007 | Programming | Software | Microsoft | Windows     June 7, 2006    

    Over 500.000 people have downloaded Office 2007 Beta 2 in the couple of first days it was available. That's a lot, a whole lot! Chances are that you are 1 of these, isn't it?

    Now, finding some spare time to get to know the new interface, learning how to program for the new office... that's the hardest part.


    Here are some interesting resources to get you started with the new suite in no time (even without installing it!!)
    1. To get to know the basics, go to the Office 2007 preview site. Don't feel like installing it? No problem, just watch some videos on the new interface.

    2. If you are a developer like myself, you're probably more interested in developing for the new Office. Chances are that you find what you are looking for in the Office developer center. In the What's new section, you can also find links to the most important Office blogs.

    3. If Microsoft Office Sharepoint Server is your cup of tea, you're gonna be thrilled when reading in the Servers section of the developer site. Some nice screenshots of Office Sharepoint 2007 can be found here.

    Hope this brings some clarity in all the "Office violence" that awaits us!

      Posted on: Wednesday, June 07, 2006 9:00:08 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | ASP.net | C# | Programming     May 31, 2006    

    I for sure didn't...

    Let me explain the situation.
    I'm building a multilanguage ASP.net 2.0 application at KBC Bank. The underlying database is Oracle 9i. This application uses masses of dates, all are in the format required by the database, MM/YY/DDDD.

    A collegue of mine wrote some lines of code using a rowfilter to filter out some records from a dataset, retrieved from the Oracle database. So he used a simple DateTime.ToString(). This appeared to be working... until someone came along and tested it with Dutch IE browser settings.

    This resulted in a 'String was not recognized as a valid DateTime' error.

    After some research, I found that the RowFilter always uses SQL Server syntax when filtering out results, no matter if the data retrieved originates from Oracle or SQL Server.

    An article on calendars on CodeProject says the following:
    ...The code forces a "MM/dd/yyyy" date format when constructing the RowFilter as required for date comparisons in such expressions. The filter is also constructed to take into account the possibility of time values within the DayField column. 

    So, what did I do in the end? This:

    dv.RowFilter = string.Format(
                       "{0} >= #{1}# and {0} < #{2}#",
                       this.DayField,
                       day.Date.ToString("MM/dd/yyyy"),
                       day.Date.AddDays(1).ToString("MM/dd/yyyy");


    And that line saved the day :-)

      Posted on: Wednesday, May 31, 2006 11:27:17 PM (Romance Daylight Time, UTC+02:00)   |   Comments [1]
             
    Gill Cleeren     .net | ASP.net | C# | Programming     May 31, 2006    

    Today, 2 interesting programs were suggested to me by collegues on the project I'm currently working on.

    Up first is Snippet Compiler. It's a "small IDE", that enables you to do some quick tests on code. Instead of making a dummy project in VS, where you can test if for example myDateTime.ToShortDateString() also includes the hours, minutes and seconds, you just tap in the line(s) of code in Snippet Compiler. It then runs these lines as a Console application.

    To get this free tool, go here.

    The second interesting tool I discovered is "The Regulator". I had to a quite nasty regular expression, but with this open-source tool, it is much easier than sitting down and writing them by hand.

    The homepage mentions the following:
    It allows you to build and verify a regular expression against any text input, file or web, and displays matching, splitting or replacement results within an easy to understand, hierarchical tree.

    For this application, go here.

    These two applications are gonna be in my toolbox for sure ;-)

    Oh and while I'm at it, did you know the VS 2005 version of Resharper, Resharper 2.0 was released. Go here: www.jetbrains.com/resharper

      Posted on: Wednesday, May 31, 2006 11:15:37 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     Programming     May 31, 2006    



    Another version of VS 2005 is on its way, TE for database professionals.

    Visual Studio Team Edition for Database Professionals delivers a market-shifting database development product designed to manage database change, improve software quality through database testing and bring the benefits of Visual Studio Team System and life cycle development to the database professional.

    A CTP version will be available on June 11th.

    For the official announcement, see the press release on Microsoft PressPass.

    Related news items:

    More info here.

      Posted on: Wednesday, May 31, 2006 9:47:51 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     ASP.net | Programming     May 11, 2006    

    A new build of the Atlas Control Toolkit is available. You can get it here.

    The Toolkit contains several very interesting samples, which can get you started in no time.
    Stay tuned for upcoming experiences with the toolkit, since I am preparing 2 sessions on ASP.net/Atlas which I will be giving next month.

    More resources: ScottGu's site

      Posted on: Thursday, May 11, 2006 11:42:58 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     ASP.net | Programming     May 11, 2006    

    A very interesting article was posted today on ASP.net. It's something I already could have used in the past, therefore, I post it here... No doubt I will not come acros a situation where I might need to debug JS.

    The article demonstrates how, using a number of new ASP.NET 2.0 features such as Web Resources and Web Events, you can create an easy to use control that logs JavaScript errors on the browser to ASP.NET.

    You can read the entire article here.

      Posted on: Thursday, May 11, 2006 11:37:02 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    Gill Cleeren     .net | ASP.net | C# | Programming | Microsoft     May 4, 2006    

    If you weren't there (like me... Vegas is a little too far ;-) ), you can now download or view all sessions of Mix06 online.

    Go here to get them all! (There are some very interesting ones on Atlas!)

      Posted on: Thursday, May 04, 2006 11:49:27 PM (Romance Daylight Time, UTC+02:00)   |   Comments [0]
             
    2/4/2012   5:00:45 PM
     Welcome to Snowball.be
    Hello and welcome to snowball.be!

    My name is Gill Cleeren, I'm a Microsoft Regional Director and an MVP ASP.NET.
    On Snowball.be, you'll find all kind news and articles on .net, ASP.NET, WPF, Silverlight and Microsoft in general.
    More on me can be found on my about page.

    Should you have any questions, don't hesitate to contact me by Send mail to the author(s) .

     Partner sites
     Most popular tags
    .net (124) .net 3.0 (6) .net 3.5 (18) .NET 4 (18) .NET Show (1) ADO.net (4) ASP.net (53) ASP.net AJAX (4) ASP.NET MVC (3) Atlas (12) Azure (2) Blend (2) Book (5) Book review (4) C# (43) Case studies (1) Chopsticks (3) Community (10) Community Day (15) Consoles (1) Database (1) DevDays09 (4) DotNetNuke (4) Efficiency (57) Enterprise Library (5) Events (60) Expression (7) Games (3) Hardware (9) Internet (18) IT (1) jQuery (1) LightSwitch (3) Links (11) LINQ (4) Mac (2) Metro (1) Microsoft (75) Mix 07 (6) Mix 08 (4) Mix 09 (1) Mix 11 (1) Movies (4) MVP (5) MVP Summit 2008 (3) mvvm (1) Office 2007 (10) Other (8) PDC (22) PDC2008 (10) Personal (36) ppt (9) Programming (52) Programming tools (22) Regional Director (2) Silverlight (142) Silverlight Advent Calendar (24) sl4 (44) Slide decks (13) Snowball (13) Software (20) Microsoft (25) Speaking (14) SQL Server (10) TechDays (13) TechEd (14) telerik (6) Telerik (6) TFS (1) Twitter (1) Vista (73) Vista Tricks (9) Visual Studio.net (38) Visug (33) VS2010 (8) Wallpaper (2) WCF (2) Webcasts (9) Webinars (5) Windows (41) Windows 7 (5) Windows 8 (1) Windows Azure (2) Windows Mobile (3) Windows Phone 7 (2) WinFX (17) WinRT (1) WP7 (2) WPF (40) XAML (24)

     On this page
    My intentions for 2008: Become A Better Developer
    Announcing the 1st Silverlight Challenge
    Interesting links I stumbled upon
    How-to: DotNetNuke: Installation
    Start of DotNetNuke articles
    Enterprise Library v3.0 December CTP released
    Upcoming Windows Vista event
    .net 3.0 released
    ASP.net Timepicker control
    New issue of MSDN magazine available
    Component art releases Ajax toolkit
    Regular expressions library
    It's one of those days again...
    VB6'ers: come to .net
    Atlas - be gone!
    Network Monitor 3
    Lots of new releases
    Microsoft XNA Game Studio Express (Beta) released
    Article on CodeProject
    A book to watch out for!
    WPF tutorial: how to create great image effects with WPF/XAML
    WPF Examples: a small example on animation and gradients
    Visual Studio 2003 SP1 + Nuggets
    PHP.net to come "soon"
    Ladies and gentlemen, your votes please
    Resharper: the faster build and some examples of use
    How to WPF: getting started
    Custom macros for .net
    JetBrains introduces Team City
    Aptana - a free IDE for HTML
    Microsoft Sandcastle: the CTP of the NDoc killer is here!
    Oh no, Microsoft has gone crazy?!
    Image-to-HTML using only ASP.net 2.0
    WPF examples: Databinding in WPF: a simple RSS reader with XAML/WPF
    Microsoft.Office.Interop.Excel not found
    Talk with Lutz Roeder and Peli de Halleux
    MSDN magazine August
    patterns & practices Guidance Explorer
    Winforms how-to: Dynamically changing the icon shown in the taskbar
    WinFX Renamed .NET Framework 3.0
    New isuue of MSDN magazine available
    CTP of VSTS for DBA's available
    Tech Ed 2006 Keynote
    MSDN: The Wiki
    Visug to host an Visual Studio Team System event
    Not a lot time to master Office 2007?
    Did you know this about the RowFilter?
    Two interesting tools that should be in your toolbox
    Visual Studio 2005 Team Edition for Database Professionals
    Atlas Control Toolkit Refresh Now Available
    Debug JS in ASP.net
    Sessions Mix06 for download!
     This site
     Archives
    Navigation
     Sitemap
     Blogroll OPML
     Disclaimer

    All content is property of www.snowball.be. Nothing on this site can be copied or published elsewhere, unless otherwise stated.

    This site is made by Gill Cleeren.

    Questions? Opinions? Send mail to the author(s) E-mail