<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Alex in a nutshell &#187; Programming</title>
	<atom:link href="http://salamakha.com/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://salamakha.com/blog</link>
	<description>Random thoughts on IT</description>
	<lastBuildDate>Mon, 15 Mar 2010 01:04:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>.Net 4, Azure SDK and WCF HTTP Activation</title>
		<link>http://salamakha.com/blog/2009/09/23/net-4-azure-sdk-and-wcf-http-activation/</link>
		<comments>http://salamakha.com/blog/2009/09/23/net-4-azure-sdk-and-wcf-http-activation/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 14:33:43 +0000</pubDate>
		<dc:creator>Alex Salamakha</dc:creator>
				<category><![CDATA[.net]]></category>

		<guid isPermaLink="false">http://salamakha.com/blog/?p=74</guid>
		<description><![CDATA[Azure SDK requires WCF HTTP Activation to be installed. However, WCF HTTP Activation won&#8217;t install if you have installed .Net 4 prior to that. Here is why: when you install the .Net 4.0 beta, for some reason it also overwrites at least one of your .Net 3.0 (WCF) files, at least on 64bit systems, namely &#8220;c:\windows\microsoft.net\framework64\v3.0\Windows Communication [...]]]></description>
			<content:encoded><![CDATA[<p>Azure SDK requires WCF HTTP Activation to be installed. However, WCF HTTP Activation won&#8217;t install if you have installed .Net 4 prior to that. <a href="http://stackoverflow.com/questions/1402638/installing-wcf-http-activation-on-windows-vista-fails">Here is why</a>:</p>
<blockquote><p>when you install the .Net 4.0 beta, for some reason it also overwrites at least one of your .Net 3.0 (WCF) files, at least on 64bit systems, namely</p>
<p>&#8220;<em>c:\windows\microsoft.net\framework64\v3.0\Windows Communication Foundation\SMConfigInstaller.EXE</em>&#8220;.</p>
<p>So the bad part is, with this new version in place you cannot longer enable the &#8220;WCF HTTP Activation&#8221; Feature of Vista and Win7 and even worse, uninstalling .Net 4 beta <strong>does not</strong> restore the original version.</p></blockquote>
<p>So if you&#8217;re building a new system, make sure you install WCF HTTP Activation prior to .Net 4.</p>
<p>If you have screwed up like I did, install Windows 7/Vista on a VM, copy <em>SMConfigInstaller.EXE</em> file back, restart your machine and enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://salamakha.com/blog/2009/09/23/net-4-azure-sdk-and-wcf-http-activation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Microsoft TechEd Australia 2009</title>
		<link>http://salamakha.com/blog/2009/09/19/microsoft-teched-australia-2009/</link>
		<comments>http://salamakha.com/blog/2009/09/19/microsoft-teched-australia-2009/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 08:55:56 +0000</pubDate>
		<dc:creator>Alex Salamakha</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://salamakha.com/blog/?p=68</guid>
		<description><![CDATA[It&#8217;s been fantastic to get away from the office and spend few days at sunny Gold Coast. Every paid TechEd delegate received an awesome package from Microsoft and HP: Now I have a little carry-around-meetings netbook, HP Mini 2140. Despite being a bit too sluggish for development in Visual Studio 2010 and not having Bluetooth [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been fantastic to get away from the office and spend few days at sunny Gold Coast.</p>
<p>Every paid TechEd delegate received an awesome package from Microsoft and HP:</p>
<p><img class="alignnone size-full wp-image-69" title="img_1796" src="http://salamakha.com/blog/wp-content/uploads/2009/09/img_1796.jpg" alt="img_1796" width="800" height="387" /></p>
<p>Now I have a little carry-around-meetings netbook, <a href="http://www.pcworld.idg.com.au/review/notebooks/hp/mini_2140/280290">HP Mini 2140</a>. Despite being a bit too sluggish for development in Visual Studio 2010 and not having Bluetooth it is a really nice machine which has proven itself for the job.</p>
<p>Back to the conference. There were quite a few interesting sessions. Here is my top 5:</p>
<ul>
<li><a href="http://www.syringe.net.nz/">Chris Auld</a> from Intergen, NZ presenting on Azure platform. Great overview and comparison of all cloud platforms (Session ARC201).</li>
<li><a href="http://jim.webber.name/">Jim Webber</a>, Thoughtworks&#8217; Global Head of Architecture, presenting on architecturing REST-based systems and hypermedia. Jim is a fantastic and passionate presenter, I enjoyed both of his sessions (SOA321 and ARC305) immensely.</li>
<li><a href="http://callvirt.net/blog/post/Why-F-%28TechEd-09-DEV450%29.aspx">Joel Pobar</a> presenting on F# and its application in applications. It was a very interesting session (DEV450) indeed, one of those sessions that any developer should love -  playing with new cool stuff  with new technology. I&#8217;ll be catching up with Joel during his upcoming Sydney visit to talk more about F#.</li>
<li><a href="http://www.builttoroam.com/">Nick Randolph</a> on interconnectivity between clients (including mobile) and Azure services, queues, etc. Full of practical stuff on Azure (Session SOA341).</li>
<li><a href="http://msmvps.com/blogs/robfarley/">Rob Farley</a> from LobsterPot Solutions presenting a hands-on session on SQL Azure (Session SQL305).</li>
</ul>
<p>And, as usual, TechEd is a place where you meet interesting people and get inspiring ideas. It was great to catch up with ex-colleagues from <a href="http://www.cargowise.com/">ediCargoWise</a> who now run their own company, <a href="http://www.envoyat.com/">EnvoyAT</a>.</p>
<p>Looking forward to TechEd 2010, it&#8217;s going to be great to spend few full on technical days at Gold Coast this time next year.</p>
]]></content:encoded>
			<wfw:commentRss>http://salamakha.com/blog/2009/09/19/microsoft-teched-australia-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CommSec Cash Management goes live</title>
		<link>http://salamakha.com/blog/2008/06/19/commsec-cash-management-goes-live/</link>
		<comments>http://salamakha.com/blog/2008/06/19/commsec-cash-management-goes-live/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 15:19:50 +0000</pubDate>
		<dc:creator>Alex Salamakha</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://salamakha.com/blog/2008/06/19/commsec-cash-management-goes-live/</guid>
		<description><![CDATA[It&#8217;s such a good feeling to finish a long project. CommSec Cash Management was an interesting project to work on. Put simply, it&#8217;s a self-contained bank within a bank, offering high interest savings and transactional accounts, Debit Master Card, Internet banking, full back office capabilities and integration with existing CommSec&#8217;s trading products and Commonwealth Bank&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s such a good feeling to finish a long project. <a href="http://www.comsec.com.au/">CommSec Cash Management</a> was an interesting project to work on. Put simply, it&#8217;s a self-contained bank within a bank, offering high interest savings and transactional accounts, Debit Master Card, Internet banking, full back office capabilities and integration with existing CommSec&#8217;s trading products and Commonwealth Bank&#8217;s existing payments systems.</p>
<p>Building such a thing from the ground up was quite an experience  from professional point of view; it was a long project too (started prototype in August 2007, started development in September 2007, pilot in April 2008, went live for public in June 2008).</p>
<p>Two weeks after launch &#8211; no major issues, which is even a better feeling.</p>
<p>&#8230;now I just need a holiday before starting to work on a new assignment&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://salamakha.com/blog/2008/06/19/commsec-cash-management-goes-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating business objects validation with Enterprise Library Validation Block</title>
		<link>http://salamakha.com/blog/2007/11/14/creating-business-objects-validation-with-enterprise-library-validation-block/</link>
		<comments>http://salamakha.com/blog/2007/11/14/creating-business-objects-validation-with-enterprise-library-validation-block/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 03:01:53 +0000</pubDate>
		<dc:creator>Alex Salamakha</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://salamakha.com/blog/2007/11/14/creating-business-objects-validation-with-enterprise-library-validation-block/</guid>
		<description><![CDATA[I&#8217;ve been using MS Enterprise Library on a number of projects. There are several blocks that used more often than others. I find validation block particularly useful. However, I usually like to tweak it a bit. The thing I don&#8217;t like is when you want to validate an object you require to write a substantial [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://msdn.microsoft.com/entlib/">MS Enterprise Library</a> on a number of projects. There are several blocks that used more often than others. I find validation block particularly useful. However, I usually like to tweak it a bit. The thing I don&#8217;t like is when you want to validate an object you require to write a substantial amount of code:</p>
<blockquote>
<p style="margin: 0px"><span style="color: #2b91af">   </span><span style="color: #2b91af">Validator</span>&lt;<span style="color: #2b91af">Customer</span>&gt; validator = <span style="color: #2b91af">ValidationFactory</span>.CreateValidator&lt;<span style="color: #2b91af">Customer</span>&gt;();</p>
<p style="margin: 0px"><span style="color: #2b91af">   </span><span style="color: #2b91af">ValidationResults</span> results = validator.Validate(customer);</p>
</blockquote>
<p>Also it&#8217;s possible to create a validator for another type and validate an object with it without any problems, errors or exceptions:</p>
<blockquote>
<p style="margin: 0px"><span style="color: #2b91af"></span> <span style="color: #2b91af">Validator</span>&lt;WRONGCLASS&gt; validator = <span style="color: #2b91af">ValidationFactory</span>.CreateValidator&lt;WRONGCLASS&gt;();</p>
<p style="margin: 0px"><span style="color: #2b91af"></span>             <span style="color: #2b91af">ValidationResults</span> results = validator.Validate(customer);</p>
</blockquote>
<p>This feature is for flexibility, however, I haven&#8217;t found a need to use it the way it was intended. On the other hand I have encountered a number of situations where developers copy-pasted code responsible for creation of a validator without changing the type of a target object. This results unexpected behaviour during testing.<br />
In order to fix this every business object is derived from a common parent BaseBusinessObject class, which has the following method defined:</p>
<blockquote>
<p style="margin: 0px"><span style="color: #2b91af"></span> <span style="color: blue">public</span> <span style="color: #2b91af">ValidationResults</span> Validate()</p>
<p style="margin: 0px"><span style="color: #2b91af"></span>             {</p>
<p style="margin: 0px"><span style="color: #2b91af"></span>                 <span style="color: #2b91af">    Validator</span> validator = <span style="color: #2b91af">ValidationFactory</span>.CreateValidator(<span style="color: blue">this</span>.GetType());</p>
<p style="margin: 0px"><span style="color: #2b91af"></span>                 <span style="color: blue">    return</span> validator.Validate(<span style="color: blue">this</span>);</p>
<p style="margin: 0px"><span style="color: #2b91af"></span>             }</p>
</blockquote>
<p>As a result, validating an object is now a lot simpler:</p>
<blockquote>
<p style="margin: 0px"><span style="color: #2b91af"></span> customer.Validate();</p>
</blockquote>
<p>Usually it makes sense to have a base business object class anyway, so it&#8217;s not much of an overhead.</p>
]]></content:encoded>
			<wfw:commentRss>http://salamakha.com/blog/2007/11/14/creating-business-objects-validation-with-enterprise-library-validation-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New job</title>
		<link>http://salamakha.com/blog/2007/10/28/new-job/</link>
		<comments>http://salamakha.com/blog/2007/10/28/new-job/#comments</comments>
		<pubDate>Sun, 28 Oct 2007 10:09:31 +0000</pubDate>
		<dc:creator>Alex Salamakha</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://salamakha.com/blog/2007/10/28/new-job/</guid>
		<description><![CDATA[As of November 6, 2007 I will no longer be an independent consultant at Commonwealth Bank of Australia, my workplace for the past 18 months. I&#8217;m not going to another organisation, however. I&#8217;m switching to a permanent position of Application Architect instead. I&#8217;m excited!]]></description>
			<content:encoded><![CDATA[<p>As of November 6, 2007 I will no longer be an independent consultant at <a href="http://www.cba.com.au">Commonwealth Bank of Australia</a>, my workplace for the past 18 months. I&#8217;m not going to another organisation, however. I&#8217;m switching to a permanent position of Application Architect instead.  </p>
<p>I&#8217;m excited! </p>
]]></content:encoded>
			<wfw:commentRss>http://salamakha.com/blog/2007/10/28/new-job/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Running multiple instances of CruiseControl monitor</title>
		<link>http://salamakha.com/blog/2007/10/23/running-multiple-instances-of-cruisecontrol-monitor/</link>
		<comments>http://salamakha.com/blog/2007/10/23/running-multiple-instances-of-cruisecontrol-monitor/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 00:49:52 +0000</pubDate>
		<dc:creator>Alex Salamakha</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://salamakha.com/blog/2007/10/23/running-multiple-instances-of-cruisecontrol-monitor/</guid>
		<description><![CDATA[We&#8217;re using a customised version of Cruise Control, hence we all stuck with old one-per-project Cruise Control Monitor (v. 0.9.1.940). Major hassle for me is to monitor a number of projects in tray. This version doesn&#8217;t support multiple project configurations with only one entry in the config allowed for a project: &#60;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&#62; &#60;CruiseControlMonitor [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re using a customised version of Cruise Control, hence we all stuck with old one-per-project Cruise Control Monitor (v. 0.9.1.940).</p>
<p>Major hassle for me is to monitor a number of projects in tray. This version doesn&#8217;t support multiple project configurations with only one entry in the config allowed for a project:</p>
<blockquote><p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;CruiseControlMonitor xmlns:xsd=&#8221;http://www.w3.org/2001/XMLSchema&#8221; xmlns:xsi=&#8221;http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns=&#8221;http://www.sf.net/projects/ccnet&#8221;&gt;<br />
&lt;PollingIntervalSeconds&gt;15&lt;/PollingIntervalSeconds&gt;<br />
<strong> &lt;ProjectName&gt;Name-Of-Your-Project-Here&lt;/ProjectName&gt;</strong><br />
&#8230;</p></blockquote>
<p>As a result, every time I restart  a machine I need to start 4 instances of CCTray and manually select corresponding projects from a list. Annoying!</p>
<p>Simple fix is:</p>
<ul>
<li>Create multiple config files, with just ProjectName entry being different</li>
<li>Create however many shortcuts to CCTray you need in your <em>Startup </em>group and specify a corresponding config file as a parameter</li>
<li>Enjoy the view of multiple CruiseControl Monitors sitting in your tray:</li>
</ul>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/10/cctray.png" title="Multiple CruiseControl monitors"><img src="http://salamakha.com/blog/wp-content/uploads/2007/10/cctray.png" alt="Multiple CruiseControl monitors" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://salamakha.com/blog/2007/10/23/running-multiple-instances-of-cruisecontrol-monitor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do we need frameworks?</title>
		<link>http://salamakha.com/blog/2007/10/05/do-we-need-frameworks/</link>
		<comments>http://salamakha.com/blog/2007/10/05/do-we-need-frameworks/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 17:30:11 +0000</pubDate>
		<dc:creator>Alex Salamakha</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://salamakha.com/blog/2007/10/05/do-we-need-frameworks/</guid>
		<description><![CDATA[Mitch Denny&#8217;s and Paul Stovell&#8217;s posts on frameworks are thought-provoking, especially because I&#8217;m in a beginning phase of a rather big project. We have layered architecture with UI, complex middle-tier that talks to a number of external systems and DBs. We have a number of developers on the project with the same number to start [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://notgartner.wordpress.com/2007/09/25/frameworks-frameworks-frameworks/">Mitch Denny&#8217;s</a> and  <a href="http://www.paulstovell.net/blog/index.php/mitch-on-frameworks-frameworks-frameworks/">Paul Stovell&#8217;s</a> posts on frameworks are thought-provoking, especially because I&#8217;m in a beginning phase of a rather big project. We have layered architecture with UI, complex middle-tier that talks to a number of external systems and DBs.</p>
<p>We have a  number of developers on the project with the same number to start in next few weeks. After initial launch I expect 50-60-70% of staff to be moved to some other projects with new (and, most likely, junior) developers taking over their positions.</p>
<p>Do we need a custom framework on top of what .Net provides? Yes.</p>
<p>Do we need a framework even if it&#8217;s going to be outdated tomorrow? Hell, yes!</p>
<p><strong>Why do we need any framework at all?</strong></p>
<p>1)<em> Consistency of development process. </em>I don&#8217;t want new starters to invent a wheel and create their own solutions. Framework can be verified, tested, performance-tested, approved by architects. Do I have a luxury of trusting every developer&#8217;s judgment on everything? Not on a large project.</p>
<p>2) <em>Efficiency.</em> I want developers to productively write  code (mostly UI and business logic) and don&#8217;t worry about plumbing, validation nuances, etc.</p>
<p>Are we going to write everything ourselves? No. We&#8217;re going to re-use as much as we can.  This brings a second question:</p>
<p><strong>Adopting external frameworks. Is it good?</strong></p>
<p>.Net  provides a lot of stuff out of the box, however, not everything. Validation, Data Access and control library are obvious weak points that require addressing on pretty much any project. Tracing and logging can be extended way further than standard implementation in order to be really useful in n-tier systems.</p>
<p>So, re-use third-party or write your own? I have seen projects where everything was written in house as a principle, including reporting engine. It took a lot of time and was inferior comparing to what&#8217;s available on the market. Yes, the framework did almost 100% of what&#8217;s needed and was written with specific project in mind, but it had its own limitations, just like any other framework in the world. It would have been more efficient development-wise and beneficial to customers to utilise existing libraries.</p>
<p><a href="http:/c2.com/xp/YouArentGonnaNeedIt.html">YAGNI principle</a> teaches us that we should not over-engineer for future as we won&#8217;t need it most probably. I think this principle is being violated more often during in-house framework development rather than during third-party framework re-use. Given a choice between utilising 20% of <a href="http://msdn.microsoft.com/entlib/">Enterprise Library</a> or writing these 20% ourselves, I&#8217;m going to opt for the first option because it&#8217;s faster and does the job.  I&#8217;d rather use it as a base and write a little bit of custom tweaking code on top of it when required; it&#8217;s more efficient this way. For example Enterprise Library Validation block doesn&#8217;t support cross-field validation. Fine! I can write it within the scope of my project, but at least I don&#8217;t need to write the entire validation framework.</p>
<p>Seriously, what&#8217;s the problem with utilising 20% of a large-ish third-party framework? After all, code re-use isn&#8217;t such a new concept.</p>
]]></content:encoded>
			<wfw:commentRss>http://salamakha.com/blog/2007/10/05/do-we-need-frameworks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VS.Net 2005 AddIns</title>
		<link>http://salamakha.com/blog/2007/10/04/vsnet-2005-addins/</link>
		<comments>http://salamakha.com/blog/2007/10/04/vsnet-2005-addins/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 05:27:01 +0000</pubDate>
		<dc:creator>Alex Salamakha</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://salamakha.com/blog/2007/10/04/vsnet-2005-addins/</guid>
		<description><![CDATA[VS.Net add-ins are being installed by default to My Documents\Visual Studio 2005\AddIns folder.I&#8217;ve got a roaming profile at my work computer and My Documents folder is located on a remote drive, which, in its turn, causes all the add-ins to fail during load due to trust issues. Simplest solution is to move add-ins to a [...]]]></description>
			<content:encoded><![CDATA[<p>VS.Net add-ins are being  installed by default to <em>My Documents\Visual Studio 2005\AddIns</em> folder.I&#8217;ve got a roaming profile at my work computer and My Documents folder is located on a remote drive, which, in its turn, causes all the add-ins to fail during load due to trust issues.</p>
<p>Simplest solution is to move add-ins to a new location and then change your VS.Net 2005 settings via <em>Tools &gt;&gt; Options &gt;&gt; Environment &gt;&gt; Add-in/Macros Security</em>:</p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/10/vssettings.jpg" title="VS.Net 2005 AddIns settings"><img src="http://salamakha.com/blog/wp-content/uploads/2007/10/vssettings.jpg" alt="VS.Net 2005 AddIns settings" /></a></p>
<p>Hit OK, restart your Visual Studio and voila!</p>
]]></content:encoded>
			<wfw:commentRss>http://salamakha.com/blog/2007/10/04/vsnet-2005-addins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decimal in c# attributes</title>
		<link>http://salamakha.com/blog/2007/09/21/decimal-in-c-attributes/</link>
		<comments>http://salamakha.com/blog/2007/09/21/decimal-in-c-attributes/#comments</comments>
		<pubDate>Fri, 21 Sep 2007 06:08:53 +0000</pubDate>
		<dc:creator>Alex Salamakha</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://salamakha.com/blog/2007/09/21/decimal-in-c-attributes/</guid>
		<description><![CDATA[We&#8217;re writing a new framework for our new project and decided to use Enterprise Library Validation Block as the foundation for user input validation. It worked out really well; we&#8217;re building a library of our business-specific re-usable validators. With unit testing in place, it&#8217;s heaps better than using any validation inside the forms. There is [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re writing a new framework for our new project and decided to use <a href="http://msdn2.microsoft.com/en-us/library/bb410105.aspx">Enterprise Library Validation Block</a> as the foundation for user input validation. It worked out really well; we&#8217;re building a library of our business-specific  re-usable validators.  With unit testing in place, it&#8217;s heaps better than using any validation inside the forms.</p>
<p>There is one question that puzzles me however &#8211; why the hell decimal isn&#8217;t allowed as a parameter in attributes at CLR level?</p>
<blockquote dir="ltr" style="margin-right: 0px"><p><font face="Arial">24.1.3 Attribute parameter types</font></p>
<p><font face="Arial">The types of positional and named parameters for an attribute class are limited to the attribute parameter types, which are:<br />
- One of the following types: bool, byte, char, double, float, int, long, short, string.<br />
- The type object.<br />
- The type System.Type.<br />
- An enum type, provided it has public accessibility and the types in which it is nested (if any) also have public accessibility.<br />
- Single-dimensional arrays of the above types.</font></p></blockquote>
<p>I&#8217;m sure CLR guys had their reasons, but since I haven&#8217;t found any documentation about that topic I&#8217;d like to know the answer.</p>
<p>Using double and internally use Convert.ToDecimal isn&#8217;t n option I&#8217;d like to pursue.</p>
]]></content:encoded>
			<wfw:commentRss>http://salamakha.com/blog/2007/09/21/decimal-in-c-attributes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Managing email workflow with AEP</title>
		<link>http://salamakha.com/blog/2007/09/10/managing-emails-with-aep/</link>
		<comments>http://salamakha.com/blog/2007/09/10/managing-emails-with-aep/#comments</comments>
		<pubDate>Mon, 10 Sep 2007 16:31:42 +0000</pubDate>
		<dc:creator>Alex Salamakha</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://salamakha.com/blog/2007/09/10/managing-emails-with-aep/</guid>
		<description><![CDATA[I&#8217;m a shareware author and that implies a lot of email-related routine. Since I hate routine tasks, I&#8217;ve been looking at ways to streamline my emails workflow lately. Here is what I mean by routine tasks. Each shareware author sells his software over the Internet via one of the online sales providers (Regnow, RegSoft, Plimus, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a <a href="http://www.capstralia.com" title="To-Do list and Contact Management software from Capstralia.Com">shareware author</a> and that implies a lot of email-related routine. Since I hate routine tasks, I&#8217;ve been looking at ways to streamline my emails workflow lately. Here is what I mean by routine tasks. Each shareware author sells his software over the Internet via one of the online sales providers (<a href="http://www.regnow.com">Regnow</a>, <a href="http://www.regsoft.com">RegSoft</a>, <a href="http://www.plimus.com">Plimus</a>, <a href="http://www.shareit.com">ShareIt</a>, etc.). Whenever somebody purchases your software you receive an email with order details &#8211; product purchased, number of copies, total, GST/VAT, user name, address, etc. Your regular routine is:</p>
<ol>
<li>Check email</li>
<li>Copy user name from email into Clipboard</li>
<li>Run Code generation utility</li>
<li>Paste user name and number of licenses into the code generation utility</li>
<li>Click Generate code button</li>
<li>Copy generated code into Clipboard</li>
<li>Create an email based on a template for particular product</li>
<li>Enter user name into the email</li>
<li>Paste generated code</li>
<li>Press <em>Send </em>button</li>
</ol>
<p>The most important bit is that you have to be physically present in front of your computer in order to perform the above mentioned 10 steps. What if you want to store the user details in the database or check customer&#8217;s email against previous orders to offer a discount? More routine!</p>
<p>As a software developer I can write my own email processor. While it&#8217;s an option, I see it as a waste of time. Then <a href="http://www.microsoft.com/biztalk" title="Microsoft Biztalk">Biztalk</a>, perhaps? It&#8217;s nice and easy for a programmer, BUT with <a href="http://www.microsoft.com/biztalk/howtobuy/default.mspx">Standard Edition&#8217;s price of US$8,500</a> it&#8217;s not really an option for many people. Here is the alternative &#8211; <a href="http://www.tweakmarketing.com/products/aep/" title="Advanced Email Parser">Advanced Email  Parser (AEP)</a>.</p>
<p>Why? First of all its cost. It starts at US$400, 1/20th of Biztalk&#8217;s price. Enterprise license costs double that (AU$999 + GST in Australia). Compare that with the cost of BizTalk Server 2006. Secondly, <a href="http://www.tweakmarketing.com/products/aep/">AEP </a>is quite simple to use, user doesn&#8217;t require programming skills to create simple solutions.  However, you <em>may</em> require a skilled programmer in case of complex business processes integration (various back-end systems, databases, web services, etc).</p>
<p>Here is how I can fix the above mentioned problem of processing an online order  for my shareware program <a href="http://www.capstralia.com/products/pro" title="Quick To-Do Pro">Quick To-Do Pro</a> with <a href="http://www.tweakmarketing.com/products/aep/">AEP</a>.<span id="more-16"></span></p>
<p>First of all, make sure that server is stopped by running AEP Service Manager:</p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/09/01_servicemanager.jpg" title="AEP Service Manager"><img src="http://salamakha.com/blog/wp-content/uploads/2007/09/01_servicemanager.jpg" alt="AEP Service Manager" /></a></p>
<p>Then run AEP and create an email account:</p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/09/02_emailaccount.jpg" title="Create email account"><img src="http://salamakha.com/blog/wp-content/uploads/2007/09/02_emailaccount.jpg" alt="Create email account" /></a></p>
<p>Once this is done, let&#8217;s move on to creating processing rules. A notification message looks like this:</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/09/03_regmessage.gif" title="Registration message"><img src="http://salamakha.com/blog/wp-content/uploads/2007/09/03_regmessage.gif" alt="Registration message" /></a></p>
<p>Let&#8217;s get started with the script. Create an email account to check:</p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/09/02_emailaccount.jpg" title="Create email account"><img src="http://salamakha.com/blog/wp-content/uploads/2007/09/02_emailaccount.jpg" alt="Create email account" /></a></p>
<p>Then create rules to make sure that it&#8217;s a genuine order message. I&#8217;m checking for sender email and subject line.</p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/09/05_senderemailfilter.gif" title="Sender email filter"><img src="http://salamakha.com/blog/wp-content/uploads/2007/09/05_senderemailfilter.gif" alt="Sender email filter" /></a></p>
<p>and subject line contains phrase <em>Quick To-Do PRO</em>:</p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/09/06_messagesubject.gif" title="Message subject"><img src="http://salamakha.com/blog/wp-content/uploads/2007/09/06_messagesubject.gif" alt="Message subject" /></a></p>
<p>Now processing the contents of the email. I&#8217;m saving 4 fields  &#8211; User name, Email, Quantity, and Order Id &#8211; into variables:</p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/09/07_savingvalue.gif" title="07_savingvalue.gif"><img src="http://salamakha.com/blog/wp-content/uploads/2007/09/07_savingvalue.gif" alt="07_savingvalue.gif" /></a></p>
<p>Repeat this as many times as you need for all variables: <em>quantity purchased, customer email address, preferred user name, etc.</em> Here lies the first challenge. User name for the reg. code should follow the algorithm:</p>
<blockquote><p>if customer specified a preferred user name, use it, otherwise use customer&#8217;s name</p></blockquote>
<p>This is implemented via <em>Simple condition</em> statement followed by <em>SetVariableByTemplate</em>.</p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/09/08_simplecondition.gif" title="Simple conditional variable"><img src="http://salamakha.com/blog/wp-content/uploads/2007/09/08_simplecondition.gif" alt="Simple conditional variable" /></a></p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/09/09_setvariable.gif" title="Setting Variable"><img src="http://salamakha.com/blog/wp-content/uploads/2007/09/09_setvariable.gif" alt="Setting Variable" /></a></p>
<p>Now run key generator, pass user name and quantity of licenses purchased as parameters, grab output and save it as a variable <em>regCode</em>:</p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/09/08_runkeygen.gif" title="Run key generator task"><img src="http://salamakha.com/blog/wp-content/uploads/2007/09/08_runkeygen.gif" alt="Run key generator task" /></a></p>
<p>It&#8217;s time to send an email to customer by using SMTP Sender rule:</p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/09/11_sendemail.gif" title="Send email rule"><img src="http://salamakha.com/blog/wp-content/uploads/2007/09/11_sendemail.gif" alt="Send email rule" /></a></p>
<p>And here is the entire script:</p>
<p><a href="http://salamakha.com/blog/wp-content/uploads/2007/09/12_entirescript.gif" title="Entire script to process an order for Quick To-Do Pro"><img src="http://salamakha.com/blog/wp-content/uploads/2007/09/12_entirescript.gif" alt="Entire script to process an order for Quick To-Do Pro" /></a></p>
<p>Make sure you saved the script and restarted <a href="http://www.tweakmarketing.com/products/aep/">AEP</a> service. Now I don&#8217;t worry about not being to respond to  <a href="http://www.capstralia.com/products/pro" title="Quick To-Do Pro">Quick To-Do Pro</a>  purchases 24/7. Simple, huh?</p>
<p>OK, that was a simple example. I can extend it to save <a href="http://www.capstralia.com/products/pro" title="Quick To-Do Pro">Quick To-Do Pro</a>&#8216;s customer details to the database, etc. But I&#8217;m leaving this exercise to the reader.<br />
Where else would you use <a href="http://www.tweakmarketing.com/products/aep/">AEP</a>? Anywhere where you receive emails and would like to automate the process of handling those emails. Customer lost his login details or registration key for your software and dropped you a line? You can auto-reply with those details by writing a script that looks up in a database and emails it to customer. Received an order from your web store? <a href="http://www.tweakmarketing.com/products/aep/">AEP</a> can put it into your database, trigger shipment by contacting your supplier&#8217;s system, and send customer a follow-up email with details. Basically if you ever need to integrate email processing into your business solution, <a href="http://www.tweakmarketing.com/products/aep/">AEP</a> is a perfect answer.</p>
<p>Final note: <a href="http://www.tweakmarketing.com/products/aep/">AEP</a> runs as Windows application  or as a Windows Service. I strongly recommend running it as a service.</p>
<p>If you&#8217;re in Australia or New Zealand and would like to order  <a href="http://www.tweakmarketing.com/products/aep/" title="Advanced Email Parser">Advanced Email  Parser (AEP)</a> or any solution based on it, contact Sydney-based <a href="http://www.centizone.com.au" title="Centizone Pty Ltd">Centizone Pty Ltd</a> for a free quote.</p>
]]></content:encoded>
			<wfw:commentRss>http://salamakha.com/blog/2007/09/10/managing-emails-with-aep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
