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

Jeffrey Palermo (.com)

Blog moved to www.jeffreypalermo.com

September 2004 - Posts

  • Sauce Reader is my favorite RSS Reader - level 000

    Sauce Reader v1.8 (BETA)

    Sauce Reader v1.8 is now available for download.

     

    I had been using RSS Bandit, and I was pretty satisfied, but I'm using Sauce Reader now, and it is just amazing.  No longer do I even have to click on a title to read a post, because it previews them for me.  I can now easily post to my own blog right from the reader and write comments right from the reader.  I know this is possible with other readers, but it is completely intuitive with Sauce Reader.

    It also looks just like the Outlook 2003 UI.

  • MSDN - ". . . all without writing a single line of code." - level 100

    Scott Stewart laments what he saw at his local MSDN event, and I have to say that I experienced the same thing at the Austin, TX MSDN event.  I, too, like writing code, and I tend not to use the designer to much.  Back in the days of FrontPage and Interdev, I didn't use the designer.  I found that I had to tweak the designers code anyway, so it didn't take me long to write the code myself. 

    I think what Microsoft is trying to showcase is that ASP.NET 2.0 reduces a whole lot of plumbing, and while the designers help, they don't actually write any code.  If the designers wrote code, it would be in the .cs class.  In v1.1 we have “Designer-generated code don't touch”, but that doesn't exist in 2.0 because of partial classes.  and pulling more functionality into the base classes.  The new GridView control supports sorting and paging through properties.  Now, the designer will write the markup for you, but it just sets the appropriate properties.  In the DataGrid, we have to write sorting and paging code (just a few lines), but the GridView abstracts that into the control so we don't even have to do that.  I think the changes are better, and writing less code is better, but I know that I will always have to write code because there isn't a way that a designer can write my business logic. 

    Sure we'll see some newbies that will hammer out something that works with the designer, and it may work fine for a small company, but as soon as the requirements get a little more complex, the need to actually type the code will be apparant.

    Just by adding features to the language and the .Net Framework, Microsoft is meeting the needs of enterprise developers like us, Scott, but it seems to me that the MSDN events are really touting the hobbyist and RAD features that it adding on top of the features you and I use.

    If I ever took a test on the RAD features in VS or the designers, I'd fail.  But I know exactly what code is generated by them because I write it every day. (Except for DataSet-DataAdapter stuff - I tend to use a DataReader to populate my custom objects).

  • Eric Sink's great article on product pricing - level 200

    On MSDN, Eric Sink has an awesome article about product pricing.  There are a lot of variables that can go into this, and his article is very informative.  I loved it.  Check it out.
  • RegisterClientScriptBlock() incompatibility in .Net v2.0 Beta 1 - level 100

    This may impact many people because it is a change in the validation of the parameters of this method.  The method is defined below:

    RegisterClientScriptBlock(string key, string script);

    In .Net 1.1, the key parameter could not be null, but it COULD be a zero-length string.  In .Net 2.0 Beta 1, this parameter is validated so that an empty string is not valid input.  It throws an exception. 

    Maybe a validation change for the better, but a breaking change none-the-less.

  • Austin nerd dinner blog - level 000

    I've set up the Austin nerd dinner blog at http://nerddinner.com/blogs/austin/.  To be honest, I, as well as this community is biased toward .Net (versus Java or any other language), but I think there are plenty of .Netters around Austin.  Thanks to Jim Blizzard  for setting up this site.
  • Jason Beres at the Austin .Net UG - level 200

    Jason Beres from Infragistics presented last night at the Austin .Net user group.  He domoed several techniques for providing a rich experience to the user using client side script and ASP.NET It was a great talk.
  • Grassroots news from the field & .Net & blogs - level 000

    Steve Smith has set up a blog site for soldiers in Iraq.  Now this site won't be technical at all, but it's interesting how blogging and specifically, .TEXT, is spreading.  

    I've been a subscriber to Steve's army blog since returning from Iraq myself this past April.  I was over there for a little over a year from 2003 to 2004, and I can tell you that no matter where Steve goes, he'll be able to find a connection to the Internet.  When I arrived in April 2003 (shortly after the initial invasion), there were a few Internet connections available (and usually only available for official business), but as time when on, Internet cafes (full of computers provided for the soldiers) began to pop up, and now most camps have Internet Cafes. 

    I wonder if Scott had any idea how popular his .Text app would become.

  • Did you know that XPSP2 replaced the entire XP kernal? - level 200

    Mark Minasi has a great article about what, exactly, XPSP2 does.  One of the things it does is install a completely new build of the XP kernal.  There are plenty of other things, so go read the article!
  • XPSP2 installed successfully - level 100

    I was intentionally not a first adopter on XPSP2 because of the problems some had with installation, but yesterday I attempted to install it on my secondary computer at home.  This isn't your normal e-mail/MS Word computer.  This computer has so many peripherals attached to it that it's hard to route the wires.  Two video cards, 3 hard drives, 2 optical.  and it has so much software on it that Program Files is around 20GB by itself.  VS 2002 and 2003, Virtual PC, Adobe stuff, SQL Server, IIS, etc.  While I was away in Iraq for 14 months, I had it set to auto-update so my wife didn't have to mess with it, so it's always had the latest patches.  I run Ad-aware and Norton anti virus, and I have to say that I don't have any spy ware or viruses.  Norton hasn't caught anything in over 2 years, and I keep it up to date (I don't open email attachments from strangers).

    I was a little uneasy about installing XPSP2 because some people have had problems, but I've always had success with MS's patches.  I shut everything down and turned Norton off and then proceeded to install.  The install went fine, and everything is great.  In the back of my head I wonder if the people who had problems left programs running during the install, left anti-virus on, actually continued to work during the install, or something else besides:  shut down all programs (even extra services you have running - sql server) and let the computer do its thing. 

    All in all, it has been as painless as every other MS patch that has been automatically installed.

  • Does the back button work in your web apps? - level 100

    Steven DeWalt makes some great points about the usability of web applications specifically with the back button of the browser.  I'm tempted so many times to use Server.Transfer( ), but if it results in the back navigation breaking, then I think twice. 
  • Great developers ask "why", not "how" - level 000

    Dave has a great post about the difference in asking “how do I code this” and “why am I coding it this way”.
  • James Avery's Going Independent discussion group - level 000

    If you haven't already heard, James Avery has started a Yahoo group dealing with the topic of going independent (quiting your job while continueing to work).  There are already 90 members in the group, so there should be some good content and advice for those inclined to get out from behind a corporate firewall that blogs everything useful on the net.  Heres the group: http://groups.yahoo.com/group/going_independent/
  • Web Application architecture preference - level 300

    I'd like to share my preference in building web applications.  First, I'd like to remember that in ASP 3.0, every page posted information to another page, so every page had to know the URL to the next page.  This created spaghetti-posting, and the web application became very brittle because if a page moved, other pages declaratively linking or posting to it were broken.  Those who implemented large web applications with ASP 3.0 know exactly what I'm talking about.

    With ASP.NET the potential for that problem still exists, but some simple design decisions can save  you maintainence time down the road.  Specifically, I'm talking about putting all visible elements and logic in user controls.  I, personally, don't implement any UI in my .aspx files.  All my .aspx files are there for is to hook up .ascx files.  This makes for no URL binding, and my control flow is all programmatic.  All my screens are different user controls, and a master user control decides which controls to load for a particular screen.

    VS has some really great RAD features that make slogging out code very easy, and you will have a working application very quickly, but your maintainability will suffer.  Since I've been using my user control method, my apps have been extremely easy to maintain even in the face of changing requirements and design change requests.  Give it a try.

    In ASP.NET 2.0, imagine have a .aspx that sets the master page, sets the thems, and then loads a user control.  In this way, your site is VERY flexible.  Your custom screen (user control) could be moved to any page anywhere in the site as well as adapted to different looks by changing the master page and theme.

  • How to: Add a totals row to your DataGrid before the footer/pager - level 300

    In my own dealings, I've had to take control of how a DataGrid was rendered. One particular example is adding a Totals row to a grid BEFORE the footer. Here's a sample:

    <asp:DataGrid ID="dgd" Runat="server" AutoGenerateColumns="False">
    
    <Columns>
    <asp:BoundColumn DataField="Product" HeaderText="Product"/>
    <asp:BoundColumn DataField="Price" HeaderText="Price" DataFormatString="{0:C}"/>
    <asp:EditCommandColumn EditText="Edit" UpdateText="Update" CancelText="Cancel" />
    </Columns>
    </asp:DataGrid>
    And the code:
            private void Page_Load(object sender, System.EventArgs e)
    
    {
    //creating mock table for data
    DataTable dt = new DataTable();
    dt.Columns.Add("Product");
    dt.Columns.Add("Price");
    dt.Rows.Add(new object[]{"Shoes", "12.90"});
    dt.Rows.Add(new object[]{"Socks", "3.50"});
    dt.Rows.Add(new object[]{"Underpants", "8.40"});
    //binding mock data
    dgd.DataSource = dt;
    dgd.DataBind();

    //adding totals row
    DataGridItem row = new DataGridItem(-1, -1, ListItemType.Separator);
    TableCell cell = new TableCell();
    row.Cells.Add(cell);
    cell = new TableCell();
    //calculate total
    decimal total = 0;
    foreach(DataGridItem dgi in dgd.Items)
    {
    total += decimal.Parse(dgi.Cells[1].Text);
    }
    cell.Font.Bold = true;
    cell.Text = total.ToString("c");
    row.Cells.Add(cell);
    cell = new TableCell();
    row.Cells.Add(cell);
    dgd.Controls[0].Controls.Add(row);
    }
    I merely create a new DataGridItem, add what I want, and add it to my grid. I've used this concept several times, and I hope it helps out someone else.
  • Submit your Whidbey bugs (here's proof it works) - level 200

    Check out bug  FDBK13913 on the MSDN Product Feedback Center.  I submitted this bug after trying to convert a VS 2003 web application to Whidbey Beta 1 using the built-in convert project wizard.  Because of the change from code-behind to code-beside, this project is incompatible with Whidbey if unchanged.  Yes, there are workarounds, and I used one, but I submitted this bug because that's what it is, and The Web team is working on the bug now.  I've submitted some bugs that were duplicates, but this one was unique, so if I didn't submit it, who knows if someone else would?
More Posts Next page »

Our Sponsors

Free Tech Publications

This Blog

Syndication

News

Headspring Systems

View Jeffrey Palermo's profile on LinkedIn

See my new blog at .jeffreypalermo.com