<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Starting Handicaps</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2005/06/16/starting-handicaps/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2005/06/16/starting-handicaps/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Jamie Collins</title>
		<link>http://www.dailydoseofexcel.com/archives/2005/06/16/starting-handicaps/#comment-14172</link>
		<dc:creator>Jamie Collins</dc:creator>
		<pubDate>Fri, 17 Jun 2005 09:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1168#comment-14172</guid>
		<description>&lt;p&gt;DK: &quot;I so skillfully created a constant to refer to the field in the recordset, but I leave 0.8 and36 as literals. Shameful. If this program will ever be useful outside of my league, those are going to be user settings. I need to make them user settings right now instead of being so lazy.&quot;&lt;/p&gt;
&lt;p&gt;If you think of the tables and their columns in your database as being &#039;classes&#039; and their columns as &#039;members&#039; for your front end application use, you&#039;ll see it is reasonable to refer to them as literals (you don&#039;t use CallByName too much, do you :) ?). What might start out as a maintenance-assisting exercise (i.e. if the column name ever changed you&#039;d only need to amend one place in client code) may end up with code such as:&lt;/p&gt;
&lt;p&gt;Const TABLE_PLAYERS_NAME As String = &quot;TblPlayers&quot;&lt;br&gt;
Const TABLE_PLAYERS_COL_PLAYER_ID As String = &quot;Player&quot;&lt;br&gt;
Const TABLE_PLAYERS_COL_BEGHC_NAME As String = &quot;BegHC&quot;&lt;/p&gt;
&lt;p&gt;Then you realize you could organize this in a collection class of tables each with dependent collection class of columns, just to store meta data element names. Then you realize you can query the database&#039;s data dictionary, schema system tables or equivalent to dynamically populate your schema objects. Then you realize you have an application that seemingly has no clue about its database until run-time.&lt;/p&gt;
&lt;p&gt;That is not the way to create tiered architecture. Changing the underlying database structure will always have non-trivial implications for a front end application. &lt;/p&gt;
&lt;p&gt;My take on it is that referring to members as literals such as &quot;SELECT Player, BegHC FROM TblPlayers&quot; and Fields(&quot;BegHC&quot;) is entirely acceptable. I think putting 0.8 and 36 into user settings is correct. I&#039;d also suggest changing the global variables for your connection and recordset objects into respective Property Get&#039;s e.g. would be able to test the state etc of the underlying ADODB object before returning a reference to it.&lt;/p&gt;
&lt;p&gt;Jamie.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>DK: &#8220;I so skillfully created a constant to refer to the field in the recordset, but I leave 0.8 and36 as literals. Shameful. If this program will ever be useful outside of my league, those are going to be user settings. I need to make them user settings right now instead of being so lazy.&#8221;</p>
<p>If you think of the tables and their columns in your database as being &#8216;classes&#8217; and their columns as &#8216;members&#8217; for your front end application use, you&#8217;ll see it is reasonable to refer to them as literals (you don&#8217;t use CallByName too much, do you <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ?). What might start out as a maintenance-assisting exercise (i.e. if the column name ever changed you&#8217;d only need to amend one place in client code) may end up with code such as:</p>
<p>Const TABLE_PLAYERS_NAME As String = &#8220;TblPlayers&#8221;<br />
Const TABLE_PLAYERS_COL_PLAYER_ID As String = &#8220;Player&#8221;<br />
Const TABLE_PLAYERS_COL_BEGHC_NAME As String = &#8220;BegHC&#8221;</p>
<p>Then you realize you could organize this in a collection class of tables each with dependent collection class of columns, just to store meta data element names. Then you realize you can query the database&#8217;s data dictionary, schema system tables or equivalent to dynamically populate your schema objects. Then you realize you have an application that seemingly has no clue about its database until run-time.</p>
<p>That is not the way to create tiered architecture. Changing the underlying database structure will always have non-trivial implications for a front end application. </p>
<p>My take on it is that referring to members as literals such as &#8220;SELECT Player, BegHC FROM TblPlayers&#8221; and Fields(&#8220;BegHC&#8221;) is entirely acceptable. I think putting 0.8 and 36 into user settings is correct. I&#8217;d also suggest changing the global variables for your connection and recordset objects into respective Property Get&#8217;s e.g. would be able to test the state etc of the underlying ADODB object before returning a reference to it.</p>
<p>Jamie.</p>
<p></p>
]]></content:encoded>
	</item>
</channel>
</rss>

