Geeks With Blogs
No Fun Intended Shoo! You are debugging the crap outta me! Server Control Development Tips
This blog is moooooooving....

There is no better time to start a new blog than the start of a new year. My interest in .NET has been waning for a while now. I know GWB is a technology community, not just a .NET community but I think it best to have my own site and the like.

I want to thank Jeff Julian and John Alexander for the outstanding community and allowing me to set up shop here. Keep in touch.

 

Here is my new blog.

Posted On Sunday, January 1, 2006 7:09 PM

Server Control Development Tip #6: Love that HtmlTextWriter
You may want to skip this tip if you do not care about optimization in your server controls. Yeah right. When you are parsing out all the data that will go into your string, you may be tempted to distrust the HtmlTextWriter. 'Beware the groooooovvveeee.' (sorry, sideline from one of my favorite kids movies, The Emperor's New Groove. Speaking of kids movies, have you seen the Incredibles? How awesome is that movie? I love it.) The HtmlTextWriter is sequential meaning if you write a table tag, pass ......

Posted On Monday, April 4, 2005 10:16 AM

Server Control Development Tip #5: Do You Need INamingContainer?
Most server controls will need to implement INamingContainer but if you need to do a quick test, try this on for size:1. Does your control provide data binding?2. Is your control a templated control.3. Does your control have child controls that may need to have events re-routed to them?If you answered yes to any of these three questions, you need INamingContainer.Most of the heavy controls (by heavy I mean flexible and reusable, not bloated) use INamingContainer including the DataGrid and DataList. ......

Posted On Monday, March 28, 2005 10:22 AM

Server Control Development Tip #4: Provide an accurate representation for the developer's IDE
While you are developing Server Controls, keep in mind that their PRIMARY USE is REuse. Any time you spend now making it easy to use will reap you many times that amount while using the control in the development environment. As a simple solution, make sure you provide an accurate representation for the IDE of what you control will look like when it is loaded. Whether you do this with the Render method or with designer classes, make it as simple and accurate as possible. Of course, all bets are off ......

Posted On Thursday, March 24, 2005 12:12 PM

An External Control Development Tip
Well, Miguel has commented on what I had planned for Control development tip #9 but here it is.

Posted On Wednesday, March 23, 2005 1:59 PM

Server Control Development Tip #3: Do not write a single line of code until you have a thorough understanding of the Page Lifecycle
Many developers, being our nature and all, will attempt to wing this part of the exam. Do not make that mistake. Nothing is more important when developing server controls than a deep, thorough, intimate knowledge of the page lifecycle. You should know this aspect better than you know your spouse. If you do not have this deep understanding, you will not know that you should call EnsureChildControls() in Page_Init or CreateChildControls() in OnPreRender. Or when to manipulate session state, or load ......

Posted On Wednesday, March 23, 2005 1:09 PM

Server Control Development Tip #2: See it on paper before seeing it in code
Design (and not big up front design) is necessary in server controls for one simple reason: this control you are building will not be the end all. Eventually, someone, somewhere, will need to extend your control. As an example, lets look at a very simple examination of the AdRotator control. First, the AdRotator has three methods which can be overridden (as do most server controls). OnPreRender, CreateControlCollection, and OnRender. When you inherit from System.Web.UI.WebControls.W... you ......

Posted On Tuesday, March 22, 2005 9:09 AM

Server Control Development Tip #1: Determining Whether to Inherit from Control or WebControl in a Server Control
I am buffing up on ASP.NET Server Controls and a central dilemma seems to be whether to inherit from System.Web.UI.Control or System.Web.UI.WebControls.W... It really seems to boil down to whether you will be presenting visual elements or not. If you are presenting visual elements in your control, you should probably inherit from WebControl. Why? Inheriting from System.Web.UI.Control basically gives you all that you need from the ASP.NET page framework but WebControl gives you the added control ......

Posted On Monday, March 21, 2005 9:21 AM

Copyright © Jason Bentley | Powered by: GeeksWithBlogs.net