<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Extreme .NET programming</title>
	<atom:link href="http://blog.scooletz.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.scooletz.com</link>
	<description>Non static code design</description>
	<lastBuildDate>Tue, 04 Jun 2013 08:01:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.scooletz.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Extreme .NET programming</title>
		<link>http://blog.scooletz.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.scooletz.com/osd.xml" title="Extreme .NET programming" />
	<atom:link rel='hub' href='http://blog.scooletz.com/?pushpress=hub'/>
		<item>
		<title>Protobuf-linq</title>
		<link>http://blog.scooletz.com/2013/06/04/protobuf-linq/</link>
		<comments>http://blog.scooletz.com/2013/06/04/protobuf-linq/#comments</comments>
		<pubDate>Tue, 04 Jun 2013 08:00:06 +0000</pubDate>
		<dc:creator>scooletz</dc:creator>
				<category><![CDATA[Protobuf-net]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[projections]]></category>
		<category><![CDATA[serialization]]></category>

		<guid isPermaLink="false">http://blog.scooletz.com/?p=723</guid>
		<description><![CDATA[I had an idea about querying and projecting over big streams of messages serialized with Google Protocol Buffers. If one needs only a few fields to his/her projection, why don&#8217;t make it implicit and prepare an optimal way of deserializing only these fields? That&#8217;s the way Protobuf-linq has been born. It&#8217;s simple, fast and eager [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=723&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I had an idea about querying and projecting over big streams of messages serialized with Google Protocol Buffers. If one needs only a few fields to his/her projection, why don&#8217;t make it implicit and prepare an optimal way of deserializing only these fields? That&#8217;s the way <a href="https://github.com/Scooletz/protobuf-linq" title="Protobuf-linq">Protobuf-linq</a> has been born. It&#8217;s simple, fast and eager to help you iterate over big streams of data.<br />
Check it out!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scooletz.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scooletz.wordpress.com/723/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=723&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.scooletz.com/2013/06/04/protobuf-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/940bf1b089c3e4e4cebfa3007d162aca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scooletz</media:title>
		</media:content>
	</item>
		<item>
		<title>Ripple on your NuGet</title>
		<link>http://blog.scooletz.com/2013/05/20/ripple-on-your-nuget/</link>
		<comments>http://blog.scooletz.com/2013/05/20/ripple-on-your-nuget/#comments</comments>
		<pubDate>Mon, 20 May 2013 08:00:08 +0000</pubDate>
		<dc:creator>scooletz</dc:creator>
				<category><![CDATA[Continous Integration]]></category>
		<category><![CDATA[CI]]></category>
		<category><![CDATA[Fubu]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[NuGet]]></category>
		<category><![CDATA[package management]]></category>
		<category><![CDATA[Ripple]]></category>

		<guid isPermaLink="false">http://blog.scooletz.com/?p=720</guid>
		<description><![CDATA[Recently I&#8217;ve been involved in a project which consists of many teams collaborating to deliver a big project. The application architecture gives this teams an opportunity to work with their code in a module scope. There&#8217;s no one big Visual Studio solution, all modules are scoped in their own slns. Living in a world like [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=720&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Recently I&#8217;ve been involved in a project which consists of many teams collaborating to deliver a big project. The application architecture gives this teams an opportunity to work with their code in a module scope. There&#8217;s no one big Visual Studio solution, all modules are scoped in their own slns. Living in a world like this means, that your CI, package management and local deployment must be fast, effective and easy to use.<br />
<a href="https://github.com/DarthFubuMVC/ripple">Ripple</a> is a project from the FubuMVC family. It&#8217;s an alternative NuGet client, so all the changes in behavior are made on the client side. It makes it a perfect fit for a scenario where one can mix up a local NuGet feeds for their internal packages and official ones. What about its advantages?<br />
The very first difference is a versioning. Ripple extracts packages into non versioned folders. It means that your projects will no longer be changed, when a new version of a package arrives. It helps a lot, especially in environments with packages being frequently published.<br />
Ripple makes a distinction between referenced packages. There are <em>float</em> and <em>fixed</em> packages. Float packages are these changing rapidly. It&#8217;s meant that all your packages should be floating during development. The fixed packages are rock solid versions of libraries used by your system. They will not be updated, unless the <em>force</em> option are used.<br />
The Ripple is still being developed. The most important thing it&#8217;s that it is active and thriving. If you develop applications in .NET with a plenty of solutions which are meant to publish packages, then give Ripple a try. It&#8217;s worth it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scooletz.wordpress.com/720/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scooletz.wordpress.com/720/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=720&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.scooletz.com/2013/05/20/ripple-on-your-nuget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/940bf1b089c3e4e4cebfa3007d162aca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scooletz</media:title>
		</media:content>
	</item>
		<item>
		<title>Backbone &amp; underscore beauty</title>
		<link>http://blog.scooletz.com/2013/04/22/backbone-underscore-beauty/</link>
		<comments>http://blog.scooletz.com/2013/04/22/backbone-underscore-beauty/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 08:00:02 +0000</pubDate>
		<dc:creator>scooletz</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[SPA]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Backbone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[Marionette]]></category>
		<category><![CDATA[Underscore]]></category>

		<guid isPermaLink="false">http://blog.scooletz.com/?p=715</guid>
		<description><![CDATA[Recently I&#8217;ve joined a project which is based on the Single Page Application paradigm. This means no page refreshes after the first load, after login and a plenty of client side scripting. To enhance the project speed a stack of client side libraries is used including, RequireJS (for module management), Underscore, Backbone and Backbone Marionette. [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=715&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Recently I&#8217;ve joined a project which is based on the Single Page Application paradigm. This means no page refreshes after the first load, after login and a plenty of client side scripting. To enhance the project speed a stack of client side libraries is used including, <a href="http://requirejs.org">RequireJS</a> (for module management), <a href="http://underscorejs.org/">Underscore</a>, <a href="http://backbonejs.org/">Backbone</a> and <a href="http://marionettejs.com/">Backbone Marionette</a>. There are more of them, but the last three are very interesting because of their paradigm.</p>
<p>Underscore, Backbone and Marionette are not frameworks. They are libraries, great libraries providing a few tools to deal with a web app development. They do not make you to use all of they <del datetime="2013-04-13T15:54:09+00:00">features </del> components (as &#8216;features&#8217; are overloaded, framework term). You can pick wisely and use only a few of the provided tools. Of course there is a risk of creating a monster, an unusable app, but it&#8217;s up to you and your paradigms, what to use and what to implement on your own. Strongly encourage you to get accustomed to them, especially all of them have a beatiful common denominator, they provide the annotated codebase (<a href="http://lostechies.com/derickbailey/2011/12/14/annotated-source-code-as-documentation-with-docco/">code as documentation</a>) which can be found here: <a href="http://underscorejs.org/docs/underscore.html">Underscore</a>, <a href="http://backbonejs.org/docs/backbone.html">Backbone</a>, <a href="http://derickbailey.github.io/backbone.marionette/docs/backbone.marionette.html">Marionette</a>.</p>
<p>Use libraries, don&#8217;t let frameworks use you!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scooletz.wordpress.com/715/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scooletz.wordpress.com/715/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=715&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.scooletz.com/2013/04/22/backbone-underscore-beauty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/940bf1b089c3e4e4cebfa3007d162aca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scooletz</media:title>
		</media:content>
	</item>
		<item>
		<title>Enhancing log4net exception logging</title>
		<link>http://blog.scooletz.com/2013/04/15/enhancing-log4net-exception-logging/</link>
		<comments>http://blog.scooletz.com/2013/04/15/enhancing-log4net-exception-logging/#comments</comments>
		<pubDate>Mon, 15 Apr 2013 08:00:10 +0000</pubDate>
		<dc:creator>scooletz</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[log4net]]></category>
		<category><![CDATA[event log]]></category>
		<category><![CDATA[EventId]]></category>
		<category><![CDATA[EventLogAppender]]></category>

		<guid isPermaLink="false">http://blog.scooletz.com/?p=710</guid>
		<description><![CDATA[Using a library like log4net is surely helpful in your day to day app development. One of the most important cases where an entry should be logged is an application exception occurring on the production environment. It&#8217;s quite common to use Windows&#8217; event logs as a storage for log entries and log4net has a special [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=710&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Using a library like log4net is surely helpful in your day to day app development. One of the most important cases where an entry should be logged is an application exception occurring on the production environment. It&#8217;s quite common to use Windows&#8217; event logs as a storage for log entries and log4net has a special appender which is used in this cases called simply EventLogAppender. All it does by default is appending an entry to the Application event log using a parametrized event source name. It does not set an event id or a category of the entry, disabling a simple querying of entries by this param. There are imperative ways of adding one, like by adding an element EventID or Category to a dictionary <em>log4net.ThreadContext.Properties</em>. This makes you either wrap each call to log4net with a proxy (it&#8217;s useful and may be used in your project) or pollute your code with plenty of a logging logic. Can it be done in another way?</p>
<p><strong>Filter to the rescue</strong><br />
It&#8217;s not quite hard to provide a better, separated way of enhancing your log entries on the information based on the exception object being thrown. One of them is using a filter, which has an ability to access an exception by a <em>LoggingEvent</em> instance. A simple code of doing it can be found in the following gist.</p>
<p><script src="https://gist.github.com/5378807.js"></script></p>
<p>As you can see, the consts of <em>EventID</em> and <em>Category</em> are stored in the filter&#8217;s implementation as the original EventLogAppender uses inline consts to check them. Once their added they will be used by the mentioned <em>EventLogAppender</em> to mark the given entries with EventId and Category. The logic of determining them is up to you. You can hash the exception stacktrace, use <a href="http://msdn.microsoft.com/en-us/library/system.exception.source.aspx">an exception&#8217;s source property</a> or something else. At the very end remember to add this filter to your appender. Happy logging! <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scooletz.wordpress.com/710/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scooletz.wordpress.com/710/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=710&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.scooletz.com/2013/04/15/enhancing-log4net-exception-logging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/940bf1b089c3e4e4cebfa3007d162aca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scooletz</media:title>
		</media:content>
	</item>
		<item>
		<title>Learning</title>
		<link>http://blog.scooletz.com/2013/03/25/learning/</link>
		<comments>http://blog.scooletz.com/2013/03/25/learning/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 08:00:00 +0000</pubDate>
		<dc:creator>scooletz</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[learning]]></category>

		<guid isPermaLink="false">http://blog.scooletz.com/?p=701</guid>
		<description><![CDATA[How do you learn? How much time do spend on learning new things? What tools do you use? Below you can find a few my opinions, a few tools that I use. The tools I use to learn are, in the order from the most used: An interesting projects A smartphone An e-book reader Books [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=701&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>How do you learn? How much time do spend on learning new things? What tools do you use? Below you can find a few my opinions, a few tools that I use.</p>
<p>The tools I use to learn are, in the order from the most used:</p>
<ol>
<li>An interesting projects</li>
<li>A smartphone</li>
<li>An e-book reader</li>
<li>Books (yes, good, old-fashioned printed books)</li>
<li>A computer or a laptop</li>
</ol>
<p>The first and foremost is <strong>an interesting project</strong>. By a project I mean my day-to-day job (choose it wisely, it&#8217;s a lot of your time) as well as some minor things done as OSS. Under this category go also all the spikes which haven&#8217;t been finished and all the fun projects I do at home.<br />
<strong>A smartphone</strong> with a good RSS reader allows me to deal with an enormous number of blog entries published by brothers in code. The phone enables me to drag down a Twitter bar in the Android app a few times a day when I have a few spare minutes(waiting for a coffee, etc.). I&#8217;m not an addict though. I do prefer to have internet access switched off most of the time. I use it offline with no notifications etc. distracting me all the time.<br />
<strong>An e-book reader</strong> (I like to use a bigger format of one) is perfect for longer periods of time (from 20 minutes and longer). Just have a few Google whitepapers unread and stored there.<br />
I read non-technical <strong>books</strong> as well. I do like the paper versions, but sometimes they&#8217;re even harder to read than e-books (a crowded bus for instance). The time limit is also important. I tend to take one with me if I know that I&#8217;ll be able to read for more than 15, 20 minutes.<br />
<strong>A computer</strong> for watching all the <a href="http://www.infoq.com/">Infoq</a> &amp; <a href="http://skillsmatter.com/">Skillsmatter</a> presentations. When I have one hour, I take one from my list of &#8216;to watch&#8217; and watch it.</p>
<p>As you can see I have one rule: I&#8217;ve got to have sth on my to do list all the time, with different time requirements. I use it every time I have a few spare minutes. Things which may take longer (a good post on Twitter) are pushed to a to do list. The future version of me will handle it. Having a smartphone and a reader is more than enough for a standard day. Presentations watched on a computer are good for weekends or an evening spare time. I do encourage you. Make your list, assign time frames preferred by you and take a few of your knowledge sources with you. It&#8217;s worth it!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scooletz.wordpress.com/701/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scooletz.wordpress.com/701/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=701&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.scooletz.com/2013/03/25/learning/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/940bf1b089c3e4e4cebfa3007d162aca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scooletz</media:title>
		</media:content>
	</item>
		<item>
		<title>Protobuf-net: inheritance of messages</title>
		<link>http://blog.scooletz.com/2012/12/27/protobuf-net-inheritance-of-messages/</link>
		<comments>http://blog.scooletz.com/2012/12/27/protobuf-net-inheritance-of-messages/#comments</comments>
		<pubDate>Thu, 27 Dec 2012 14:45:09 +0000</pubDate>
		<dc:creator>scooletz</dc:creator>
				<category><![CDATA[Protobuf-net]]></category>
		<category><![CDATA[inheritance]]></category>
		<category><![CDATA[serialization]]></category>

		<guid isPermaLink="false">http://blog.scooletz.com/?p=692</guid>
		<description><![CDATA[The last post was an introduction to a simple project called Protopedia, located here. The project is destined to bring in a simple manner, probably one test per case, solutions for complex scenarios like versioning, derivation of messages, etc. As the versioning was described by the previous entry, it&#8217;s right time to deal with derivation. [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=692&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The <a href="http://blog.scooletz.com/2012/12/17/protobuf-net-message-versioning/">last post</a> was an introduction to a simple project called Protopedia, located <a href="https://github.com/Scooletz/Protopedia">here</a>. The project is destined to bring in a simple manner, probably one test per case, solutions for complex scenarios like versioning, derivation of messages, etc. As the versioning was described by the previous entry, it&#8217;s right time to deal with derivation.</p>
<p><strong>Inheritance</strong><br />
It&#8217;s well known fact that one should favor composition over inheritance. Dealing with derivation trees with plenty of nodes can bring any programmer to his/her knees. How about messaging? Does this rule apply also in this area? It&#8217;s common for messages to provide a common denominator, containing fields common for all messages (headers, correlation identifiers and so on), especially if they&#8217;re meant to be sent/saved as a stream of messages of the base type (example: Event Sourcing with events of a given aggregate). Using a set of messages with a distilled root greatly simplifies concerns mentioned earlier. Consider the following scenario, serialization of a collection of A messages (or its derivatives) being given the following structure:</p>
<p><img src="http://yuml.me/8c92fa40" alt="Message inheritance tree for example " /></p>
<p>How would Protobuf-net serialize such collection? First, take a look at the <a href="https://github.com/Scooletz/Protopedia/tree/master/Protopedia/Derivation">folder from Protopedia</a>. You can notice, that all the classes: A, B, C, have been mapped with different types. It&#8217;s worth to notice the ProtoInclude attributes with tag values of the types located one level deeper in the derivation tree. The second important thing is the values of the derived type tags, which do not collide with tags of the class fields. In the example, you can find a constant value of 10 used for sake of future versions of the root, the A class. As one can see in the test of the derivation, the child classed of the given class are serialized as fields with the tags equal to the tag passed in the ProtoInclude attribute. To see the fields composed in a way the Protobuf-net serializes inherited messages take a look into <a href="https://github.com/Scooletz/Protopedia/blob/master/Protopedia/Derivation/MessagesWithCompositionInsteadOfInheritance.cs">following message contracts</a>. There&#8217;s no magic and the whole idea is rather straightforward: serialize derivatives as fields, turning the inheritance into the composition. This working proposal of Protobuf-net will be sufficient and effective in all of your efforts of serialization of inheritance. Nice serializing!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scooletz.wordpress.com/692/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scooletz.wordpress.com/692/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=692&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.scooletz.com/2012/12/27/protobuf-net-inheritance-of-messages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/940bf1b089c3e4e4cebfa3007d162aca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scooletz</media:title>
		</media:content>

		<media:content url="http://yuml.me/8c92fa40" medium="image">
			<media:title type="html">Message inheritance tree for example </media:title>
		</media:content>
	</item>
		<item>
		<title>Protobuf-net: message versioning</title>
		<link>http://blog.scooletz.com/2012/12/17/protobuf-net-message-versioning/</link>
		<comments>http://blog.scooletz.com/2012/12/17/protobuf-net-message-versioning/#comments</comments>
		<pubDate>Mon, 17 Dec 2012 08:00:17 +0000</pubDate>
		<dc:creator>scooletz</dc:creator>
				<category><![CDATA[Protobuf-net]]></category>
		<category><![CDATA[message versioning]]></category>

		<guid isPermaLink="false">http://blog.scooletz.com/?p=679</guid>
		<description><![CDATA[Welcome again. Recently I&#8217;m involved in a project where Protobuf-net library is used for the message serialization concern. The Protobuf-net library was developed by Marc Gravell of Stackoverflow. Beside standard Google Protocol Buffers concepts there is a plenty of .NET based options, like handling derivation, using standard Data Contracts, etc. This is the first post [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=679&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Welcome again. Recently I&#8217;m involved in a project where <a href="http://code.google.com/p/protobuf-net/">Protobuf-net</a> library is used for the message serialization concern. The Protobuf-net library was developed by Marc Gravell of Stackoverflow. Beside standard Google Protocol Buffers concepts there is a plenty of .NET based options, like handling derivation, using standard Data Contracts, etc. This is the first post of a few, which will deal with some aspects of Protobuf-net which might be nontrivial for a beginner. Beside the posts, a project <a href="https://github.com/Scooletz/Protopedia">Protopedia</a> was created to show cases of Protobuf usages. All the examples below are stored in this repository. All the posts requires a reader to get accustomed to <a href="https://developers.google.com/protocol-buffers/">the official Google Protocol Buffers documentation</a>.</p>
<p><strong>Versioning</strong><br />
The versioning of interfaces is a standard computer science problem. How to deal with sth which was released as looking in one way and after internal changes of the system it must be changed publicly.<br />
Consider following scenario of having two versions of one message located <a href="https://github.com/Scooletz/Protopedia/blob/master/Protopedia/Versioning/Messages.cs">here</a>. As you can see, there are a few changes like the change of the name, the addition and removal of some fields. Imagine that a service A runs on the old version of the message. A sevice B uses a new version. Is it possible to send this message from A to B, and then back to A and have all the data stored in the message? With no loosing anything appended by the B service? With Protobuf&#8217;s Extensible class used as a base class it&#8217;s possible. The only thing one should remember is to do not reuse ProtoMemberAttribute tags&#8217; values of field removed in the past. New fields should always be added with new tags&#8217; values. </p>
<p><strong>How does it work?</strong><br />
When Protobufs deserialize a message, all the data with tags found in the message contract are deserialized into the specific fields, the rest of data is hold in a private &#8216;storage&#8217; of the Extensible class. During serialization, these additional fields are added to the binary form allowing another message consumer to retrieve fields according o their version of the message.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scooletz.wordpress.com/679/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scooletz.wordpress.com/679/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=679&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.scooletz.com/2012/12/17/protobuf-net-message-versioning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/940bf1b089c3e4e4cebfa3007d162aca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scooletz</media:title>
		</media:content>
	</item>
		<item>
		<title>Overvalidated design</title>
		<link>http://blog.scooletz.com/2012/12/10/overvalidated-design/</link>
		<comments>http://blog.scooletz.com/2012/12/10/overvalidated-design/#comments</comments>
		<pubDate>Mon, 10 Dec 2012 08:00:30 +0000</pubDate>
		<dc:creator>scooletz</dc:creator>
				<category><![CDATA[ASP MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://blog.scooletz.com/?p=670</guid>
		<description><![CDATA[Imagine, that you&#8217;re requested to allow adding additional validation in an ASP MVC application to properties of some models. The set of properties&#8217; types is given and contains following types: string, int, DateTime, a reference to a glossary entity. The business (why?) scenario is irrelevant and will be not exposed here. To allow MVC work [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=670&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Imagine, that you&#8217;re requested to allow adding additional validation in an ASP MVC application to properties of some models. The set of properties&#8217; types is given and contains following types: string, int, DateTime, a reference to a glossary entity. The business (why?) scenario is irrelevant and will be not exposed here.<br />
To allow MVC work nicely there are multiple ways to resolve this case. The following ways may be used:</p>
<ul>
<li>a custom <a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.modelvalidatorprovider.aspx">ModelValidatorProvider</a> implementation can be provided, which takes the validation information saved in some storage and applies to </li>
<li>an extension to <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.typedescriptor.aspx">TypeDescriptor</a> facilities, to add attributes to the specified properties</li>
</ul>
<p>But how to store this information, being given a meta description (types and their properties already mapped to entities in a database). The first take was to provide an abstract class <em>Validator</em> and try to subclass it with a fully descriptive design, allowing saving any type of parameter, with any kind of operator. You can imagine how many enums, objects (not so strongly typed API) it created.</p>
<p>The <em>&#8220;what for?&#8221;</em> question arose. Being given a set of types and possibilities of their validation why not to provide validators tightly coupled to those types? If the set of validated types is frozen, the switches can be easily replaced with visitors (very stable hierarchy), which can easily transform the given data into sth which may be used by MVC.</p>
<p><img src="http://yuml.me/43c7174c" alt="Validators data new design" /></p>
<p>Having your information about validators correlated with types, which should not be changed in a while, allows you for easier editing and storing (no more operators, objectly typed properties). The transformed values can be easily applied via <em>ModelValidator</em> or added as attributes to the <em>TypeDescriptor</em> of the given model. This approach creates a simple pipeline with a possibility of getting the procession result in any moment and inject it in the framework (ASP MVC) in a preferable way.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scooletz.wordpress.com/670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scooletz.wordpress.com/670/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=670&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.scooletz.com/2012/12/10/overvalidated-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/940bf1b089c3e4e4cebfa3007d162aca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scooletz</media:title>
		</media:content>

		<media:content url="http://yuml.me/43c7174c" medium="image">
			<media:title type="html">Validators data new design</media:title>
		</media:content>
	</item>
		<item>
		<title>How leader should answer a (technical) question</title>
		<link>http://blog.scooletz.com/2012/12/03/how-leader-should-answer-a-technical-question/</link>
		<comments>http://blog.scooletz.com/2012/12/03/how-leader-should-answer-a-technical-question/#comments</comments>
		<pubDate>Mon, 03 Dec 2012 17:12:03 +0000</pubDate>
		<dc:creator>scooletz</dc:creator>
				<category><![CDATA[Leading]]></category>
		<category><![CDATA[leading]]></category>
		<category><![CDATA[team]]></category>

		<guid isPermaLink="false">http://blog.scooletz.com/?p=667</guid>
		<description><![CDATA[Being a leader of a team means questions. Sometimes too many to answer. Questions means interruptions in your work, hence one can think about minimizing the time spent on answering. You can think of an easy solution: lets put a time limit, which exhausted one day, disallows any further questions. Yep it will limit the [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=667&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Being a leader of a team means questions. Sometimes too many to answer. Questions means interruptions in your work, hence one can think about minimizing the time spent on answering. You can think of an easy solution: lets put a time limit, which exhausted one day, disallows any further questions. Yep it will limit the time spent on answering but will it help your team as a whole? So many unanswered questions which should have been answered yesterday&#8230; It&#8217;s wrong.<br />
One can come up with an idea of limiting answer time, for instance you have no more than 5 minutes for a chat about your question. What if the meeting is ended just before the enlightenment moment? It&#8217;s wrong.<br />
My preferred way of answering one&#8217;s question is to bring even-more-than-needed insight, to not simply answer how to do it, but why it should be done this way. It&#8217;s profitable to spend even ten minutes more allowing one to think about reasoning and follow the same path. After all, when the general knowledge about the &#8216;how-to&#8217; solve the problem is passed, you will have two people in your team why can answer the same question in the future. It&#8217;s a lot of better to say &#8216;he knows how it works and can give you some information. You can analyze this together&#8217; than &#8216;this was done before. Ask this copier-of-ideas, he will show you how to paste a snippet of code&#8217;. This will reduce the chance of you being the bottleneck in your team and increase chances of self-organization.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scooletz.wordpress.com/667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scooletz.wordpress.com/667/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=667&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.scooletz.com/2012/12/03/how-leader-should-answer-a-technical-question/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/940bf1b089c3e4e4cebfa3007d162aca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scooletz</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello again</title>
		<link>http://blog.scooletz.com/2012/12/02/hello-again/</link>
		<comments>http://blog.scooletz.com/2012/12/02/hello-again/#comments</comments>
		<pubDate>Sun, 02 Dec 2012 08:22:05 +0000</pubDate>
		<dc:creator>scooletz</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.scooletz.com/?p=665</guid>
		<description><![CDATA[It&#8217;s been a while. Time to return this blog to a normal state for a blog, time to restart blogging. I do like the Jeremy&#8217;s rule to write at least one post per week and from now on I&#8217;ll follow this rule.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=665&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s been a while. Time to return this blog to a normal state for a blog, time to restart blogging. I do like the <a href="http://jeremydmiller.com/">Jeremy&#8217;s</a> rule to write at least one post per week and from now on I&#8217;ll follow this rule.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scooletz.wordpress.com/665/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scooletz.wordpress.com/665/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.scooletz.com&#038;blog=15231286&#038;post=665&#038;subd=scooletz&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.scooletz.com/2012/12/02/hello-again/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/940bf1b089c3e4e4cebfa3007d162aca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scooletz</media:title>
		</media:content>
	</item>
	</channel>
</rss>
