Blog Home  Home Feed your aggregator (RSS 2.0)  
What did you learn today? - Thursday, March 02, 2006
Phil Denoncourt's Technology Rants
 
 Thursday, March 02, 2006

PRO: Designing and Optimizing Data Access by Using Microsoft SQL Server 2005

Design client libraries to write applications that administer a SQL Server service.

  • Design server management objects (SMO) applications.
  • Design replication management objects (RMO) applications.
  • Design automation management objects (AMO) applications.
  • Design SQL Server Networking Interface (SNI) for asynchronous queries.

Here's MSDN's section on SMO.  Darshan Singh has an overview of SMO at YukonXML.comDavid Hayden has an example of how to create a table using SMO.

MSDN's section on RMO.  There is not a lot of community activity in respects to RMO.  Here's my take.  Probably good to know how to create a publication (EnabledTransPublishing on ReplicationDatabase, Create a TransPublication object), create a subscription (TransPullSubscription, or TransSubscription), how to cause a syncronization (TransSynchronizationAgent).  Keep in mind I've never use these objects, these are the ones that strike me as important.

It appears that AMO really means Analysis Management Objects.  There appears to be no reference anywhere to "automation management objects" anywhere.  Here's MSDN's section on AMOLiu Tang and Paul Bradley wrote a overview for MSDN magazine.

SNI For Async?  It looks like SNI is used for tracing.  Here's an article at MSDN that mentions SNI.

Next up-> MARS

Thursday, March 02, 2006 1:43:43 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 
70-442 - Part II - Caching by phildenoncourt

PRO: Designing and Optimizing Data Access by Using Microsoft SQL Server 2005

Design caching strategies.

  • Select ADO.NET caching.
  • Design custom caching functionality.
  • Design a refresh strategy for cached data.

ADO.NET doesn't have a cache.  ASP.NET does.  ADO.NET retrieves results into objects like DataSets that can be cached in the ASP.NET cache or your own Cache app.

Designing your caching functionality seems like a lot of work.  You have to manage the size of the cache, object expiration, object invalidation.  I use the Enterprise library and that provides a lot of the plumbing.

Refreshing cached data is done using Query Notifications via the SqlDependency or SqlNotificationRequest objects.  There is a good article on MSDN outlining how to set this up.  Steve Smith mentions the changes that have occured since Beta 2 on his blog.

Next up->Client Libraries

Thursday, March 02, 2006 1:07:33 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 

PRO: Designing and Optimizing Data Access by Using Microsoft SQL Server 2005

Design appropriate data access technologies.

Design an appropriate data access object model.

Design a cursor strategy for a data access component.

  • Decide when to use cursors.
  • Decide how to maximize cursor performance.
  • Detect which applications are using cursors and evaluate whether to remove them.

I just looked at my testing schedule and realized I'm taking this test in two days.  Time to get cramming...

The first two items are kind of vague.  I don't think there's much to be said there.

My cursor strategy is... don't use them.  However it appears there are times when it is faster.  Andy Machanic has found that they solve the running sum problem much faster than traditional relational methods.  However he found using CLR worked much better.

Maximizing performance would be centered around opening it as FAST_FORWARD.

There's a couple of ways that I can think of to detect whether or not an "app" is using cursors.  You can scan through the system tables(sys.procedure) looking for the word OPEN CURSOR.  That won't work if a) the stored procs are encrypted, b) the stored procs utilize CLR, or c) the app uses dynamic SQL. The best option would be to profile the database, looking for cursor events.

Thursday, March 02, 2006 12:28:08 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 
 Wednesday, March 01, 2006

UPGRADE: MCAD Skills to MCPD Web Developer by Using the Microsoft .NET Framework

Copy a Web application to a target server by using the Copy Web tool.

Precompile a Web application by using the Publish Web tool.

Optimize and troubleshoot a Web application.

  • Customize event-level analysis by using the ASP.NET health-monitoring API.
  • Use performance counters to track the execution of an application.
  • Troubleshoot a Web application by using ASP.NET tracing.
  • Optimize performance by using the ASP.NET Cache object.

The Copy Web Tool allows you to copy your website from your machine to another machine.  It can connect to a remote machine through http (using Frontpage extensions), FTP.  It can also deploy to your local IIS machine, or your file system.  It does a bi directional sync, meaning changes from your machine are uploaded to the server and changes from the server are downloaded to your machine.

The Publish web tool allows you to precompile your website.  You can then deploy the website without the accompanying source code.  You publish to either a local file path, ftp or http.  If you select the "Allow this precompiled site to be updateable" option, the HTML is not compiled into the assembly.  If you select the "Use fixed naming and single page assemblies" option, you will get an assembly for each page.  Skins and Themes are still compiled into a single assembly.  The last option available to you is whether or not you want to strongly name the assemblies.

In the last section of this MSDN article, Jeff Prosise describes the health monitoring API.  There is also a Patterns and Practices article describing best uses of the feature.

There are quite a few performance counters.  Look (in perfmon) under ASP .NET Apps v2.0.50727 .  Counters that look interesting to watch are Anonymous Requests / Sec, Error Events Raised / Sec, Request Execution Time, Request Wait Time, Requests Executing,  Requests / Sec, Sessions Total.

To get tracing information from an ASP.NET application, you still have to enable tracing in the web.config file.  You request http://localhost/myapp/trace.axd to view the trace logs.  There is an article at ExtremeExperts.com on the new tracing features.

Thiru Thangarathinam has a overview of the new caching features at 15seconds.com.  Important changes appear to be the SqlCacheDependency.

Next up->Master Pages

Wednesday, March 01, 2006 7:40:22 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 
 Monday, February 27, 2006

UPGRADE: MCAD Skills to MCPD Web Developer by Using the Microsoft .NET Framework

Create a composite Web application control.

  • Create a user control.
  • Convert a Web Forms page to a user control.
  • Include a user control in a Web Forms page.
  • Manipulate user control properties.
  • Handle user control events within the user control code-declaration block or code-behind file.
  • Create instances of user controls programmatically.
  • Develop user controls in a code-behind file.
  • Create a templated user control.

Add New Item->Web User Control.

There is an article on MSDN on how to convert a page to a user control.  It's a little easier than in 1.1 if you are using single-file pages.  Rename to .ascx, change @Page to @Control. Remove HTML, Body and Form tags from the HTML Code.

There is also an article on MSDN on how to include user controls in a page.  Add a Register directive to the top of the page, specifying a prefix, tagname and a relative URL to the user control.  You can also now drag the user control from your project onto the page and it will wire it up.

You manipulate a user control as you would any other control, through a member variable of the page.

To handle a user control event within the user control code declaration block, you add it the event as an attribute to the tag.  Here is an example of a usercontrol that has an event named TextStringChanged.

<uc1:MyUserControl ID="MyUserControl1" runat="server" TextString="Phil was here" OnTextStringChanged="TextStringChanged"/>

To handle it in the code-behind file, you treat it like a event on any other type of control.  Add a event handler delegate to the event.

To programatically create a usercontrol, use the LoadControl method of the Page.  That returns a reference to a new instance of the user control.  Then you must add it to a controls collection in order for it to appear on a page.

Creating templated usercontrols sounds tricky, but it's not that bad.  Try the walkthough on MSDN .

Next up->Copy / Publish Web tool

Monday, February 27, 2006 7:33:43 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 
 Sunday, February 26, 2006

UPGRADE: MCAD Skills to MCPD Web Developer by Using the Microsoft .NET Framework

Create, delete, and edit data in a connected environment.

  • Retrieve data by using a DataReader object.
  • Build SQL commands visually in Server Explorer.
  • Build SQL commands in code.
  • Create parameters for a command object.
  • Perform database operations by using a command object.
  • Retrieve data from a database by using a command object.
  • Perform asynchronous operations by using a command object.
  • Perform bulk copy operations to copy data to a SQL Server computer.
  • Store and retrieve binary large object (BLOB) data types in a database.

To use a DataReader, you create a command object, open the associated connection, and call the ExecuteDataReader method.

To build SQL Commands visually in Server Explorer, right click on the Database in the Server Explorer and select "New Query".

To build SQL Commands in code, you create a SQLCommand instance, set the commandtext property with the SQL Statement, add parameter objects to the parameters collection, and associate a connection to the command object.

Creating parameters is done by creating SqlParameter objects, setting the name, dbtype and value, and append to the command's parameters collection.

To perform database operations using a command object, invoke the ExecuteNonQuery method.  It executes the SQL statement of the command object and returns the number of rows affected.

To retrieve data using a command object, you can call the ExecuteDataReader, ExecuteScalar, or ExecuteXMLReader methods.

The command object now supports async operations.  There are BeginExecuteNonQuery, BeginExecuteDataReader, or BeginExecuteXmlReader methods.  Vishnu Prasad has a writeup on this at DevX.

They've added managed support for SQL Bulk Copies in the SqlBulkCopy class.  David Hayden has an example of how to use this class.

Working with Blobs isn't as hard as it used to be.  You just set the parameter's dbtype to SqlString and assign the large string to the parameter's value property.  No AppendChuck, GetChunk.  There is another method that I found interesting from Vadivel's blog.  I don't think that will be on the test.

Next up-> Composite Web Controls

Sunday, February 26, 2006 6:15:49 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 

UPGRADE: MCAD Skills to MCPD Web Developer by Using the Microsoft .NET Framework

Manage connections and transactions of databases.

  • Configure a connection to a database graphically by using the Connection Wizard.
  • Configure a connection by using Server Explorer.
  • Configure a connection to a database by using the connection class.
  • Connect to a database by using specific database connection objects.
  • Enumerate through instances of Microsoft SQL Server by using the DbProviderFactories.GetFactoryClasses method.
  • Open a connection by using the Open method of a connection object.
  • Close a connection by using the connection object.
  • Secure a connection to protect access to your data source.
  • Create a connection designed for reuse in a connection pool.
  • Control connection pooling by configuring ConnectionString values based on database type.
  • Use connection events to detect database information.
  • Handle connection exceptions when connecting to a database.
  • Perform transactions by using the ADO.NET Transaction object.

Again, I still haven't found a "Connection Wizard".  Referring to my earlier post, There is a Data Source Configuration Wizard. 

To configure a connection in the server explorer, right click on Data Connections node, and select Add New Connection.

Also, there is no Connection class.  There are a few objects that have a Connection property.  There are classes that implement IDbConnection, but strictly speaking, (unless we talking about sharepoint) there is no Connection class.  However, if you have a class that implements IDbConnection (SqlConnection, OleDbConnection...), you configure it using the ConnectionString property.

To connect to a SQL Server database, use the SqlConnection object.  Call the Open method after setting the connection string.

Alex Homer has an example of how to use DbProviderFactories.GetFactoryClasses at Devx.com.  It returns a datatable of all the classes that registered as DbProviderFactories in the machine.config.

To close the connection, invoke the close method on the connection object.  Obviously, an exception will be thrown if the connection is no longer open.  You can inspect the state property to see if the connection is still active.

To protect Datasource information, you're supposed to put the ConnectionStrings in the ConnectionStrings section of the web.config.  Then you encrypt the contents using the method outlined by David Hayden's site.

To create a connection that will stay in a pool, make sure your connections are connecting to the database with the same login.  Reportedly having minor differences in the connection string will cause it not to pool. 

There is information about controlling connection pooling at MSDN via ConnectionString values.

There are two events worth listening to on a SqlConnection.  InfoMessage (fired when warnings or informational messages are returned by SQL Server), and StateChanged (fired when the state of the connection has changed).

To handle exceptions when connecting to a database, catch SqlException (if SQL rejected the connection), or InvalidOperationException (The connection was already opened, or you haven't given the connection object enough info.)

To Begin a transaction on an open connection, call the BeginTransaction method on the SqlConnection object.  That returns a transaction object that you control the Commit or Rollback with.  There is a new locking level, snapshot isolation which bears understanding.

There is also a new Systems.Transaction namespace.  This is used for distributed transactions.  John Papa has a writeup on MSDN covering the feature.

Next up-> Data objects

Sunday, February 26, 2006 5:34:24 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 

UPGRADE: MCAD Skills to MCPD Web Developer by Using the Microsoft .NET Framework

Implement data-bound controls.

  • Use tabular data source controls to return tabular data.
  • Use hierarchical data source controls to display hierarchical data.
  • Display data by using simple data-bound controls.
  • Display data by using composite data-bound controls.
  • Display data by using hierarchical data-bound controls.
  • Use the FormView control to display the values of a single table record from a data source.

Tabular data source controls would be the SqlDataSource, AccessDataSource, and ObjectDataSource.  SqlDataReader and AccessDataSources should be self explanatory.  The ObjectDatasource allows the binding of custom business objects, including datasets.  GridViewGuy has a walkthrough on using the component on his site.

There are two hierarchical data source controls.  SiteMapDataSource, and the XmlDataSource.  The SiteMapDataSource reads SiteMap info from the SiteMapProvider for the website.  It keeps current as the user navigates the website.  The XmlDataSource allows you to bind XML.  Keyvan Nayyeri has a tutorial on the XMLDataSource at CodeProject.

Most web controls can be bound.  You should know the difference between Eval (Readonly data) and Bind(Two way binding; data might be changed).  There is an article at MSDN on this.

Composite Databound controls are the Gridview, DataList,  DetailsView and the Repeater.  Dino Esposito has an article at MSDN on the GridView.  It's old, but it still applies.  Wei Meng Lee has an article on the Datalist.  The data reader doesn't seem to have changed.   GridViewGuy has an article on the DetailsView.

To display hierarchical data, you can use the new TreeView.  Technically, you could also use the SiteMapPath or the Menu.  Thiru Thangarathinam has a very comprehensive article on binding with this control at 15seconds.

The FormView is a templated control that works on a record by record basis.  You provide a readonly layout in the ItemTemplate, and a layout for edits in the EditItemTemplate. There is an overview at ASP.NET.

Next up -> Database Connections

Sunday, February 26, 2006 5:01:15 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 
 Friday, February 24, 2006

UPGRADE: MCAD Skills to MCPD Web Developer by Using the Microsoft .NET Framework

Program a Web application.

  • Redirect users to another Web page by using a server-side method.
  • Detect browser types in Web Forms.
  • Ascertain the cause of an unhandled exception at the page level.
  • Programmatically access the header of a Web page.
  • Implement cross-page postbacks.
  • Assign focus to a control on a page when the page is displayed.
  • Avoid performing unnecessary processing on a round trip by using a page's IsPostBack property.
  • Access encapsulated page and application context.
  • Avoid unnecessary client-side redirection by using the HttpServerUtility.Transfer method.
  • Avoid round trips by using client-side scripts.
  • Use a page's Async attribute to create a page that has built-in asynchronous capabilities.
  • Convert HTML server controls to HTML elements.

There are two ways to redirect users to another web page.  Response.Redirect, which aborts processing the current page and tells the user's browser to go somewhere else, Server.Transfer and Server.Execute.  There is the PostBackURL property for button controls, but I consider that client side functionality.  Mike Pope has a writeup about the advantages of Server.Transfer vs. PostBackURL. 

To detect the browser type, use the Browser property on the response object.  There are plenty of new properties in the HttpBrowserCapabilities object. Mostly to support mobile device features.

Unhandled exceptions at the Page level are supposed to be handled in the Error event of the page.  Victor Garcia Aprea has an post on the exceptions to this rule.

To access the header, use the methods on the Response property, AppendHeader (AddHeader is obsolete) and ClearHeaders methods; Headers property.

Cross page postbacks are a new feature.  To make use of the them, set the PostBackURL property to a different page.  There are a few good writeups on this feature.  Scott Allen at OdeToCode, Naveedullah Khan at DotNetPakistan, Ting-hao Yang at MSDN.

To assign focus to a control, set the DefaultFocus attribute of the Form element to the HTML id of the control to get focus.  Scott Guthrie has a post on this feature.  There is also a Focus method on controls.

The IsPostBack feature hasn't changed.  Understand that when you use Server.Transfer, IsPostBack in the transferred page is set to the value of the initial page.

The Page and Application objects still exist.  The Page has its own Cache for Page specific information,  Application has it's own cache for the entire website.

To avoid round trips using client side script, you can either use the Validation controls, or write your own script, registering it by calling RegisterClientSideScript, RegisterStartupScript, or RegisterOnSubmitStatement.

The Async feature allows you to send requests to get data.  When the data is returned, you then resume building the page.  Fritz Onion has a writeup on the feature.  Bipin Joshi also has a good article.

To convert an HTML Server control back to a plain old HTML element, just remove the RunAt=Server attribute.  Obviously this won't work with Web Controls.

Next up-> Data Bound Controls

Friday, February 24, 2006 2:43:46 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 
Configure settings for a Web application.
  • Configure system-wide settings in the Machine.config file.
  • Configure settings for a Web application in the Web.config file.
  • Manage a Web application's configuration by using the Web Site Administration Tool.

You can change the system wide settings by manually editing the machine.config file in the config subdirectory of the framework or you can change it programatically by using the Configuration classes.  Same with web.config

There two articles at ExtremeExperts.com that cover configuration.  Part 1 and Part 2

The Web Site Administration Tool  Ludmal has a quick article outlining the feature set

Next up->Web Applications

Friday, February 24, 2006 1:31:06 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 
 Thursday, February 23, 2006

UPGRADE: MCAD Skills to MCPD Web Developer by Using the Microsoft .NET Framework

Add and configure Web server controls.

  • Add Web server controls to a Web Form.
  • Configure the properties of Web server controls programmatically.
  • Configure Web server control properties by using the Microsoft Visual Studio Property Editor.
  • Specify whether events of a control cause a Web Form to post to the server.
  • Configure a control to receive postback events.
  • Access controls in Web Forms pages when working with naming containers and child controls.
  • Create HTML server controls in the designer.
  • Set HTML server control properties programmatically.
  • Use HTML server controls to programmatically access HTML tags.
  • Create HTML controls as elements in an HTML document.
  • Use the AdRotator Web server control to manage banners and pop-up windows.
  • Use the Button Web server control to send a command to the server when a button is clicked.
  • Display a calendar on a Web page by using the Calendar Web server control.
  • Implement the CheckBox Web server control.
  • Implement the FileUpload Web server control.
  • Create and manipulate links on a Web Form by using the HyperLink Web server control.
  • Display an image on a Web Form by using the Image Web server control.
  • Implement a button on a Web Form by using the ImageButton Web server control.
  • Define hotspot regions within an image by using the ImageMap Web server control.
  • Use the Label Web server control to display customized text on a Web page.
  • Display a hyperlink style button on a Web Form by using the LinkButton Web server control.
  • Display lists of information by using controls that derive from the ListControl class.
  • Create a Web Form with static text by using the Literal Web server control.
  • Implement pagination for controls on a page by using the Pager Web server control.
  • Use the Panel Web server control to arrange controls in groups on a page.
  • Create a container for a group of View controls by using the MultiView Web server control.
  • Use the View Web server control to create a Web application.
  • Create a mutually exclusive set of choices by using the RadioButton Web server control.
  • Construct a table by using the Table, TableRow, and TableCell Web server controls.
  • Enable users to type information into a Web Form by using the TextBox Web server control.
  • Create a wizard by using the Wizard Web server control to collect data through multiple steps of a process.
  • Use the XML Web server control to create XML data at the location of the control.
  • Customize the appearance of Web server controls by using Web control templates.
  • Programmatically edit settings in a Web site's configuration file.
  • Dynamically add Web server controls to a Web Forms page.

The first three bullets shouldn't be problematic.  The next two are about setting the AutoPostback property of web controls. 

To access controls within a naming container, use the FindControl method.  Remember that FindControl only finds controls within its own Naming Container.

"Create HTML server controls in the designer." and "Set HTML server control properties programmatically" shouldn't present new challenges.

To create HTML controls as elements in the HTML document, you can add the RunAt=Server attribute to existing HTML elements, or you can add elements at runtime by creating an HtmlGenericControl and adding it to the controls collection.

The AdRotator component hasn't changed much.  It is now bindable to a database.  As I recall, you used to have to create an XML file for it to use.  Doug Seven has a article on the AdRotator component (based on an older version of the framework)

The Button control has a few minor changes.  It has an OnClientClick property.  You put in javascript code that will execute when the user clicks the button.  There is also a UseSubmitBehavior, which if set, turns the button into an HTML submit button.  In addition, there is a PostBackUrl property which states which page should be loaded when a button causes a postback.  Dino Esposito has a writeup on some of the complications in using this property.  Buttons also govern a new feature called ValidationGroups implemented using the ValidationGroup property.  Peter Blum has a writeup explaining the new feature.

Mike Pope found what was new with the Calendar control (And most others as well).

No changes on the CheckBox control except it can be a part of a ValidationGroup. 

The FileUpload control is new, but it is functionally identical to the HtmlInputFile control.  Anand Narayanaswany has a quick tutorial on using the control.

The Hyperlink control hasn't changed.

The image control also hasn't changed significantly except the property that Mike points out, GenerateEmptyAlternativeText.

The ImageButton has the same changes as the button control.

ImageMap control is brand new.  You define hotspots over a image in different shapes (Circle, Rectange, Polygon).  With each hotspot, you specify a PostBackValue.  That is the value that is sent back to the page if you said that postbacks should occur.  The other option is to have it navigate to a specific URL when the hotspot is clicked.

The label control hasn't changed much.  Support for skinning is about it.

LinkButton also has the same new properties as the button control.

There are four controls that derive from ListControl: CheckBoxList, DropDownList, ListBox, and RadioButtonList.  They all support the new data binding model.  There is a property call AppendDataBoundItems that allows you to add bound items below items that you've added manually.  That seems to be about it.

The Literal control has a mode property, allowing you to state how to treat the literal: Encode (The contents are HTML-Encoded), PassThrough (The contents are not touched), or Transform (Remove unsupported elements for WML or cHTML renderings)

The Pager control was dropped from the final release.

The Panel control has some improvements.  There is a ScrollBars property that allows you to specify whether or not content is scrolled within the panel.  There is a DefaultButton property that specifies which button is depressed when <Enter> is pressed within the panel.  There is a GroupingText property which is displayed as a title in the panel.

The MultiView control is a nice new control.  It's purpose is control a collection of View controls, of which only one can be visible at a time.  Jason N. Gaylord has a tutorial on ASP Alliance.

Remember that Views can only be used within a MultiView control.

The Radiobutton control hasn't changed.  Join a Radiobutton to a group using the GroupName property.  It supports validation groups.

The Table, TableRow, and TableCell controls don't appear to have changed.

The Textbox has support for Autocomplete, that appears to be all I see as changed.

The wizard is a templated control that allows you to create a wizard without having to worry about the plumbing of the previous/next/finished buttons.  Dino Esposito has a writeup at MSDN on the control.

The XML Control hasn't changed.  It's used to bring XML back to the client which can then be transformed into presentable data.

Web control templates?  Maybe they mean skinning.  Thiru Thangarathinam has a writeup at 15seconds.com about skinning.  To me it seems they took CSS to the next level.

You would modify the web.config file using the ASP.NET Configuration API.  Note that the account must have write access to successfully update the config.

To programmatically add controls to a webpage, just create a new object, add it to the page's controls collection.  Scott Mitchell has a quick overview of how to do this.

Next up->Web Application Settings

Thursday, February 23, 2006 5:41:57 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 
 Tuesday, February 21, 2006

March 2nd, I'll be in Boston at the Beantown Dot Net user's group giving a talk on XML Serialization.

XML Serialization - XML Serialization is the process of transforming a complex object to and from XML. This is made straightforward with the .NET framework. We'll take a look out how to serialize a simple object and some of the attributes used to control the output. Then we'll take a look at some of the more advanced features like capturing processing errors, overrides and unknown elements. Finally we'll take complete control of the serialization process using the new features of the 2.0 Framework. Be the envy of all your coworkers by mastering XML serialization.

Phil Denoncourt is a .NET consultant, who over the past 4 years has developed a wide range of .NET applications and has over 20 years experience writing software. He is the leader of the New England C# User Group and has acquired the MCSD, MCDBA, MCSE, MCAD, MCSA and MCP+SB certifications. When not coding, or spending time with his wife and 5 children, Phil is an avid fan of the Boston Red Sox and New England Patriots.

Tomorrow I'll get started on the study guide for 70-551 - Web Applications.

Tuesday, February 21, 2006 1:06:44 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Speaking Engagements  | 
 Saturday, February 18, 2006

Evaluate the technical feasibility of an application design concept.

  • Evaluate the proof of concept.
  • Recommend the best technologies for the features and goals of the application.
  • Weigh implementation considerations.
  • Investigate existing solutions for similar business problems.

Create a proof-of-concept prototype.

  • Evaluate the risks associated with the proposed technology or implementation.
  • Validate that the proposed technology can be used in the application.
  • Demonstrate to stakeholders that the proposed solution will address their needs.

Evaluate the technical specifications for an application to ensure that the business requirements are met.

  • Translate the functional specification into developer terminology, such as pseudo code and UML diagrams.
  • Suggest component type and layer.

Evaluate the logical design of an application.

  • Evaluate the logical design for performance.
  • Evaluate the logical design for maintainability.
  • Evaluate the logical design for extensibility.
  • Evaluate the logical design for scalability.
  • Evaluate the logical design for security.
  • Evaluate the logical design against use cases.
  • Evaluate the logical design for recoverability.
  • Evaluate the logical design for data integrity.

Evaluate the physical design of an application. Considerations include the design of the project structure, the number of files, the number of assemblies, and the location of these resources on the server.

  • Evaluate the physical design for performance.
  • Evaluate the physical design for maintainability.
  • Evaluate how the physical location of files affects the extensibility of the application.
  • Evaluate the physical design for scalability.
  • Evaluate the physical design for security.
  • Evaluate the physical design for recoverability.
  • Evaluate the physical design for data integrity.

Choose an appropriate layout for the visual interface.

  • Decide the content flow within the application.
  • Evaluate user navigation needs.
  • Identify the goal of the UI.
  • Ensure the congruency and consistency of the user experience throughout the application.
  • Choose techniques to control the layout.

Evaluate a strategy for implementing a common layout throughout the UI.

  • Suggest an applicable UI standard based on the application specification. Considerations include MDI, SDI, control grouping, and so on.

Choose an appropriate control based on design specifications.

  • Evaluate the type of data that must be captured or displayed.
  • Evaluate available controls. Considerations include standard .NET Framework controls and custom, internally developed, and third-party controls.
  • Evaluate the manner in which available controls are implemented in previous and ongoing projects or applications.
  • Evaluate the user demographic.
  • Evaluate the user environment.

Choose an appropriate data validation method at the UI layer.

  • Choose a validation method based on the data type provided.
  • Decide how to report the feedback. Considerations include callbacks, exceptions, and writing to an event log.
  • Identify the source of invalid data.
  • Identify the cause of an invalid entry.
  • Evaluate whether invalid data can be prevented.
  • Evaluate whether an exception must be thrown.
  • Evaluate whether an exception must be logged.
  • Evaluate whether visual feedback, such as a message box or color, is required.

Choose appropriate user assistance and application status feedback techniques.

  • Design a user assistance mechanism.
  • Choose an appropriate application status feedback technique based on available control types.
  • Choose an appropriate application status feedback technique to support accessibility.
  • Design an application status feedback mechanism.

Establish the required characteristics of a component.

  • Decide when to create a single component or multiple components.
  • Decide in which tier of the application a component should be located.
  • Decide which type of object to build.

Create the high-level design of a component.

  • Establish the life cycle of a component.
  • Decide whether to use established design patterns for the component.
  • Decide whether to create a prototype for the component.
  • Document the design of a component by using pseudo code, class diagrams, sequence diagrams, activity diagrams, and state diagrams.
  • Evaluate tradeoff decisions. Considerations include security vs. performance, performance vs. maintainability, and so on.

Develop the public API of a component.

  • Decide the types of clients that can consume a component.
  • Establish the required component interfaces.
  • Decide whether to require constructor input.

Develop the features of a component.

  • Decide whether existing functionality can be implemented or inherited.
  • Decide how to handle unmanaged and managed resources.
  • Decide which extensibility features are required.
  • Decide whether a component must be multithreaded.
  • Decide which functions to implement in the base class, abstract class, or sealed class.

Develop an exception handling mechanism.

  • Decide when it is appropriate to raise an exception.
  • Decide how a component will handle exceptions. Considerations include catching and throwing a new exception; catching, wrapping, and throwing the wrapped exception; catching and terminating, and so on.

Develop the data access and data handling features of a component.

  • Analyze data relationships.
  • Analyze the data handling requirements of a component.

Develop a component to include profiling requirements.

  • Identify potential issues, such as resource leaks and performance gaps, by profiling a component.
  • Decide when to stop profiling on a component.
  • Decide whether to redesign a component after analyzing the profiling results.

Consume a reusable software component.

  • Identify a reusable software component from available components to meet the requirements.
  • Identify whether the reusable software component needs to be extended.
  • Identify whether the reusable software component needs to be wrapped.
  • Identify whether any existing functionality needs to be hidden.
  • Test the identified component based on the requirements.

Choose an appropriate exception handling mechanism.

  • Evaluate the current exception handling mechanism.
  • Design a new exception handling technique.

Choose an appropriate implementation approach for the application design logic.

  • Choose an appropriate data storage mechanism.
  • Choose an appropriate data flow structure.
  • Choose an appropriate decision flow structure.

Choose an appropriate event logging method for the application.

  • Decide whether to log data. Considerations include policies, security, requirements, and debugging.
  • Choose a storage mechanism for logged events. For example, database, flat file, event log, or XML file.
  • Choose a systemwide event logging method. For example, centralized logging, distributed logging, and so on.
  • Decide logging levels based upon severity and priority.

Evaluate the application configuration architecture.

  • Decide which configuration attributes to store.
  • Choose the physical storage location for the configuration attributes.
  • Decide in which format to store the configuration attributes.

Perform a code review.

Evaluate the testing strategy.

  • Create the unit testing strategy.
  • Evaluate the integration testing strategy.
  • Evaluate the stress testing strategy.
  • Evaluate the performance testing strategy.
  • Evaluate the test environment specification.

Design a unit test.

  • Describe the testing scenarios.
  • Decide coverage requirements.
  • Evaluate when to use boundary condition testing.
  • Decide the type of assertion tests to conduct.

Perform integration testing.

  • Determine if the component works as intended in the target environment.
  • Identify component interactions and dependencies.
  • Verify results.

Resolve a bug.

  • Investigate a reported bug.
  • Reproduce a bug.
  • Evaluate the impact of the bug and the associated cost and timeline for fixing the bug.
  • Fix a bug.

Evaluate the performance of an application based on the performance analysis strategy.

  • Identify performance spikes.
  • Analyze performance trends.
  • Track logon times.

Analyze the data received when monitoring an application.

  • Monitor and analyze resource usage.
  • Monitor and analyze security aspects.
  • Track bugs that result from customer activity.

Evaluate the deployment plan.

  • Identify component-level deployment dependencies.
  • Identify scripting requirements for deployment. Considerations include database scripting.
  • Evaluate available deployment methods.

Validate the production configuration environment.

  • Verify networking settings
  • Verify the deployment environment.
  • Verify the deployment environment.

This is nice.  If you can do all this, you should be able to call yourself a developer.  There's no amount of studying that can help you.  These bullet items are seeing if you can solve a problem using Microsoft technlogies and juggle different needs of your customers.  It will be interesting to see how they can test for this using a series of multiple choice questions.

In order to cover all of this material sufficiently, I'd have to write a book.  Also, I'm about to take the test in 2 hours, so I need to start reviewing the preivous material.  After I take the test, I suspect I'll no longer be able to publicly comment on this test.

 

Saturday, February 18, 2006 12:24:05 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 
Configure the installation of a Windows Forms application by using ClickOnce technology.
  • Install a Windows Forms application on a client computer by using ClickOnce deployment.
  • Install a Windows Forms application from a server by using ClickOnce deployment.
  • Configure the required permissions of an application by using ClickOnce deployment.

Thiru Thangarathinam has an article at 15seconds that goes over the basics.  There is an FAQ on windowsforms.net about clickonce that also has some good info.  Michele Lerous Bustamante has a category on her blog about Clickonce.

Clickonce can also produce setup files that can be installed from a network share or CD.

Understand that in order to install a WinForm application from a server that uses Clickonce, you simply navigate to a URL that the application is hosted.  Because the user is downloading executable content, IE will warn them.

The  permissions can be set in the  project properties dialog.  Check the "Enable Clickonce Security Settings".  You state whether the application needs to run with Full Trust or Partial Trust.  With Partial Trust, you specify which zone your application will run from and the permissions are shown.  You can choose to request (include) or not a specific permission.  Also, there is a calculate permissions button.

Next up-> Envisioning and Designing an Application

Saturday, February 18, 2006 12:08:35 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 
Manage a background process by using the BackgroundWorker component.
  • Run a background process by using the BackgroundWorker component.
  • Announce the completion of a background process by using the BackgroundWorker component.
  • Cancel a background process by using the BackgroundWorker component.
  • Report the progress of a background process by using the BackgroundWorker component.
  • Request the status of a background process by using the BackgroundWorker component.

The BackgroundWorker component is intended to make multi threading easier.  Ben Lovell has a good post that explains how to use it.

The code that will run in the background is placed in the DoWork event.  Remember that it is operating in a different thread than the UI, so if you want to touch any of the UI, you need to use BeginInvoke or Invoke.

To annouce the completion of a background process, you let the DoWork event finish.  That will fire the RunWorkerCompleted event.

To cancel a background process, you call the CancelAsync method.  In the DoWork event, you should constantly be checking the CancellationPending property, it doesn't automatically cancel itself.

To report progress, call the ReportProgress method, while in the DoWork event.

There's no obvious way to "request" the status of a background process.  There is a ProgressChanged event that you can hook into.

Next up-> Clickonce

Saturday, February 18, 2006 11:44:17 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 

Create, configure, and customize user assistance controls and components.

  • Configure the PropertyGrid component.
  • Configure the ProgressBar control to indicate progress graphically.
  • Display status information by using the StatusStrip control.
  • Configure the ToolTip component.
  • Configure the ErrorProvider component.
  • Configure the HelpProvider component.
  • Play system sounds and audio files by using the SoundPlayer.
  • Configure the Timer component to raise an event at regular intervals.
  • Enable scrolling by using the HScrollBar and VScrollBar controls.

The PropertyGrid component hasn't changed since 1.1.  Set the SelectedObject or SelectedObjects property and it will display all public settable properties.  I've found it to be a very useful, but underused component.

The ProgressBar control hasn't changed either.  Set the bounds by setting the Minimum and Maximum properties.  Indicate progress by setting the value property or calling the Increment method.

StatusStrip is a completely new control.  It derives from ToolStrip, so it can use all the ToolStrip controls.  It anchors itself to the bottom of your form.

The ToolTip component hasn't changed.  Drag it onto a form.  You only need one per form.  You can either enter tooltip text to all your controls at design time, or use the SetToolTip method to set the text.

The ErrorProvider component also hasn't changed.  When an error condition occurs, call the SetError method.  Remember to call the Clear method when the error no longer exists.

No change in the HelpProvider component, also.  Drag that component onto a form.  You'll see that three properties get added to the design of all controls on the form.  HelpString is the string that will be displayed when the user selects the control using the Help Button.  HelpNavigator specifies what elements of the help system will be displayed when the user asks for help.  HelpKeyword is the help topic that will be shown when the user asks for help.

The SoundPlayer control which existed during the betas, was dropped according to Kevin McNeish.

The Timer component hasn't changed from 1.1.  It fires an event at regular intervals.  Remember that the events are executed on the UI thread.

The HScrollBar and VScrollBar haven't changed either.  They work very similar(programming wise) to the ProgressBar, but the user can move the slider.  (There also isn't an Increment method).

Next up->Async Programming

Saturday, February 18, 2006 2:30:46 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   Certifications  | 

Read, write, and validate XML by using the XmlReader class and the XmlWriter class.

  • Read XML data by using the XmlReader class.
  • Read all XML element and attribute content.
  • Read specific element and attribute content.
  • Read XML data by using the XmlTextReader class.
  • Read node trees by using the XmlNodeReader class.
  • Validate XML data by using the XmlValidatingReader class.
  • Write XML data by using the XmlWriter class.

MSDN has an