August 2006 - Posts

September 15th we are hosting another Software Developer Event. This SDE is focused on WEB development so if you are in the Netherlands and even remotely interested in WEB development you really should go.
 
And its not just for .NET developers either, Visual FoxPro, Delphi and Visual Objects developers are welcome too. Of course Java, Ruby and all others too be we don’t have anything special for them L
 
The session (in Dutch)
 

Overzicht sprekers en sessies

Delphi
C#
Visual Basic.NET
DotNetNuke
FoxPro
Visual Objects
8:30
Registratie / Ontvangst
9:00
Delphi 2006 en (Custom) DBWeb Controls
Bob Swart
Hoe gebruik je het web als infrastructuur voor je applicaties?
Peter van Ooijen
Wie is er bang van CASper, het lieve spookje?
Marcel Peereboom
DotNetNuke
and Ajax
Stefan Kamphuis
Working interactively with Visual FoxPro
Rainer Becker
DBF Access in a .NET World

Ginny Caughey
10:15
Pauze - 30 min.
10:45
Framework ontwikkeling voor database toepassingen
Patrick Barel
BBQ Web: Custom modules in Community Server 2.0
Dennis Vroegop
RSS Lifecycle
Hannes Preishuber
How to make
a news site with DNN
Peter Schotman
Using Foxpro Data and procedures in classic ASP
Ronald Jansen
Van VO naar Vulcan. Dat is Logisch

Robert v/d Hulst
12:00
Lunch - 60 min.
13:00
ASP.NET voor Delphi programmeurs
Jeroen Pluimers
WCF Security
Erik van de Ven
The unknown side of Gridview
Hannes Preishuber
Module Development
Process
Erik van Ballegoij
Whats New in SQL in Visual FoxPro 9.0
Rainer Becker
Vulcan.NET Migration Strategies

Ginny Caughey
14:15
Pauze - 15 min.
14:30
Web applications with ASP.NET and IntraWeb (including ECO support)
Hadi Hariri
ASP.NET 2.0 caching
Alex Thissen
Exception management voor Web & Win apps in .Net 2.0
Mark Vroom
Developing Secure DotNetNuke modules
Cathal Connolly
Using Foxpro Data and procedures in ASP.NET 2.0
Gerben Kessen
Windows messaging en communicatie tussen applicaties
Frans de Wit
15:45
Pauze - 30 min.
16:15
Indy for DOT.NET & Win 32
Hadi Hariri
Building AJAX-style Web Apps with Atlas
Raimond Brookman
Nieuw in ASP.NET 2.0
Thomas Huijer
Using DotNetNuke to rapidly develop rich components
Cathal Connolly
SOA with Webservices in Visual FoxPro
Rainer Becker
Wat is er nieuw in Visual Objects 2.8
Robert v/d Hulst
17:30
Einde
 
 
Hope to see you there!
 
Maurice de Beijer
with no comments
Filed under: ,
One of the controls just about every developer seems to create is a mover. Basically a mover consists of two list boxes, the left one containing the available items, the one on the right containing the selected items. Selecting one or more items and clicking a button, or drag and drop sometimes, selects or deselects the items.
 
Now there are several ways of doing this but frequently people are moving items between list box Items collection. Now this works but there is a far easier way to handle this. Create a DataTable with the items in question. Add two columns, the first is names Selected and of type Boolean, the second is named Order and of type Integer.
The second is actually only needed if you want new items to appear at the bottom of the list, leaving it out results in a fixed order of items no matter in what order they where selected.
 
Now create a DataView for each of the two list boxes passing in the DataTable in the constructor. Set the RowFilter of the available list to Selected = false and for the selected to Selected = true. Set the Sort property to Order of required and use these two as the DataSource for the two list boxes.
 
Now all you have to do is update the Selected and Order columns when the user selects/deselects one of the items.
 
Simple and quick, just the way I like it J
 
 
PublicClass Form1
 
    PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
 
        Dim dt AsNew DataTable
        dt.Columns.Add("Description", GetType(String))
        dt.Columns.Add("Selected", GetType(Boolean))
        dt.Columns.Add("Order", GetType(Integer))
 
        For i AsInteger = 1 To 10
            dt.Rows.Add(NewObject() {i.ToString(), False, i})
        Next
 
        Dim dv As DataView
        dv = New DataView(dt)
        dv.RowFilter = "Selected = false"
        dv.Sort = "Order"
        lstAvailable.DataSource = dv
        lstAvailable.DisplayMember = "Description"
 
        dv = New DataView(dt)
        dv.RowFilter = "Selected = true"
        dv.Sort = "Order"
        lstSelected.DataSource = dv
        lstSelected.DisplayMember = "Description"
    EndSub
 
    PrivateSub cmdMoveRight_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdMoveRight.Click
        MoveSelected(lstAvailable, lstSelected)
    EndSub
 
    PrivateSub cmdMoveLeft_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdMoveLeft.Click
        MoveSelected(lstSelected, lstAvailable)
    EndSub
 
    PrivateSub MoveSelected(ByVal source As ListBox, ByVal target As ListBox)
        Dim selected AsNew List(Of DataRow)()
        ForEach item AsObjectIn source.SelectedItems
            selected.Add(CType(item, DataRowView).Row)
        Next
 
        ForEach row As DataRow In selected
            row("Selected") = NotCBool(row("Selected"))
            row("Order") = Environment.TickCount
        Next
    EndSub
EndClass
 
 
 
 
Maurice de Beijer
Looking for a compression library that gets around? LZO is a fast compression library that was actually uses on the NASA rovers Spirit and Opportunity. Michael Link created a .NET wrapper class so using it is a breeze. The following is the sample application listed on the LZO.NET home page:
 
// Create the compressor object
LZOCompressor lzo = newLZOCompressor();
 
// Build a quite redundant string
StringBuilder sb = newStringBuilder();
for (int i = 0; i < 10000; i++)
{
    sb.Append("LZO.NET");
}
string str = sb.ToString();
Console.WriteLine("Original-Length: " + str.Length);
 
// Now compress the 70000 byte string to something much smaller
byte[] compressed = lzo.Compress(Encoding.Default.GetBytes(str));
Console.WriteLine("Compressed-Length: " + compressed.Length);
 
// Decompress the string to its original content
string str2 = Encoding.Default.GetString(lzo.Decompress(compressed));
Console.WriteLine("Decompressed-Length: " + str2.Length);
Console.WriteLine("Equality: " + str.Equals(str2));
 
Even though no mention is made of .NET 2.0 it still works just as advertised.
 
Take a look at http://lzo-net.sourceforge.net/ for the LZO.NET project or http://www.oberhumer.com/ for the original LZO project.

 
 
 
Maurice de Beijer
with 4 comment(s)
Filed under:
NDoc was a great tool to generate documentation for the code I wrote. Unfortunately its been very quite around NDoc for a while but now Kevin Downs has decided to stop the project altogether. A shame but given the reasons he lists quite understandable.
 
So what else to use as a documentation tool? Well it just so happens that Microsoft has released a CTP of Sandcastle. And Sandcastle just happens to be a documentation compiler for managed class libraries. Sounds like just what the doctor ordered :-) See http://www.microsoft.com/downloads/details.aspx?FamilyID=E82EA71D-DA89-42EE-A715-696E3A4873B2&displaylang=en for the download or http://blogs.msdn.com/sandcastle/default.aspx for more information.
 
Maurice de Beijer
with no comments
Filed under:
Now that's a surprise as I wasn't expecting a 2003 SP anymore. Now if they would only do a 2005 SP I would be a happy camper :-)
 
 
Maurice de Beijer
with 3 comment(s)
Filed under: