Tuesday, May 31, 2005
NTeam
Today, I joined the NTeam project where I'll be working with a friend of mine, Ron Buckton on a competitive open source system. Seems like a lot of fun, but we're still in the planning phase. I say "we" as though I've been working with these guys for a while, and yet I just signed on today.
Monday, May 30, 2005
VS.NET 2005 Team System Training
I got to go to a VS.NET Team System Training seminar on Friday. It was pretty cool, but you could definitely tell it was still beta. I've been playing with 2.0 framework and Whidbey for almost 8 months now and been following it since the whitepapers, so I've been close to the development side, but I haven't really paid much attention to the Team Foundation Server.
Anyways, it was fun to play with the new features of Team System. Microsoft has done a great job creating an extensible interface and yet maintaining such a tight integration with all its other tools (Sql Reporting Services, Microsoft Office, Microsoft Project). The best part is the Enterprise Souce Code Management. Finally, a real source control system that isn't open source and is reliable and fast. YEA!
Anyways, it was fun to play with the new features of Team System. Microsoft has done a great job creating an extensible interface and yet maintaining such a tight integration with all its other tools (Sql Reporting Services, Microsoft Office, Microsoft Project). The best part is the Enterprise Souce Code Management. Finally, a real source control system that isn't open source and is reliable and fast. YEA!
Thursday, May 19, 2005
If people only knew the power of the UserControl...
It's come to my attention that a lot of people don't understand the power of ASP.NET databinding and using server and user controls efficiently. So I've put together a few tips on making better use of these two demons.
1. User controls are controls. You can create properties in them, and as long as they are public, they are accessible to the parent control in the ASPX page. This gives you the ability to easily databind the control in the ASPX page. A simple example is when you want to display a product. The two easiest ways to handle this situation are to (1) pass the DataRowVersion or Product class directly to the user control, and have the user control bind the data, or (2) pass each property to the user control.Now, what if you want to do some sort of skinning on a user control? Here's a simple method to give your user controls a heading:
Example user control:
public class Product : UserControl
{
private DataRowVersion _productData = null;
public Product() {}
public DataRowVersion ProductData
{
// notice, I do not use viewstate to persist this
// information since it is probably persisted
// in the parent control
get { return _product; }
}
...
void BindData() { // handle binding the data }
}
implementing this in a page with a repeater might look like this:
<%@ Register TagPrefix="uc" TagName="Product" Src="~/Product.ascx" %>
<asp:repeater runat="server">
<itemtemplate>
<uc:product runat="server" productdata="'<%# Container.DataItem %>' />
</itemtemplate>
</asp:Repeater>
An example for (2) is very similar and will provide little benefit in demonstration.
This code will give you the ability to skin the heading of your user control and allow you to place content within the user control on the ASPX pageWell, I hope you enjoy these. I'll try to demonstrate some other cool techniques in future blogs.
[ParseChildren(true, "WebPartContent")]
public class WebPart : UserControl
{
protected Label WebPartTitle;
protected PlaceHolder WebPartContentPlaceholder;
[Browsable(false)]
public PlaceHolder WebPartContent
{
get { return WebPartContentPlaceholder; }
set { WebPartContentPlaceholder = value; }
}
[Browsable(true)]
public string Title
{
get { return WebPartTitle.Text; }
set { WebPartTitle.Text = value; }
}
}
The ASCX control can look like this:
<table cellpadding="3" cellspacing="0">
<tr>
<!-- Heading -->
<td><asp:Label runat="server" id="WebPartTitle" /></td>
<td width="60" align="right"><asp:Button runat="server" id="CloseButton" /></td>
</tr>
<tr>
<td colspan="2">
<asp:Placeholder runat="server" id="WebPartContentPlaceholder" />
</td>
</tr>
</table>
And the ASPX page can look like this:
<body>
<uc:WebPart runat="server" Title="Web part title">
This is where my user control content will go...
</uc:WebPart>
</body>
Monday, May 16, 2005
Working on extensible inventory system
I started working on an extensible inventory tracking system this weekend. It will integrate with my already existent content management system and my upcoming extensible shopping cart system.
The idea is to build an application that has plug points for additional functionality that can be easily implemented. The complexity in this is that I want there to be an infinite number of plug points that maintain the ability to interact with each other and allow the minimum number of dependencies...
...and, I hope to do it without going pattern happy.
The idea is to build an application that has plug points for additional functionality that can be easily implemented. The complexity in this is that I want there to be an infinite number of plug points that maintain the ability to interact with each other and allow the minimum number of dependencies...
...and, I hope to do it without going pattern happy.
Monday, May 02, 2005
Neural networks
Figured I'd post a link to something cool. Here's an article that showed up in MSDN mag last month on writing a simple neural network which I would have figured would be written in either C++ or C#--it was written in VB.
http://msdn.microsoft.com/msdnmag/issues/05/05/NeuralNetworks
http://msdn.microsoft.com/msdnmag/issues/05/05/NeuralNetworks
Subscribe to:
Posts (Atom)