help.net


Musing on .Net

News

Windows Phone Apps

FotoBank


FotoIreland

Windows 8 Apps




hit counters






Open source CMS


My blog

Irish blogs

Locations of visitors to this page Get Chitika eMiniMalls

.Net useful

Blogs I read

PocketPC

SQL

Usability

October 2005 - Posts

I am not a spaghetti coder

Following the reactions I got from a previous post, I decided it was time to fight back against the Microsoft pasta people! (Beware: I still like spaghetti but with tomato sauce)

So I would like to introduce my new logo (feel free to use it on your blog):

I AM NOT

A SPAGHETTI CODER

 

Posted: Oct 31 2005, 10:39 PM by help.net | with no comments
Filed under: ,
[Video] Clare Dillon Microsoft Ireland and the role of communities at the last INDA meeting

Now next in our video series, Clare Dillon Microsoft Ireland and some nice comments on the history of INDA and generally on the role of communities. 

If I started a community in Ireland, I have to say because of Clare who help me a lot building a now 900 members user group.

Click here to see Clare in action

 

Posted: Oct 31 2005, 05:43 PM by help.net | with no comments
Filed under:
.Text compatible with .Net 2.0?

I installed the .Net 2.0 package on web server. But it seems I have some problem with .Text. Anybody has done this and can tell what are the modifications to make .Text working?

This is the error message:

System.InvalidOperationException: The WebResource.axd handler must be registered in the configuration to process this request.

Thanks for the help.

Posted: Oct 31 2005, 05:08 PM by help.net | with 2 comment(s)
Filed under:
[Video] Ian Griffiths session - Avalon at the last INDA meeting

Ok we continue our videos show by Ian Griffiths, who was one of our speakers at INDA conference in Dublin.

 Click here to see Ian in action

Ian (and Chris Sells) have also released what seems to be the first book on Avalon aka WPF

Posted: Oct 31 2005, 02:09 PM by help.net | with 1 comment(s)
Filed under: ,
The Code Spaghetti generation is back


Over the last few months, I try to read and prepare some book reviews regarding ASP.NET 2.0. So with all my personal subjectivity, I found myself embroiled in some sort of conspiracy by the C.S.G. aka the Code Spaghetti Generation.

I was quite sure this was an extinct cult from the Asp 3.0 time circa 1999. They are now invading our brains in every book or article I read and this look like a revival cult of some kind or a pervasive plot to conquer the developers world.

See this piece of code (Warning: if you are a DBA or a Business Object guru this might hurt and make you scream):

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Chapter 5 Product List</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/banner.jpg" /><br />
        <br />
        <table>
          <tr>
            <td width="300px" valign="top">
              <asp:GridView ID="GridView1" runat="server"
                  AllowSorting="True" AllowPaging="True"
                  DataKeyNames="ProductID" DataSourceID="SqlDataSource1"
                  AutoGenerateColumns="False" SelectedIndex="0"
                  CellPadding="4" GridLines="None" ForeColor="Black">
                  <Columns>
                    <asp:BoundField DataField="ProductID" HeaderText="ID"
                        ReadOnly="True">
                      <HeaderStyle HorizontalAlign="Left" />
                        <ItemStyle Width="75px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Name" HeaderText="Name">
                      <HeaderStyle HorizontalAlign="Left" />
                        <ItemStyle Width="200px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="CategoryID" HeaderText="Category" />
                    <asp:CommandField ButtonType="Button" ShowSelectButton="True" />
                  </Columns>
                  <HeaderStyle BackColor="Silver" Font-Bold="True"
                      ForeColor="White" />
                  <RowStyle BackColor="White" ForeColor="Black" />
                  <AlternatingRowStyle BackColor="WhiteSmoke" ForeColor="Black" />
                  <FooterStyle BackColor="Silver" Font-Bold="True" ForeColor="White" />
                  <PagerStyle BackColor="Silver" ForeColor="Blue"
                      HorizontalAlign="Center" />
              </asp:GridView>
              <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                  ConnectionString="<%$ ConnectionStrings:HalloweenConnection %>"
                  SelectCommand="SELECT [ProductID], [Name], [CategoryID]
                      FROM [Products] ORDER BY [ProductID]">
              </asp:SqlDataSource>
            </td>
            <td width="400px" valign="top">
                <asp:DetailsView ID="DetailsView1" runat="server"
                    DataSourceID="SqlDataSource2"  DataKeyNames="ProductID"
                    Height="50px" Width="400px" AutoGenerateRows="False"
                    BackColor="White" BorderColor="White" BorderStyle="Ridge"
                    BorderWidth="2px" CellPadding="3" CellSpacing="1"
                    GridLines="None">
                    <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
                    <Fields>
                        <asp:BoundField DataField="ProductID" HeaderText="Product ID:"
                            ReadOnly="True" SortExpression="ProductID">
                            <HeaderStyle HorizontalAlign="Left" Width="150px" />
                            <ItemStyle Width="250px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Name" HeaderText="Name:">
                            <HeaderStyle HorizontalAlign="Left" Width="150px" />
                            <ItemStyle Width="250px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="ShortDescription"
                           HeaderText="Short Description:">
                            <HeaderStyle HorizontalAlign="Left" Width="150px" />
                            <ItemStyle Width="250px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="LongDescription"
                            HeaderText="Long Description:">
                            <HeaderStyle HorizontalAlign="Left" Width="150px" />
                            <ItemStyle Width="250px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CategoryID"
                            HeaderText="Category ID:">
                            <HeaderStyle HorizontalAlign="Left" Width="150px" />
                            <ItemStyle Width="250px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="ImageFile"
                            HeaderText="Image File:" SortExpression="ImageFile">
                            <HeaderStyle HorizontalAlign="Left" Width="150px" />
                            <ItemStyle Width="250px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="UnitPrice"
                            HeaderText="Unit Price:"  DataFormatString="{0:c}">
                            <HeaderStyle HorizontalAlign="Left" Width="150px" />
                            <ItemStyle Width="250px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="OnHand" HeaderText="On Hand:">
                            <HeaderStyle HorizontalAlign="Left" Width="150px" />
                            <ItemStyle Width="250px" />
                        </asp:BoundField>
                        <asp:CommandField ButtonType="Button"
                            ShowDeleteButton="True"
                            ShowEditButton="True"
                            ShowInsertButton="True" />
                    </Fields>
                    <HeaderStyle BackColor="Silver" Font-Bold="True"
                        ForeColor="Black" />
                    <EditRowStyle BackColor="Blue" Font-Bold="True"
                        ForeColor="White" />
                </asp:DetailsView>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server"
                    ConflictDetection="CompareAllValues"
                    ConnectionString="<%$ ConnectionStrings:HalloweenConnection %>"
                    SelectCommand="SELECT [ProductID], [Name], [ShortDescription],
                          [LongDescription][CategoryID][ImageFile]
                          [UnitPrice][OnHand]
                        FROM [Products]
                        WHERE ([ProductID] = @ProductID)"
                    DeleteCommand="DELETE FROM [Products]
                        WHERE [ProductID] = @original_ProductID
                          AND [Name] = @original_Name
                          AND [ShortDescription] = @original_ShortDescription
                          AND [LongDescription] = @original_LongDescription
                          AND [CategoryID] = @original_CategoryID
                          AND ( [ImageFile] = @original_ImageFile
                           OR ImageFile IS NULL AND @original_ImageFile IS NULL )
                          AND [UnitPrice] = @original_UnitPrice
                          AND [OnHand] = @original_OnHand"
                    InsertCommand="INSERT INTO [Products] ([ProductID], [Name],
                          [ShortDescription][LongDescription][CategoryID]
                          [ImageFile][UnitPrice][OnHand]
                        VALUES (@ProductID@Name@ShortDescription,
                          @LongDescription@CategoryID@ImageFile
                          @UnitPrice@OnHand)"
                    UpdateCommand="UPDATE [Products] SET [Name] = @Name,
                          [ShortDescription] = @ShortDescription
                          [LongDescription] = @LongDescription
                          [CategoryID] = @CategoryID
                          [ImageFile] = @ImageFile
                          [UnitPrice] = @UnitPrice
                          [OnHand] = @OnHand
                        WHERE [ProductID] = @original_ProductID
                          AND [Name] = @original_Name
                          AND [ShortDescription] = @original_ShortDescription
                          AND [LongDescription] = @original_LongDescription
                          AND [CategoryID] = @original_CategoryID
                          AND ( [ImageFile] = @original_ImageFile
                           OR ImageFile IS NULL AND @original_ImageFile IS NULL )
                          AND [UnitPrice] = @original_UnitPrice
                          AND [OnHand] = @original_OnHand">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="GridView1" Name="ProductID"
                            PropertyName="SelectedValue" Type="String" />
                    </SelectParameters>
                    <DeleteParameters>
                        <asp:Parameter Name="original_ProductID" Type="String" />
                        <asp:Parameter Name="original_Name" Type="String" />
                        <asp:Parameter Name="original_ShortDescription" Type="String" />
                        <asp:Parameter Name="original_LongDescription" Type="String" />
                        <asp:Parameter Name="original_CategoryID" Type="String" />
                        <asp:Parameter Name="original_ImageFile" Type="String" />
                        <asp:Parameter Name="original_UnitPrice" Type="Decimal" />
                        <asp:Parameter Name="original_OnHand" Type="Int32" />
                    </DeleteParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="Name" Type="String" />
                        <asp:Parameter Name="ShortDescription" Type="String" />
                        <asp:Parameter Name="LongDescription" Type="String" />
                        <asp:Parameter Name="CategoryID" Type="String" />
                        <asp:Parameter Name="ImageFile" Type="String" />
                        <asp:Parameter Name="UnitPrice" Type="Decimal" />
                        <asp:Parameter Name="OnHand" Type="Int32" />
                        <asp:Parameter Name="original_ProductID" Type="String" />
                        <asp:Parameter Name="original_Name" Type="String" />
                        <asp:Parameter Name="original_ShortDescription" Type="String" />
                        <asp:Parameter Name="original_LongDescription" Type="String" />
                        <asp:Parameter Name="original_CategoryID" Type="String" />
                        <asp:Parameter Name="original_ImageFile" Type="String" />
                        <asp:Parameter Name="original_UnitPrice" Type="Decimal" />
                        <asp:Parameter Name="original_OnHand" Type="Int32" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:Parameter Name="ProductID" Type="String" />
                        <asp:Parameter Name="Name" Type="String" />
                        <asp:Parameter Name="ShortDescription" Type="String" />
                        <asp:Parameter Name="LongDescription" Type="String" />
                        <asp:Parameter Name="CategoryID" Type="String" />
                        <asp:Parameter Name="ImageFile" Type="String" />
                        <asp:Parameter Name="UnitPrice" Type="Decimal" />
                        <asp:Parameter Name="OnHand" Type="Int32" />
                    </InsertParameters>
                </asp:SqlDataSource><br />
                <asp:Label ID = "lblError" runat="server" ForeColor="Red"
                    EnableViewState="False"></asp:Label>
            </td>
          </tr>
        </table>
    </div>
    </form>
</body>
</html>
Generated using PrettyCode.Encoder

So if you are reading this line, and you are still alive, stop reading here.

Well for many years I was told this was a bad practice to mix presentation layer and data layer. So why the C.S.G. is back again? To please the beginners? Any typing mistake when you want to update your HTML code on this page will doom your worthy application.

So please can all the ASP.NET 2.0 writers add a small comment on this kind of thing and say something like 'Don't do it kids it's cool but it's really bad practice and it will send you to code hell'.

I propose a new logo to ban all the C.S.G. people from our web applications.

 

Posted: Oct 31 2005, 01:33 PM by help.net | with 23 comment(s)
Filed under:
Send me the money

Wow, thanks to S.B. Chatterjee, I know I am 'virtually' rich. So where I can claim the money now :-)


My blog is worth $40,082.34.
How much is your blog worth?

 

 

Posted: Oct 31 2005, 01:12 PM by help.net | with 2 comment(s)
Filed under:
[Video] Dino Esposito session - Dynamic Expressions at the last INDA meeting

Ok we start the videos show by Dino Esposito, who was our first speaker at INDA conference in Dublin. Amazing that the subject Dino choose for the conference is also an article written by himself in the October edition of Asp.netPRO magazine.

Thanks to Philip McKeown for being so good behind the camcorder and also for the production of this series.

 Click here to see Dino’s lecture

 

Posted: Oct 28 2005, 12:18 PM by help.net | with 2 comment(s)
Filed under:
Google Base

Google has launched a new service but play with our nerves by switching on and off the service all the time. Well at least the entry page is really there but this morning I was unable to enter.

From Google blog this is what you can learn about Google Base:

Rumor of the day



You may have seen stories today reporting on a new product that we're testing, and speculating about our plans. Here's what's really going on. We are testing a new way for content owners to submit their content to Google, which we hope will complement existing methods such as our web crawl and Google Sitemaps. We think it's an exciting product, and we'll let you know when there's more news.

 

Posted: Oct 28 2005, 09:09 AM by help.net | with no comments
Filed under:
Microsoft .NET Framework Version 2.0 Redistributable Package
The Microsoft .NET Framework Version 2.0 Redistributable Package is also available for download now.

Posted: Oct 28 2005, 08:44 AM by help.net | with 1 comment(s)
Filed under: ,
Visual Studio 2005 Final version...
... available on MSDN.

Posted: Oct 28 2005, 08:18 AM by help.net | with no comments
Filed under: ,
More Posts Next page »