Jason Salas' WebLog

On-air and online: making people laugh, making people think, pissing people off

Sponsors

ASP.NET sites that kick ass

Pals with blogs

Podcasts I listen to

October 2004 - Posts

Book Review: "User Interfaces in C#: Windows Forms and Custom Controls"

I've "grown up" in programming working exclusively with the Web, and recently moved into the very unfamiliar world of desktop development. This is a fantastic piece of work that gives you a very high-level view of the major concepts and considerations you'll need when attempting to conquer the world of Windows Forms.

The book starts out with a brief discussion of some of the more visual aspects of great UI design, which, as author Matthew MacDonald describes, is as much technical as aesthetic. It then dives right into the major concepts of WinForms - forms and controls, and many of the secrets and tips on using them to create familiar, effective UIs for your apps. Examples are alternate ways of achieving drag-and-drop functionality for on-form controls, creating floating toolbars for and maintaining synchronicity in MDI apps.

It's very real, very practical, and very easy to grasp.

I was found MacDonald only mentioning certain class members for each of the controls, and the "members" tables listed in the book don't explicitly break the members down into properties, methods and events, which clouds a newbie's learning of a new set of classes and their functionality for the first time. That's about the only criticism I have with the title.

The book's finest moment is evident in what has got to be one of the best written chapters on the often-complex topic of working with data and databinding in WinForms. It's thorough, yet easy on the brain in terms of laying out how to work with binding in simple and complex environments.

The book isn't a primer on C# or on programming in general, so the code snippets are largely piecemeal, abstracted modules of much larger Windows Forms and components. But this isn't necessarily a bad thing.

Posted: Oct 28 2004, 11:09 PM by guam-aspdev | with no comments
Filed under:
Book Review: "Seeing Data - Designing User Interfaces for Database Systems Using .NET"

Seeing Data – Designing User Interfaces for Database Systems Using .NET
By Rebecca Riordan, published by Addison-Wesley

The one quality that makes this book a clear winner is the quality of the content and clarity of author Rebecca Riordan's writing.   She uses a friendly, humorous, often bitingly sarcastic voice that eases the normal tension accompanying such a complex topic as UI design for Windows applications with .NET technologies.   You'll appreciate this tone as Riordan takes you through some very challenging scenarios in developing winning desktop apps.

The main focus is on presentation tier technologies and techniques used to create great programs that customers will really enjoy using.  The book starts out with five phenomenally-written chapters on GDI+, typography, color, and image programming that every developer working with .NET should read, whether they're examining UI design for desktop applications, or otherwise.   It also includes a helpful glossary of development terms mentioned throughout the text that you'll enjoy and refer to often.

Riordan also attempts to demystify the many complexities of .NET databinding within Windows Forms.  As do most Addison-Wesley texts, the book's physical properties are to be appreciated, using sturdy binding and thick paper, making the book close and sit easily after a session open on your lap (and who hasn't wrecked at least book doing so?).

The only downside to this book (and a minor one at that) is the exclusive presentation of code in Visual Basic .NET, which would make the book largely one-dimensional to programmers working with that language (or liberal minded C# readers).  But programming language semantics aside, this is a real gem, and one you'll want to pickup for your WinForms team projects.

Posted: Oct 11 2004, 02:18 PM by guam-aspdev | with no comments
Filed under:
Building a web-based P2P client

I'm not really going to try this, but I'm wondering if anyone out there has tried putting together a web client for a P2P app.  I guess if 2 or more PCs shared a set of authentication rules and belonged to the same membership system, they theoretically could use networking classes in ASP.NET and read the drive contents of each other's computers and facilitate the transfer of files, yes?

Anyone tried to do this?

Book Review: "Best Kept Secrets in .NET"

"Best Kept Secrets in .NET" by Deborah Kurata
Published by APress

Although I'm giving this book high marks for thoroughness of content, I did feel slightly dejected after expecting it, based on its title, to be a cornucopia of gems of little-known facts that .NET developers of varying levels could use. And while it certainly contains a lot of good remarks about how to work faster and/or more efficiently with have better performing code, it's not exactly a collection of "secrets".

I'm a somewhat experienced programmer, and a lot of what I read I found to be best practices that most introductory books on a variety of subjects will feature. The book's magic is that the tips are consolidated to within a single bound title, relieving the reader of needing to buy and read multiple titles to acquire such knowledge.

The book's finer points are evident in the many code samples being featured in both Visual Basic .NET and C#, and the book's succinct nature. Author Deborah Kurata doesn't spend hours poring over concepts; she just gets right to the point and lets you know how you can use a certain trick in your .NET programming. On that point, there's also a nice discussion of using regular expressions and operator overloading, and a good preview of refactoring in Visual Studio 2005 (at the time of this writing still in early beta).

However, I was disappointed in the fact that there wasn't a chapter on such secrets for web development with ASP.NET, and leans heavily towards those programming for Windows Forms (there are faint mentions of using web.config for web projects, but that's about it). This makes the book more applicable to desktop developers, and unfairly denies the browser crowd of using this book for their work.

Still, I came away with a couple of morsels that I'll take with me, such as the ability to use VB .NET's IsNumeric function in C# by referencing Microsoft.VisualBasic.dll. As with most APress titles, it's made the stand the test of time, with heavy paper and sturdy binding, so it's great as a desktop reference.

Overall it makes for a nice, quick read - priced pretty decently

Posted: Oct 09 2004, 04:42 PM by guam-aspdev | with 1 comment(s)
Filed under:
I was not aware of that...IsNumeric in C#

I'm reading Deborah Kurata's "Best Kept Secrets in .NET" (review forthcoming), and she indicates that to be able to use Visual Basic .NET's IsNumeric function in C#, you can include a reference to Microsoft.VisualBasic.dll.

Granted, Deborah's book is one written from a WinForms development standpoint, so that crowd may be well aware of this.  But for me, being a web dev looking to expand into the wonderful world of desktop programming, this is news to me.  There are code snippets-a-plenty documenting how to emulate IsNumeric in C#, but this is a cool thing to keep in one's mental rolodex.

 

How does one emulate a search engine's ranking (aka, "relevance", "strength") feature?

One of the things I've been working on mentally for the past few days is a referral engine for a B2C app for a restaurant I'm doing.  The one key element that I'm stuck on is how to develop a weighted ranking system, where items can be recommended based on the strength of their relations to a customer's past purchased items (i.e., pepperoni pizza would rank higher than salad when sausage pizza is an item appearing regularly).

The DB table design is basically open at the moment.  I'm using a simple aggregation query that uses COUNT(*), GROUP BY and HAVING to determine the frequency of items purchased over a certain time period (an item selected more than 5 times in a month constitutes a recurring purchase).  Then, I'd like to run through a catalog of items and determine their relevance to the base item.  I was thinking of using some sliding multiplier or a constant, but I'm stuck.

We've all seen and have used this weighted ranking/strength feature for years in SQL Server, FrontPage's search utility and Google (which are largely based on full-text searches, whereas this implementation is probably going to be based off of numerical values for an item's categories/subcategories).  Now, I'd like to roll this myself, but this seems to be more on the computer science end of the pool, which I don't normally swim in.  :)

Anyone have any tips or pointers?

Building an Amazon.com-like referral engine for an e-commerce web app

A side project I'm working on to keep myself busy over the weekend is a referral engine for a multi-platform (web and mobile) B2C app.  It's essentially product- and industry-agnostic, so in theory it can fit other application models outside the scope of e-commerce.

Anyhoo, this is my general spec for the engine, and in lieu of any actual coding, this is what I'm working with:

The system tracks registered users and asserts recommendations based on their buying habits.  A recommendation resultset consists of 3 recordsets of data, based on a weight-based algorithm calculated for a certain buying frequency over a certain time:

1. Frequently-purchased products - hamburgers are recommended for repeat hamburger purchases ("Would you like your normal order?")
2. Direct Correlation products - pepperoni pizza is recommended for customers buying sausage pizza ("Have you tried...?")
3. Indirect Correlation products - spaghetti is recommended for customers buying sausage pizza ("You might also like...") 

My best friend is a database guru (an Access freak, actually), so he and I are putting out heads together to see if we can't suss out the logical design for the table schema and SPROCs.  However, any additinal input based on your own experience is more than welcome.  A book I just read and reviewed, "Beginning ASP.NET 1.1 E-Commerce", features a chapter on making customer recommendations, which I'm going to go over again.

Ahh, to be young and ambitious...

More Posts