Dave Burke - Freelance .NET Developer specializing in Online Communities

A freelance .NET Developer

November 2003 - Posts

nGallery first impressions

I still have more late-night quality hours to spend studying .Text and gleam more of ScottW's code wisdom, but I thought I'd check out nGallery 1.5 while Scott finishes the 0.95 release of .Text.  Let me say that Jason Alexander knows what he's doing!  Definitely a valuable study in coding practices.  Great job on the inline documentation, as well.  I hope to have other observations to post as I continue working with the source.

My plan is to keep nGallery in the base ASP.NET application space of my personal web site (no subdirectory config'd as separate application) to integrate nGallery with site authentication and other functions as well as with .Text 0.95. 

Posted: Nov 24 2003, 12:03 AM by daveburke | with 2 comment(s)
Filed under: ,
Another reason to blog

I was cleaning out my Visual Studio Projects folder under

d:\documents and settings\me\my documents\visual studio projects

and accidentally dragged a folder with project code I still need.  The folder name had a (2) in it, and for this reason (or some other) it was not saved in the recycle bin giving me the chance to restore it.  What is the friggen' deal with that??  And although I'm a religious backup guy, I never included my vsprojects folder because I backed-up the IIS directories.  But the THREE projects in this folder were not web apps, they were console apps.  Gone! 

I have the logic elsewhere since these were derived from asp.net apps, but any specifics not in asp.net source code can be found here on my blog. 

So another reason to blog is to provide notes to self on what you did a while back in case you need to reproduce it.  In most instances, however, backing up the VS Projects folder is a superior method to code reproduction...

Posted: Nov 23 2003, 11:46 PM by daveburke | with 3 comment(s)
Filed under:
[non-.NET] No more Adobe LiveMotion

Adobe LiveMotion is one of those Adobe products I purchase whenever a new version is available, along with Photoshop, Illustrator, and Acrobat.  I've been so .NET-driven for the last, oh, year, that I haven't put serious time into staying in touch with my Graphic Designer's side, though I still do a fair amount of graphic design work as part of my job.

Regarding LiveMotion, it was the animated image component of the group competing with Flash.  I went with it after a lot of deliberation, concluding that I wanted a more integrated graphic design environment and wanted to stay with Adobe. 

I just saw this on Adobe's site tonight:

Effective November 15, 2003, Adobe will no longer distribute LiveMotion 2.0. Though Adobe has decided to concentrate its efforts in other areas, we want to thank our loyal LiveMotion customers for their support.

Here's the full url.

The good news is that I always viewed animated images as something that doesn't bring real business value to applications--web or otherwise.  I'm always looking for good use of animated images in applications, but at this point in time and in my particular environment I just didn't see it.  So I'm happy that I haven't spent hours and hours learning a package which is going away....unlike the year of my life I spent learning COM....

 

Changing reading mid-stream

Dan Fogelberg's 1974 Souvenirs album has a song titled “Changing Horses [in the Middle of the Stream].”  Third song on side one, right after “Illinois [looks like you're gonna have to see me again.]  Completely beautiful.  I definitely need to listen to Fogelberg again.  The “mid-stream” subject term made me think of it....

So I'd been reading Chris Sells' Windows Programming in C# and its a great book, but its a book that's best experienced while sitting next to your computer and going through the examples chapter after chapter.  I do most of my reading during the late afternoon while on my Nordic Trac Achiever Ski Machine which sits in my home office.  I crank up the tunes, put a .NET book on the Ski machine's reading attachment, and I'm set.  But I just wasn't enjoying the skiing/reading experience much lately.

So it was time to turn to more familiar territory: Steve Smith and Rob Howard's ASP.NET Developer's Cookbook.  I got so into this book this afternoon that I stayed on the nordic trac much longer than I planned.  More on the book later, I just had to take a minute to say how charged up I am about this great book.

Sidebar:  All links in this post are to BarnesandNobles rather than my usual Amazon.  Amazon seems to be down at the moment....

Its okay to refactor on company time, too

In October I first posted about a refactoring task I wanted to undertake, but at the time felt that this was too personal and would take too much extra time to justify doing it on my employer's dime during working hours.  Since then a number of other tasks came and went and this refactoring need sat there crying out to be done.  It didn't matter when it should be done, to keep the overall project moving forward it had to be done.

I needed to turn out multiple versions of an app using different types of data with slightly different properties and functions.  In recent months I discovered the joy of inheritence and base classes, and this would be the ticket.  All but a couple (well, three maybe four) methods could reside in a base class, and I could use scaled down classes for each app variant focusing on those 3 methods.  But the rub (for me, not my employer) was the additional 2-3 days to rewrite the original app. 

Back to the point of refactoring on company time.  Whatever you call it, “refactoring,” “upgrading,” “versioning,” whatever, if its the smart thing to spend some extra time rewriting an app to scale it out in drastically reduced time, make it more stable, more manageable, and easier to enhance in the future, then its in the company's interest to take the time.  Once I recognized the payoff of making the investment, it was a no-brainer. 

Of course, I am an incredibly blessed nerd that I don't have to rationalize these things to a manager.  I can only look at things objectively with my company's best interest at heart (and the expansion of my own skillset secondarily), make a decision and get to work.

Posted: Nov 17 2003, 09:52 PM by daveburke | with 1 comment(s)
Filed under:
Housecleaning MS VSNET help files on my c:\ drive

A previous post described the crash of my home office PDC and moving to another server which was an earlier development machine.  The PDC was a Pentium Pro 200Mhz w/ 64MB RAM, so its retirement was way overdue.  The server now filling in is no spring chicken, however: 4 years old, a 550Mhz 512MB mom-n-pop pc which has served me very well.  Its got a 4GB C:\ partition, which should be big enough.  The problem is that there was only 494MB free this afternoon.

I make it a point to never install anything on the OS partition and to keep it clean as possible.  Still 4GBs almost filled up! 

In housecleaning I found a 2-year-old 261MB memory.dmp file in c:\winnt that I took a chance and deleted, but also discovered 356MBs of MSHelp files in C:\Documents and Settings\All Users\Application Data\Microsoft Help for just VSS and VSS.NET.  I can understand the logic of putting the help files there, but maybe it would be nice if there was a choice in its location.  I searched through VS.NET Options and didn't find the ability to change it.  But I had to move the files to my D:\ drive and if I use VS.NET on that machine in the future (and I'm sure I will) I will have to live without the help files.

I just hope my new PDC reboots now...ah, heck.  I'll reboot it on Monday.

 

hostmysite.com and the church web site

I have been a customer of hostmysite.com for over two years now, choosing them as my first Windows-based host for a church web site I did for my [ex] church.  The church web site had a secure member area, a complete member photo directory, mailing list support, church photo gallery, online library, visitor tracking, ability for members to update their own records, etc, etc.

I started the site in March 2001 in classic .ASP then encountered .NET beta 2 at TechEd 2001 Atlanta in July of that year.  The site became a marvelous learning tool for .NET, with many many late night coding sessions hammering away at church website features in my efforts to learn .NET.

I won't get into why I closed down the site a couple of months ago and left the church.  All I will say is that if anyone from any denomination comes up to you and asks you if you would like to do a church web site for charity, “don't blink, don't hesitate, don't think.  Just spit in his eye,” as Bing Crosby said in White Christmas (yeah, on the train to Vermont with Danny Kaye and the Haynes Sisters.)

Oh, about hostmysite.com.  They have been consistently fantastic in all areas of service over the last two years.  When I sent an email to them yesterday informing them that the church web site was no more and that I regrettably wanted to cancel my account, they emailed (and phoned!) asking me if I knew that I was paid until April 2004 and that I could change my site domain names for free?  I never heard of that.  I know my domain's DNS is hosted by hostmysite.com as well, so that makes it easier to do, of course.  But I thought that was a smart, customer-focused policy.  Another reason I like hostmysite.com. 

System.Reflection SetProperty

This is my second post on using reflection.  Here is the first.  I started rewriting a web app which lists items then on selection shows the item summary (along with several item-specific functions) to support other similar item types.  So it was an opportunity to implement a base class in the solution's WebUI project namespace and go from there.  A method I wanted to use in the base class set a property in a control in the web project's .ASPX page.  I've used reflection to get a property in a remote class web control, but never set a property.  Here's how it works for me.

System.Web.UI.Control uc_doclist = Page.FindControl("uc_doclist");
Type ucType = uc_doclist.GetType();
System.Reflection.PropertyInfo prop = ucType.GetProperty("pid");
ucType.InvokeMember ("pid", BindingFlags.Default | BindingFlags.SetProperty,null,
     uc_doclist, new object [] {int.Parse(e.CommandArgument.ToString())});


In my googling I found two reflection sources which were helpful:

 

Useful scrollable area tip

One of my pal Julie Lerman's earlier articles was a tip on how to create a scrollable datagrid.  I needed one the other day so I thought I'd check it out. 

The image at right is mucked up to mask company data, but you can clearly see its usefulness.

I used it in two different apps in the last week alone.  It works great for displaying scrollable areas in popup windows, which doesn't have to be a datagrid.

The code is below.  As you can see, all it is is wrapping a control in a DIV tag.  Another cool tip I learned from her article was in using the style elipses in the properties window to visually set the style of the DIV area.  (In the .ASPX page, select the DIV with your cursor then go to STYLE in the property window.)  Easy.

<table width="520" align="center">
<tr>
<td><img src="/images/utils/blank10x10.gif" width="20" height="10"></td>
<td>
<div id="scroller" style="OVERFLOW: auto; WIDTH: 480px; HEIGHT: 300px">
<asp:DataGrid id="dgProp" AutoGenerateColumns="False" CssClass="smstart" runat="server"
 AlternatingItemStyle-BackColor="#eeeeee" CellSpacing="6" Cellpadding="3"
 ShowHeader="False" ShowFooter="False" BorderStyle="Solid"
 BorderColor="#eeeeee" BorderWidth="1px">
 <Columns>
  <asp:TemplateColumn ItemStyle-CssClass="nbsmstart" ItemStyle-BorderColor="#dddddd"
   ItemStyle-BorderStyle="Solid" ItemStyle-BorderWidth="1px">
   <ItemTemplate>
    <%# DataBinder.Eval(Container.DataItem, "desc") %>
   </ItemTemplate>
  </asp:TemplateColumn>
 </Columns>
</asp:DataGrid>
</div>
</td>
</tr>
</table>

I couldn't find the location of the original article since I think URLs got changed with the redesign of dotnetjunkies.com and my search didn't find it.  Maybe someone will provide the url in this post's comments for the sake of completeness.

 

Posted: Nov 13 2003, 12:00 AM by daveburke | with 2 comment(s)
Filed under:
First impressions of Whidbey

I saw Whidbey in action for the first time thanks to Julie Lerman's presentation at Monday's VTdotNET Users Group meeting.  She did a great job, by the way.  (As much kool aid as she's been drinking, no wonder, eh?)

I was very thankful to see where we go from here.  I was apprehensive, but now actually anticipating loading up, mmmm, Whidbey beta 2 and running with it. 

I was concerned that there would be another leap as there was from the VB6/Interdev/ASP world to .NET, but I see Whidbey as just another evolution of where we've been going with VS.NET 1.x.

I also was apprehensive because I like the way I am writing applications now.  And I'll like the way I write applications after I learn the ton of stuff to want to learn, but this is an important consideration and I didn't want Whidbey to change that.  It will only make things better. 

Maybe I won't wait for beta 2...

 

Posted: Nov 12 2003, 10:53 PM by daveburke | with no comments
Filed under:
More Posts Next page »