<?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: Typesafe ENUM&#8217;s</title>
	<atom:link href="http://www.herrodius.com/blog/27/feed" rel="self" type="application/rss+xml" />
	<link>http://www.herrodius.com/blog/27</link>
	<description>Thoughts from a software developer</description>
	<lastBuildDate>Wed, 30 Nov 2011 09:13:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: nils</title>
		<link>http://www.herrodius.com/blog/27/comment-page-1#comment-821</link>
		<dc:creator>nils</dc:creator>
		<pubDate>Thu, 18 Aug 2005 23:22:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=27#comment-821</guid>
		<description>I think you are missing the woods for the trees - the AssessmentItemTypes surely are value objects, so adding themselves to a static array etc. seems to go about it the wrong way.

Just create an AssessmentItemTypeCollection, which in turn contains the static TYPES array and has getByID and getByName entries (and can contain further structures to speed up access to these two) - and it is this class which creates and adds new item types to the TYPES array.

(and use getters/setters for the AsessmentItemType class :))</description>
		<content:encoded><![CDATA[<p>I think you are missing the woods for the trees &#8211; the AssessmentItemTypes surely are value objects, so adding themselves to a static array etc. seems to go about it the wrong way.</p>
<p>Just create an AssessmentItemTypeCollection, which in turn contains the static TYPES array and has getByID and getByName entries (and can contain further structures to speed up access to these two) &#8211; and it is this class which creates and adds new item types to the TYPES array.</p>
<p>(and use getters/setters for the AsessmentItemType class <img src='http://www.herrodius.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Burch</title>
		<link>http://www.herrodius.com/blog/27/comment-page-1#comment-820</link>
		<dc:creator>Greg Burch</dc:creator>
		<pubDate>Tue, 16 Aug 2005 22:54:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=27#comment-820</guid>
		<description>One thing I would do, strings or not, is make all those identifiers constants that way if and when they change they are all in one place. It also helps identify uniqueness since all of the constants are defined in one place. I personally try to not use node names at all as identifiers but always have an id field that is used. The nodes define the structure and their attribute define the metadata, I don&#039;t mix them.</description>
		<content:encoded><![CDATA[<p>One thing I would do, strings or not, is make all those identifiers constants that way if and when they change they are all in one place. It also helps identify uniqueness since all of the constants are defined in one place. I personally try to not use node names at all as identifiers but always have an id field that is used. The nodes define the structure and their attribute define the metadata, I don&#8217;t mix them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christophe</title>
		<link>http://www.herrodius.com/blog/27/comment-page-1#comment-819</link>
		<dc:creator>Christophe</dc:creator>
		<pubDate>Tue, 16 Aug 2005 21:01:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=27#comment-819</guid>
		<description>Hi Greg,

thx for the feedback. About the id&#039;s: using strings as assessmentitem identifiers just felt better when reading or correcting the XML files. The QTI standard also uses strings as identifiers (&quot;choiceMultiple&quot; for multiple choice assessmentitems for instance), though this is not the reason we chose strings.

Mentioning QTI, I was just thinking that in order to assign one of the types to an assessmentitem parsed from a QTI XML file, we would need to extend the constructor of the AssessmentItemType to accept the QTI identifier as well. And what if more XML structures needed to be used...I think we&#039;ll need to rethink the design.</description>
		<content:encoded><![CDATA[<p>Hi Greg,</p>
<p>thx for the feedback. About the id&#8217;s: using strings as assessmentitem identifiers just felt better when reading or correcting the XML files. The QTI standard also uses strings as identifiers (&#8220;choiceMultiple&#8221; for multiple choice assessmentitems for instance), though this is not the reason we chose strings.</p>
<p>Mentioning QTI, I was just thinking that in order to assign one of the types to an assessmentitem parsed from a QTI XML file, we would need to extend the constructor of the AssessmentItemType to accept the QTI identifier as well. And what if more XML structures needed to be used&#8230;I think we&#8217;ll need to rethink the design.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Burch</title>
		<link>http://www.herrodius.com/blog/27/comment-page-1#comment-818</link>
		<dc:creator>Greg Burch</dc:creator>
		<pubDate>Tue, 16 Aug 2005 20:38:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=27#comment-818</guid>
		<description>Well in your case I would definately go with the second not only because it keeps private&#039;s, private, but because its just more natural. However why didn&#039;t you stick to ID&#039;s? When using strings like that on a larger scale you would have to actually localize your code rather than defining them as a constant (or as close as you can in AS)

-Greg</description>
		<content:encoded><![CDATA[<p>Well in your case I would definately go with the second not only because it keeps private&#8217;s, private, but because its just more natural. However why didn&#8217;t you stick to ID&#8217;s? When using strings like that on a larger scale you would have to actually localize your code rather than defining them as a constant (or as close as you can in AS)</p>
<p>-Greg</p>
]]></content:encoded>
	</item>
</channel>
</rss>

