CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

July 2004 - Posts

  • Working offline

    My holiday is starting tomorrow. This time I'm going to take some work with me. The camping site does have a power outlet but a network connection is not included. Will it work ? No email.., no blogs.., no Google.... Interesting experiment.

    Peter

  • Beware of the webworm

    A webform is a webform, right ? According to the Word dictionary it is web form (and web service, etc.) OK, that is what a spelling checker is for. But the default suggestion for webform in Word is webworm. Hitting Change to fast results in a very strange story.

    Peter

  • Why doesn't the DataSetDataSource have a SetDataSet method ?

    The new data aware controls in VS 2005 are all very very “tabular”, most of them work with one table of data. In the 1.1 days (=today) you can use a plain dataset and bind your web form controls to the various tables in that dataset. In 2005 there is the DataSetDataSource control which wraps up a full XML dataset with multiple tables. You fill the dataset in the control from an xml file or pass in the XML as a string. You can save the updates data to a file and get the updated XML as string.

    The GetDataSet method returns the wrapped dataset as a dataset object. But why is there no SetDataSet method ? If I want to fill the control from a dataset object I first have to serialize the object to XML and assign the result of that to get the data in.

    Peter

  • Virtual PC, VS 2005 and SQL server

    Managed to trash my first VS 2005. Did something wrong and now everytime I try to set up a sql connection VS goes bananas and dies with a “hresult fails” message. Good old COM.

    Virtual PC can really help you here. With storage becoming so flexible a fresh PC is at hand. I allready had a virtual virgin XP hard disk at hand, now I also have a fresh beta install. Installed VS on the virtual PC and copied the vhd file. In case it messes up again all I have to do is copy the vhd. Like a new bike in the Tour.

    Peter

  • Weird session behaviour in VS 2005

    In a VS 2005 I had problems getting to the session object. At first it looked like a security issue with IE, but that did not fix the problem. A little experimenting revealed someting weird.

    The situation : fresh Virtual PC, all updates applied, no IIS.

    Take this code

    Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
            ListBox1.Items.Add(Session.SessionID)
    End Sub

    It adds the seesion ID of the roundtrip to the listbox. Every roundtrip has a new ID. I need that ID to identify the session.

    Trying to see more I stored something in the session.

    Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        ListBox1.Items.Add(Session.SessionID)

        Const MySessionMember As String = "JustME"
        Try
            Label1.Text = Session.Item(MySessionMember).ToString
        Catch ex As Exception
            Label1.Text = "Not found.."
        End Try
        Session.Item(MySessionMember) = TextBox1.Text

    End Sub

    This works perfectly and the weird thing is that the SessionID is now constant over the roundtrips. And becomes usable.

    I guess this a bug /over-optimization in VWD ?

    Peter

  • Visual Web developer : where has my session gone ?

    Without a doubt it is a setting I am overlooking.. but :

    I try to use the session object in a VS 2005 web app running on Visual Web Developer. After every roundtrip my Session object has a new sessionId and the Isnew property reads true. Started with a blank asp.net app. It was like that in the May preview and is still like that in the beta. What am I missing ?

    Peter

  • VS 2005 beta setup blues... with a happy ending

    The setup of the VS beta took more effort than I had expected. In the process I encountered some things worth sharing. The DVD image downloaded is a difficult one.

    • Virtual PC doesn't accept the image. 
    • Yesterday I mentioned a virtual DVD drive. That breaks time aftertime somewhere half way the installation process.
    • Don suggested copying the files contents to disk and running setup from disk. Again the virtual drive breaks.
    • Trying to burn a physical disk I trashed three disks and gave up again
    • Finally I found a machine running Nero Drive Image, another virtual DVD drive. Loaded the image over the network and shared the virtual drive over the network (x your fingers) and tried to install from that.

    Presto:

    Happy as a clown :>

    Peter

  • It was to weird to be true

    Yesterday I reported something which looked very weird trying to setup the VS 2005 beta. Which even scared some other people. I found out what had happened. The dvd images available don't load in Virtula PC. So I burned a physical DVD. In the download dir was still the may preview as well and my burning software (or actually myself...) picked the wrong image. Indeed I installed the May preview again. Blush blush... I am really sorry for all the inconvience.

    As an alternative I found a very simple virtual CD drive. This works under Virtual PC and right at this moment it is installing the real beta.

    Peter

     

  • FeedDemon 1.10

    A new version of my favourite blogreader FeedDemon has been released. Update is free for registered users. The best new feature is that the back and forward browsing buttons on my MS mice now do work. There was an issue with that which I never completely understood, I can hardly browse without these buttons and they do work in VS. But now they do work in FD as well, thanks a lot Nick ! FeedDemon is a nice alternative for IE as well as it has multiple browser tabs.

    Peter

  • WhoAmI : Beta is not the beta ???

    <Update>This post doesn't make any sense at all. Read here if you want to know why</Update>

    Yesterday I had run wild in enthousiasm to see the beta available on MSDN downloads. Installed the thing and you know what ? The setup installs the May preview, the 40426 build......

    Peter

  • VS 2005 beta really available

    A couple of days ago it was raining blog post about the VS 2005 beta being available. After clicking a couple of times it turned out to be an announcement. But right now the ISO image is available at MSDN downloads. 3588.1 Megs. I have 97% and some 4 more hours to go...

    Peter

  • VB.NET 2004 world tour

    As another side show of Teched DotNed organized a meeting to discuss VB.NET and C# with MS team members.

    Despite the football some 30 people showed up. We had a good time with a lot of laughs. Everybody was given the time to ride their hobby-horse, the team members patiently took the time to take notes. Maybe some of the suggestions will make it into the product. The best one went like this : “It should be difficult to make easy mistakes...” which started as a discussion on iterating through the members of an enumeration.

    The VB feature the team would like most to drop (but cannot do because of backward compatibilty) is On error resume. Backwards comptability is very important to MS, the only issue which is allowed to break existing code is security.

    VB.NET seems to be focussed more on WinForm than on ASP.NET, at the MS campus they are in the same building as the Winforms team. So bringing the .NET framework to every desktop is important. What will MS do to bring the framework to every desktop ? Everything they can ! A way could be to include it in a (critical) update. The main reason for not doing that (yet?) is the size, after all it is a 20mb download.

    Peter

  • The ASP.NET roadshow

    Another event I visited this week was the ASP.NET roadshow, an event organized by Microsoft. I had hoped for some more TechEd speakers dropping by but the whole day was presented by one Dutch trainer. Xander from InfoSupport gave a good introduction to ASP.NET. Nothing wrong with that. ASP.NET is big and in the flood of the many features he discussed were new things for everyone. Perhaps it was to much for attendees new to .NET. And they appeared to be the target audience. I think this is a show which travels, so may I give some suggestions to make it a better one:

    • The speaker has a C# addiction. Nothing wrong with that, hell of a language. But in the course of the day he did some VB bashing which (VB).NET does not deserve. Not to mention the points where he was just wrong.
    • The invitation to the event had seen a better marketing than content manager. It was vague enough to read anything you want between the lines. I had read what I had hoped for, not what was.
    • The invitation explicitly invited to bring your notebook. Many a visitor did. Alas there was nothing to plug into and no part of the program even touched any hands-on activity.
    • The location was 'De School voor de toekomst'. This translates as school for the future. But something like WiFi was unknown and the “comfortable“ chairs were of a type which have been banned long ago. My back still hurst.

    But I had a good day. Social activities were surprising. Of course Hasan Fadili, DotNEd speaker was there. As well I met an old fellow (biology) student, who I had last seen over 25 years ago. He had also switched to IT. And there was somebody from the same village I live, he had made the same (long) journey. The world is small. (I have to admit they recognized me first. Besides new glasses I really do need some training in social skills :>)

    Peter

     

  • DotNEd goes enterprise

    TechEd being in Amsterdam did produce quite some spin-off for the non visitors. Monday the 28th the Dutch usergroup DotNEd had a meeting where both Juval Lowry and Ingo Rammer did a presentation on Enterpise stuff. We were flooded with information, some of the attendees perhaps even drowned. If you could draw one conclusion from everything presented it would be that enterprise features in .NET is a world in motion. And that they are highly misunderstood.

    Ingo is a speaker who's running on perpetual energy, once he has started he can't be stopped any more. One of his stories perhaps describes the .NET enterprise world at its best. He did a well read book on .NET remoting. One of the readers had implemented a pattern with remoting events in an internet scenario with 1000's of users connecting. And complained that the app did not work to well :> Besides working on a second edition Ingo is now also working on a book about enterprise architecture. The problem is not how to write code, the framework classes make all of that not to difficult. The problem is when to use what.

    Peter

     

  • Beginning Object oriented ASP.NET 2.0 using VB.NET

    I've been writing quite a lot over the last couple of weeks (months), and now I really have a great subject for this 200th post (still care about statistics). Last weekend I submitted the first part of my manuscipt of Beginning Object Oriented ASP.NET using VB.NET, to be published by Apress. It will be a tutor on object oriented programming intended for (VB) developers who know how to write code but are scared by the new world of OOP in VB.NET. As, amongst others, Jay has blogged there is a need for a good book on OOP.

    People who knew me as a Delphi guy allready expressed their worries about me moving to the “Dark side”. Now they can feel at ease, I have totally lost my mind ! In the Delphi world VB has a bad reputation, even in the .NET world C# people tend to look down upon VB. You can still write some horrible code in VB.NET. But you can also write 1st class strongly typed OOP code where the VB.NET compiler will help you with clear warnings on every ambiguity. After every topic in my book I do a small recap in C#. You might be surpised to see how small the diffrences between C# and VB code are. They both follow the same (CTS) patterns.

    .NET is all about coding against this huge object oriented class library (the framework). Coding in C#, the compiler forces you to write good clean code. Coding in VB compiler settings allow you to get away with a lot but they can force you to write just as good as something in C#.

    Peter

More Posts