July 2003 - Posts

SQL Web Logs Launched - Help Spread the Word

For those of you who don't know, yes we're in the process of starting a new site named SqlJunkies - We are a couple months out but we wanted to get our blogs going ASAP for there is a lack of them in our community. So here we go: http://sqljunkies.com/WebLog/ . We're running the same build of Blogs as DNJ so there are some overlaps because we haven't had time to do our UI and our LOGO isn't finished, but hey we're up and going so don't complain :-)

Email us to start one and please spread the word to any SQL guru's!

 

Please Help Me Test Our New Code Repository Engine

Ok, we need some help over the next couple days. Basically, I need help finding bugs and suggestions for functionality on a new site we're launching (or relaunching) CodeJunkies.NET. http://64.85.9.66/ - CodeJunkies.NET is going to be a one stop shop for all your “Code Snippits” and Application functionality needs. It's only purpsose will be to serve up code and put in code.

Everything will be exposed through RSS and Web Services (including ways to submit and retrieve code) although all the services are not complete yet.

We hope this will be a valuable asset to the community, but we need your help to get all the bugs out before we launch ( next week sometime )

Please send feedback directly to me at donny.mack@dotnetjunkies.com

Thanks!!!

We're running the new blog engine!!!!

As Jim pointed out we're now running the newest version of Scott's Wonderful Blog Engine - As you bloggers will notice there are many new skins to choose from and a lot more functionality. It's truly turning into a wonderful application!

Enjoy

 

New Article on DNJ: Building a Full-Featured Custom DataGrid Control

Check it out:

Building a Full-Featured Custom DataGrid Control
By Dimitrios Markatos
In this article, we will examine and implement these very features and demonstrate how you can build your very own Datagrid control component, one that you will be able to customize, and more importantly reuse. Based on this ability, you will then end up with one powerful control that will have many implementations, from which you could learn about creating almost any other types of custom controls. (Tuesday, July 22, 2003)

Includes source code downloads in C#.
Read It Now! Read It Now!    Discuss it in the Forums! Discuss it in the Forums!

Blog Fix: Fixed Link and Comment Count Issue

We were having issues with the Comment and Link count's not showing up. After going through the SPROCS I currently have I noticed that no where was the main table which these values we're pulled from updated. So I added a trigger to update these tables as a temp fix. I am assuming I am running some outdated SPROC's. Scott  has told me he is having a new version soon, which I'm really excited about, so all these smaller issues should be fixed with that!

Thanks for all of your patience!

Web Services Tip: When to Use and When not to Use

This is a very simple tip and a rule that you should live by MOST of the time. Of course a situation always arises when you need to do something that is not recommend, but in general this rule should be followed:

When to Use XML Web Services

Application to Application Communication

When not to Use XML Web Services

Intra-Application Communication

That's it, that's the tip. It may seem obvious, but I've seen XML Web Services used in the wrong way more than once so I know it's not!

Until next time!

More Information on Web Services:

http://msdn.microsoft.com/webservices/default.aspx
http://www.dotnetjunkies.com/quickstart/aspplus/
http://www.dotnetjunkies.com/tutorial/default.aspx?tid=6
http://www.dotnetjunkies.com/Search/?exSearchPhrase=Web%20Services

Quick Tip: String vs. StringBuilder

Ok, this is just a quick tip since I'm tired.

We're going discuss why you should ALWAYS use a StringBuilder (part of System.Text namespace) when doing any string manipulation.

Put simply, a string type is immutable and a StringBuilder is NOT.

Immutable means that after created it cannot be modfied, changed, etc. - This is what a string type is, if you add even just one character to a string using either the + or &

myString = myString & "HI"

A new string is created (an additional OBJECT is created)

A StringBuilder is NOT immutable (Mutable), so you can add, remove, modify, etc. a StringBuilder object and new objects will NOT be created. So, if you need to dynamically construct a string or manipulate one always use a StringBuilder object.

C# Example:

StringBuilder sb = new StringBuilder("You can pass in a string to the contstructor");
sb.Append(" and then add some more");

There are many other methods and properties of the stringbuilder object you should check out to make your life easier:

Check StringBuilder Class Browser

What is Wrong with DotNetJunkies Homepage????

Ok, I see about a ~50% approval of our home page, what gives? Please let us know, what we're missing so we can add it.

For that matter, what features are we lacking currently that we can add???

We are striving to be a larger, better, .NET community and we need your help! We have the connections to get the information you want and need but without feedback we don't know what that is?

I understand that we still have some bugs in this version of DotNetJunkies, some we are letting go by because we're working on a better system to replace the current and the others we are fixing. We have lots of new features and sections in the works, but you may think of something we haven't, it's happened a million times so let us know!

help@dotnetjunkies.com is the url to email or just respond to this post with your comments! Another avenue is our Forums we're on them all day long. And if all else fails, email me directly donny.mack@dotnetjunkies.com

Thanks for all your support!!

Just Launched TablePC Development Forums

On a suggestion from Bob, we just launched a group of TablePC Development Forums which I think are going to be huge as there become more and more TabletPC users.

If you're a tablet pc developer please help support our new forums.

Tablet PC Development Forums: http://www.dotnetjunkies.com/Forums/ShowForumGroup.aspx?ForumGroupID=39

Forum List:
http://www.dotnetjunkies.com/Forums/

Solution Design (Class Structure)

This really isn't a tip, more of a peeve I have. I hate when I pick up someone elses solution and find that there are multiple classes contained in one code file. It is uterly annoying and difficult to find things. I suggest creating a seperate file for each class and name you code files the same as your class definitions. Additionally, create a file structure which corresponds with your namespace definitions.

Tip: If you happen upon a solution where you're having a tough time finding things use the Visual Studio.NET's object explorer:

  1. Hit Ctrl+Alt+J, this will open up the solution in the object explorer.
  2. Now you have a treeview look at your project's namespaces
  3. Drill down to a class and select it
  4. In the right pane right-click on a method name and click "Go to Definition" and you're magically taken to the projects class to the line where that method is defined.

Now for some feedback from you:

Question:  In a logical 3-tier solution how do you define you project hierarchy? Do you keep everything in one project, do you have multiple projects and if so how do you name them. Do you have a well defined folder hierarchy within each project etc. I'll release my hierarchy I typically use after I see what others use. Oh, and why do you choose the way you do it? Is it something you learned or something you developed?

The .NET Pet Shop Sample Application Version 3.0

We just put up version 3.0 of Microsoft's answer to Suns Pet Shop "Blueprint" application. You can find a running version of the sample application here: http://sampleapps.dotnetjunkies.com/MSPetShop/ - On the default page you'll find links to where you can download the application itself with FULL source code. Also, you'll find benchmarks and performance tests of each version (.NET and J2EE).

Do you think it would be a good idea to start discussion forums for these types of applicaitons???

Let me know!

Enjoy!

New Controls on Home Page

I added two new controls on home: http://www.dotnetjunkies.com/ one for the last 25+ web logs and one for the last 20+ forum entries.

This should increase any blogger traffic quite a bit!

Regards,

Donny

The First of Many Posts

I just started a new category for my blog named ASP.NET Best Practices. As I stated in another entry I'm putting together a bible of best practices for ASP.NET development. Until it's finished I'm going to be posting a new tip everyday. After it's finished I'll post the document and it will become a living document. If you have a tip respond to one of my tips and I'll add it. Now some of these tips are pretty obvious, but that is exactly why I'm keeping them in. Because they're so obvious they're often overlooked.

General Coding Tips

Use Code Regions: When using Visual Studio.NET or Visual Studio.NET 2003 you can specify code regions. Code regions are basically blocks of code that you can collapse within the Visual Studio IDE. What code regions enable you to do is group related pieces of code together which makes things easier to find. For instance, I typically will group all my properties for a class within a Properties code region.

The way you specifiy a region is a little different between C# and VB. Let's take a look:

Visual Basic .NET

#Region " P R O P E R T I E S "

Public MyProp As String

#End Region

C#

#region P R O P E R T I E S

public string MyProp;

#endregion

There are a couple rules to using Regions.

1.) Regions must have a starting and ending directive
2.) They can be nested
3.) They can't overlap other block statements

Two Great Blog Articles On DotNetJunkies

Jeff Jullian Link 1 Link 2 has written two wonderful articles on blogs, specifically he speaks about what RSS is in Got RSS? and Translatting RSS with XSLT - I recommend all to read these two articles.

Tomorrow we'll be having a new article come out by: Russ Nemhauser which talks about utilizing Web Services in the Enterprise.

Stay tuned.

Major Goof

I had to tell this because this is the second time I’ve done this so beware. Visual Studio.NET sets the <compilation> section of the Web.Config debug=true. This is a HUGE performance issue and I just found that we have been running this in our WebLog application:-0 Fixed now, and I swear it will never happen again! I started checking this because of the best practices document I’m creating. I’m going through each point I make and checking my own work, oh my. http://dotnetjunkies.com/weblog/donnymack/posts/363.aspx  

2 Down 2 to Go

2 Servers migrated and 1 to go. We’re almost finished with our physical layer and I’m pleased. We have our 1st Windows 2003 Web Server up and our new Database Server.  Our staging server is up and running we just need to install our source control software http://www.sourcegear.com/vault/index.asp and we’re finished with it. The only other thing to do is rebuild our second web server with Windows 2003 and we’re finished with Physical.

Now onto our application! I’ve made a ton of new enhancements and changes, to many to list. I’m going to be updating it tomorrow! I’ll also be adding some new articles. I know we have been slacking in this area since the launch but we do have a very nice back log of articles to publish. Additionally, I have a ton of online chapters to put up. I’ll be putting one of those up tomorrow. If you haven’t checked it out yet http://dotnetjunkies.com/DotNetBooks/ , our books online is growing. I have about 10 others to go right now, but I thought it stupid to launch them all at once so I’m doing one a week. Some of the links to “Other Resources” is bad up there, but I’ll be updating those tomorrow.

I’m also in the process of writing a Best Practices document which is turning out to be awesome. It covers the do’s and don’ts of .NET development. I know I don’t always follow them that’s why I’m making it. It’s going to be my check list for all future development. It’ll be an organic document so I’m going to be leaving it up for discussion in the forums so I can change, add, or delete items. Hopefully, it will become the bible J

Take Care…