# Wednesday, September 29, 2004
Wise WebCast

Bill Wagner (Great Lakes Area .NET Users Group President, Regional Director and author of the C# Core Language Little Black Book and Effective C#) is going to be doing a webcast on how to install and configure Data Driven Web Applications.

If you've faced the frustration deploying a data-driven Web application to a server, or tried moving applications from one server to another, you need to attend this webcast. Learn how to create installations for your Web application as easily as a desktop application. By attending this webcast you will learn:

  • Why your Web application needs an installer
  • What problems you will face deploying manually
  • How to create multiple Web sites and virtual directories in the same installation
  • How to connect to and configure SQL Server databases
  • How to manage security for your application
  • How to edit web.config to customize your installation

 

Join Wise Solutions and Bill Wagner of SRT Solutions as we cover the process of creating an easy installation for a complex Web application.

Thursday, September 30 @ 8:30 a.m. EST

For Registration go to http://www.wise.com/wfwi_webcasts.asp.



Wednesday, September 29, 2004 2:21:46 PM (GMT Standard Time, UTC+00:00)  #  Comments [0] 

# Friday, September 17, 2004
GMail Invites
If you would like one - let me know through my contact form (http://www.JoshHolmes.com/contact.aspx).

Friday, September 17, 2004 9:20:15 PM (GMT Standard Time, UTC+00:00)  #  Comments [0] 

Blog Post Headlines and Pictures

Patrick Steele (http://weblogs.asp.net/psteele/archive/2004/09/16/230473.aspx?Pending=true) and Scoble have been talking about using descriptive titles on your blog posts to make it easier to scan and triage what posts you read. That’s actually a great point. I know that I scan 150+ blogs and Patrick is in the same ballpark. That’s an average of 80-120 posts a day and some days are more intense than that. The good news is that NewsGator (http://www.NewsGator.com), SharpReader (http://www.sharpreader.net/) and RSS Bandit (http://www.rssbandit.org/) all make scanning new posts.

 

Patrick went on to post about the number of pictures that are on blogs and how frustrating that is when you are offline. One the one hand, I agree with that. It’s really frustrating that when you are offline and the major portion of a given blog with an interesting headline is a picture. On the other hand, I really like the pictures that are on some of the blogs that I read. Some examples of this are:
http://bucsfishingreport.com/pMachine/weblog.php

http://weblogs.asp.net/jrule/Rss.aspx

 

I’m not saying that the pictures make the post but it does help the item. Some other blogs just add pictures for the fun of it and they don’t really add anything to the post.

There are few things that I’d like to suggest about pictures.

First, be judicial in your use of pictures. That is, make sure that they add something to the post.

Second, in the short term, make sure that you provide alternative text for all of the pictures on your blog.

Third, I’d love it if one on the readers (or all of them for that matter) would have an option to download pictures and the like with the posts.


RSS
Friday, September 17, 2004 1:47:23 AM (GMT Standard Time, UTC+00:00)  #  Comments [1] 

# Thursday, September 16, 2004
Test Driven Development

Last night Eric Maino (http://www.meeteric.net) gave a talk at GANG (http://www.migang.org) about Test Driven Development (TDD). It was a very good talk that touched on a lot of the important issues involved in testing. It was a good overview of NUnit (http://www.nunit.org) and how TDD works. The slides will be up on the GANG web site soon.

 

One of the questions that came up was how GUI testing works with NUnit. I happened to attend a talk at SD West (http://www.SDExpo.com) by Elisabeth Hendrickson from Quality Tree (http://www.qualitytree.com) on that exact topic. She has been working on a test harness for GUI testing that’s built on NUnit. You can learn more about it here - http://www.qualitytree.com/autotest/dotnetgui.htm.


Development | Utilities
Thursday, September 16, 2004 8:58:14 PM (GMT Standard Time, UTC+00:00)  #  Comments [0] 

# Friday, June 25, 2004
Snippet Compiler

I’ve found this little tool invaluable. I use it to test out RegEx expressions, String Formatting and tons of other useful little bits of code.

I used to keep a dummy project around for this purpose, but it’s a pain to load VS.NET every time that you want to test a quick string formatting and it’s too painful to test to that location in your real application just to see if it worked and see what it does.

I hope that you enjoy it as much as I do.


Development
Friday, June 25, 2004 1:56:05 PM (GMT Standard Time, UTC+00:00)  #  Comments [0] 

# Thursday, June 17, 2004
History of Programming Languages

I thought that this was an interesting item. It’s the history of programming languages back to the mid-50s. There are a few things that I saw that were interesting – such as the fact that Fortran will be 50 this November and is the ancestor to a number of programming languages. There were a few inaccuracies, such as the fact that they skipped from VB 1.0 to VB 6.0 and completely missed all of the releases between.

Oh well, it’s an interesting thing anyways…


Development
Thursday, June 17, 2004 7:54:38 PM (GMT Standard Time, UTC+00:00)  #  Comments [0] 

# Wednesday, June 02, 2004
Host a Native Control on .NET CF

There are a number of reasons that you might want to host a native windows control on the Compact Framework and now there’s a way using the OpenNetCF framework.


Compact Framework
Wednesday, June 02, 2004 9:32:12 PM (GMT Standard Time, UTC+00:00)  #  Comments [0] 

New White Paper

Articles | Compact Framework
Wednesday, June 02, 2004 9:22:58 PM (GMT Standard Time, UTC+00:00)  #  Comments [0] 

# Thursday, April 22, 2004
CodeDom Article

I know that it's not a really big deal to many authors, but I got my first article published on the Fawcette Reports web site.

I didn't know that it was actually published until I started getting emails about it - but it's linked below.


Articles
Thursday, April 22, 2004 1:53:43 PM (GMT Standard Time, UTC+00:00)  #  Comments [0] 

# Tuesday, February 03, 2004
Databinding on the Compact Framework

Through careful use of databinding, your UI code can be very light weight.

There are two forms of databinding that we need to discuss, binding to properties of objects and binding to a list of objects – which often binds to properties of the individual objects.

First, let’s deal with the less talked about binding to properties. The code to setup a binding to a particular property on an object is fairly simple. The following snippet binds the text property of the _txtName textbox to the name of a person.

 

_txtName.DataBindings.Add("Text", person, "name");

 

This assumes several things. First of all, it assumes that the TextBox has a Text property. Second, it assumes that the person is not null and lastly, that the person has a valid property called name. Once you work through those assumptions, the TextBox in question will not only show but allow you to edit the person’s name with that one line of code. If, however, instead of a person object, you have a table with rows of people, you will bind as follows.

 

_txtName.DataBindings.Add("Text", _dataSet.Tables["person"], "name");

 

As a quick note, on the full framework, I would bind the text as follows.

 

_txtName.DataBindings.Add("Text", _dataSet, "person.name");

 

However, this is a shortcoming of the Compact Framework in that it is not able to bind to expressions like “person.name”.

 

Back to the original thought, as this is a simple textbox, this is only able to bind to one row at a time so it’s going to enlist the BindingManagerBase for the form to pick which row is bound. The BindingManagerBase controls the databinding for a particular object for all of the bound sub-controls of the control from which it was returned. Most often, it is used to control the bindings for an entire form, as I’ve done in the sample, but it can also be used on a particular Tab or Panel. To get the BindingManagerBase, use the BindingContext for the container in question to retrieve it as follows.

 

BindingManagerBase _bindingManager = null;

_bindingManager = this.BindingContext[_dataSet.Tables["person"]];

 

At this point, you can use the BindingManagerBase to control the position in the list and thus the current row bound by the TextBox by setting its Position or to monitor changes to the object by subscribing to the CurrentChanged event.

 

BindingManagerBase _bindingManager = null;

private void Bind()

{

            _bindingManager = this.BindingContext[_dataSet.Tables["person"]];

            _bindingManager.PositionChanged +=

                      new EventHandler(_bindingManager_PositionChanged);

_bindingManager.CurrentChanged +=

         new EventHandler(_bindingManager_CurrentChanged);

 

            _txtName.DataBindings.Add("Text", _dataSet.Tables["person"], "name");

            _txtEmail.DataBindings.Add("Text", _dataSet.Tables["person"], "email");

}

private void _btnNext_Click(object sender, System.EventArgs e)

{

            _bindingManager.Position++;

}

private void _btnPrevious_Click(object sender, System.EventArgs e)

{

            _bindingManager.Position--;                   

}

 

This will allow you to cycle through the list easily.

 

The second form of databinding, binding to lists, is even easier. The code is as follows.

 

private void BindList()

{

            _lstMain.DataSource = _dataSet.Tables["person"];

            _lstMain.DisplayMember = "name";

}

 

Setting the DataSource on the list requires that the list (or table in this sample) implements IList or IListSource, which the DataTable does. Setting the DisplayMember is similar to the binding of the properties that we did earlier in that it will show the name column or property on the person object or row in the list.

 

There are some benefits to combining these methods of databinding. For example, if you bind the table to the list and bind the textbox to the same table – the listbox will automatically keep track of the positioning of the BindingManagerBase.

 

In conclusion, there is very little need to write a lot of UI code anymore. Instead, leverage databinding to your advantage to keep your UI lightweight and responsive. 

 

For a full code listing download the sample code below.


Development
Tuesday, February 03, 2004 10:02:14 PM (GMT Standard Time, UTC+00:00)  #  Comments [0]