<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>software-architecture &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/software-architecture/</link>
	<description>Feed of posts on WordPress.com tagged "software-architecture"</description>
	<pubDate>Mon, 07 Dec 2009 03:58:57 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[From the Trenches - Software by Numbers]]></title>
<link>http://saturnnetwork.wordpress.com/2009/12/06/from-the-trenches-software-by-numbers/</link>
<pubDate>Mon, 07 Dec 2009 02:02:19 +0000</pubDate>
<dc:creator>nanettebrown</dc:creator>
<guid>http://saturnnetwork.wordpress.com/2009/12/06/from-the-trenches-software-by-numbers/</guid>
<description><![CDATA[This is another post in the “From the Trenches” series about our research project on communicating t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This is another post in the “From the Trenches” series about our research project on communicating the value of architecting within Agile development. I meant to post this earlier, but I’ve been in the trenches digging.</p>
<p>As Ipek Ozkaya discussed in our <a href="http://saturnnetwork.wordpress.com/2009/11/12/from-the-trenches-communicating-the-value-of-architecting-within-agile-development/">From the Trenches kickoff post</a>, we are approaching our research on the value of architecture from the perspective of release planning. I am excited about this perspective because it moves the discussion of architecture’s value out of the realm of philosophy and into the realm of action and choice. As practitioners, we may talk to management and marketing and other decision makers about how valuable architecture is, and they may, in principle, agree. However, the real test of whether we’ve made the sale about architecture’s value is when the time comes to make investment choices, and that’s where release planning comes into play.</p>
<p><!--more-->As part of our research, one of the books we reviewed is <em>Software by Numbers</em> by Mark Denne and Jane Cleland-Huang, published in 2004. The book has been influential in Agile circles, not so much for the specific algorithms that it contains, but for bringing the issue of value to the forefront of discussions on release planning. Here are a few of the concepts that we found particularly interesting and relevant to our project.</p>
<p>In <em>Software by Numbers</em>, Denne and Cleland-Huang coin the acronym MMF (minimum marketable feature) to represent a unit of software value creation. This concept really hit home with me, based on experiences from early in my development career. I was working on a PC product targeted toward several discrete market segments. Our team quickly discovered that to be successful, a given product release needed to have a sufficient “chunk of value” to make a discernable impact on the value perception of at least one of the target segments. A release strategy that provided just a little bit of functionality to all the segments would fail to make the required market impact.</p>
<p>We definitely plan to incorporate the concept of MMF into our research work. We are, however, toying with the idea of changing MMF to MRC (minimum releasable capability). Our thought is that changing “marketable” to “releasable” addresses internal IT and DoD projects that are not marketed, per se, but that still need to provide discernable value at the time of release. The thought behind changing “feature” to “capability” is that the term “feature” may be seen as having a bias toward functionality, whereas &#8220;capability&#8221; is broader in meaning and could more easily encompass the inclusion of quality attribute enhancements into a release. Any opinions on this proposed terminology would be more than appreciated, by the way.</p>
<p>Chapter 4 of <em>Software by Numbers</em> is titled “Incremental Architecture.&#8221; In this chapter, Denne and Cleland-Huang make the point that “architecture needs unambiguous traceability back to the needs of stakeholders so that the rationale behind each architectural element is well-defined.&#8221; Linking architecture to stakeholder value is not, of course, a new idea. The SEI’s <a href="http://www.sei.cmu.edu/architecture/">architecture-centric engineering</a> practices have focused for years on architecture as the key to enabling successful delivery of quality attribute requirements.</p>
<p>However, the authors of <em>Software by Numbers</em> consider architecture not from a <em>technical</em> perspective but from a <em>financial</em> perspective; that is, from the perspective of their “incremental funding model.&#8221;  Within this model, they propose decomposing the architecture into a set of architecture elements that can be linked to the MMFs that they support and, consequentially, factored into an incremental release strategy. This is an interesting point of view and could certainly simplify the issue of clearly apportioning architectural cost and value. However, it also raises a host of questions such as</p>
<ul>
<li>What exactly constitutes an architectural element? Is it a framework, a pattern, a tactic, a mechanism, an architecturally significant component such as a piece of middleware?</li>
<li>What about efforts related to architectural prototyping and technology selection? How do these costs factor into architecture’s overall value proposition, and how are they apportioned to MMFs?</li>
<li>How do you account for the critical mass of architectural elements that must be present in the first release and must precede the development of any MMF?</li>
</ul>
<p>Finally, there is the topic of how to quantify value. In <em>Software by Number</em><em>s</em>, the authors use rigorous calculations to determine net present value (NPV), internal rate of return (IRR), and break-even time for a project. This approach is appealing in that it clearly expresses value in the language of NPV and IRR, which are typically used in funding justifications. Also, focusing on NPV and break-even time clearly highlights the issue of MMF timing and sequencing, a key consideration in incremental development and release strategies. On the other hand, the calculations are laborious and require a high (perhaps too high) degree of precision in determining the value of individual MMFs and the impact of time delays on those values. The alternative to the <em>Software by Numbers</em> approach would be to use value points (similar to story points) as a relative evaluation technique. <a href="http://www.sei.cmu.edu/saturn/2010/speakers.cfm">Jim Highsmith</a> discusses the use of value points in his latest book <em>Agile Project Management</em>.</p>
<p>These are some of our ideas so far. Some are fully baked and some are half-baked but we’re making progress on what I find to be a fascinating topic. Thanks for visiting us in the trenches.</p>
<p>Nanette Brown &#8211; SEI</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[An A-Z Guide to Being an Architect]]></title>
<link>http://yasseronline.wordpress.com/2009/12/05/an-a-z-guide-to-being-an-architect/</link>
<pubDate>Sat, 05 Dec 2009 07:26:02 +0000</pubDate>
<dc:creator>yasseronline</dc:creator>
<guid>http://yasseronline.wordpress.com/2009/12/05/an-a-z-guide-to-being-an-architect/</guid>
<description><![CDATA[Assalamoalykom, كل سنة و انتم طيبين Eid Adha Mubarak, and may Allah bless you and your families in s]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Assalamoalykom,</p>
<p>كل سنة و انتم طيبين<br />
Eid Adha Mubarak, and may Allah bless you and your families in shaa&#8217; Allah,</p>
<p>After some quality time with family during last two weeks Eid vacation, we are back again to business.</p>
<p>First thing was waiting for me was a project scope statement in Arabic! A challenging task  indeed, I will let you know in a coming post how did it go, for now and for this fresh cool morning here in Dammam here is a funny article that suites early morning coffee or if you wish tea with mint and milk <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , enjoy.</p>
<p><a title="An A-Z Guide to Being an Architect" href="http://msdn.microsoft.com/en-us/architecture/cc505969.aspx" target="_blank">An A-Z Guide to Being an Architect</a></p>
<p>Salam,</p>
<p><a href="http://yasseronline.wordpress.com/files/2009/12/eid-greetings.png"><img class="alignnone size-medium wp-image-110" title="Eid-Greetings" src="http://yasseronline.wordpress.com/files/2009/12/eid-greetings.png?w=222" alt="" width="222" height="300" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[To An Architect Everything Looks Like A Nail]]></title>
<link>http://fifthsystemeffect.wordpress.com/2009/12/01/to-an-architect-everything-looks-like-a-nail/</link>
<pubDate>Tue, 01 Dec 2009 10:53:49 +0000</pubDate>
<dc:creator>fifthsystemeffect</dc:creator>
<guid>http://fifthsystemeffect.wordpress.com/2009/12/01/to-an-architect-everything-looks-like-a-nail/</guid>
<description><![CDATA[]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;"><img class="aligncenter size-full wp-image-97" style="border:darkgray 5px solid;" title="Patternitis Architecture" src="http://fifthsystemeffect.wordpress.com/files/2009/11/10_patternitis.png" alt="Patternitis Architecture" width="500" height="375" /></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Amazon Web Services]]></title>
<link>http://akantos.wordpress.com/2009/12/01/amazon-web-services/</link>
<pubDate>Tue, 01 Dec 2009 02:56:06 +0000</pubDate>
<dc:creator>akantos</dc:creator>
<guid>http://akantos.wordpress.com/2009/12/01/amazon-web-services/</guid>
<description><![CDATA[Other day I was hiring a dedicated server. In doubt about whether choose between windows 2003 standa]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Other day I was hiring a dedicated server. In doubt about whether choose between windows 2003 standard or web server. I’ve chosen the standard one. It has message queuing system and I needed it so much. Then stumbled at Amazon Web Services – Then I felt myself stupid. They provide Queuing services and worse &#8211; at very cheap price.</p>
<p>That comes as lesson… nowadays we can just architect solutions without take into account the new approach of services in the cloud. <a href="http://aws.amazon.com" target="blank">Amazon Web Services</a> is just a sample which provides a lots of interesting services like Storage (very cheap), scalable mysql server (not that cheap but considerable if you&#8217;re really doing business) and many others.</p>
<p align="center"><a href="http://aws.amazon.com" target="blank"><img src="http://media.amazonwebservices.com/logo_aws.gif" border="0"></a></p>
<p>I know there are other service providers which in my point view still needs clarify what services they provide and what cost is going to be at end. I&#8217;ve seen some services about cloud computing which always appear to be more expensive than it should. They also miss details which makes me unable to calculate exactly what I going to need.<br />
How I would know how much processor cycles my application is going to need in month? Still not comfortable these days, hope it get better!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Mapping JavaEE and .NET stack components]]></title>
<link>http://itdevworld.wordpress.com/2009/12/01/mapping-javaee-and-net-stack-components/</link>
<pubDate>Tue, 01 Dec 2009 01:30:36 +0000</pubDate>
<dc:creator>rafaelri</dc:creator>
<guid>http://itdevworld.wordpress.com/2009/12/01/mapping-javaee-and-net-stack-components/</guid>
<description><![CDATA[Recently I started to research how to develop on .NET as I&#8217;ve been developing for JavaEE. Firs]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Recently I started to research how to develop on .NET as I&#8217;ve been developing for JavaEE.<br />
First thing that came to my mind as a JavaEE architect was: &#8220;Okay, IIS and ASP.NET are some of the presentation tier alternative I have for .NET but what for business tier?&#8221; or rephrasing as someone that has<br />
been using JavaEE for a long time: &#8220;What would be the .NET EJB?&#8221;.<br />
<a href="http://itdevworld.wordpress.com/files/2009/10/javaee-dotnetcomparison.jpeg"><img class="aligncenter size-medium wp-image-227" title="JavaEE-DotNETComparison" src="http://itdevworld.wordpress.com/files/2009/10/javaee-dotnetcomparison.jpeg?w=300" alt="JavaEE-DotNETComparison" width="300" height="129" /></a>First thing I missed was the concept of the MDB that in .NET stack that seems to be replaced by an MSMQ message trigger.</p>
<p>Another major .NET difference is that even though it seems to have the concept of the VM process (as Java does) it has the concept of a shared library, or the <a href="http://msdn.microsoft.com/en-us/library/yf1d93sz%28VS.71%29.aspx" target="_blank">Global Assembly Cache</a>. If you think in terms of Java then you have to either manually replicate the jar or share them using a shared storage and having it on the classpath.</p>
<p>As we are on the classpath subject, .NET and its CLR seems to <a href="http://msdn.microsoft.com/en-us/library/8056d76e%28VS.80%29.aspx" target="_blank">avoid (and limit it to J#) </a>the concept of a ClassLoader. Although sometimes problematic, the Java concept of the ClassLoader allows very sofisticate scenarios of application composition and also for hot code generation (by the application) at runtime.</p>
<p>I hope this post has helped anyone in the situation as I were before and I also hope it does not sound as a comparison of which platform is better as you might guess that I sincerely know that each one has its applications, strengths and weaknesses.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Publishing, self publishing and "in betweens" in India]]></title>
<link>http://pranshujain.wordpress.com/2009/11/30/publishing-self-publishing-and-in-betweens-in-india/</link>
<pubDate>Mon, 30 Nov 2009 17:46:40 +0000</pubDate>
<dc:creator>Pranshu Jain</dc:creator>
<guid>http://pranshujain.wordpress.com/2009/11/30/publishing-self-publishing-and-in-betweens-in-india/</guid>
<description><![CDATA[A friend has a book which needs to be published. Thru the process (which is still on ) I was fortuna]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>A friend has a book which needs to be published. Thru the process (which is still on ) I was fortunate to see the ring-side view of all options and here are some of the details.</p>
<p>Publishing: This is the traditional model which still works best if your book is selected by publishers. the publishers ask for a manuscript. If they like it, they will invest in it, do everything needed, and pay the author a royality. If your book appeals to publishers, maybe this is the best way. you get professional everything &#8211; editing, marketing,media, sales etc. and your book appears in more bookshelves without you lifting a finger than you imagine. You dont have to invest money and you get royality for sold books. Unfortunately, we were out of luck so we explored options.</p>
<p>Self publishing: Self publishing is quite mature now both in india and worldwide. Worldwide &#8211; you have companies like Lulu. In india, you have companies like <a href="http://cinnamonteal.dogearsetc.com/" target="_blank">CinnamonTeal </a>and <a href="http://www.pothi.com" target="_blank">pothi</a>. They operate on a &#8220;print on demand&#8221; basis &#8211; which means they will print books as they are ordered &#8211; even one book. However there were several dis-advantages</p>
<ol>
<li>Digital printing is most expensive. I thought Pothi&#8217;s price was quite reasonable at just over a Indian Rupee per page &#8211; even if you ordered just a single copy. This means that if you have a 200 pager book, you can sell it at 250Rs and make 35 Rs per book. Its not bad, but compared to something like 50-60 rs per book for printing when you print a 1000 copies, this does sound a lot. Actually its not that bad till you look at number 2.</li>
<li>You can only sell via their online store. It wont get listed on flipkart and indiaplaza and other online book stores. You always have an option to buy copies and list on them. Now assuming that they want 30% margin, the price of the book goes upto 350 Rs. But if you leave it at the self publisher, the buyer doesnot get discounts or free shipping. Now, they charge you a prey steep shipping costs at about Rs 50 - taking the book price upto 300 Rs if you leave it there. So I am begining to think its a pretty neat deal for niche books &#8211; but slightly expensive for popular ones ( especially when your idea of sales is bullying friends and family into buying it).  The good part is that you get something in hand immediately, no questions asked &#8211; and given the fact that it is one book at a time its not a bad deal. </li>
<li>There is no pre-publishing ( more on that later), marketing, distribution to other stores at all. You are complely on your own. These costs may add up.</li>
</ol>
<p>Now coming to the in-betweens. There are two options that I found out.</p>
<p>1) Sponsored publishing: Here you bear approximately half the cost of launching a book by the publisher [so even if the publisher is half convinced, they will go for it]. It has all the goodness of traditional publishing, and the royality you get is a bit higher, however, you start making money only after your book has sold between a 1000 to 2000 copies. This is not bad for a popular book. They promise everything &#8211; a launch, circulating it to media, getting reviews, listing it on online and offline stores via distribution channel, all logistics, inventory keeping etc. &#8211; everything. Now its upto you if you want to invest money on it, and expect returns only if the book is very popular. One of the publishers who agreed for it was <a href="http://www.frogbooks.net/about.htm">Frog Books</a>. They are very responsive.</p>
<p>2) Self Publishing ++ : Self publishing complaines offering traditional Printing+ Distribution: Sandeep of <a href="http://www.blushingpi.com/Contact.html">Blushing Pi</a> got us this option. They offer all pre-publishing, printing, digital marketing, and distribution &#8211; most of it done via 3rd parties &#8211; but managed by them on a &#8220;a lat carte&#8221; pricing.</p>
<p>Now coming to a description of puublishing lifecycle as I understand it. People in industry like to divide into 3 stages (called pre and post printing or publishing depending who you talk to ):</p>
<p>Pre-publishing or Pre-printing : This involves completing the content &#8211; including editing etc, doing the design, and getting the files in printable format.</p>
<p>Publishing or Printing: Test print &#8211; proof &#8211; print.</p>
<p>Post publishing or post printing: including one time activities like finding distributors and ongoing tasks like Store inventory, distribute to online and offline book store. Marketing and sales are also a big part of this stage.</p>
<p><strong><span style="text-decoration:underline;">Pre-Publishing</span></strong></p>
<p>Pre-publishing tasks involve</p>
<ul>
<li>Finalize content</li>
<li>Obtaining copyright on material you are quoting:</li>
<li>Prepare manuscript to circulate to publishers</li>
<li>You could get agents who will take your book to publishers &#8211; for a price. Good agents could get you a long way.</li>
<li>Proof Read &#8211; preferably by a different person &#8211; this is to ensure the quality of what you have written.</li>
<li>Editing: get reviews and edits from a professional to increase the quality of work significantly.</li>
<li>Cover design : Work with professional designers to get this. Note that it might help to have an ISBN number before you do this so that the bar code could also be generated and added.</li>
<li>Preparing other illustration and graphics: For cover and for content if you need graphics, it might be a good idea to get it done from a professional.</li>
<li>Foreword : you may want someone else to write it &#8211; preferably someone popular who may be able to recommend the book to many <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</li>
<li>Obtaining Copyrights for your book: As per laws in india, the copy right automatically happens to the author the moment the content is created. however, in case you want to go in for obtaining copyritghts &#8211; then you could register copyrights with copyrights office at <a href="http://copyright.gov.in/copyrightregistrationform.pdf">http://copyright.gov.in/copyrightregistrationform.pdf</a>. You can have a company handle copyrights for you for about Rs 5000. One of the companies who can handle it for you is <a href="http://www.brainleague.com">Brainleague</a></li>
<li>Getting ISBN number &#8211; you need to know the number of pages, whether its paperback or hardcover etc. before you can get an ISBN number. In India, a person can get an ISBN number on their own. If you want someone else to handle it for you &#8211; that is also possible and not very expensive.</li>
</ul>
<p><strong><span style="text-decoration:underline;">Printing</span></strong></p>
<ul>
<li>Digital printing: This is usually economical for upto 200 copies.</li>
<li>Offset printing: This is best for over 500 copies. For between 200 to 500 copies, either could be fine.</li>
<li>The material provided to printer needs to have proper typesetting. The offset printers usually bundle that service with no or minimal extra cost.</li>
</ul>
<p>It might help to strike a deal with a distributor before you go for printing.</p>
<p><strong><span style="text-decoration:underline;">Post-Publishing</span></strong></p>
<ul>
<li>Getting a distribution deal: To list your book on online bookstore or in physical bookstores, you need to have a deal with distributors. Distributors order books from you, reach them to stores. The stores typically want over 30% discount on cover price of the book, so that they can offer discounts, free shipping etc. To do that, distributors want minimum 45% off cover price. Anyway, you need to strike a deal and they are likely to ask for more - with a most likely deal between 55% to 45%.</li>
<li>Inventory: you need to store books and provide them to distributors when they request for it. Its quite expensive to outsource it and it could cost 1-2% per month of book cost to store it.</li>
<li>Marketing: The traditional publishers have a set of contacts of journalists who review books based on their interest. They send the books out, and a few will send out a review whether they publish it or not. Usually, unpublished comments cannot be quoted. On a slightly higher end, you could have a book launch event where you can invite journalists and a few are more likely to write about it. You can also mail the book to libraries, push it to other influential people who can talk about it, have in-store displays. The no-money option is digital marketing which is to create a blog, place links, distribute e-books ( few chapters or full book)to bloggers etc. Digital marketing takes a lot of your time but doesnt cost much money. It helps if you order listed books to send to others rather than sending copies you have as the distributors and retailers will get excited by sales and may throw in extra advertising, promotions and discounts to push the sales further.</li>
<li>Direct sale: you could also sell directly via ebay or other marketplaces to earn the retailer money yourself.</li>
</ul>
<p>I am still going thru the process and will update what I learn. Do feel free to contact me via a comment on this post if you need any details or contacts.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Hunkemoller wins ING retail award for category 'best bricks and clicks']]></title>
<link>http://chrisvanzadel.wordpress.com/2009/11/30/hunkemoller-wins-ing-retail-award-for-category-best-bricks-and-clicks/</link>
<pubDate>Mon, 30 Nov 2009 11:09:22 +0000</pubDate>
<dc:creator>metalpro2008</dc:creator>
<guid>http://chrisvanzadel.wordpress.com/2009/11/30/hunkemoller-wins-ing-retail-award-for-category-best-bricks-and-clicks/</guid>
<description><![CDATA[Hunkemoller has won the award from ING retail this year for the best on-line fulfillment. This price]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hunkemoller has won the award from ING retail this year for the best on-line fulfillment. This price has been awarded by a panel of experts, instead of online votes by the users, and Hunkemoller is very proud to have won it.<br />
Personally I take a bit of pride because I have designed and maintained the solution architecture which allows them to be successful.</p>
<p>Source:</p>
<p><a title="ING retail price 2009" href="http://retailjaarprijs.com/Verslag_ING_Retail_Jaarprijs_Gala_2009.html">ING retail price 2009</a> (Dutch)<br />
<a title="Twinkle hunkemoller ING retail 2009" href="http://www.twinklemagazine.nl/nieuws.aspx?id=28146&#38;utm_campaign=rss&#38;utm_source=rss&#38;utm_medium=rss">Twinkle </a>(Dutch)</p>
<p>Thank you Fred for mentioning it to me <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Silverlight Bits&amp;Pieces - Part 9: A MessageBox replacement]]></title>
<link>http://ajdotnet.wordpress.com/2009/11/28/silverlight-bitspieces-part-9-a-messagebox-replacement/</link>
<pubDate>Sat, 28 Nov 2009 18:01:47 +0000</pubDate>
<dc:creator>ajdotnet</dc:creator>
<guid>http://ajdotnet.wordpress.com/2009/11/28/silverlight-bitspieces-part-9-a-messagebox-replacement/</guid>
<description><![CDATA[OK, let’s put the brand new service provider model to some good use. Whenever a service call reports]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>OK, let’s put the <a href="http://ajdotnet.wordpress.com/2009/11/14/silverlight-bitspieces-part-8-application-extensions/" target="_blank">brand new service provider model</a> to some good use.</p>
<p>Whenever a service call reports an error I want some message box telling me about it (rather than simply swallowing it, which is the default behavior). Whenever the user does something potentially devastating I want some explicit confirmation, read message box, that he knows what he’s doing. <a href="http://msdn.microsoft.com/en-us/library/ms598690(VS.95).aspx" target="_blank"><em>MessageBox.Show</em></a> does all I need (well, it is restricted to OK and OK/Cancel, but one can live with that). Only&#8230; these system message boxes are dull, boring, and not at all a shiny example for a Silverlight application. <em>Enter the message box service provider…</em></p>
<p><strong>Basic implementation of a message box service</strong></p>
<p>The basic implementation will get the infrastructure up and running.</p>
<p>The first step is defining the service contract. Show this and that and a query method. The first (and naive) version looks like this:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_interface1.jpg" /> </p>
<p>The default implementation of our <em>application extension service turned service provider</em> (AES/SP) would use the dull system message boxes to implement that. The code is actually quite straight forward:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_messageboxservice.jpg" /> </p>
<p>Now, I could demand that the app.xaml has this one (or any other service implementing my interface) registered. However, I like to be <a href="http://en.wikipedia.org/wiki/Convention_over_Code" target="_blank">correct by default</a>, thus my accessor will fall back on this implementation if none is registered – and I can be sure that there will <em>always </em>be a respective service. </p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_zugriff2.jpg" /> </p>
<p>All that is left is a search&#38;replace for all calls to <a href="http://msdn.microsoft.com/en-us/library/ms598690(VS.95).aspx" target="_blank"><em>MessageBox.Show</em></a>&#8230; E.g. to show an error:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_verwendung_error.jpg" /> </p>
<p>… and to get confirmation, in this case to return a book:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_verwendung_confirm.jpg" /> </p>
<p>And, of course, it works as expected:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/app_messagebox.jpg" /> </p>
<p><strong>Replacing the Dialog </strong></p>
<p>Second act. Get rid of those dull things.</p>
<p>Create a new “Silverlight Child Window” and style it to look like a message box. I „borrowed“ the images from the Visual Studio Image Library (on my machine under <em>C:\Program Files\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary\1033\VS2008ImageLibrary\Objects\png_format\WinVista\</em>) and simply placed all possible images in the dialog. A textbox, two buttons, that’s it. Here is the styled XAML:</p>
<h3><a href="http://ajdotnet.files.wordpress.com/2009/11/xaml_messagebox_new.jpg" target="_blank"><img src="http://ajdotnet.files.wordpress.com/2009/11/xaml_messagebox_new.jpg" /></a> </h3>
<p>Some code is needed for the initialization. The message has to be set, the correct image made visible, etc.. I could probably have done this with less coding, using some tricks and elaborate databinding. But who cares, it’s straight forward and comprehensible (unlike what I probably would have come up with).</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_dialog.jpg" /> </p>
<p>Setting the <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.childwindow.dialogresult(VS.95).aspx" target="_blank"><em>DialogResult </em>property</a> also closes the dialog (sik!).</p>
<p>Finally I need a replacement AES/SP. The main method to show the dialog looks like this:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_messageboxservice_new.jpg" /> </p>
<p>Great? Great! &#8230; GOT YOU! (Fell into the trap myself, actually&#8230; :-/ )</p>
<p><strong>Fixing the Bug</strong></p>
<p>Remember that in Silverlight <em>everything</em> is asynchronous? Well, everything except <em><a href="http://msdn.microsoft.com/en-us/library/ms598690(VS.95).aspx" target="_blank">MessageBox.Show</a></em>? And ‘everything’ includes <em><a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.childwindow.show(VS.95).aspx" target="_blank">ChildWindow.Show</a></em>! Meaning my confirm method will not work this way. To overcome this I decided to pass a delegate to the dialog constructor and made sure it’s called in the OK case: </p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_dialog_callback.jpg" /> </p>
<p>And to be able to pass the delegate I changed the existing AES as well (and the interface respectively):</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_messageboxservice_better.jpg" /> </p>
<blockquote><p>Of course I had to adjust the default implementation using a messagebox:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_messageboxservice_callback.jpg" /> </p>
</blockquote>
<p>The calling code changes respectively, passing a lambda:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_verwendung_confirm_new.jpg" /> </p>
<p>Done. Now my application looks nice, even if it has to show a message box:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/app_messagebox_new.jpg" /> </p>
<p><strong><a href="http://en.wikipedia.org/wiki/ANFSCD" target="_blank">ANFSCD</a>…</strong></p>
<p>This endeavor served actually three purposes: </p>
<ul>
<li>First, I wanted/needed the feature <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  </li>
<li>Second, I wanted to see/demonstrate the service provider pattern from a user’s point of view. </li>
<li>And third – as you may have noticed from some screenshots – I used this implementation to check out VS2010 beta. </li>
</ul>
<blockquote><p>A quick verdict about VS 2010 beta (not really worth a separate post)&#8230;</p>
<p>The core system, i.e. the shell, the C# code editor, build system, etc. feels very good. No apparent bugs, quite fast, including intellisense, and close enough to VS2008 to feel familiar. Considering that big parts of this are complete rewrites, this is quite an achievement.</p>
<p>The visual designer for (Silverlight) XAML works nice for user controls. Designing grids, the property pane, and other tasks, is at first glance en par with Blend, but comes in a more familiar „Visual Studio flavor“; still it feels more rich and mature than VS2008.      <br />However, there are some notable gaps. Editing of styles and templates, animations, and visual state manager are not covered. Thus my guess is that Blend will remain a necessary complement to VS, even if one has to switch less often. BTW: Contrary to <a href="http://timheuer.com/blog/archive/2009/10/22/can-i-use-vs2010-for-silverlight-3-development.aspx" target="_blank">what Tim wrote</a>, I could work with Blend on VS2010 solutions (the project that cannot be loaded is only the web project), I just refrained from manipulating my project files with Blend.</p>
<p>Other areas I touched briefly have been less satisfying. <a href="http://msdn.microsoft.com/en-us/library/dd997841(VS.100).aspx" target="_blank">IntelliTrace</a> didn’t work, but I didn’t spend too much time on that. The architecture and modeling area for example has changed, but is by no means bug free (to the point of “not yet usable”). The profiler has evolved, but IMO still lacks what DevPartner offered nearly 10 years ago: <a href="http://www.microfocus.com/products/DevPartner/StudioProfessionalEditionCapabilities.asp#6" target="_blank">a decent call graph</a>. </p>
<p>Oh, one bright spot for any dev lead: code analysis (FxCop) rules are now <a href="http://blogs.msdn.com/fxcop/archive/2008/11/12/fun-with-code-analysis-rulesets.aspx" target="_blank">maintained in separate files</a>, projects reference these files by name.</p>
<p>Anyway, I have been using VS2010 beta since I installed it and was never compelled to switch back to VS2008. I’m going to have to reinstall my machine anytime soon, and I’m planning on going along with VS2010 beta, not installing VS2008 at all.</p>
</blockquote>
<p><font color="#008000">That’s all for now folks,      <br /><strong>AJ.NET</strong></font></p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http://ajdotnet.wordpress.com/2009/11/28/silverlight-bitspieces-part-9-a-messagebox-replacement/"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://ajdotnet.wordpress.com/2009/11/28/silverlight-bitspieces-part-9-a-messagebox-replacement/" border="0" alt="kick it on DotNetKicks.com" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Application Layers]]></title>
<link>http://solutionsarchitecture.wordpress.com/2009/11/26/application-layers/</link>
<pubDate>Thu, 26 Nov 2009 08:26:09 +0000</pubDate>
<dc:creator>J@F</dc:creator>
<guid>http://solutionsarchitecture.wordpress.com/2009/11/26/application-layers/</guid>
<description><![CDATA[Software applications are based on layers and the communication between them, so the main task in th]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Software applications are based on layers and the communication between them, so the main task in the design of an application architecture will be the identification and creation of layers and then to specify a communication language and set the rules and guidelines of the interaction between these layers.<br />
To start the design of an application architecture, the architect should keep in mind the following points:</p>
<p style="padding-left:30px;">• Separation of concerns<br />
• Clearness in the communication rules between layers.<br />
• Implementation of loose coupling between layers using abstraction (Interface)<br />
• Separation of component between logical layers (UI-Business-..)<br />
• Keeping the data format consistent within a layer or component</p>
<p>If we really take into consideration these points, the application will be easily extensible and testable, and its components will be clearly identifiable and reusable.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SData in Sage ERP Accpac 6]]></title>
<link>http://smist08.wordpress.com/2009/11/24/sdata-in-sage-erp-accpac-6/</link>
<pubDate>Tue, 24 Nov 2009 15:29:43 +0000</pubDate>
<dc:creator>smist08</dc:creator>
<guid>http://smist08.wordpress.com/2009/11/24/sdata-in-sage-erp-accpac-6/</guid>
<description><![CDATA[One of the big features in Accpac 6 is SData support. What is SData? SData is a web services protoco]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>One of the big features in Accpac 6 is SData support. What is SData? SData is a web services protocol based on REST. What is REST? REST is a web services protocol that is very popular among Internet companies. There are basically two main competing standards for web services. One is SOAP which is promoted by Microsoft, Oracle and IBM; this is a fairly heavy duty protocol which requires a fair bit of infrastructure (which is provided by the companies promoting this protocol). The other is REST which was invented as a University Research project and basically uses existing Web Technologies such as HTTP and RSS to implement a web services protocol. The nice thing about REST is that it doesn’t require any extra middleware. You are basically doing everything via standard web URLs. The infrastructure that supports this is basically just the standard Internet. SData is just an extension to REST, similar to Google’s GData which is also based on REST. REST protocols are used by Google, Amazon, eBay, Yahoo and all the main Internet companies. Gartner estimates that 75% of web services in use on the Internet are REST based. REST/SData also provides a standard mechanism for performing CRUD (create, read, update, delete) on all records.</p>
<p>From Accpac, every Accpac View (or Business Logic Object) will be exposed via SData. This provides third party ISVs a complete, efficient Web Services interface to communicate to Accpac with. Also all Sage applications are being made SData aware, meaning that all Sage applications can manipulate SData Web Services (or feeds). For instance here is some Accpac A/R Customer and G/L Account data displayed within a Sage CRM Dashboard using SData.</p>
<p><a href="http://smist08.wordpress.com/files/2009/11/crmacc.png"><img class="alignnone size-medium wp-image-92" title="crmacc" src="http://smist08.wordpress.com/files/2009/11/crmacc.png?w=300" alt="" width="300" height="235" /></a></p>
<p>From a simple wizard you can select any Accpac SData feed and once you’ve chosen a feed, you can select which columns you wish to display. Additionally Sage CRM and Accpac will be converting to use SData for our integration needs, this transition will occur over several versions of both products. In the same way you will be able to access CRM data from Accpac using SData.</p>
<p>All the new Sage ERP Accpac 6 screens are written entirely using SData. This means the screen can access any Accpac Views via SData, but additionally they can access any SData feeds from any product. In Accpac 5.x, the screen controls were mapped via datasource controls to views and view fields. This was great, but it limited you to only connecting our standard controls to fields in Views developed in our SDK. Now that the controls are mapped to a standards based SData fields, it means they will be able to be connected easily to much more data than just Accapc data. Look for other Sage products to start providing SData interfaces in their coming versions.</p>
<p>Sage is publishing SData as a publicly available standard. You can read all about it at: <a href="http://sdata.sage.com/">http://sdata.sage.com/</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Services From A To Z]]></title>
<link>http://fifthsystemeffect.wordpress.com/2009/11/24/services-from-a-to-z/</link>
<pubDate>Tue, 24 Nov 2009 10:37:45 +0000</pubDate>
<dc:creator>fifthsystemeffect</dc:creator>
<guid>http://fifthsystemeffect.wordpress.com/2009/11/24/services-from-a-to-z/</guid>
<description><![CDATA[8HSH59MCDDGM]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="aligncenter size-full wp-image-93" style="border:darkgray 5px solid;" title="Yellow Pages Architecture" src="http://fifthsystemeffect.wordpress.com/files/2009/11/09_yellowpages.png" alt="Yellow Pages Architecture" width="500" height="375" /></p>
<p><span style="color:#ffffff;">8HSH59MCDDGM</span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Software Architecture Guide]]></title>
<link>http://vinodvarma.wordpress.com/2009/11/22/architecture-guide/</link>
<pubDate>Sun, 22 Nov 2009 15:54:25 +0000</pubDate>
<dc:creator>vinodvarmah</dc:creator>
<guid>http://vinodvarma.wordpress.com/2009/11/22/architecture-guide/</guid>
<description><![CDATA[Are you looking for a good book on Architecture? Then, Microsoft Application Architecture Guide, 2nd]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Are you looking for a good book on Architecture? Then, <a href="http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=ce40e4e1-9838-4c89-a197-a373b2a60df2&#38;displayLang=en" target="_blank">Microsoft Application Architecture Guide, 2nd Edition</a> is a &#8216;must-read&#8217;. Though it is tuned to working with Microsoft technologies, much of topics covered have larger relevance. What I like about this book, compared to other books on software architecture, is practical relevance and ease of application</p>
<p>Hats off to Microsoft for bringing architecture from the elite glass house to developers&#8217; workspace!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[CardioPod un producto de Telehealth Solutions]]></title>
<link>http://guidozanon.wordpress.com/2009/11/21/cardiopod-un-producto-de-telehealth-solutions/</link>
<pubDate>Sat, 21 Nov 2009 19:07:18 +0000</pubDate>
<dc:creator>guidozanon</dc:creator>
<guid>http://guidozanon.wordpress.com/2009/11/21/cardiopod-un-producto-de-telehealth-solutions/</guid>
<description><![CDATA[Hace unos meses Telehealth Solutions una empresa Inglesa ubicada en Watford, lanzo CardioPod, un pro]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hace unos meses <a href="http://www.telehealthsolutions.co.uk/" target="_blank">Telehealth Solutions</a> una empresa Inglesa ubicada en Watford, lanzo CardioPod, un producto en el que venimos trabajando hace ya unos cuantos meses. El mismo permite calcular el riesgo cardio-vascular de un paciente mediante la realización de una serie de test y cuestionarios.</p>
<p>Por ahora el producto los están usando las tres principales servicios de medicina de inglaterra, pero esperamos que en el proximo año se sumen muchas mas.</p>
<p>Les dejo algunos links con articulos sobre el producto:</p>
<p><a href="http://www.news-medical.net/news/20090624/Telehealth-Solutions-launches-CardioPod-for-NHS-Health-Check.aspx" target="_blank">http://www.news-medical.net/news/20090624/Telehealth-Solutions-launches-CardioPod-for-NHS-Health-Check.aspx</a></p>
<p><a href="http://www.european-hospital.com/en/article/6058.html" target="_blank">http://www.european-hospital.com/en/article/6058.html</a></p>
<p><a href="http://www.ehiprimarycare.com/news/4990/cardiopod_launched_at_nhs_camden" target="_blank">http://www.ehiprimarycare.com/news/4990/cardiopod_launched_at_nhs_camden</a></p>
<p><a href="http://scottishhealthcare.co.uk/78/edinburgh-pharmacist-cardiopod/" target="_blank">http://scottishhealthcare.co.uk/78/edinburgh-pharmacist-cardiopod/</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Survey on architecture decision making]]></title>
<link>http://saturnnetwork.wordpress.com/2009/11/20/survey-on-architecture-decision-making/</link>
<pubDate>Fri, 20 Nov 2009 20:12:26 +0000</pubDate>
<dc:creator>billpollak</dc:creator>
<guid>http://saturnnetwork.wordpress.com/2009/11/20/survey-on-architecture-decision-making/</guid>
<description><![CDATA[Philips Research and Embedded System Institute (ESI) in the Netherlands have launched this survey of]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.research.philips.com/">Philips Research</a> and <a href="http://www.esi.nl/">Embedded System Institute</a> (ESI) in the Netherlands have launched <a href="http://survey01.ehv.campus.philips.com/survey.php">this survey</a> of system architects and managers to understand architecture decision making.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Declarative Programming in Sage ERP Accpac 6.0A]]></title>
<link>http://smist08.wordpress.com/2009/11/19/declarative-programming-in-sage-erp-accpac-6-0a/</link>
<pubDate>Thu, 19 Nov 2009 03:38:50 +0000</pubDate>
<dc:creator>smist08</dc:creator>
<guid>http://smist08.wordpress.com/2009/11/19/declarative-programming-in-sage-erp-accpac-6-0a/</guid>
<description><![CDATA[In the Sage ERP Accpac 5.x series of product, all screen definitions were part of the Visual Basic p]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In the Sage ERP Accpac 5.x series of product, all screen definitions were part of the Visual Basic programs that made up each user screen. The only way to get at these screen definitions was to embed the OCX for that screen in a VB program or VBA macro and then manipulate the screen programatically. With Accpac 6.0, we wanted to make many screen customizations way easier. The solution was to separate the screen definition from the User Interface program. In Accpac 6.0 each screen is defined in an XML file that contains all the layout information. This screen can be edited in a Visual Screen Designer that is part of the product, or since XML is just a text file, it can be edited in a standard text or XML editor. For that matter the screen can be generated from another program. The definition of the screen layout file (xsd file) is available and the format is completely open.</p>
<p>In Accpac 5.x, we saved a lot of programming time by binding the individual UI elements to datasources. This meant that an edit control was actually attached to a View field via its properties in the VB form designer. Then the control would be data aware and handle setting its data into the view and retrieving updated data from the View. In this way, no programming was required for most of the forms on the screen. We have exactly the same concept in Sage ERP Accpac 6.x. Only each control is bound to a field with in an SData feed and that SData feed could theoretically come from any Sage application that provides SData feeds or from any other application that has adopted the open SData format. Thus again no programming is required for most fields on the form.</p>
<p>Then we have gone one step further and provided standard actions that can be attached to controls in the layout. In Accpac 5.x you had to code all the logic that happened when a button was pressed. In Accpac 6.x we provide standard actions, so for instance you can attach a save action to the save button which will perform the save operation on the configured SData feed. This way we can develop simple forms with navigation, save, new and delete operations, with no programming. The declarative layout actually produces a complete running program can run with no additional code. Many of the Accpac setup and other simple screens can be developed this way, greatly speeding the development of Accpac 6.x.</p>
<p>The layouts for Accpac 6 are quite different from the screens in Accpac 5.x. For one thing all controls were placed on 5.x screens at specific x,y co-ordinates. In Accpac 6, all layout is handled by browser document object model layout nodes. Nothing is specified in x,y coordinates, you just specify which controls line up and how and then the process is dynamic depending on the length and size of the text. This is a great benefit when translating into languages that take more space like Spanish since the form will automatically adjust to the longer text. When running a right to left language like Arabic, it&#8217;s even smart enough to be able to re-arrange all the controls into a right to left ordering. All this is just functionality built into every browser and something we gladly don&#8217;t have to worry about.</p>
<p>These are just some of the new things that declarative layouts are bringing to Sage ERP Accpac 6.0A. This will really be a strong and flexible foundation to develop on.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[MapReduce talk from Lambda Lounge Presentation]]></title>
<link>http://tech.michaelgroner.com/2009/11/18/mapreduce-talk-from-september-lambda-lounge/</link>
<pubDate>Wed, 18 Nov 2009 21:25:46 +0000</pubDate>
<dc:creator>Michael</dc:creator>
<guid>http://tech.michaelgroner.com/2009/11/18/mapreduce-talk-from-september-lambda-lounge/</guid>
<description><![CDATA[In September I presented on the foundations of MapReduce and MapReduce applications at the St. Louis]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In September I presented on the foundations of MapReduce and MapReduce applications at the <a href="http://lambdalounge.org/" target="_blank">St. Louis Lambda Lounge</a>.</p>
<p>It always surprises me how simple the MapReduce algorithm is and how few people really understand it. After the talk I had multiple people approach me and say &#8220;I have had elements of MapReduce on my applications for a long time and didn&#8217;t know it.&#8221;</p>
<p><!--more--></p>
<p>Here are my slides from the talk.</p>
<p><!-- SlideShare error: doc is missing or has illegal characters /[^-_a-zA-Z0-9]/ --></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Google Wave]]></title>
<link>http://vinodvarma.wordpress.com/2009/11/17/google-wave/</link>
<pubDate>Tue, 17 Nov 2009 17:19:01 +0000</pubDate>
<dc:creator>vinodvarmah</dc:creator>
<guid>http://vinodvarma.wordpress.com/2009/11/17/google-wave/</guid>
<description><![CDATA[Is Google Wave a flop? I do not think so! I have received an invite for Google Wave. Just started pl]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://blog.commlabindia.com/elearning/is-google-wave-a-flop" target="_blank">Is Google Wave a flop</a>? I do not think so!</p>
<p>I have received an invite for Google Wave. Just started playing around with it. I am very much impressed with Google Wave. </p>
<p>What interests me is that the paradigm shift in communication; pretty much close to typical discussion. Discussions, in general, are not linear. It aligns very closely with human thought process and group activities like discussion. A good discussion, though would be centered on a topic,  would also cover variety of related topics as well</p>
<p>Will it replace current forms like emails and IMs? It may not. Just as emails have not removed regular mail service. </p>
<p>Applications? Plenty. I would use it to record my own thought process and learning. I would also use it in any group activity,  including software development. </p>
<p>Will it be a success? Well, there is more to success in the market than just realization of need and a good product. Critical mass, financial muscle, marketing push, competition and many other  factors too play a major role</p>
<p>I am waiting for getting all my contacts into Google Wave. At this point, I am constrained by the number of invites that I can send</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Code Generation Conference]]></title>
<link>http://akantos.wordpress.com/2009/11/17/code-generation-conference/</link>
<pubDate>Tue, 17 Nov 2009 01:06:09 +0000</pubDate>
<dc:creator>akantos</dc:creator>
<guid>http://akantos.wordpress.com/2009/11/17/code-generation-conference/</guid>
<description><![CDATA[I found out the Code Generation conference. Happens in Europe and sounds to be nice. They talk about]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I found out the Code Generation conference. Happens in Europe and sounds to be nice. They talk about code Generation and Model-Driven Software Development. The community says that the event has a strong practical focus and an emphasis on sharing experiences and knowledge and I hope to be there next year.</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/OsKQeuCCSvg&#038;rel=0&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/OsKQeuCCSvg&#038;rel=0&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Silverlight Bits&amp;Pieces - Part 8: Application Extensions]]></title>
<link>http://ajdotnet.wordpress.com/2009/11/14/silverlight-bitspieces-part-8-application-extensions/</link>
<pubDate>Sat, 14 Nov 2009 10:20:34 +0000</pubDate>
<dc:creator>ajdotnet</dc:creator>
<guid>http://ajdotnet.wordpress.com/2009/11/14/silverlight-bitspieces-part-8-application-extensions/</guid>
<description><![CDATA[Note: This is part of a series, you can find the related posts here… The last post used the new Appl]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><blockquote><p>Note: This is part of a series, you can find the related posts <a href="http://ajdotnet.wordpress.com/category/silverlight/" target="_blank">here</a>…</p>
</blockquote>
<p>The last post used the new <a href="http://msdn.microsoft.com/en-us/library/dd833084(VS.95).aspx" target="_blank">Application Extension Services</a> (AES for short) to include security into the application. This time I’m going to take AES one step further, laying out yet another piece of basic infrastructure.</p>
<blockquote><p>As a quick recap: An AES is a simple class, implementing a simple interface (<em><a href="http://msdn.microsoft.com/en-us/library/system.windows.iapplicationservice(VS.95).aspx" target="_blank">IApplicationService</a></em>) and optionally another one (<em><a href="http://msdn.microsoft.com/en-us/library/system.windows.iapplicationlifetimeaware(VS.95).aspx" target="_blank">IApplicationLifetimeAware</a></em>). It is then registered by the developer via the <em>app.xaml</em>. SL3 instantiates the AES at runtime and calls the respective callback methods on said interfaces, including <a href="http://msdn.microsoft.com/en-us/library/system.windows.iapplicationservice.startservice(VS.95).aspx" target="_blank"><em>StartService</em></a><em>, </em><a href="http://msdn.microsoft.com/en-us/library/system.windows.iapplicationservice.stopservice(VS.95).aspx" target="_blank"><em>StopService</em></a><em>,</em> and others. The recommended way to use these services is to maintain a static property and reference the class <a href="http://msdn.microsoft.com/en-us/library/dd833084(VS.95).aspx#accessing_extension_services_from_application_code" target="_blank">accordingly</a>.</p>
</blockquote>
<p>Basically AES solve one problem: <em>How do I extend the global application class, without actually replacing it, i.e. without providing a derived class?</em></p>
<blockquote><p>The problem here is that many libraries need some kind of global anchor and in the past, tool developers often chose to provide this by subclassing the next available central artifact (e.g. the page class or the application). And the next tool developer doing the same rendered those two libraries mutually exclusive, just by employing an adverse implementation strategy.</p>
</blockquote>
<p>However, SL3 solves only the <em>providing </em>part of the equation, the part related to the application class and the instantiation of the AES. But look <a href="http://ajdotnet.wordpress.com/2009/11/08/silverlight-bitspieces-part-7-application-permissions/" target="_blank">again</a> at the <em>consumer</em> code:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_checksecurity.jpg" /> </p>
<p>Following the <a href="http://msdn.microsoft.com/en-us/library/dd833084(VS.95).aspx#accessing_extension_services_from_application_code" target="_blank">recommendations</a>, I get singleton access to some object. Worse, the calling code is directly and tightly coupled to the AES class. But frankly, do I need SL3 to implement a singleton? Certainly not. Then why use AES in the first place? </p>
<p>What I’d love is to have the consumer code depend on some service (read interface), not on the actual implementation. And the ability to swap those services in and out, without affecting the caller. Matter of fact, the calling code doesn’t and shouldn’t care whether I use a <em>SecurityServiceThatGetsItsInformationFromTheServer </em>or a <em>SecurityServiceThatGetsItsInformationFromWindowsAzure </em>(or google account, open id, whatever).</p>
<p>If I could get that, AES would become a very valuable feature… .&#160; </p>
<p><strong>Introducing Service Providers</strong></p>
<p>OK, what the calling code needs is some service in terms of a contract, say <em>ISecurityService</em>, that it can ask for. And the same is true for any crosscutting concern, such as error reporting, tracing, caching, you name it. And actually .NET has already addressed this need with the <a href="http://msdn.microsoft.com/en-us/library/system.iserviceprovider(VS.95).aspx" target="_blank">service provider pattern</a>. This pattern has been used for example <a href="http://msdn.microsoft.com/en-us/library/ms734738.aspx" target="_blank">in WF</a> (e.g. to introduce workflow instance persistence), and <a href="http://msdn.microsoft.com/en-us/library/ms171822.aspx" target="_blank">quite extensively</a> in the Visual Studio <a href="http://msdn.microsoft.com/de-de/magazine/cc163634(en-us).aspx" target="_blank">design time infrastructure</a>.</p>
<blockquote><p>OK, I can hear you crying out <a href="http://en.wikipedia.org/wiki/Dependency_Injection" target="_blank">DI</a>. And the chorus chanting <a href="http://msdn.microsoft.com/en-us/library/dd362339.aspx" target="_blank">Unity</a> or <a href="http://ninject.org/" target="_blank">Ninject</a> (to name just two that support SL). But think again. Would you (or rather a library developer) mandate a specific DI container without reason? And you can always wire your pet container into this pattern by providing a <em>IFactory </em>service using whatever container you like. After all, the pattern handles <em>access </em>to services, not <em>instantiation </em>of them. (Which is what AES does, but again, Microsoft chose not to provide a fully fledged DI container…)</p>
</blockquote>
<p>What do I need to make this approach tick? I need a <em>GetService </em>method that iterates all AES – they are available via <em><a href="http://msdn.microsoft.com/en-us/library/system.windows.application.applicationlifetimeobjects(VS.95).aspx" target="_blank">Application.ApplicationLifetimeObjects</a></em>. And I need something to attach this method to. Using an extension method I can actually attach it to the application class:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_getservice.jpg" /></p>
<p>The method iterates all AES, checks whether one implements the requested (interface) type. It also checks whether any AES itself follows the pattern and implements <em>IServiceProvider, </em>and respectively forwards the request if it does. (This allows me to build up a chain of providers.)</p>
<p>That’s it. Long talk, short implementation, all set <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>Reimplementing the SecurityService</strong></p>
<p>Now I need the rework the SecurityService and the calling code to comply with the pattern. The service interface is simple enough:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_interface.jpg" /> </p>
<p>And my revised security service looks like this:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_service2.jpg" /> </p>
<p>The base class <em>ApplicationServiceBase </em>implements the two interfaces with respective empty virtual methods, thus I only had to overwrite <em>StartService</em>. Aside from some reformatting the most notable difference with the <a href="http://ajdotnet.wordpress.com/2009/11/08/silverlight-bitspieces-part-7-application-permissions/" target="_blank">previous implementation</a> is the absence of the static <em>Current </em>property to access the service instance at runtime. I also renamed the class to reflect what it does. Since the calling code won’t refer to that name any more, this is now feasible.</p>
<p>Accessing the service at runtime is done – drum roll please – using the service provider pattern. This (admittedly not exactly nice) code can be hidden in a simple static property, adding a little convenience. I did this with a class that provides a static property, but also allows calling an extension method on the <em>Application </em>class:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_zugriff1.jpg" /></p>
<blockquote><p>BTW: Wouldn’t it be nice to have <a href="http://ajdotnet.wordpress.com/2008/02/10/extensively-using-extension-methods/" target="_blank">extension properties</a> that I could attach to the application class…?</p>
</blockquote>
<p>And the calling code, i.e. the access to the user object changes to:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_verwendung1.jpg" />&#160; </p>
<p>Now the calling code is completely decoupled from the actual implementation of the security service, meaning I could replace it without affecting the calling code.</p>
<p><strong>A look ahead: Building on the pattern</strong></p>
<p>There are several use cases for this pattern that I will employ (they may or may not be addressed in later posts, but at least this list should give you some ideas):</p>
<ul>
<li>Last chance exception handling: A service will react to the <a href="http://msdn.microsoft.com/en-us/library/system.windows.application.unhandledexception(VS.95).aspx" target="_blank">unhandled exception event</a> and gather context information. It will then use another service to report the error. </li>
<li>Message boxes: I will need message boxes for errors, information, and confirmation. The system <em><a href="http://msdn.microsoft.com/en-us/library/system.windows.messagebox(VS.95).aspx" target="_blank">MessageBox</a> </em>is however somewhat dull. A service will cover that and a later implementation will replace the boring system dialogs with nice and shiny replacements. </li>
<li>Logging and tracing: At some point I will have to tackle these demands. </li>
<li>… </li>
</ul>
<p>I’m sure you can think of other examples, like navigation with parameter passing, global state, caching, …. Anyway, I think this is motivation enough to roll out some additional infrastructure. </p>
<blockquote><p>As a side note: Actually I had a completely homegrown implementation of this pattern for SL2. When SL3 came out and offered AES I quickly jumped on the bandwagon and threw away most of that code. If only Microsoft had not stopped one step short of my needs… . I’d rather have the platform support that out-of-the-box. And given the simplicity of the remaining implementation this shouldn’t have been too much of an issue.</p>
</blockquote>
<p><font color="#008000">That’s all for now folks,      <br /><strong>AJ.NET</strong></font></p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http://ajdotnet.wordpress.com/2009/11/14/silverlight-bitspieces-part-8-application-extensions/"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://ajdotnet.wordpress.com/2009/11/14/silverlight-bitspieces-part-8-application-extensions/" border="0" alt="kick it on DotNetKicks.com" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Automated Software Design Research Group]]></title>
<link>http://akantos.wordpress.com/2009/11/13/automated-software-design-research-group/</link>
<pubDate>Fri, 13 Nov 2009 17:09:56 +0000</pubDate>
<dc:creator>akantos</dc:creator>
<guid>http://akantos.wordpress.com/2009/11/13/automated-software-design-research-group/</guid>
<description><![CDATA[Lean software development demands too much automation. Of course, the idea is to make more with less]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Lean software development demands too much automation. Of course, the idea is to make more with less and have higher quality until delivering software functionalities most important for the business. This path is hard, really hard. You&#8217;ll probably have to rethink all your gained knowledge and start developed a solid wisdom through research. Constantly looking new ways to do what you do today and improve what you think you need not.</p>
<p>Not every IT company will really benefit of Lean Thinking. Such style demand too much research and intellectual work which results will came along the way. You need to keep traces so to really understand the intangible results. This is expense, and you may give up in the very beginning. </p>
<p>I believe that the worse thing still the daily operation activities along low budget and unprepared managerial staff. People are too involved with day-to-day problems and stop everything aiming rethink their work in such advanced way can be a laborious process that can simply never happen! </p>
<p>Any way&#8230; I would like to present the <a href="http://www.cs.utexas.edu/users/schwartz/" target="_blank">Automated Software Design Research Group</a>. This group explores new ways to develop software. They have a lot of academic papers (Dissertations and Theses) which can simply be applied to your life. Even if you not in Lean or Agile environment.<br />
See ya..</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[From the trenches: Communicating the value of architecting within agile development]]></title>
<link>http://saturnnetwork.wordpress.com/2009/11/12/from-the-trenches-communicating-the-value-of-architecting-within-agile-development/</link>
<pubDate>Thu, 12 Nov 2009 20:59:58 +0000</pubDate>
<dc:creator>ipozka</dc:creator>
<guid>http://saturnnetwork.wordpress.com/2009/11/12/from-the-trenches-communicating-the-value-of-architecting-within-agile-development/</guid>
<description><![CDATA[Deciding not to architect is an architectural decision. Postponing key architectural decisions while]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Deciding not to architect is an architectural decision. Postponing key architectural decisions while focusing on iteration-at-a-time development and customer-visible features negatively affects the success of large-scale projects. On the other hand, indulging in analysis paralysis in search of the best architecture that will sustain the system for its entire lifespan has the same effect. <!--more-->This is a reality that both the agile and architecture communities have accepted, especially in the context of large projects. But given that neither little-to-no-architecture nor big-up-front-architecture delivers the desired results to project stakeholders, what is the solution?</p>
<p><em>Communicating the value of architecting within agile development</em> is a year-long project that Nanette Brown, Robert Nord, and I have just begun at the SEI with the goal of better understanding and measuring where the sweet spot is for just enough architecting to support agility in the context of large projects. Understanding how architecture-related tasks and features appear in iteration and release planning is an essential aspect of finding the right balance. We observe, as have many others such as <a href="http://www.sei.cmu.edu/newsitems/saturn2010_highsmith.cfm">Jim Highsmith</a> in the latest edition of <em>Agile Project Management</em>, that foregoing planning in the haste of development does not necessarily equate with agility. Customer-visible features come to be because of the underlying organization of the software. Every system has an architecture, explicitly designed or not. The separation of architecture, code, and features might aid in project management, yet the reality is that they are not clearly separable.</p>
<p>Architecture can focus planning, backlog management, and refactoring. It can help prioritize features that are architecturally significant. However, this requires eliciting architecture-related features, assigning value and cost to them, and having mechanisms that treat customer-visible features simultaneously with architectural features based on their dependencies. <a href="http://agilevancouver.ca/modules/agilevancouver/event.jsp?id=146">Philippe Kruchten</a> describes these concepts and their relationship to each other quite clearly with the metaphor of painting. We are also collaborating with him and his team at the University of British Columbia.</p>
<p>We often get asked at the SEI, <em>“</em>What are you currently working on?” On one hand, I’m glad that people care. On the other hand, I feel responsible that, in the search for solutions, we should not overlook the simple and the obvious. Being overly protective of ideas can lead to overthinking and overanalyzing, common pitfalls in any project, and contrary to agility: open communication, frequent feedback, courage, and simplicity.</p>
<p>In response, we have decided in this project to practice the principles of agility. We will make frequent posts here talking about what we are currently thinking, what we have read that we thought was valuable, what we applied, and what we think will not work as we progress on this project.</p>
<p>Ipek Ozkaya &#8211; SEI</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Harmful dependency cycles]]></title>
<link>http://traxnet.wordpress.com/2009/11/12/harmful-dependency-cycles/</link>
<pubDate>Thu, 12 Nov 2009 20:35:16 +0000</pubDate>
<dc:creator>traxnet</dc:creator>
<guid>http://traxnet.wordpress.com/2009/11/12/harmful-dependency-cycles/</guid>
<description><![CDATA[Rushing things is bad.  You are in a hurry to get to the supermarket just to find, once you are ther]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Rushing things is bad.  You are in a hurry to get to the supermarket just to find, once you are there, that you forgot the shopping list at home. When developing applications, rushing things without a proper background design leads to spaghetti code. You module A depends on B, B depends on C, and C depends on A. There is some hidden master components, the sums of all of them, which is hard to notice, maintain and reuse.</p>
<p>&#160;</p>
<p style="text-align:center;"><img class="aligncenter" title="Dependecy structure matrix example" src="http://www.theserverside.net/tt/articles/content/ControllingDependencies/images/clip_image022.gif" alt="Dependecy structure matrix example" width="574" height="326" /></p>
<p>&#160;</p>
<p>Dependency structure matrix can help you find those harmful dependencies. The key on this tool is the way the important data is presented to the user (you). Matrix organization let&#8217;s you easily spot dependencies, where graphs tend to be hard to visualize.</p>
<p><img class="aligncenter" title="Dependency diagram" src="http://www.theserverside.net/tt/articles/content/ControllingDependencies/images/clip_image018.jpg" alt="Dependency diagram" width="549" height="444" /></p>
<p>This is one of the tools we are currently using to deliver high quality software to our clients. You can find more info in the following links:</p>
<p><a href="http://sdg.csail.mit.edu/pubs/2005/oopsla05-dsm.pdf">http://sdg.csail.mit.edu/pubs/2005/oopsla05-dsm.pdf</a></p>
<p><a href="http://www.theserverside.net/tt/articles/showarticle.tss?id=ControllingDependencies">http://www.theserverside.net/tt/articles/showarticle.tss?id=ControllingDependencies</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Documentation Is Architecture]]></title>
<link>http://fifthsystemeffect.wordpress.com/2009/11/10/documentation-is-architecture/</link>
<pubDate>Tue, 10 Nov 2009 09:27:40 +0000</pubDate>
<dc:creator>fifthsystemeffect</dc:creator>
<guid>http://fifthsystemeffect.wordpress.com/2009/11/10/documentation-is-architecture/</guid>
<description><![CDATA[]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;"><img class="aligncenter size-full wp-image-61" style="border:darkgray 5px solid;" title="Undocumented Architecture" src="http://fifthsystemeffect.wordpress.com/files/2009/10/07_undocumented.png" alt="Undocumented Architecture" width="500" height="376" /></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Problems with RIA Services (Feedback for July 2009 CTP)]]></title>
<link>http://dvanderboom.wordpress.com/2009/11/09/problems-with-ria-services-feedback-for-july-2009-ctp/</link>
<pubDate>Tue, 10 Nov 2009 02:35:45 +0000</pubDate>
<dc:creator>Dan Vanderboom</dc:creator>
<guid>http://dvanderboom.wordpress.com/2009/11/09/problems-with-ria-services-feedback-for-july-2009-ctp/</guid>
<description><![CDATA[RIA Services (new home page) is a collection of tools and libraries for making Rich Internet Applica]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>RIA Services (<a href="http://silverlight.net/riaservices/">new home page</a>) is a collection of tools and libraries for making Rich Internet Applications, especially line of business applications, easier to develop.&#160; Brad Abrams did a <a href="http://videos.visitmix.com/MIX09/t40f">great presentation</a> of RIA Services at MIX 2009 that touches on querying, validation, authentication, and how to share logic between the server and client sides.&#160; Brad also has a huge series of articles (26 as I write this) on using Silverlight and RIA Services to build a realistic application.</p>
<p>I love the concept of RIA Services.&#160; Brad and his team have done a fantastic job of identifying the critical issues for LOB systems and have the right idea to simplify those common data access tasks through the whole pipeline from database to UI controls, using libraries, Visual Studio tooling, or whatever it takes to get the job done.</p>
<p>So before I lay down some heavy criticism of RIA Services, take into consideration that it’s still a CTP and that my scenario pushes the boundaries of what was likely conceived of for this product, at least for such an early stage.</p>
<h2>Shared Data Model with WPF &#38; Silverlight Clients</h2>
<p>The cause of so much of my grief with RIA Services has been my need to share a data model, and access to a shared database, across WPF as well as Silverlight client applications.&#160; Within the constraints of this situation, I keep running into problem after problem while trying to use RIA Services productively.</p>
<p><u>The intuitive thing to do is</u>: define a single data model project that compiles to a single assembly, and then reference that in my Silverlight and non-Silverlight projects.&#160; This would be a 100% full-fidelity shared data model.&#160; As long as the code I wrote was a subset of both Silverlight and normal .NET Frameworks (an intersection), we could share identical types and write complex validation and model manipulation logic, all without having to constrain ourselves to work within the limitations of a convoluted code generation scheme.&#160; Back when I wrote Compact Framework applications, I did this with great success despite the platform gap, and I didn’t have anything like RIA Services to help.</p>
<h3>Incompatible Assemblies</h3>
<p>Part of the problem arises because Silverlight assemblies are incompatible with non-Silverlight assemblies.&#160; A lot of what RIA Services is doing is trying to find a way around this limitation: picking up attributes and code files from one project and inserting that code into the Silverlight project with a build action.&#160; This Visual Studio “magic” has been criticized for its weakness in dealing with multiple-solution systems where Visual Studio can’t update the client because it’s not loaded, and I’ve heard there’s work being done to address this, but for my current needs, this magic aspect of it isn’t a problem.&#160; The specifics of how it works, however, are.</p>
<h3>Different Data Access APIs</h3>
<p>Accessing entities requires a different API in Silverlight via RiaContextBase versus ObjectContext elsewhere.&#160; Complex logic in the model (for validation and other actions against the model) requires access to other entities and therefore access to the current object context, but the context APIs for Silverlight and WPF are very different.&#160; Part of this has to do with Silverlight’s inability to make synchronous calls to the server.</p>
<p>In significantly large systems that I build, I use validation logic such as “this entity is valid if it’s pointing to an entity of a different type that contains a PropertyX value of Y”.&#160; One of my tables stores a tree of data, so I have methods for loading entire subtrees and ensuring that no circular references exist.&#160; For these kinds of tasks, I need access to the data context in basic validation methods.&#160; When I delete nodes from a tree, I need to delete child nodes, so update logic is part of the model that needs to be the same in every client.&#160; I don’t want to define that multiple times for multiple clients.&#160; I like to program very <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself">DRY</a>.&#160; In other words, I find myself in need of a shared model.</p>
<p>RIA Services doesn’t provide anything like type equivalence for a shared model, however.&#160; Data model classes in Silverlight inherit from Entity, but EntityObject in WPF.&#160; In the RIA Services domain context, we RaiseDataMemberChanged, but in a normal EF object context, we need to ReportPropertyChanged.&#160; In WPF, I can call MyEntity.Load(MergeOption.PreserveChanges), but in Silverlight there&#8217;s no Load method on the entity and no MergeOption enum.&#160; In WPF I can query against context.SomeEntitySet, but in Silverlight you would query against context.GetSomeEntitySetQuery() and then execute the query with another method call.</p>
<p>This chasm of disparity makes all but the simplest shared model logic impractical and frustrating.&#160; The code generation technique, though good in principle, keeps getting in the way.&#160; For example, I have both parameterless and parameterized constructors in my entity classes.&#160; This works great in my WPF client, but when this code is synchronized to my Silverlight client, I get an error because the Silverlight-side entity class is generated in two parts: in the hidden partial class, a parameterless constructor is generated which calls partial method OnCreated; and in the visible partial class, the constructor method I defined on the server is dumped into another file, so I have duplicate constructors.&#160; If I remove the parameterless constructor from the server side, I get an error because my entity class requires a parameterless constructor (and defining a non-default constructor effectively removes the default one from the resulting type unless it’s explicitly defined).&#160; I thought I could define the partial method OnCreated and put my construction logic in there, but the partial method is only defined on the client side.&#160; That means sharing construction logic consists of copying and pasting the OnCreated method across the various clients—far from an ideal solution.</p>
<h3>Entity Data Model Required to be in Web Project</h3>
<p>Another strategy I attempted was to define the .edmx file and my partial class extensions in a class library, and then reference that from the web project.&#160; I could define the LinqToEntitiesDomainService&#60;MyDataContext&#62;, but sharing entity class code (by generating code in the Silverlight project) isn’t possible unless the .edmx file and partial class extensions are defined in the web project itself.&#160; This would mean that my WPF client would have to reference a web project for data access, which by itself seems wrong.&#160; (Or making a copy of the data model, which is worse.)&#160; It would be better for the WPF client to talk to the same domain service as the Silverlight client, but RIA Services doesn’t give you an option to link that web project to a non-Silverlight project, so again I ran into a brick wall.</p>
<h3>So Don’t Do That</h3>
<p>The kind of advice I’m getting for this is, “so don’t do that”.&#160; In other words, don’t write complex validation logic in the model or otherwise try to access the data context; don’t write parameterized constructors; don’t aim for 100% type fidelity across all endpoints of a system; don’t try to share data models with Silverlight and non-Silverlight projects, etc.&#160; But I see the potential for RIA Services, so I have to push for these things unless I hear really convincing arguments against them (or compelling alternatives).</p>
<h2>Conclusion</h2>
<p>The fact that there are different data contexts and data item definitions within those contexts imposes a burden on the developer to use different techniques for each environment, and creates challenges for centralizing data model logic and reusing equivalent logic across different kinds of clients.&#160; My gut feeling is that RIA Services in its current form has some fundamental design flaws that will need to be addressed, taking into consideration systems with a mix of Silverlight, WPF, and other clients, before it becomes a truly robust data access platform.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Silverlight Bits&amp;Pieces - Part 7: Application Permissions]]></title>
<link>http://ajdotnet.wordpress.com/2009/11/08/silverlight-bitspieces-part-7-application-permissions/</link>
<pubDate>Sun, 08 Nov 2009 18:55:23 +0000</pubDate>
<dc:creator>ajdotnet</dc:creator>
<guid>http://ajdotnet.wordpress.com/2009/11/08/silverlight-bitspieces-part-7-application-permissions/</guid>
<description><![CDATA[OK, back down from vacation – proud about the accomplishment and perhaps with some new perspectives.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>OK, back <a href="http://en.wikipedia.org/wiki/Mount_Kilimanjaro" target="_blank">down from vacation</a> – proud about the accomplishment and perhaps with some <a href="http://www.nation.co.ke/News/-/1056/672082/-/uo06q9/-/index.html" target="_blank">new perspectives</a>. It really makes you think about the <a href="http://www.ifpri.org/publication/2009-global-hunger-index-facts-and-findings-sub-saharan-africa-east-africa" target="_blank">effects of the financial crisis</a> if you happen to work primarily for banks… . Well.</p>
<blockquote><p>Note: This is part of a series, you can find the related posts <a href="http://ajdotnet.wordpress.com/category/silverlight/" target="_blank">here</a>…</p></blockquote>
<p>The last post (pre-Kili <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ) provided me with the necessary infrastructure to address the next topic: application security.</p>
<p>Silverlight is “secure by design”. It runs in a sandbox, only allowing restricted access to the local machine. Regarding server calls it supports HTTPS and windows authentication for intranets, it restricts <a href="http://msdn.microsoft.com/en-us/library/cc189008(VS.95).aspx" target="_blank">URL access</a> and allows only calls to servers explicitly <a href="http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx" target="_blank">opted in for</a>. From a .NET perspective it has a <a href="http://blogs.msdn.com/shawnfa/archive/2007/05/09/the-silverlight-security-model.aspx" target="_blank">changed programming model</a>, no longer supporting <a href="http://msdn.microsoft.com/en-us/library/930b76w0(VS.71).aspx" target="_blank">CAS</a>, but a more simple model that takes the restrictions into account that are already in place. It has the well-known interfaces <em><a href="http://msdn.microsoft.com/en-us/library/system.security.principal(VS.95).aspx" target="_blank">IPrincipal and IIdentity</a></em><em> </em>in place, yet no implementation and no anchor to ask for them, like <em><a href="http://msdn.microsoft.com/en-us/library/system.web.httpcontext.user.aspx" target="_blank">HttpContext.User</a> </em>in web applications.</p>
<p><em>Silverlight is so secure, it doesn’t even tell you, who you are.</em></p>
<p>From a purely technical perspective this is perfectly in order. The services I call are running on the server and it’s their job to make sure no one does something or gets to know something he isn’t entitled to.<br />
On the other hand, many intranet applications need to know the user name, if only to display it. And they need the permissions granted to the user to hide buttons, menu entries or make edit fields read only – none of that for actual security reasons (the server would take care that the user couldn’t do any harm, anyway), but to improve the user experience, not letting him do things and telling him afterwards that he has had no permission to do what he did in the first place.</p>
<p>User and roles are available at the server at the ASP.NET runtime, and one “only” needs to make it available to the client. Matter of fact, ASP.NET provides the necessary service implementation <a href="http://blogs.msdn.com/brada/archive/2008/05/03/accessing-the-asp-net-authentication-profile-and-role-service-in-silverlight.aspx" target="_blank">readily available</a>. This is also the way to integrate with ASP.NET forms authentication.</p>
<p>There are two caveats with this approach, though: These ASP.NET services provide roles and all, but they just don’t include the user name. Also, being services, I would have to call them asynchronously, which would incur at least a little time lag after starting the application, that I would have to deal with. A time lag that is unnecessary in intranet applications where the user is determined by windows authentication.</p>
<p>Thus my solution is as follows:</p>
<ol>
<li>On the server include the information about user name and his roles in the <em>initparams</em>, so that it is available for the SL application right form the start, without any lag.</li>
<li>On the client pick up that information and mimic <em><a href="http://msdn.microsoft.com/en-us/library/system.web.httpcontext.user.aspx" target="_blank">HttpContext.User</a> </em>to have a similar developer experience.</li>
</ol>
<blockquote><p>Of course, someone could fake this data, which might at first glance be a security flaw. But as I said, this information is only used to improve the user experience. Even if someone masqueraded as a different user, the sandbox on the client side still uses the actual user’s restrictions. And the same is true for the services that still have the responsibility to enforcing security anyway. I’m also not revealing sensitive information, since user name and permissions are not exactly protected data. And finally I could load the web page containing this data via HTTPS. Thus, form a security perspective I’m on the save side.</p></blockquote>
<p><strong>Server side</strong></p>
<p>The server side is easy enough, since the necessary work has already been done. Step one is to include the information in the initparams within the ASP.NET page:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/asp_initparams.jpg" alt="" /></p>
<p>Step to is the respective implementation:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_getuserinformation.jpg" alt="" /> </p>
<p><strong>Client side</strong></p>
<p>Mimic <em>HttpContext.User? </em>Well, there is no <em><a href="http://msdn.microsoft.com/en-us/library/system.web.httpcontext.aspx" target="_blank">HttpContext</a></em>, but we have the <em><a href="http://msdn.microsoft.com/en-us/library/system.windows.application(VS.95).aspx" target="_blank">Application</a></em> object which can be seen as a pendant of sorts. (I wouldn’t relate it to the <em><a href="http://msdn.microsoft.com/en-us/library/system.web.httpapplication.aspx" target="_blank">HttpApplication</a></em>, though, since an application in the ASP.NET sense spans all users.) Yet I’m reluctant to provide a base class to inject my pet feature, because that would bring me into conflict with any other library that may one day choose to do the same.</p>
<p>Luckily SL3 introduced the new concept of <a href="http://msdn.microsoft.com/en-us/library/dd833084(VS.95).aspx" target="_blank">Application Extension Services</a> (AES for short). AES have to implement <a href="http://msdn.microsoft.com/en-us/library/system.windows.iapplicationservice(VS.95).aspx" target="_blank">a simple interface</a> and are registered via the <em>app.xaml</em>. SL3 instantiates them and calls the <em><a href="http://msdn.microsoft.com/en-us/library/system.windows.iapplicationservice.startservice(VS.95).aspx" target="_blank">StartService</a></em> and <em><a href="http://msdn.microsoft.com/en-us/library/system.windows.iapplicationservice.stopservice(VS.95).aspx" target="_blank">StopService</a></em> method to provide the hooks for initialization and shutdown. There will be another post about AES, thus I’ll leave it at that for now. Anyway, here’s the respective implementation:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_securityservice.jpg" alt="" /></p>
<p>It’s straight forward, it merely parses the information provided via the <em>initparams</em>. And the registration that will create the service at runtime is quite simple:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/xaml_application.jpg" alt="" /></p>
<p>This is backed by boilerplate implementations of <em>IPrincipal</em>…</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_principal.jpg" alt="" /></p>
<p>… and <em>IIdentity</em>:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_identity.jpg" alt="" /></p>
<p>From here I can use the user information at leisure, as I need it, and as I’m used to do. For example:</p>
<p><img src="http://ajdotnet.files.wordpress.com/2009/11/code_checksecurity.jpg" alt="" /> </p>
<p><span style="color:#008000;">That’s all for now folks,<br />
<strong>AJ.NET</strong></span></p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http://ajdotnet.wordpress.com/2009/11/08/silverlight-bitspieces-part-7-application-permissions/"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://ajdotnet.wordpress.com/2009/11/08/silverlight-bitspieces-part-7-application-permissions/" border="0" alt="kick it on DotNetKicks.com" /></a></p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
