<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2polishfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Bartek Szafko</title><link>http://bartekszafko.pl</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BartekSzafko" /><description>all of the bits and pieces</description><language>en</language><image><link>http://bartekszafko.pl</link><url>http://0.gravatar.com/avatar/5fb44993b81dfdafc147e76d9557b6b2.png?s=48</url><title>Bartek Szafko</title></image><lastBuildDate>Tue, 06 Dec 2011 12:57:56 PST</lastBuildDate><generator>http://wordpress.org/?v=3.2.1</generator><sy:updatePeriod xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">hourly</sy:updatePeriod><sy:updateFrequency xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">1</sy:updateFrequency><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BartekSzafko" /><feedburner:info uri="bartekszafko" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FBartekSzafko" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FBartekSzafko" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2FBartekSzafko" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FBartekSzafko" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FBartekSzafko" src="http://www.newsgator.com/images/ngsub1.gif">Zapisz w NewsGator Online</feedburner:feedFlare><feedburner:feedFlare href="http://client.pluck.com/pluckit/prompt.aspx?GCID=C12286x053&amp;a=http%3A%2F%2Ffeeds.feedburner.com%2FBartekSzafko" src="http://www.pluck.com/images/rss-pluck.gif">Zapisz w czytniku Pluck RSS</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FBartekSzafko" src="http://o.aolcdn.com/myfeeds/html/vis/myaol_cta1.gif">Zapisz w My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/BartekSzafko" src="http://www.bloglines.com/images/sub_modern11.gif">Zapisz w Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FBartekSzafko" src="http://www.netvibes.com/img/add2netvibes.gif">Dodaj do netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FBartekSzafko" src="http://buttons.googlesyndication.com/fusion/add.gif">Dodaj do Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.addtoany.com/?linkname=Bartek%20Szafko&amp;linkurl=http%3A%2F%2Ffeeds.feedburner.com%2FBartekSzafko&amp;type=feed" src="http://www.addtoany.com/addfr-b.gif">Add to Any Feed Reader</feedburner:feedFlare><item><title>Static keyword is the source of all evil, well almost</title><link>http://feedproxy.google.com/~r/BartekSzafko/~3/N-fbaXZMWos/</link><category>.NET</category><category>Development</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bartłomiej Szafko</dc:creator><pubDate>Tue, 06 Dec 2011 12:53:28 PST</pubDate><guid isPermaLink="false">http://bartekszafko.pl/?p=812</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><!-- tweet id : 109724557560119296 --><style type='text/css'>#bbpBox_109724557560119296 a { text-decoration:none; color:#0084B4; }#bbpBox_109724557560119296 a:hover { text-decoration:underline; }</style><div id='bbpBox_109724557560119296' class='bbpBox' style='padding:20px; margin:5px 0; background-color:#C0DEED; background-image:url(http://a0.twimg.com/images/themes/theme1/bg.png); background-repeat:no-repeat'><div style='background:#fff; padding:10px; margin:0; min-height:48px; color:#333333; -moz-border-radius:5px; -webkit-border-radius:5px;'><span style='width:100%; font-size:18px; line-height:22px;'>Everytime someone uses static keyword in c# a sweet kitten is slain with a hammer kthxbye</span><div class='bbp-actions' style='font-size:12px; width:100%; padding:5px 0; margin:0 0 10px 0; border-bottom:1px solid #e6e6e6;'><img align='middle' src='http://bartekszafko.pl/wp-content/plugins/twitter-blackbird-pie//images/bird.png' /><a title='tweeted on 02-09-2011 22:29' href='http://twitter.com/#!/bszafko/status/109724557560119296' target='_blank'>02-09-2011 22:29</a> via <a href="http://twitter.com/download/android" rel="nofollow" target="blank">Twitter for Android</a><a href='https://twitter.com/intent/tweet?in_reply_to=109724557560119296' class='bbp-action bbp-reply-action' title='Reply'><span><em style='margin-left: 1em;'></em><strong>Reply</strong></span></a><a href='https://twitter.com/intent/retweet?tweet_id=109724557560119296' class='bbp-action bbp-retweet-action' title='Retweet'><span><em style='margin-left: 1em;'></em><strong>Retweet</strong></span></a><a href='https://twitter.com/intent/favorite?tweet_id=109724557560119296' class='bbp-action bbp-favorite-action' title='Favorite'><span><em style='margin-left: 1em;'></em><strong>Favorite</strong></span></a></div><div style='float:left; padding:0; margin:0'><a href='http://twitter.com/intent/user?screen_name=bszafko'><img style='width:48px; height:48px; padding-right:7px; border:none; background:none; margin:0' src='http://a2.twimg.com/profile_images/321066047/avatar_bartek_normal.jpg' /></a></div><div style='float:left; padding:0; margin:0'><a style='font-weight:bold' href='http://twitter.com/intent/user?screen_name=bszafko'>@bszafko</a><div style='margin:0; padding-top:2px'>Bartek Szafko</div></div><div style='clear:both'></div></div></div><!-- end of tweet -->
<p><span id="more-812"></span>This is something that has been on my mind for quite some time. I see a lot of APIs being built on static methods and classes. I personally think it&#8217;s a huge mistake because of:</p>
<ul>
<li>testability: mocking static classes/methods is a very difficult endavour, i have yet heard of one mocking library that allows such kind of things</li>
<li>readability : when you take a class that  heavily relies on  some kind of  static APIs the dependency is not immediately visible and may cause significant problems in refactoring</li>
</ul>
<p>The static keyword is definitely overused in most code written in .NET maybe because it&#8217;s a path of least resistance&#8230;.</p>
<p>We don&#8217;t have to look very far for an example: let&#8217;s take a most obvious and common &#8211; HttpContext. Fortunately in that case there is even some help from Microsoft  in form of Microsoft.Web.Abstractions.</p>
<p>Most of the time what you really want/need is single instance or per request lifetime and it should be expressed in configuration not in code. It&#8217;s a lot easier when you use a brand new shiny asp .net mvc where you can easily plug a container which deals with that kind of things. In webforms it&#8217;s not that easy.</p>
<p>That said I&#8217;m not totally against statics, they are quite handy in some situations ( extension methods yay). I&#8217;m just urging for caution. So be careful.<br/><strong>Inne podobne artykuły:</strong>
<ul class="similar-posts">
<li><a href="http://bartekszafko.pl/2011/07/25/project-silk-subjective-review-part-3-ioc-a-problem-child/" rel="bookmark" title="25-07-2011">Project Silk subjective review part 3 IoC a problem child</a></li>
<li><a href="http://bartekszafko.pl/2010/03/22/wpf-konwertery-w-xamlu/" rel="bookmark" title="22-03-2010">WPF: Konwertery w XAMLu</a></li>
<li><a href="http://bartekszafko.pl/2011/07/20/project-silk-subjective-review-part-2-no-ddd-no-cqrs-and-mighty-handlers-of-doom/" rel="bookmark" title="20-07-2011">Project Silk subjective review part 2 no DDD, no CQRS and mighty handlers of doom</a></li>
<li><a href="http://bartekszafko.pl/2006/04/10/copysourceashtml-2005/" rel="bookmark" title="10-04-2006">CopySourceAsHTML 2005</a></li>
<li><a href="http://bartekszafko.pl/2008/06/03/x64-an-x86-interop-in-net/" rel="bookmark" title="03-06-2008">x64 an x86 interop in .NET</a></li>
</ul>
<p><!-- Similar Posts took 18.760 ms --></p>
<a href="http://bartekszafko.pl//2006/04/22/my-bio/"><img class="frame" src="http://bartekszafko.pl/wp-content/uploads/bszafko_avatar.jpg" alt="Bartek Szafko" border="0" style="float:left; border:1px solid #A9A9A9; margin:6px;padding:4px;position:relative;"></a>This post was originally published on <a href="http://bartekszafko.pl">Bartek Szafko blog</a><br style="clear:both"/> 81401c6e400a1ca19bd490938dc3548e</small><div class="shr-publisher-812"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F12%2F06%2Fstatic-keyword-is-the-source-of-all-evil-well-almost%2F' data-shr_title='Static+keyword+is+the+source+of+all+evil%2C+well+almost'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F12%2F06%2Fstatic-keyword-is-the-source-of-all-evil-well-almost%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F12%2F06%2Fstatic-keyword-is-the-source-of-all-evil-well-almost%2F' data-shr_title='Static+keyword+is+the+source+of+all+evil%2C+well+almost'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=N-fbaXZMWos:BxuKdOFiNhQ:tF1tbY45p4M"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=tF1tbY45p4M" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=N-fbaXZMWos:BxuKdOFiNhQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=N-fbaXZMWos:BxuKdOFiNhQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=N-fbaXZMWos:BxuKdOFiNhQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=N-fbaXZMWos:BxuKdOFiNhQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=N-fbaXZMWos:BxuKdOFiNhQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=N-fbaXZMWos:BxuKdOFiNhQ:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BartekSzafko/~4/N-fbaXZMWos" height="1" width="1"/>]]></content:encoded><description>This is something that has been on my mind for quite some time. I see a lot of APIs being built on static methods and classes. I personally think it&amp;#8217;s a huge mistake because of: testability: mocking static classes/methods is a very difficult endavour, i have yet heard of one mocking library that allows such kind [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bartekszafko.pl/2011/12/06/static-keyword-is-the-source-of-all-evil-well-almost/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">5</slash:comments><feedburner:origLink>http://bartekszafko.pl/2011/12/06/static-keyword-is-the-source-of-all-evil-well-almost/</feedburner:origLink></item><item><title>Integrating WCF services with forms authentication</title><link>http://feedproxy.google.com/~r/BartekSzafko/~3/iv77DLBIgDU/</link><category>.NET</category><category>Development</category><category>error handler</category><category>forms authentication</category><category>service behavior</category><category>wcf</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bartłomiej Szafko</dc:creator><pubDate>Sun, 25 Sep 2011 10:51:31 PDT</pubDate><guid isPermaLink="false">http://bartekszafko.pl/?p=801</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>A colleague at work wanted to host a json wcf service inside a web application and call it from jquery on an aspx reataining all authentication info. The web app used forms authentication. Luckily jquery passed all authentication info but WCF didn’t use it.</p>
<p><span id="more-801"></span></p>
<p>We started by looking at similar MVC solution with authorize attribute and filters, unfortunately it was not a good idea. But then i remembered that before authorize attribute and filters were implemented in MVC I used a PrincipalPermission attribute (more on this in <a href="http://bartekszafko.pl/2008/06/12/chron-swoje-akcje-w-mvc/">blog post</a> only in polish). PrincipalPermission is a standard System.Security mechanism to limit access to methods. So I implemented my service as follows:</p>
<pre class="c#" name="code">[ServiceContract]
[AspNetCompatibilityRequirements(
RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
public class TestService
{
	[WebGet(UriTemplate = "/DoWork", ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Authenticated = true)]
        public string DoWork()
        {
            return DateTime.Now.ToString();
        }
}</pre>
<p>Everything was fine but the service did not work even when the user was logged in. It turns out that PrincipalPermission is used from within CheckAccess but it uses Thread.CurrentPrincipal to check current identity and because we are working within web app identity is stored in HttpContext.Current.User. One solution is to copy identity in service constructor but it’s not quite as elegant, so I came up with a service behavior:</p>
<pre class="c#" name="code">public class UseFormsAutenticationMessageInspector :
	IDispatchMessageInspector
{
        public UseFormsAutenticationMessageInspector()
        {
        }

        public object AfterReceiveRequest(
		ref Message request,
		IClientChannel channel,
		InstanceContext instanceContext)
        {
            Thread.CurrentPrincipal = HttpContext.Current.User;
            return null;
        }

        public void BeforeSendReply(
		ref Message reply,
		object correlationState)
        {
        }
}</pre>
<p>That seemed to work fine except it returned http status code 400 (bad request) when the user was not logged in and we wanted to have it return 403 forbidden. The answer was another service behavior which would add ErrorHandler which handles SecurityException. The only problem was that the error handler didn’t get a SecurityException but a FaultException. After some digging I wrote following error handler</p>
<pre class="c#" name="code">    public class SecurityExceptionErrorHandler : IErrorHandler
    {

        public bool HandleError(Exception error)
        {
            return false;
        }

        public void ProvideFault(
            Exception error,
            MessageVersion version,
            ref Message fault)
        {
            FaultException f = error as FaultException;
            if ( f == null || f.Code.SubCode.Name != "FailedAuthentication"  )
                return;

            fault = Message.CreateMessage(version, String.Empty);

            HttpResponseMessageProperty rmp = new HttpResponseMessageProperty();

            rmp.StatusCode = System.Net.HttpStatusCode.Forbidden;
            rmp.StatusDescription = "Forbidden";

            fault.Properties.Add(HttpResponseMessageProperty.Name, rmp);

            OperationContext.Current.RequestContext.Reply(fault);
        }

    }</pre>
<p>And a corresponding service behavior:</p>
<pre class="c#" name="code">    public class HandleSecurityExceptionAttribute : Attribute, IServiceBehavior
    {

        public void AddBindingParameters(
            ServiceDescription serviceDescription,
            ServiceHostBase serviceHostBase,
            Collection&lt;ServiceEndpoint&gt; endpoints,
            BindingParameterCollection bindingParameters)
        {
        }

        public void ApplyDispatchBehavior(
            ServiceDescription serviceDescription,
            ServiceHostBase serviceHostBase)
        {
            foreach (ChannelDispatcherBase chanDisp in serviceHostBase.ChannelDispatchers)
            {
                ChannelDispatcher disp = chanDisp as ChannelDispatcher;
                disp.ErrorHandlers.Add(new SecurityExceptionErrorHandler());
            }
        }

        public void Validate(
            ServiceDescription serviceDescription,
            ServiceHostBase serviceHostBase)
        {
        }
    }</pre>
<p>The final service looks like this:</p>
<pre class="c#" name="code">    [UseFormsAuthentication]
    [HandleSecurityException]
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class TestService
    {
        [WebGet(UriTemplate = "/DoWork", ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Authenticated = true)]
        public string DoWork()
        {
            return DateTime.Now.ToString();
        }
    }</pre>
<p><br/><strong>Inne podobne artykuły:</strong>
<ul class="similar-posts">
<li><a href="http://bartekszafko.pl/2008/11/29/en-wpf-ribbon-in-prism-applications/" rel="bookmark" title="29-11-2008">[EN] WPF: Ribbon in Prism Applications</a></li>
<li><a href="http://bartekszafko.pl/2011/07/25/project-silk-subjective-review-part-3-ioc-a-problem-child/" rel="bookmark" title="25-07-2011">Project Silk subjective review part 3 IoC a problem child</a></li>
<li><a href="http://bartekszafko.pl/2008/11/23/o-wstazce-w-pryzmacie-ribbon-prism/" rel="bookmark" title="23-11-2008">O wstążce w pryzmacie ( Ribbon + Prism)</a></li>
<li><a href="http://bartekszafko.pl/2006/04/10/copysourceashtml-2005/" rel="bookmark" title="10-04-2006">CopySourceAsHTML 2005</a></li>
<li><a href="http://bartekszafko.pl/2008/06/03/x64-an-x86-interop-in-net/" rel="bookmark" title="03-06-2008">x64 an x86 interop in .NET</a></li>
</ul>
<p><!-- Similar Posts took 27.573 ms --></p>
<a href="http://bartekszafko.pl//2006/04/22/my-bio/"><img class="frame" src="http://bartekszafko.pl/wp-content/uploads/bszafko_avatar.jpg" alt="Bartek Szafko" border="0" style="float:left; border:1px solid #A9A9A9; margin:6px;padding:4px;position:relative;"></a>This post was originally published on <a href="http://bartekszafko.pl">Bartek Szafko blog</a><br style="clear:both"/> 81401c6e400a1ca19bd490938dc3548e</small><div class="shr-publisher-801"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F09%2F25%2Fintegrating-wcf-services-with-forms-authentication%2F' data-shr_title='Integrating+WCF+services+with+forms+authentication'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F09%2F25%2Fintegrating-wcf-services-with-forms-authentication%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F09%2F25%2Fintegrating-wcf-services-with-forms-authentication%2F' data-shr_title='Integrating+WCF+services+with+forms+authentication'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=iv77DLBIgDU:YIvnduGbo98:tF1tbY45p4M"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=tF1tbY45p4M" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=iv77DLBIgDU:YIvnduGbo98:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=iv77DLBIgDU:YIvnduGbo98:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=iv77DLBIgDU:YIvnduGbo98:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=iv77DLBIgDU:YIvnduGbo98:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=iv77DLBIgDU:YIvnduGbo98:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=iv77DLBIgDU:YIvnduGbo98:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BartekSzafko/~4/iv77DLBIgDU" height="1" width="1"/>]]></content:encoded><description>A colleague at work wanted to host a json wcf service inside a web application and call it from jquery on an aspx reataining all authentication info. The web app used forms authentication. Luckily jquery passed all authentication info but WCF didn’t use it. We started by looking at similar MVC solution with authorize attribute [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bartekszafko.pl/2011/09/25/integrating-wcf-services-with-forms-authentication/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://bartekszafko.pl/2011/09/25/integrating-wcf-services-with-forms-authentication/</feedburner:origLink></item><item><title>Reading Continuous Delivery book</title><link>http://feedproxy.google.com/~r/BartekSzafko/~3/JLT8bfO-mlk/</link><category>Books</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bartłomiej Szafko</dc:creator><pubDate>Wed, 24 Aug 2011 21:00:08 PDT</pubDate><guid isPermaLink="false">http://bartekszafko.pl/?p=789</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div>I saw Continuous Delivery pop up on the ThoguhtWorks Radar and was curious about it. I decied to look into &#8220;Continuous Delivery:Reliable Software Releases through Build, Test, and Deployment Automation&#8221; book by Jez Humble and David Farley.</div>
<div><span id="more-789"></span></div>
<p><a href="http://bartekszafko.pl/wp-content/uploads/2011/08/51UYBHnvjFL._BO2204203200_PIsitb-sticker-arrow-clickTopRight35-76_AA300_SH20_OU01_.jpg"><img class="alignleft size-full wp-image-795" title="51UYBHnvjFL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_" src="http://bartekszafko.pl/wp-content/uploads/2011/08/51UYBHnvjFL._BO2204203200_PIsitb-sticker-arrow-clickTopRight35-76_AA300_SH20_OU01_.jpg" alt="" width="300" height="300" /></a>Here are some of my takeaways:</p>
<ol>
<li>Continous Delivery is more than Continuous Integration it&#8217;s about delivering software to clients hands and shortening feedback loop.</li>
<li>How long does it take to publish a single line of code modification to a client? Hours ? That&#8217;s too long!</li>
<li>Is deployment process manual? How often does it fail? Manual deployment is not repeatable and auditable. People are error prone despite even a very good manual every deployment may  differ. The answer it to automate everything. The deployment script is the ultimate documentation and it&#8217;s always kept accurate.</li>
<li>Deployment makes you nervous? Is deployment to production a big deal for you ? If the answer is yes then you probably do it too seldom if you deploy(to test or stage) on daily basis the scripts are ready for the prime time. This brings up another issue it&#8217;s crucial that you deploy using same tools on every environment including your internal systems.</li>
<li>Deployment does not produce business value and is boring.</li>
<li>Build a pipeline encompassing all of the steps(including testing). If something in the pipeline fails halt the line.</li>
<li>Do it early do it often, that way if something is wrong you know ahead of time. Sounds kind of agile <img src='http://bartekszafko.pl/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ol>
<p>That&#8217;s only from the first chapter.</p>
<p>The book, in my opinion, is worth reading.</p>
<p>And as an addition something I heard some time ago which came to my mind when I started reading the book &#8211; the law of  three strikes and you automate:</p>
<blockquote><p>The first time you do something, you just do it manually.<br />
The second time you do something similar, you wince at the repetition, but you do it anyway.<br />
The third time you do something similar, you automate</p></blockquote>
<a href="http://bartekszafko.pl//2006/04/22/my-bio/"><img class="frame" src="http://bartekszafko.pl/wp-content/uploads/bszafko_avatar.jpg" alt="Bartek Szafko" border="0" style="float:left; border:1px solid #A9A9A9; margin:6px;padding:4px;position:relative;"></a>This post was originally published on <a href="http://bartekszafko.pl">Bartek Szafko blog</a><br style="clear:both"/> 81401c6e400a1ca19bd490938dc3548e</small><div class="shr-publisher-789"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F08%2F25%2Freading-continous-delivery-book%2F' data-shr_title='Reading+Continuous+Delivery+book+'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F08%2F25%2Freading-continous-delivery-book%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F08%2F25%2Freading-continous-delivery-book%2F' data-shr_title='Reading+Continuous+Delivery+book+'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=JLT8bfO-mlk:nPBDDa04C-U:tF1tbY45p4M"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=tF1tbY45p4M" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=JLT8bfO-mlk:nPBDDa04C-U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=JLT8bfO-mlk:nPBDDa04C-U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=JLT8bfO-mlk:nPBDDa04C-U:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=JLT8bfO-mlk:nPBDDa04C-U:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=JLT8bfO-mlk:nPBDDa04C-U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=JLT8bfO-mlk:nPBDDa04C-U:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BartekSzafko/~4/JLT8bfO-mlk" height="1" width="1"/>]]></content:encoded><description>I saw Continuous Delivery pop up on the ThoguhtWorks Radar and was curious about it. I decied to look into &amp;#8220;Continuous Delivery:Reliable Software Releases through Build, Test, and Deployment Automation&amp;#8221; book by Jez Humble and David Farley. Here are some of my takeaways: Continous Delivery is more than Continuous Integration it&amp;#8217;s about delivering software to [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bartekszafko.pl/2011/08/25/reading-continous-delivery-book/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://bartekszafko.pl/2011/08/25/reading-continous-delivery-book/</feedburner:origLink></item><item><title>Project Silk subjective review part 3 IoC a problem child</title><link>http://feedproxy.google.com/~r/BartekSzafko/~3/bOcw8QLFbFc/</link><category>.NET</category><category>review</category><category>p&amp;p</category><category>silk</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bartłomiej Szafko</dc:creator><pubDate>Sun, 24 Jul 2011 21:03:30 PDT</pubDate><guid isPermaLink="false">http://bartekszafko.pl/?p=742</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This is part 3 of my <a href="http://silk.codeplex.com/">http://silk.codeplex.com/</a> review.</p>
<p>IoC miss usage is a most common problem in many applications and first thing I usually look at.</p>
<p><span id="more-742"></span></p>
<p>I choose random action method called Add from FillupController:</p>
<p><a href="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-022.png"><img class="size-full wp-image-756 aligncenter" title="mileage stats 02" src="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-022.png" alt="" width="700" height="585" /></a></p>
<p>Do you see that Using stuff, let&#8217;s have a look:</p>
<p><a href="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-03.png"><img class="aligncenter size-full wp-image-757" title="mileage stats 03" src="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-03.png" alt="" width="394" height="155" /></a>Duh, so it&#8217;s says we are creating an object using service locator, not a good practice.</p>
<p>What is more curious the FillUpController has no properties at all:</p>
<p><a href="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-04.png"><img class="aligncenter size-full wp-image-758" title="mileage stats 04" src="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-04.png" alt="" width="426" height="179" /></a></p>
<p>On the other hand there is a custom controller resolver which uses IoC Container.</p>
<p>Now testing a controller requires mocking IoC controller:</p>
<p><img class="aligncenter size-full wp-image-759" title="mileage stats 05" src="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-05.png" alt="" width="687" height="275" /></p>
<h4>What I would do</h4>
<ul>
<li>The simplest thing: extract interfaces from all instances resolved with Using  register it in container and just put a property dependency.</li>
<li>When you look closer at all that Using calls it&#8217;s kind of miss implemented CQRS( with all that handlers stuff in my last post), but the if project is so simple so why bother?</li>
</ul>
<p><br/><strong>Inne podobne artykuły:</strong>
<ul class="similar-posts">
<li><a href="http://bartekszafko.pl/2011/01/23/enprism-windsorextensions-now-as-a-nuget-package/" rel="bookmark" title="23-01-2011">[EN]Prism.WindsorExtensions &ndash; now as a Nuget Package</a></li>
<li><a href="http://bartekszafko.pl/2011/07/20/project-silk-subjective-review-part-2-no-ddd-no-cqrs-and-mighty-handlers-of-doom/" rel="bookmark" title="20-07-2011">Project Silk subjective review part 2 no DDD, no CQRS and mighty handlers of doom</a></li>
<li><a href="http://bartekszafko.pl/2011/07/19/project-silk-subjective-review-part-1/" rel="bookmark" title="19-07-2011">Project Silk subjective review part 1</a></li>
<li><a href="http://bartekszafko.pl/2011/12/06/static-keyword-is-the-source-of-all-evil-well-almost/" rel="bookmark" title="06-12-2011">Static keyword is the source of all evil, well almost</a></li>
<li><a href="http://bartekszafko.pl/2011/01/06/enprism-windsorextensions-use-castle-windsor-with-prism/" rel="bookmark" title="06-01-2011">[EN]Prism.WindsorExtensions &ndash; Use Castle.Windsor with Prism</a></li>
</ul>
<p><!-- Similar Posts took 21.785 ms --></p>
<a href="http://bartekszafko.pl//2006/04/22/my-bio/"><img class="frame" src="http://bartekszafko.pl/wp-content/uploads/bszafko_avatar.jpg" alt="Bartek Szafko" border="0" style="float:left; border:1px solid #A9A9A9; margin:6px;padding:4px;position:relative;"></a>This post was originally published on <a href="http://bartekszafko.pl">Bartek Szafko blog</a><br style="clear:both"/> 81401c6e400a1ca19bd490938dc3548e</small><div class="shr-publisher-742"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F07%2F25%2Fproject-silk-subjective-review-part-3-ioc-a-problem-child%2F' data-shr_title='Project+Silk+subjective+review+part+3+IoC+a+problem+child'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F07%2F25%2Fproject-silk-subjective-review-part-3-ioc-a-problem-child%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F07%2F25%2Fproject-silk-subjective-review-part-3-ioc-a-problem-child%2F' data-shr_title='Project+Silk+subjective+review+part+3+IoC+a+problem+child'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=bOcw8QLFbFc:feZ6iHnWDkw:tF1tbY45p4M"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=tF1tbY45p4M" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=bOcw8QLFbFc:feZ6iHnWDkw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=bOcw8QLFbFc:feZ6iHnWDkw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=bOcw8QLFbFc:feZ6iHnWDkw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=bOcw8QLFbFc:feZ6iHnWDkw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=bOcw8QLFbFc:feZ6iHnWDkw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=bOcw8QLFbFc:feZ6iHnWDkw:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BartekSzafko/~4/bOcw8QLFbFc" height="1" width="1"/>]]></content:encoded><description>This is part 3 of my http://silk.codeplex.com/ review. IoC miss usage is a most common problem in many applications and first thing I usually look at. I choose random action method called Add from FillupController: Do you see that Using stuff, let&amp;#8217;s have a look: Duh, so it&amp;#8217;s says we are creating an object using service [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bartekszafko.pl/2011/07/25/project-silk-subjective-review-part-3-ioc-a-problem-child/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://bartekszafko.pl/2011/07/25/project-silk-subjective-review-part-3-ioc-a-problem-child/</feedburner:origLink></item><item><title>Project Silk subjective review part 2 no DDD, no CQRS and mighty handlers of doom</title><link>http://feedproxy.google.com/~r/BartekSzafko/~3/0QE-gsDl0QM/</link><category>.NET</category><category>review</category><category>p&amp;p</category><category>silk</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bartłomiej Szafko</dc:creator><pubDate>Tue, 19 Jul 2011 21:00:35 PDT</pubDate><guid isPermaLink="false">http://bartekszafko.pl/?p=748</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This is part 2 of my <a href="http://silk.codeplex.com/">http://silk.codeplex.com/</a> review.</p>
<p>In docs there is no mention about DDD or CQRS.  That&#8217;s great because app seems to be fairly simple and CRUD should suffice. But when you look at folder structure this pops up:</p>
<p><a href="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-01.png"><img class="aligncenter size-full wp-image-749" title="mileage stats 01" src="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-01.png" alt="" width="209" height="73" /></a>Hmmm so there is a domain, and a model (separate ? ) and there are some services&#8230;</p>
<p><span id="more-748"></span></p>
<h3>The domain</h3>
<p>Going into MileageStats.Model and looking through the classes  - they look very anemic. Looking through how the classes are used reveals it is used as a domain model.</p>
<p>Now MileageStats.Domain even more interesting:</p>
<p><a href="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-06.png"><img class="aligncenter size-full wp-image-769" title="mileage stats 06" src="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-06.png" alt="" width="210" height="249" /></a></p>
<p>There is another model:</p>
<p><a href="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-07.png"><img class="aligncenter size-full wp-image-770" title="mileage stats 07" src="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-07.png" alt="" width="227" height="249" /></a>After looking at how it is used &#8211; it&#8217;s a Read Model! So what the heck is it doing in Domain? It should be placed in a separate project.</p>
<h3>Mighty handlers of doom</h3>
<p>Let&#8217;s go back to MileaseStats.Domain.Handlers. Name implies there is some kind of messaging(commands/events or cqrs even?) right? Let&#8217;s have a look at AddFillupToVehicle:</p>
<p><a href="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-08.png"><img class="aligncenter size-full wp-image-771" title="mileage stats 08" src="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-08.png" alt="" width="768" height="536" /></a>Hmm, these handlers have a lot of business logic, but according to <a href="http://elegantcode.com/2009/11/11/cqrs-la-greg-young/">Greg Young</a> :</p>
<blockquote><p>The responsibility of these <strong>command</strong><strong>handlers</strong> is to execute the appropriate behavior on the domain.</p>
<p>The <strong>command</strong> handler<strong>should</strong> not be doing any domain logic itself. If there is a need for this than that logic <strong>should</strong> be moved into a service of its own.</p></blockquote>
<p>Oh and handlers are used to get domain data from repository:<a href="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-09.png"><img class="aligncenter size-full wp-image-772" title="mileage stats 09" src="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-09.png" alt="" width="693" height="184" /></a></p>
<p>And also to do validation:</p>
<p><a href="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-10.png"><img class="size-full wp-image-773 aligncenter" title="mileage stats 10" src="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-10.png" alt="" width="747" height="201" /></a>And to get read model data:</p>
<p><a href="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-11.png"><img class="aligncenter size-full wp-image-774" title="mileage stats 11" src="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-11.png" alt="" width="542" height="164" /></a>Now that is a lot of responsibility for handlers&#8230;.</p>
<h3>Using handlers</h3>
<p><a href="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-12.png"><img class="aligncenter size-full wp-image-778" title="mileage stats 12" src="http://bartekszafko.pl/wp-content/uploads/2011/07/mileage-stats-12.png" alt="" width="516" height="224" /></a>Duh, creating handlers a in controller action, so there is no bus or any other messaging infrastructure.</p>
<p>That &#8220;Using&#8221; part is also interesting but that&#8217;s a topic for a next post.<br/><strong>Inne podobne artykuły:</strong>
<ul class="similar-posts">
<li><a href="http://bartekszafko.pl/2006/01/28/dotnetnuke/" rel="bookmark" title="28-01-2006">DotNetNuke</a></li>
<li><a href="http://bartekszafko.pl/2011/09/25/integrating-wcf-services-with-forms-authentication/" rel="bookmark" title="25-09-2011">Integrating WCF services with forms authentication</a></li>
<li><a href="http://bartekszafko.pl/2011/07/25/project-silk-subjective-review-part-3-ioc-a-problem-child/" rel="bookmark" title="25-07-2011">Project Silk subjective review part 3 IoC a problem child</a></li>
<li><a href="http://bartekszafko.pl/2011/07/19/project-silk-subjective-review-part-1/" rel="bookmark" title="19-07-2011">Project Silk subjective review part 1</a></li>
<li><a href="http://bartekszafko.pl/2011/12/06/static-keyword-is-the-source-of-all-evil-well-almost/" rel="bookmark" title="06-12-2011">Static keyword is the source of all evil, well almost</a></li>
</ul>
<p><!-- Similar Posts took 20.593 ms --></p>
<a href="http://bartekszafko.pl//2006/04/22/my-bio/"><img class="frame" src="http://bartekszafko.pl/wp-content/uploads/bszafko_avatar.jpg" alt="Bartek Szafko" border="0" style="float:left; border:1px solid #A9A9A9; margin:6px;padding:4px;position:relative;"></a>This post was originally published on <a href="http://bartekszafko.pl">Bartek Szafko blog</a><br style="clear:both"/> 81401c6e400a1ca19bd490938dc3548e</small><div class="shr-publisher-748"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F07%2F20%2Fproject-silk-subjective-review-part-2-no-ddd-no-cqrs-and-mighty-handlers-of-doom%2F' data-shr_title='Project+Silk+subjective+review+part+2+no+DDD%2C+no+CQRS+and+mighty+handlers+of+doom'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F07%2F20%2Fproject-silk-subjective-review-part-2-no-ddd-no-cqrs-and-mighty-handlers-of-doom%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F07%2F20%2Fproject-silk-subjective-review-part-2-no-ddd-no-cqrs-and-mighty-handlers-of-doom%2F' data-shr_title='Project+Silk+subjective+review+part+2+no+DDD%2C+no+CQRS+and+mighty+handlers+of+doom'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=0QE-gsDl0QM:2Xj0fqPsZuY:tF1tbY45p4M"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=tF1tbY45p4M" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=0QE-gsDl0QM:2Xj0fqPsZuY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=0QE-gsDl0QM:2Xj0fqPsZuY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=0QE-gsDl0QM:2Xj0fqPsZuY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=0QE-gsDl0QM:2Xj0fqPsZuY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=0QE-gsDl0QM:2Xj0fqPsZuY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=0QE-gsDl0QM:2Xj0fqPsZuY:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BartekSzafko/~4/0QE-gsDl0QM" height="1" width="1"/>]]></content:encoded><description>This is part 2 of my http://silk.codeplex.com/ review. In docs there is no mention about DDD or CQRS.  That&amp;#8217;s great because app seems to be fairly simple and CRUD should suffice. But when you look at folder structure this pops up: Hmmm so there is a domain, and a model (separate ? ) and there are [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bartekszafko.pl/2011/07/20/project-silk-subjective-review-part-2-no-ddd-no-cqrs-and-mighty-handlers-of-doom/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">2</slash:comments><feedburner:origLink>http://bartekszafko.pl/2011/07/20/project-silk-subjective-review-part-2-no-ddd-no-cqrs-and-mighty-handlers-of-doom/</feedburner:origLink></item><item><title>Project Silk subjective review part 1</title><link>http://feedproxy.google.com/~r/BartekSzafko/~3/DmUgT96Yh8g/</link><category>.NET</category><category>review</category><category>p&amp;p</category><category>silk</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bartłomiej Szafko</dc:creator><pubDate>Mon, 18 Jul 2011 21:00:53 PDT</pubDate><guid isPermaLink="false">http://bartekszafko.pl/?p=744</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Microsoft&#8217;s Patterns &amp; Practices published a new guidance called Silk (<a href="http://silk.codeplex.com/">http://silk.codeplex.com/</a>):</p>
<blockquote><p>Project Silk provides guidance for building cross-browser web applications with a focus on client-side interactivity. These applications take advantage of the latest web standards like HTML5, CSS3 and ECMAScript 5 along with modern web technologies such as jQuery, Internet Explorer 9, and ASP.NET MVC3.</p></blockquote>
<p>Inspired by<a href="http://ayende.com/blog/tags/reviews"> Ayende&#8217;s review of a similar app</a> I decided to write my own.</p>
<h3><span id="more-744"></span>Politics</h3>
<p>Silk release coincides with rumors about windows 8. When you look side by side on new win8 shots and silk they look quite similar. I belive Silk quidance will be to Windows 8 just like Prism(CAL) was to WPF and Silverlight.</p>
<p>If it seems to be that important it&#8217;s really worth to have a closer look.</p>
<h3>MileageStats</h3>
<p>Project Silk seems to have a broader perspective,  for now only one reference implementation is provided:</p>
<blockquote><p>To illustrate this guidance, the project includes a reference implementation called Mileage Stats that enables its users to track various metrics about their vehicles and fill-ups. Much of the effort in building Mileage Stats was applied to the usability and interactivity of the experience. Animations were included to enhance the enjoyment of the site and AJAX is used to keep the interface responsive and immersive. A great deal of care was also taken to ensure the client-side JavaScript facilitates modularity and maintainability. To accomplish these design goals, the JavaScript code was structured into “widgets” that benefit from the jQuery UI Widget Factory.</p></blockquote>
<p><span style="font-size: 15px; font-weight: bold;">Disclaimer</span></p>
<p>Silk project is really interesting, definitely worth a look and there are some very cool parts. But in my opinion you shouldn&#8217;t follow <strong>any</strong> guidance blindly. In my review I will focus on parts which in my personal opinion have room for improvements. Anyway i&#8217;m open to discussion should you have different opinion.</p>
<p>PS: My review is based on <a id="ReleaseAssociationLink0" href="http://silk.codeplex.com/releases/view/69914">Project Silk Community Drop 13 &#8211; July 12, 2011</a>.<br/><strong>Inne podobne artykuły:</strong>
<ul class="similar-posts">
<li><a href="http://bartekszafko.pl/2006/01/28/dotnetnuke/" rel="bookmark" title="28-01-2006">DotNetNuke</a></li>
<li><a href="http://bartekszafko.pl/2011/07/25/project-silk-subjective-review-part-3-ioc-a-problem-child/" rel="bookmark" title="25-07-2011">Project Silk subjective review part 3 IoC a problem child</a></li>
<li><a href="http://bartekszafko.pl/2011/07/20/project-silk-subjective-review-part-2-no-ddd-no-cqrs-and-mighty-handlers-of-doom/" rel="bookmark" title="20-07-2011">Project Silk subjective review part 2 no DDD, no CQRS and mighty handlers of doom</a></li>
<li><a href="http://bartekszafko.pl/2008/05/07/tortoisemigrate/" rel="bookmark" title="07-05-2008">TortoiseMigrate</a></li>
<li><a href="http://bartekszafko.pl/2011/01/06/enprism-windsorextensions-use-castle-windsor-with-prism/" rel="bookmark" title="06-01-2011">[EN]Prism.WindsorExtensions &ndash; Use Castle.Windsor with Prism</a></li>
</ul>
<p><!-- Similar Posts took 25.051 ms --></p>
<a href="http://bartekszafko.pl//2006/04/22/my-bio/"><img class="frame" src="http://bartekszafko.pl/wp-content/uploads/bszafko_avatar.jpg" alt="Bartek Szafko" border="0" style="float:left; border:1px solid #A9A9A9; margin:6px;padding:4px;position:relative;"></a>This post was originally published on <a href="http://bartekszafko.pl">Bartek Szafko blog</a><br style="clear:both"/> 81401c6e400a1ca19bd490938dc3548e</small><div class="shr-publisher-744"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F07%2F19%2Fproject-silk-subjective-review-part-1%2F' data-shr_title='Project+Silk+subjective+review+part+1'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F07%2F19%2Fproject-silk-subjective-review-part-1%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F07%2F19%2Fproject-silk-subjective-review-part-1%2F' data-shr_title='Project+Silk+subjective+review+part+1'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=DmUgT96Yh8g:GSyZOGAUsXE:tF1tbY45p4M"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=tF1tbY45p4M" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=DmUgT96Yh8g:GSyZOGAUsXE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=DmUgT96Yh8g:GSyZOGAUsXE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=DmUgT96Yh8g:GSyZOGAUsXE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=DmUgT96Yh8g:GSyZOGAUsXE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=DmUgT96Yh8g:GSyZOGAUsXE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=DmUgT96Yh8g:GSyZOGAUsXE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BartekSzafko/~4/DmUgT96Yh8g" height="1" width="1"/>]]></content:encoded><description>Microsoft&amp;#8217;s Patterns &amp;#38; Practices published a new guidance called Silk (http://silk.codeplex.com/): Project Silk provides guidance for building cross-browser web applications with a focus on client-side interactivity. These applications take advantage of the latest web standards like HTML5, CSS3 and ECMAScript 5 along with modern web technologies such as jQuery, Internet Explorer 9, and ASP.NET MVC3. [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bartekszafko.pl/2011/07/19/project-silk-subjective-review-part-1/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">2</slash:comments><feedburner:origLink>http://bartekszafko.pl/2011/07/19/project-silk-subjective-review-part-1/</feedburner:origLink></item><item><title>[EN]Prism.WindsorExtensions – now as a Nuget Package</title><link>http://feedproxy.google.com/~r/BartekSzafko/~3/gWcoJ1J6Yk4/</link><category>.NET</category><category>Development</category><category>prismcontrib.windsorextensions</category><category>Castle.Windsor</category><category>Prism</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bartłomiej Szafko</dc:creator><pubDate>Sun, 23 Jan 2011 10:55:05 PST</pubDate><guid isPermaLink="false">http://bartekszafko.pl/2011/01/23/enprism-windsorextensions-now-as-a-nuget-package/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>In <a href="http://bartekszafko.pl/2011/01/06/enprism-windsorextensions-use-castle-windsor-with-prism/">the last post</a> I announced an extension which allows you to use Prism aka CompositeWpf with Castle.Windsor as a dependency injection container. Now there is also <a href="http://nuget.org/Packages/Packages/Details/Prism-WindsorExtensions-4-0-0-0">a nuget package</a> so it’s easy to add to your project as well with nuget as with openwrap. </p>
<p><br/><strong>Inne podobne artykuły:</strong>
<ul class="similar-posts">
<li><a href="http://bartekszafko.pl/2011/07/25/project-silk-subjective-review-part-3-ioc-a-problem-child/" rel="bookmark" title="25-07-2011">Project Silk subjective review part 3 IoC a problem child</a></li>
<li><a href="http://bartekszafko.pl/2007/01/22/castle-project/" rel="bookmark" title="22-01-2007">Castle project</a></li>
<li><a href="http://bartekszafko.pl/2010/08/08/rubygems-w-net/" rel="bookmark" title="08-08-2010">RubyGems w .NET</a></li>
<li><a href="http://bartekszafko.pl/2011/12/06/static-keyword-is-the-source-of-all-evil-well-almost/" rel="bookmark" title="06-12-2011">Static keyword is the source of all evil, well almost</a></li>
<li><a href="http://bartekszafko.pl/2011/01/06/enprism-windsorextensions-use-castle-windsor-with-prism/" rel="bookmark" title="06-01-2011">[EN]Prism.WindsorExtensions &ndash; Use Castle.Windsor with Prism</a></li>
</ul>
<p><!-- Similar Posts took 13.792 ms --></p>
<a href="http://bartekszafko.pl//2006/04/22/my-bio/"><img class="frame" src="http://bartekszafko.pl/wp-content/uploads/bszafko_avatar.jpg" alt="Bartek Szafko" border="0" style="float:left; border:1px solid #A9A9A9; margin:6px;padding:4px;position:relative;"></a>This post was originally published on <a href="http://bartekszafko.pl">Bartek Szafko blog</a><br style="clear:both"/> 81401c6e400a1ca19bd490938dc3548e</small><div class="shr-publisher-738"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F01%2F23%2Fenprism-windsorextensions-now-as-a-nuget-package%2F' data-shr_title='%5BEN%5DPrism.WindsorExtensions+%26ndash%3B+now+as+a+Nuget+Package'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F01%2F23%2Fenprism-windsorextensions-now-as-a-nuget-package%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F01%2F23%2Fenprism-windsorextensions-now-as-a-nuget-package%2F' data-shr_title='%5BEN%5DPrism.WindsorExtensions+%26ndash%3B+now+as+a+Nuget+Package'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=gWcoJ1J6Yk4:LDdmsZ6zXBM:tF1tbY45p4M"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=tF1tbY45p4M" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=gWcoJ1J6Yk4:LDdmsZ6zXBM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=gWcoJ1J6Yk4:LDdmsZ6zXBM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=gWcoJ1J6Yk4:LDdmsZ6zXBM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=gWcoJ1J6Yk4:LDdmsZ6zXBM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=gWcoJ1J6Yk4:LDdmsZ6zXBM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=gWcoJ1J6Yk4:LDdmsZ6zXBM:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BartekSzafko/~4/gWcoJ1J6Yk4" height="1" width="1"/>]]></content:encoded><description>In the last post I announced an extension which allows you to use Prism aka CompositeWpf with Castle.Windsor as a dependency injection container. Now there is also a nuget package so it’s easy to add to your project as well with nuget as with openwrap. Inne podobne artykuły: Project Silk subjective review part 3 IoC [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bartekszafko.pl/2011/01/23/enprism-windsorextensions-now-as-a-nuget-package/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://bartekszafko.pl/2011/01/23/enprism-windsorextensions-now-as-a-nuget-package/</feedburner:origLink></item><item><title>[EN]Prism.WindsorExtensions – Use Castle.Windsor with Prism</title><link>http://feedproxy.google.com/~r/BartekSzafko/~3/fqqsOTiwuQg/</link><category>.NET</category><category>Development</category><category>prismcontrib.windsorextensions</category><category>Castle.Windsor</category><category>Prism</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bartłomiej Szafko</dc:creator><pubDate>Thu, 06 Jan 2011 09:22:33 PST</pubDate><guid isPermaLink="false">http://bartekszafko.pl/2011/01/06/enprism-windsorextensions-use-castle-windsor-with-prism/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I’ve been using <a href="http://compositewpf.codeplex.com/">Prism</a> for quite a while now, but for me it had one serious flaw – it uses Unity by default and <a href="http://stw.castleproject.org/Windsor.MainPage.ashx">Castle.Windsor</a> is my dependency injection container of choice. After looking around the internet i couldn’t find anything that was usable, so I decided to write my own prism extension. It’s on github <a href="https://github.com/bszafko/PrismContrib.WindsorExtensions">here</a>.</p>
<p><span id="more-735"></span></p>
<p>What you’ll find in the source: WindsorBootstrapper – a DefaultBootstrapper implementation which uses Windsor as the DI container. It’s ported from UnityBootstrapper so it’s not really written in a Windsory way(installers etc).</p>
<p>There is also a  silverlight project. In addition, it also contains a Windsor implementation of ServiceLocatorImplBase from Microsoft.Practices.ServiceLocation. The CommonServiceLocator.WindsorAdapter nuget package( which I used  for desktop version) unfortunately doesn’t contain a silverlight assembly so I had to add my own.</p>
<p>Build script also generates a nuget package so it’s fairly easy to add it to your own project.</p>
<p>Should you find any issues please add them on github issue tracker.</p>
<p>Enjoy.<br/><strong>Inne podobne artykuły:</strong>
<ul class="similar-posts">
<li><a href="http://bartekszafko.pl/2011/01/23/enprism-windsorextensions-now-as-a-nuget-package/" rel="bookmark" title="23-01-2011">[EN]Prism.WindsorExtensions &ndash; now as a Nuget Package</a></li>
<li><a href="http://bartekszafko.pl/2011/07/19/project-silk-subjective-review-part-1/" rel="bookmark" title="19-07-2011">Project Silk subjective review part 1</a></li>
<li><a href="http://bartekszafko.pl/2010/08/08/rubygems-w-net/" rel="bookmark" title="08-08-2010">RubyGems w .NET</a></li>
<li><a href="http://bartekszafko.pl/2011/12/06/static-keyword-is-the-source-of-all-evil-well-almost/" rel="bookmark" title="06-12-2011">Static keyword is the source of all evil, well almost</a></li>
<li><a href="http://bartekszafko.pl/2008/06/03/x64-an-x86-interop-in-net/" rel="bookmark" title="03-06-2008">x64 an x86 interop in .NET</a></li>
</ul>
<p><!-- Similar Posts took 18.175 ms --></p>
<a href="http://bartekszafko.pl//2006/04/22/my-bio/"><img class="frame" src="http://bartekszafko.pl/wp-content/uploads/bszafko_avatar.jpg" alt="Bartek Szafko" border="0" style="float:left; border:1px solid #A9A9A9; margin:6px;padding:4px;position:relative;"></a>This post was originally published on <a href="http://bartekszafko.pl">Bartek Szafko blog</a><br style="clear:both"/> 81401c6e400a1ca19bd490938dc3548e</small><div class="shr-publisher-735"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F01%2F06%2Fenprism-windsorextensions-use-castle-windsor-with-prism%2F' data-shr_title='%5BEN%5DPrism.WindsorExtensions+%26ndash%3B+Use+Castle.Windsor+with+Prism'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F01%2F06%2Fenprism-windsorextensions-use-castle-windsor-with-prism%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F01%2F06%2Fenprism-windsorextensions-use-castle-windsor-with-prism%2F' data-shr_title='%5BEN%5DPrism.WindsorExtensions+%26ndash%3B+Use+Castle.Windsor+with+Prism'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=fqqsOTiwuQg:E2OMC_08eUI:tF1tbY45p4M"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=tF1tbY45p4M" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=fqqsOTiwuQg:E2OMC_08eUI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=fqqsOTiwuQg:E2OMC_08eUI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=fqqsOTiwuQg:E2OMC_08eUI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=fqqsOTiwuQg:E2OMC_08eUI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=fqqsOTiwuQg:E2OMC_08eUI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=fqqsOTiwuQg:E2OMC_08eUI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BartekSzafko/~4/fqqsOTiwuQg" height="1" width="1"/>]]></content:encoded><description>I’ve been using Prism for quite a while now, but for me it had one serious flaw – it uses Unity by default and Castle.Windsor is my dependency injection container of choice. After looking around the internet i couldn’t find anything that was usable, so I decided to write my own prism extension. It’s on [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bartekszafko.pl/2011/01/06/enprism-windsorextensions-use-castle-windsor-with-prism/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://bartekszafko.pl/2011/01/06/enprism-windsorextensions-use-castle-windsor-with-prism/</feedburner:origLink></item><item><title>Przerzucam się na XBMC</title><link>http://feedproxy.google.com/~r/BartekSzafko/~3/OvHEDsl4m6A/</link><category>General</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bartłomiej Szafko</dc:creator><pubDate>Sun, 02 Jan 2011 08:46:51 PST</pubDate><guid isPermaLink="false">http://bartekszafko.pl/?p=732</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Od dłuższego czasu używałem <a href="http://bartekszafko.pl/2008/11/02/team-media-portal-100-rc3/">Team Media Portal </a> próbowałem też innych rzeczy ale nie zdawały dla mnie egzaminu.</p>
<p><span id="more-732"></span>Zachęciła mnie nowa wersja 10.0  <a href="http://xbmc.org/">XBMC</a> i postanowiłem spróbować.</p>
<p>Muszę powiedzieć, że jestem pod dużym warażeniem:</p>
<ol>
<li>Wygląd interfejsu &#8211; jest naprawdę świetny, nawet domyślna skórka &#8211; confluence wygląda bardzo dobrze</li>
<li>Wtyczka youtube: pozwala podpiąć się do konta, w prosty sposób wyszukiwać i zapamiętywać wyszukiwania</li>
<li>Wtyczka vimeo: pozwala na to samo co youtube &#8211; trochę się naszukałem bo okazuje się, że jest parę wersji &#8211; najlepsza jest <a href="http://code.google.com/p/vimeoxbmc/">tutaj</a></li>
<li>Automatyczna aktualizacja wtyczek: wtyczki wiedzą z jakiego repozytorium zostały pobrane i gdy tylko pojawi się nowa wersja aktualizacja następuje automatycznie a na ekranie pojawia się informacja o aktualizacji</li>
</ol>
<p>Projekt XBMC jest oczywiście otwarty.</p>
<p>Jest parę wersji: na linuxa, live cd i windowsowa. Ja uruchomiłem na Windows XP instalacja jest zupełnie bezproblemowa. Jedyne co zauważyłem to przy pierwszym uruchomieniu trochę się zacina &#8211; pewnie coś się indeksuje, ale przy kolejnych już nie ma tego problemu.</p>
<a href="http://bartekszafko.pl//2006/04/22/my-bio/"><img class="frame" src="http://bartekszafko.pl/wp-content/uploads/bszafko_avatar.jpg" alt="Bartek Szafko" border="0" style="float:left; border:1px solid #A9A9A9; margin:6px;padding:4px;position:relative;"></a>This post was originally published on <a href="http://bartekszafko.pl">Bartek Szafko blog</a><br style="clear:both"/> 81401c6e400a1ca19bd490938dc3548e</small><div class="shr-publisher-732"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F01%2F02%2Fprzerzucam-sie-na-xbmc%2F' data-shr_title='Przerzucam+si%C4%99+na+XBMC'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F01%2F02%2Fprzerzucam-sie-na-xbmc%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2011%2F01%2F02%2Fprzerzucam-sie-na-xbmc%2F' data-shr_title='Przerzucam+si%C4%99+na+XBMC'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=OvHEDsl4m6A:9ARhCa7vEBE:tF1tbY45p4M"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=tF1tbY45p4M" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=OvHEDsl4m6A:9ARhCa7vEBE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=OvHEDsl4m6A:9ARhCa7vEBE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=OvHEDsl4m6A:9ARhCa7vEBE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=OvHEDsl4m6A:9ARhCa7vEBE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=OvHEDsl4m6A:9ARhCa7vEBE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=OvHEDsl4m6A:9ARhCa7vEBE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BartekSzafko/~4/OvHEDsl4m6A" height="1" width="1"/>]]></content:encoded><description>Od dłuższego czasu używałem Team Media Portal próbowałem też innych rzeczy ale nie zdawały dla mnie egzaminu. Zachęciła mnie nowa wersja 10.0  XBMC i postanowiłem spróbować. Muszę powiedzieć, że jestem pod dużym warażeniem: Wygląd interfejsu &amp;#8211; jest naprawdę świetny, nawet domyślna skórka &amp;#8211; confluence wygląda bardzo dobrze Wtyczka youtube: pozwala podpiąć się do konta, w [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bartekszafko.pl/2011/01/02/przerzucam-sie-na-xbmc/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://bartekszafko.pl/2011/01/02/przerzucam-sie-na-xbmc/</feedburner:origLink></item><item><title>RubyGems w .NET</title><link>http://feedproxy.google.com/~r/BartekSzafko/~3/PZORJ5XAiHA/</link><category>.NET</category><category>Development</category><category>.net</category><category>nu</category><category>nubular</category><category>rubygems</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bartłomiej Szafko</dc:creator><pubDate>Sun, 08 Aug 2010 06:46:00 PDT</pubDate><guid isPermaLink="false">http://bartekszafko.pl/2010/08/08/rubygems-w-net/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Każdy używający bibliotek open source w .NET pewnie natknął się na problem ich instalowania w swoich projektach. Pół biedy kiedy używamy tylko jednej biblioteki, gorzej gdy mają one zależności między sobą i na domiar złego w konkretnych wersjach. Sytuacja szczególnie się komplikuje, gdy chcemy te biblioteki zaktualizować.</p>
<p>  <span id="more-730"></span>
<p>Okazuje się, żę podobne problemy mieli już użytkownicy Ruby i&#160; jako odpowiedź na to stworzyli Ruby Gems. Jest to narzędzie do zarządzania i dystrybuowania paczek programów i bibliotek dla języka Ruby. Jego bezpośrednie zastosowanie w .NET nastręczało trochę problemów więc powstał projekt <a href="http://groups.google.com/group/nu-net?pli=1">NU</a>. NU działa na bazie Ruby Gems pozwala instalować i aktualizować biblioteki open source w projekcie. NU to skrót od Nubular.</p>
<p>Instalacja jest bardzo prosta – najpierw trzeba mieć Iron Ruby(albo Ruby dla windows) ja pobrałem wersję 1.1 <a href="http://ironruby.codeplex.com/releases">IronRuby</a>.</p>
<h4>Instalacja NU</h4>
<pre class="brush: plain;">c:&gt;igem install nu
Successfully installed thor-0.14.0
Successfully installed nu-0.1.17
2 gems installed
Installing ri documentation for thor-0.14.0...
Installing ri documentation for nu-0.1.17...
Installing RDoc documentation for thor-0.14.0...
Installing RDoc documentation for nu-0.1.17...</pre>
<h4>&#160;</h4>
<h4>Instalacja bibliotek w projekcie</h4>
<pre class="brush: plain;">C:\Users\Bartek\Desktop\projekty\nu-test&gt;nu install fluentnhibernate
unknown:0: warning: already initialized constant OPT_TABLE
unknown:0: warning: already initialized constant S_IF_DOOR
unknown:0: warning: already initialized constant METHODS
Gem unavailable - trying to install
Successfully installed castle.core-1.1.0.0
Successfully installed castle.dynamicproxy2-2.1.0.0
Successfully installed log4net-1.2.10
Successfully installed nhibernate-2.1.2.4000
Successfully installed fluentnhibernate-1.1.0.685
Copy From: C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/fluentnhib
ernate-1.1.0.685/lib
Copy To: C:/Users/Bartek/Desktop/projekty/nu-test/lib/fluentnhibernate
loading nhibernate
Found Gem
Copy From: C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/nhibernate
-2.1.2.4000/lib
Copy To: C:/Users/Bartek/Desktop/projekty/nu-test/lib/nhibernate
loading castle.core
Found Gem
Copy From: C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/castle.cor
e-1.1.0.0/lib
Copy To: C:/Users/Bartek/Desktop/projekty/nu-test/lib/castle.core
loading castle.dynamicproxy2
Found Gem
Copy From: C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/castle.dyn
amicproxy2-2.1.0.0/lib
Copy To: C:/Users/Bartek/Desktop/projekty/nu-test/lib/castle.dynamicproxy2
loading castle.core
Found Gem
Copy From: C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/castle.cor
e-1.1.0.0/lib
Copy To: C:/Users/Bartek/Desktop/projekty/nu-test/lib/castle.core
loading log4net
Found Gem
Copy From: C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/log4net-1.
2.10/lib
Copy To: C:/Users/Bartek/Desktop/projekty/nu-test/lib/log4net</pre>
<pre class="brush: plain;">&#160;</pre>
<p>a w folderze projektu z którego uruchomiłem NU pojawiły się odpowiednie foldery ze wszystkimi zależnościami FluentNHibernate:</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" class="wlDisabledImage" title="nu blog post" border="0" alt="nu blog post" src="http://bartekszafko.pl/wp-content/uploads/2010/08/nublogpost.png" width="471" height="237" /></p>
<p>Lista aktualnie dostępnych gemów dla .net jest <a href="http://groups.google.pl/group/nu-net/web/current-packages">tutaj</a>.</p>
<p>Pojawiają się już próby integracji z Visual Studio:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:1be58cc7-dda1-4ea2-a8ef-3314d574d845" class="wlWriterEditableSmartContent">
<div><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/0-1UPrKu3wg&amp;hl=pl_PL&amp;fs=1?rel=0&amp;hl=en"></param><embed src="http://www.youtube.com/v/0-1UPrKu3wg&amp;hl=pl_PL&amp;fs=1?rel=0&amp;hl=en" type="application/x-shockwave-flash" width="480" height="385"></embed></object></div>
<div style="width:480px;clear:both;font-size:.8em">Integracja NU w Visual Studio</div>
</div>
<p>&#160;</p>
<p>Naprawdę bardzo wygodne. A skoro już mamy IronRuby to nic nie stoi na przeszkodzie, żeby zacząć używać rake do budowania.</p>
<h4>Dodatkowe linki</h4>
<p>A to linki, które bardziej szczegółowo wyjaśniają jakie były źródła powstania projektu:</p>
<ul>
<li><a href="http://codebetter.com/blogs/dru.sellers/archive/2010/07/17/nu-and-the-oss-dependency-nightmare.aspx">http://codebetter.com/blogs/dru.sellers/archive/2010/07/17/nu-and-the-oss-dependency-nightmare.aspx</a> </li>
<li><a href="http://devlicio.us/blogs/rob_reynolds/archive/2010/07/26/the-future-of-net-open-source-software-delivery.aspx?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:+Devlicious+(Devlicio.us)&amp;utm_content=Google+Reader">http://devlicio.us/blogs/rob_reynolds/archive/2010/07/26/the-future-of-net-open-source-software-delivery.aspx</a></li>
</ul>
<p><br/><strong>Inne podobne artykuły:</strong>
<ul class="similar-posts">
<li><a href="http://bartekszafko.pl/2008/03/25/using-ci-factory-with-visual-studio-2008/" rel="bookmark" title="25-03-2008">Using CI Factory with Visual Studio 2008</a></li>
<li><a href="http://bartekszafko.pl/2007/01/22/castle-project/" rel="bookmark" title="22-01-2007">Castle project</a></li>
<li><a href="http://bartekszafko.pl/2006/01/12/enterprise-library-20/" rel="bookmark" title="12-01-2006">Enterprise Library 2.0</a></li>
<li><a href="http://bartekszafko.pl/2008/05/07/tortoisemigrate/" rel="bookmark" title="07-05-2008">TortoiseMigrate</a></li>
<li><a href="http://bartekszafko.pl/2011/01/06/enprism-windsorextensions-use-castle-windsor-with-prism/" rel="bookmark" title="06-01-2011">[EN]Prism.WindsorExtensions &ndash; Use Castle.Windsor with Prism</a></li>
</ul>
<p><!-- Similar Posts took 36.854 ms --></p>
<a href="http://bartekszafko.pl//2006/04/22/my-bio/"><img class="frame" src="http://bartekszafko.pl/wp-content/uploads/bszafko_avatar.jpg" alt="Bartek Szafko" border="0" style="float:left; border:1px solid #A9A9A9; margin:6px;padding:4px;position:relative;"></a>This post was originally published on <a href="http://bartekszafko.pl">Bartek Szafko blog</a><br style="clear:both"/> 81401c6e400a1ca19bd490938dc3548e</small><div class="shr-publisher-730"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2010%2F08%2F08%2Frubygems-w-net%2F' data-shr_title='RubyGems+w+.NET'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2010%2F08%2F08%2Frubygems-w-net%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fbartekszafko.pl%2F2010%2F08%2F08%2Frubygems-w-net%2F' data-shr_title='RubyGems+w+.NET'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=PZORJ5XAiHA:J_nW81h9xUo:tF1tbY45p4M"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=tF1tbY45p4M" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=PZORJ5XAiHA:J_nW81h9xUo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=PZORJ5XAiHA:J_nW81h9xUo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=PZORJ5XAiHA:J_nW81h9xUo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=PZORJ5XAiHA:J_nW81h9xUo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BartekSzafko?a=PZORJ5XAiHA:J_nW81h9xUo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/BartekSzafko?i=PZORJ5XAiHA:J_nW81h9xUo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/BartekSzafko/~4/PZORJ5XAiHA" height="1" width="1"/>]]></content:encoded><description>Każdy używający bibliotek open source w .NET pewnie natknął się na problem ich instalowania w swoich projektach. Pół biedy kiedy używamy tylko jednej biblioteki, gorzej gdy mają one zależności między sobą i na domiar złego w konkretnych wersjach. Sytuacja szczególnie się komplikuje, gdy chcemy te biblioteki zaktualizować. Okazuje się, żę podobne problemy mieli już użytkownicy [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://bartekszafko.pl/2010/08/08/rubygems-w-net/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://bartekszafko.pl/2010/08/08/rubygems-w-net/</feedburner:origLink></item></channel></rss>

