<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.claritycon.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>dougherty distilled</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/default.aspx</link><description>Bryan Dougherty&amp;#39;s thoughts on technology and software development.</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>Benefits of K2 [blackpearl]</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2008/05/10/k2-blackpearl.aspx</link><pubDate>Sat, 10 May 2008 19:23:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:5124</guid><dc:creator>bdougherty</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=5124</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2008/05/10/k2-blackpearl.aspx#comments</comments><description>&lt;p&gt;&lt;a class="" title="K2 [blackpearl]" href="http://www.k2.com/en/displayContent.aspx?id=16" target="_blank"&gt;K2 [blackpearl]&lt;/a&gt; is the newest version of workflow software from SourceCode.&amp;nbsp; I believe it can be a valuable tool for developing line of business applications, specifially solutions that involve routing and tracking work and information between people.&amp;nbsp; While I haven&amp;#39;t built a production solution in blackpearl yet, I think I have a fairly good background from which to evaluate the product.&amp;nbsp;&amp;nbsp;I have experience building process applications in a completely custom fashion,&amp;nbsp;I have some experience with &lt;a class="" title="Windows Workflow Foundation" href="http://msdn.microsoft.com/en-us/netframework/aa663328.aspx" target="_blank"&gt;Windows Workflow Foundation&lt;/a&gt; (WF) and SharePoint, and I have built a production application using the previous K2.net 2003 product.&amp;nbsp; I recently attended a partner training event to get some more hands on experience with blackpearl and speak with K2 folks who really know the product.&amp;nbsp; This evaluation serves as&amp;nbsp;a mental exercise for me and also information for those who may be considering blackpearl.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Basics of a Workflow Application&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Applications that improve business processes usually have some basic concepts in common: users, tasks, data, rules.&amp;nbsp; Users are assigned tasks to process data.&amp;nbsp; A simple example: Employees (&lt;em&gt;users&lt;/em&gt;) submit purchase orders (&lt;em&gt;data&lt;/em&gt;) for approval.&amp;nbsp; Depending on the cost of the purchase and the department the requester works in (&lt;em&gt;rules&lt;/em&gt;), a manager has to approve it (&lt;em&gt;task&lt;/em&gt;).&amp;nbsp; &lt;/p&gt;
&lt;p&gt;So how do you build a system like this?&amp;nbsp; Obviously you&amp;#39;re going to start with requirements gathering&amp;nbsp;and in a business process app (any app really), that can be one of the biggest challenges.&amp;nbsp;&amp;nbsp;I think blackpearl can help you early on in the process.&amp;nbsp; I&amp;#39;m a big believer in early prototyping.&amp;nbsp; Being able to mock up an early system that walks users through the functionality is&amp;nbsp;much more effective&amp;nbsp;in fleshing out requirements for the final solution than simply talking with the business and drawing up how the app should work.&amp;nbsp; blackpearl allows you to rapidly build out workflows&amp;nbsp;so you can walk users the flow of tasks that each user will get, at least in a rudimentary fashion, early on in the process.&amp;nbsp; I&amp;#39;m intrigued by one of the new built in UI options blackpearl introduces.&amp;nbsp; It auto-generates a tabular-label/textbox-style aspx page for the tasks.&amp;nbsp; The final solution will no doubt involve complex business logic and a fancy user interface and lots of other goodies, but to get moving you should be able to get a simple prototype up and running writing little or no code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Visual Designer&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m a visual person.&amp;nbsp; I think you have to be to understand complex business process applicaitons.&amp;nbsp; K2 blackpearl offers three different designers to model processes in: 1) Visio 2007 2) an ajax web-based designer 3) Visual Studio 2005 (and 2008 shortly, I think).&amp;nbsp; The latter is great for developers.&amp;nbsp; And the K2 marketing folks will tell you that the first two options enable your non-technical business analysts to design workflows.&amp;nbsp; I&amp;#39;m not buying it, though.&amp;nbsp; I don&amp;#39;t see non-technical folks building out production workflows.&amp;nbsp; Wizards and all, there are still too many blackpearl and technical details in a real world scenario that make this unlikely.&amp;nbsp;&amp;nbsp;I can see two ways this could be helpful, though.&amp;nbsp; Business analysts can start with Visio to diagram&amp;nbsp;a process which can later be &amp;quot;blackpearled&amp;quot; by developers, giving the process a jump start.&amp;nbsp; Then, viewing in Viso, developers and business analysts can continue to refine the workflow by looking at it in&amp;nbsp;a &amp;quot;common language&amp;quot;.&amp;nbsp; I haven&amp;#39;t tried this yet, but it seems viable.&lt;/p&gt;
&lt;p&gt;Looking at the alternative approaches, SharePoint workflos are WF-based and therefore give you a designer to work with.&amp;nbsp; With a custom solution, you could use WF as your workflow engine and get design capabilities.&amp;nbsp; However you have a lot of plumbing to build out.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plumbing&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Building a system that tracks tasks is non-trivial.&amp;nbsp; In a custom solution, it most likely involves building a database table for tasks, writing code at write to and update the tables as events occur, properly assigning to the tasks to the correct&amp;nbsp;user(s), notifying the users of their tasks, and allowing them to manage them.&amp;nbsp; It doesn&amp;#39;t sound extremely difficult, right?&amp;nbsp; But like I said, it&amp;#39;s&amp;nbsp;certainly non-trivial.&amp;nbsp; WF gives you a good framework to build on and some basic service implementations for things like persistence via SQL Server, but you&amp;#39;re still going to have to build out a host process, define your workflow related classes and wire everything up.&amp;nbsp; And unless you&amp;#39;re really forward thinking, you have to do this for every application you build.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;SharePoint workflows have the concept of using SharePoint lists for tasks.&amp;nbsp; These tasks are scoped to a list within a site and without&amp;nbsp;some custom work, it is difficult to create an aggregate view of tasks from various sites.&amp;nbsp; Another interesting point is that by default SharePoint&amp;nbsp;deletes&amp;nbsp;completed tasks after 60 days to improve performance.&amp;nbsp;&amp;nbsp;You can&amp;nbsp;turn that&amp;nbsp;&amp;quot;feature&amp;quot; off but&amp;nbsp;the onus is on&amp;nbsp;you to archive task history, which could be a necessary requirement for compliance.&amp;nbsp;You may want to do this with a blackpearl solution, as well, but the underlying database is built in a way that you don&amp;#39;t need to.&lt;/p&gt;
&lt;p&gt;Taking tasks a step further, after getting through the basics,&amp;nbsp;you have to write even more code to monitor the tasks and&amp;nbsp;react to tasks that have not been acted on in certain timeframe.&amp;nbsp; In K2 blackpearl this functionality can be defined in an Escalation.&amp;nbsp; You can specify rules like &amp;quot;if this task isn&amp;#39;t completed in 24 hours, send an email every day&amp;quot; or &amp;quot;if this task isn&amp;#39;t completed by a certain date specified in my business data, move to another point in the workflow&amp;quot;.&amp;nbsp; Certainly non-trivial coding here.&lt;/p&gt;
&lt;p&gt;We haven&amp;#39;t even touched on how tasks are assigned or how you know when&amp;nbsp;tasks are completed yet, either.&amp;nbsp; Simple assignment isn&amp;#39;t that hard, right?&amp;nbsp; Just an AssignedToUserID column in my Task table, right?&amp;nbsp; Well for one applicaiton that might be ok.&amp;nbsp; But what if your process is more complicated.&amp;nbsp; &amp;quot;This purchase order needs to be approved by&amp;nbsp;two of the managers in the Accounting Department.&amp;quot;&amp;nbsp;&amp;nbsp;blackpearl has the concept of Destinations, Slots, and Succeeding Rules&amp;nbsp;for each activity, or milestone, in a workflow that allows you to easily define scenarios like this.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Additional Benefits&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;K2 blackpearl has additional benefits over a SharePoint or custom solution including versioning support, robust logging and exception handling, and&amp;nbsp;MSBuild integration.&amp;nbsp; And K2 blackpearl also offers addtional advanced&amp;nbsp;features.&amp;nbsp;&amp;nbsp;Smart Objects provide the ability to build facades that encapsulate multiple backend datasources for use in workflows and reporting.&amp;nbsp; Another interesting feature is the&amp;nbsp;Event Bus, which allows you to register events and build out an event driven architecture.&amp;nbsp; These concepts are interesting, but I&amp;#39;m reserving judgement until I have a chance to realy work with them.&amp;nbsp; I may try to expand on the benefits in these areas in future posts.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In the spirit of full disclosure, I have to point out that Clarity is a K2 partner, so it would be easy to assume that I have an obligation to recommend blackpearl.&amp;nbsp; However, we&amp;#39;re not in the business of selling K2 licenses.&amp;nbsp; We&amp;#39;re in the business of serving our clients by building software solutions and their&amp;nbsp;needs always&amp;nbsp;come first.&amp;nbsp; Writing and testing infrastructure&amp;nbsp;code that manages workflows and tasks is not a activity worth spending time and money on.&amp;nbsp;&amp;nbsp;K2 blackpearl provides that framework, allowing us to focus on&amp;nbsp;designing and building applications that solve the business problems at hand, enabling us&amp;nbsp;to quickly deliver high quality process related solutions that meet their needs.&lt;/p&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=5124" width="1" height="1"&gt;</description><category domain="http://blogs.claritycon.com/blogs/bryan_dougherty/archive/tags/Visual+Studio+2005/default.aspx">Visual Studio 2005</category><category domain="http://blogs.claritycon.com/blogs/bryan_dougherty/archive/tags/K2/default.aspx">K2</category><category domain="http://blogs.claritycon.com/blogs/bryan_dougherty/archive/tags/blackpearl/default.aspx">blackpearl</category></item><item><title>Visual Studio Team Edition for Database Professionals: A Developer Productivity Tool</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2008/03/17/visual-studio-team-edition-for-database-professionals-a-developer-productivity-tool.aspx</link><pubDate>Tue, 18 Mar 2008 01:23:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:4199</guid><dc:creator>bdougherty</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=4199</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2008/03/17/visual-studio-team-edition-for-database-professionals-a-developer-productivity-tool.aspx#comments</comments><description>&lt;p&gt;I wanted to share a few quick thoughts on &lt;a class="" href="http://msdn2.microsoft.com/en-us/teamsystem/aa718807.aspx"&gt;Visual Studio Team Edition for Database Professionals&lt;/a&gt;.&amp;nbsp; Over the past several months I’ve found this to be an invaluable tool.&amp;nbsp; Aside from being a mouthful, the name is a little misleading as it implies that it is only targeted at DBAs.&amp;nbsp; This is not the case.&amp;nbsp; This component of the Visual Studio Team Suite is something that developers can use to gain productivity. &lt;/p&gt;
&lt;p&gt;On most of the projects I’ve been involved in, developers are making changes to databases and a DBA may not even exist.&amp;nbsp; Coordination of those changes during the development phase can be a challenge.&amp;nbsp; Even more challenging can be the deployment of those changes to integration, testing, and production environments. VS DB Pro allows developers to track the database structure in a Visual Studio project, just like a class library.&amp;nbsp; A project can be created from an existing database or a new project can be started.&amp;nbsp; The main component of the tool is ability to perform a Schema Comparison, comparing one database or database project to another database.&amp;nbsp; Developers can use the comparison to apply the changes to their local database, or to make changes to the project.&amp;nbsp; I’ve found that this is very helpful for getting changes from one developer to another quickly.&amp;nbsp; The integration with source control helps track your changes.&amp;nbsp; Later in the application life cycle, developers and/or the operation team members can generate a script using the comparison to deploy changes to a test or production environment.&amp;nbsp; In addition to schema comparison, there are other features the tool provides like refactoring and unit testing, which I haven’t used much of yet. &lt;/p&gt;
&lt;p&gt;As always, you can’t beat good communication across a team as a key component of a successful project.&amp;nbsp; However, I think that adding Visual Studio Team Edition for Database Professionals can make your project even more successful.&amp;nbsp; I’ve got some further ideas about “best practices” for using the tool on a project and I’ll try to post those at a later date. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;A couple notes for full disclosure&lt;/em&gt;:&amp;nbsp;I’ve only used VS DB Pro with SQL Server 2005 databases and TFS source control so I can’t tell you about the experience beyond that.&amp;nbsp; Also, I’ve never compared its feature set to that of other tools - I’ve simply taken it for granted as part of the Team Suite.&amp;nbsp; And there are a few gotchas.&amp;nbsp; For example, sometimes after getting latest from source control, even when clicking the “update schema” button, the local temp database doesn’t get updated and that can cause some problems.&amp;nbsp; I’ll give MS a little break chalking this up to a first version of the tool (But it better work better in future releases!).&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=4199" width="1" height="1"&gt;</description><category domain="http://blogs.claritycon.com/blogs/bryan_dougherty/archive/tags/Visual+Studio+2005/default.aspx">Visual Studio 2005</category><category domain="http://blogs.claritycon.com/blogs/bryan_dougherty/archive/tags/Project+Management/default.aspx">Project Management</category><category domain="http://blogs.claritycon.com/blogs/bryan_dougherty/archive/tags/Software+Tools/default.aspx">Software Tools</category><category domain="http://blogs.claritycon.com/blogs/bryan_dougherty/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://blogs.claritycon.com/blogs/bryan_dougherty/archive/tags/Microsoft+SQL+Server/default.aspx">Microsoft SQL Server</category><category domain="http://blogs.claritycon.com/blogs/bryan_dougherty/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category></item><item><title>A Scrum-ptious Methodology?</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/11/18/3500.aspx</link><pubDate>Mon, 19 Nov 2007 00:07:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3500</guid><dc:creator>bdougherty</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=3500</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/11/18/3500.aspx#comments</comments><description>&lt;P&gt;The other day I attended the Chicago &lt;A href="http://vsts.sogeti-chicago.com/pages/november2007.aspx"&gt;VSTS Users Group meeting&lt;/A&gt; where the focus of the meeting was the Scrum methodology. Ed Chaltry from Centare Group led the meeting. He probably felt like he was defending Scrum instead of just presenting it as there was a lot of good lively discussion. It was a VSTS meeting, so a couple of tools that work with TFS &lt;A href="http://www.scrumforteamsystem.com/en/default.aspx"&gt;Conchango&lt;/A&gt; and &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=55A4BDE6-10A7-4C41-9938-F388C1ED15E9&amp;amp;displaylang=en"&gt;eScrum&lt;/A&gt; were demoed a bit. The emphasis was more on Scrum than the tools, however. &lt;/P&gt;
&lt;P&gt;What is Scrum? Scrum is one the agile methodolgies of software development. Wikipedia has an overview &lt;A href="http://en.wikipedia.org/wiki/Scrum_%28development%29"&gt;here&lt;/A&gt;. I have a decent amount of experience working in an agile development model: small teams, including users, SMEs and QA early in the process, following an iterative timeline. Only once, though, have I worked on a project that truly ran under the Scrum methodology. After attending the user group the other day, I was reinspired to evaluate and share my take on Scrum. &lt;/P&gt;
&lt;P&gt;The gist of my thoughts on Scrum? Scrum works well in some instances and should not be used in others. I think there are some things to take from Scrum and use and there are some things to get rid of. Some things make sense to me and some I don't Wow! That's genious! Okay, okay. I have more thoughts than that. Below is a breakdown on what I like and don't like. I'd love to hear other people's thoughts.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Burndown&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;One thing I really like about Scrum is the burndown concept. Your backlog of tasks starts with initial estimates for time and each task is updated on a daily basis to reflect to the amount of work left. What I like about this is that you can see a great view of how your project is progressing. You can see if your estimates were off. You can see when new items have been added. And it is really easy and makes sense. No percentages complete, just what is left. It can all be rolled up nicely into a "Burndown Chart" to show you how your doing. Here's an &lt;A href="http://employees.claritycon.com/bdougherty/blog/images/scrum/burndownChart.JPG"&gt;example&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;To get the complete picture, I like to add a line that shows the total estimate. At first you might think that that doesn't help much because it shouldn't change. Well you and I know that that isn't usually the case. This new line on the chart shows how many new items and how much work has been added to the iteration (just in case things slip you can see why, not that that ever happens). Scrum tries to protect the development process: it allows for new tasks to be added to your sprint backlog, there just not supposed to be new features. Again, I think this is not often the way things work out. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;All Aboard?&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;This brings me to my next point. The business side of the development equation has to be on board with the Scrum process for it to work. That might sound obvious, but unless you have a strong voice that will respect the rules, Scrum isn't going to work out. The business will have to know that that new feature will need to wait until the next Sprint. So culture here is really important to your success. That's going to be true with any software development process. With Scrum, I feel like you really need that buy in. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Requirements Aren't Perfect &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Like I said before, the idea of a backlog of features is great. "We need to be able to view our orders by state." That's a feature that is pretty straight forward. Put it on the list. Prioritize it. We'll get it into a Sprint and out in a release. Sounds good. But there are always questions to ask about those features. Or there are features that aren't so straight forward. "Our customers need a better view of their orders". They're never perfectly documented or straightforward when they come to a developer. The business analyst might capture what they think the user wants, but there's often back and forth necessary when you start building the feature. So how do you estimate for that? Do you pad for additional requirements gathering time? I think that is what Scrum wants you to do. And the first day of the Sprint is a planning day so you may get some of that done there. So this might be handled in Scrum, but this is one of the things that I think is much harder to do successfully that it sounds. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Long Term Planning &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Something that I don't understand about Scrum is how it accounts for long term planning and changes from a technical standpoint. If you're building out a new system, there is going to be a decent amount of technical design required before any coding starts. There might not be any deliverable code at the end of this. Scrum seems to require a potentially releasable deliverable. That isn't always going to be the case. Somethings take longer than a month. For example if you're moving from from oracle to sql server and you know you can't do that in a one month period, do you do it as a sprint do you? Do you start the new work in a Sprint that won't yeild a release while continuing to deliver new features for the current system in a separate sprint? What if you need to do some evaluation of your application. If you were going to evaluate a new third-part toolset or tweak performance? Or if you're changing to a more service oriented architecture that you didn't realize was needed at first. How do you handle this? Can you add technical-only items to you backlog? &lt;/P&gt;
&lt;P&gt;This is where I think the 2-4 week strict Sprint timeline breaks down a bit. I get that you can get a rythm going if your consistent, but I just don't think that everything can or should be done in such a strict timeline. What's wrong with a 3-month first phase? This may be where some semantics come into play. You could say that a 3-month phase is just three Sprints. Some things, though, should just be taken out of band. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Daily "Standup" Meetings &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;My last thought on Scrum is about the daily meetings. Scrum demands a daily "standup" meeting where the team reports quickly on what they've been doing, what they're going to be doing and if they have any roadblocks. Communication is important - no question. And I like the concept of team members committing to what they will be working on. But a daily 15 minute meeting never seems practical to me. Everyone is supposed to stand to keep things moving, maybe even pass something around to designate the speaker. And the Scrum Master is supposed to take issues offline for subsequent meetings. Sounds good. &lt;/P&gt;
&lt;P&gt;Realistically people are on a roll come meeting time or they get distracted and pulled in different directions and can't make a daily meeting. At the very least this can cause someone to be late. This is killer if that person is the Scrum Master. Roadblocks that arise often involve the majority (if not all) of the team that is present, so it just makes sense to talk about them a little bit while everyone is there. Autonomy of the developers is a tenet of Scrum, yet developers have to check in every day. Or maybe you don't trust your team? That's one way it could look to a developer. Let's let everyone sink their teeth into something and do a couple days worth of work and then report back. &lt;/P&gt;
&lt;P&gt;The daily stand up meeting is likely to fail. This can lead to resentment toward the whole process and subsequently low morale. Weekly meetings and the responsibility to raise issues as needed work better in my opinion. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3500" width="1" height="1"&gt;</description><category domain="http://blogs.claritycon.com/blogs/bryan_dougherty/archive/tags/Project+Management/default.aspx">Project Management</category><category domain="http://blogs.claritycon.com/blogs/bryan_dougherty/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category></item><item><title>.NET Technology Briefing Milwaukee</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/09/30/3291.aspx</link><pubDate>Sun, 30 Sep 2007 21:26:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3291</guid><dc:creator>bdougherty</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=3291</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/09/30/3291.aspx#comments</comments><description>&lt;P&gt;Last week I participated in the&amp;nbsp;Microsoft .NET Techology Briefing in Milwaukee.&amp;nbsp; I&amp;nbsp;gave a presentation on what's new since .NET 2.0.&amp;nbsp; Topics included .NET Framework 3.0 and 3.5, ASP.NET AJAX, Silverlight, and Visual Studio 2008.&lt;/P&gt;
&lt;P&gt;You can download the slides here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://employees.claritycon.com/bdougherty/blog/downloads/NewSince2.zip"&gt;https://employees.claritycon.com/bdougherty/blog/downloads/NewSince2.zip&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Here's are links to some of the demo material:&lt;/P&gt;
&lt;P&gt;WPF Healthcare Prototype&lt;/P&gt;
&lt;P&gt;&lt;A href="http://wpf.netfx3.com/files/folders/applications/entry6608.aspx"&gt;http://wpf.netfx3.com/files/folders/applications/entry6608.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;WPF Zeus XBAP&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.microsoft.com/casestudies/casestudy.aspx?casestudyid=53790"&gt;http://www.microsoft.com/casestudies/casestudy.aspx?casestudyid=53790&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://wpf.netfx3.com/direct/zurich/zeuswpf.xbap"&gt;http://wpf.netfx3.com/direct/zurich/zeuswpf.xbap&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Simple demo projects I&amp;nbsp;created in Visual Studio 2008 (LINQ to SQL demo&amp;nbsp;won't have the&amp;nbsp;database so it won't run)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://employees.claritycon.com/bdougherty/blog/downloads/DemoApps.zip"&gt;https://employees.claritycon.com/bdougherty/blog/downloads/DemoApps.zip&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3291" width="1" height="1"&gt;</description><category domain="http://blogs.claritycon.com/blogs/bryan_dougherty/archive/tags/Visual+Studio+Team+System/default.aspx">Visual Studio Team System</category></item><item><title>Questions to Ask Yourself Before Creating a User Control</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/06/13/3192.aspx</link><pubDate>Wed, 13 Jun 2007 18:54:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3192</guid><dc:creator>bdougherty</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=3192</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/06/13/3192.aspx#comments</comments><description>&lt;P&gt;User controls are great. They allow a developer to encapsulate functionality that can be reused throughout applications. Like any well designed class, they allow the consumer to care only about the interface and not inner workings. And from a team perspective, they provide logical separation of tasks so that multiple developers can work on related functionality simultaneously. &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;But just like everything else in this world, there can always be too much of a good thing. &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Too many user controls can be a pain to manage, add overhead, and potentially make the data you’re trying to work with harder to retrieve. Plus, building new controls does come with a cost and you don’t want to waste your time. Below are some questions I think you should ask yourself before deciding to build a user control. Specifically I’m thinking in the context of ASP.NET web development, but much of this relates to Winform and development, too.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Does my control have a unique behavior?&lt;/STRONG&gt; &lt;BR&gt;It’s easy to fall into the trap of data (not behavior) dictating the need for a user control. Let’s say that a couple web pages need to allow users to select from a list of apples. Before you know it, someone builds ApplePicker. The ApplePicker usercontrol contains a DropDownList control and allows the consumer to set the data source to a list through a DataSource property. And…and that’s about all. &lt;/P&gt;
&lt;P&gt;It turns out there is no behavioral difference between the two controls. The task of showing selectable lists of fruit could easily be achieved by simply using a DropDownList control itself. Now if the ApplePicker provided a list of options AND conditionally showed an icon based on whether the selected Apple is good for making pies or just good for snacking, then you’ve probably defined some unique behavior. In this case a custom user control is probably in order.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What if I just used a utility/helper class instead?&lt;/STRONG&gt; &lt;BR&gt;So let’s suppose the ApplePicker user control was simply a DropDownList as we initially discussed. But now the control is going to be "data aware". It knows how to load itself full of Apples. While it’s pretty cool to be able to drop a control on a page and "it just works" by filling its data source, in my I’ve found that it tends to not be all that practical or even all that beneficial. The rationale behind such a design decision is usually to avoid having to wire up the data source of your control on every web page and allow for ease updating the actual data source. These goals can be achieved in a better way. &lt;/P&gt;
&lt;P&gt;Defining a static method a utility or helper class (Utility.GetApples()) allows for a consistent way to load the ApplePicker on all your web pages. The actual source of data can be changed for all controls by changing the inner workings of the GetApples method. And it also allows you to change the data source in any exception cases. For example, most web pages may show a full list of apples, but one may need to show a list of Favorite Apples that a user has defined. Both lists can be displayed with a single control that is now more in tune with a &lt;A href="http://en.wikipedia.org/wiki/Model-view-controller"&gt;&lt;U&gt;Model View Controller&lt;/U&gt;&lt;/A&gt; pattern. This can also help you consistently add the typical "-- Please Pick An Apple --" or blank first item in your list. I really like following this kind of pattern with controls to separate the behavior and display and find that it is almost always beneficial.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Do I need to lock down access to my functionality?&lt;/STRONG&gt; &lt;BR&gt;So let’s suppose the ApplePicker user control was simply a DropDownList as we initially discussed. What if I want to lock down the way consumers use my control. For example, I feel strongly that consumers should only pass in a List&amp;lt;Apple&amp;gt; (List(Of Apples) in VB) then maybe I’d want my own strongly typed DataSource property. A better rationale, though, would be that certain methods or properties of the standard control provide more access than you want consumers to have. For example, you may wish to only allow the Text property to be read-only. Access alone is probably not going to justify use of a user control since in most cases you’ll probably want to lock down access to something that relates to unique behavior.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Am I just trying to prevent duplication of code?&lt;/STRONG&gt;&lt;BR&gt;I’ll buy code reuse as justification for a user control. But only if there is a lot. If you have two web pages that have to show a list of Apples and the list can simply be achieved with the afore mentioned DropDownList, you’re not going to win me over. If you have 20 web pages that need to display this list of Apples with a red Font and green BackColor, then you’re getting warmer. But I’d probably look to see what we could achieve using &lt;A href="http://msdn2.microsoft.com/en-us/library/ykzx33wh(VS.80).aspx"&gt;&lt;U&gt;skins and themes&lt;/U&gt;&lt;/A&gt; instead. In general, I think you should try to avoid the "duplication of code" argument unless you have a composite UI (multiple controls) like the conditional icon example. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Should I build a templated control?&lt;/STRONG&gt;&lt;BR&gt;Lastly, returning to the MVC and "behavior" theme, I think it’s good to ask whether templated controls are a good fit for your design. You’ve defined a unique behavior, but it before you know it, some web page may require 90% of the functionality in your user control, but they want to make a subtle UI change. For example, instead of a conditional icon indicating the best use of the selected apple, you may just want to display the text "Pie" or "Snack." ASP.NET offers some cool functionality allowing you to &lt;A href="http://msdn2.microsoft.com/en-us/library/aa479300.aspx"&gt;&lt;U&gt;define a control that allows the UI to be tweaked via templates&lt;/U&gt;&lt;/A&gt;. This certainly involves more work when building your control, but it may be a good way for you to extend the reuse of your control.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Summary&lt;/STRONG&gt;&lt;BR&gt;I’m a big fan of user controls, and an even bigger fan when they are thoughtfully designed and reusable. As discussed above, there are plenty of great reasons to use them. However, they can become maintenance nightmare and simply add to overhead. I know this topic can spark a lot of opinion and debate, but hopefully these questions will help you make future decisions about when to create user controls your applications.&lt;/P&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3192" width="1" height="1"&gt;</description></item><item><title>Microsoft Interop Forms Toolkit 2.0 Released</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/05/10/3120.aspx</link><pubDate>Fri, 11 May 2007 01:44:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3120</guid><dc:creator>bdougherty</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=3120</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/05/10/3120.aspx#comments</comments><description>&lt;P&gt;Microsoft has&amp;nbsp;released the newest version of the Interop Forms Toolkit. You can download it &lt;A href="http://msdn2.microsoft.com/en-us/vbasic/bb419144.aspx"&gt;here&lt;/A&gt;.&amp;nbsp; Clarity created the&amp;nbsp;&lt;A href="/blogs/clarity_headlines/archive/2006/09/25/2050.aspx"&gt;first version of the toolkit&lt;/A&gt; aimed at simplifying the process of migrating VB6 applications to .NET.&amp;nbsp; The new version goes beyond Forms, adding support for easily incorporating .NET Controls in a Visual Basic 6 Form.&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3120" width="1" height="1"&gt;</description></item><item><title>MEDC Closing Thoughts</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/05/02/3106.aspx</link><pubDate>Thu, 03 May 2007 00:27:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3106</guid><dc:creator>bdougherty</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=3106</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/05/02/3106.aspx#comments</comments><description>&lt;P&gt;MEDC was a bit of a let down this year.&amp;nbsp; Last year, MS was championing Windows Mobile 5.0 and rightly so.&amp;nbsp; It was a big step.&amp;nbsp; This year nothing like that existed.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Windows Mobile 6.0 and.NET CF 3.5 have some cool updates. Windows Mobile Pocket PC and Smartphone are called now Windows Mobile Professional and Standard, respectively.&amp;nbsp; There's a new cellular emulator and a Fake GPS emulator for developers to test with.&amp;nbsp; Orcas is coming.&amp;nbsp; But there wasn't that huge jump in technology.&lt;/P&gt;
&lt;P&gt;You still have SQL Server CE.&amp;nbsp; And though the name changed four times, you still only have RDA and Merge Replication.&amp;nbsp; The Occasionally Connected Sync framework/components/pattern or whatever still seems to be off in the distance.&amp;nbsp; Gaming and entertainment still makes up a larger portion of market share than Business/Office and Home/Education combined.&lt;/P&gt;
&lt;P&gt;Maybe MS didn't put the effort into mobile that they did the year before.&amp;nbsp; Maybe my perception is off.&amp;nbsp; This year just seemed to lack some excitment.&amp;nbsp; It's still mobile development, though, and that is ALWAYS cool.&amp;nbsp; So hopefully I'll get my hands dirty with some of this soon.&amp;nbsp; I'll be sure to post on any new excitement I learn about.&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3106" width="1" height="1"&gt;</description></item><item><title>Store and Forward Transport</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/05/02/3104.aspx</link><pubDate>Thu, 03 May 2007 00:03:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3104</guid><dc:creator>bdougherty</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=3104</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/05/02/3104.aspx#comments</comments><description>&lt;P&gt;One of the cooler things I learned about at MEDC was&amp;nbsp;the new Store and Forward Transport capability in the upcoming .NET CF 3.5.&amp;nbsp; This allows one device to send data to a central data store and even directly to another device using the new Email trasport feature in WCF.&amp;nbsp; This looks like it could really simplify data transfer in some scnearios, especially in a loosely connected enviroment.&amp;nbsp; Essentially your "service" mail stays up on the server until your code pulls it down.&lt;/P&gt;
&lt;P&gt;The new code lives in the System.ServiceModel.Channels namespace.&amp;nbsp; The basic flow of the code looks something like this.&lt;/P&gt;
&lt;P&gt;RECEIVING&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a WindowsMobileMailBinding 
&lt;LI&gt;From the binding, create a listener specifiying the channel name and email address&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;SENDING&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;From the binding, create a channel factory 
&lt;LI&gt;Open the factory and&amp;nbsp;create and output channel 
&lt;LI&gt;Create a Message that includes your serialized custom data and send it&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Of course there's that's the simplified view, but seeing and playing with the code a little, it looks like it's easy enough.&amp;nbsp; It's also worth noting that messages can be protected&amp;nbsp;using WS-Security.&lt;/P&gt;
&lt;P&gt;For more detailed info, checkout Mark Prentice's blog: &lt;A href="http://blogs.msdn.com/markprenticems/archive/2007/04/25/introduction-to-the-windows-communication-foundation-for-the-net-compact-framework-store-and-forward-messaging.aspx"&gt;http://blogs.msdn.com/markprenticems/archive/2007/04/25/introduction-to-the-windows-communication-foundation-for-the-net-compact-framework-store-and-forward-messaging.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3104" width="1" height="1"&gt;</description></item><item><title>AJAX Patterns</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/05/02/3100.aspx</link><pubDate>Wed, 02 May 2007 16:29:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3100</guid><dc:creator>bdougherty</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=3100</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/05/02/3100.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;One of the discussions at MIX covered patterns to follow when developing with AJAX.&amp;nbsp; These patterns, or maybe better called conventions, can be divided into two groups: Foundational Patterns and User Experience Patterns.&amp;nbsp; Foundational patterns describe the structure of the code and resources used to develop AJAX.&amp;nbsp; User Experience Patterns, not surprisingly, improve the way a user interacts with the web site.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Some of the foundational pattern discussion was not new.&amp;nbsp; It's something I think we all try to do in our everyday development: separation and encapsulation.&amp;nbsp; Whenever possible, separating code from content is ideal.&amp;nbsp; For example, moving your custom javascript code into a separate js file can allow for content updates independent of code.&amp;nbsp; Taking it a step further, the inclusion of javascript and control over the placement of content can be encapsulated into a server control creating a single unit that can be reused.&amp;nbsp; I know this isn't rocket science, but in an enviroment where web tools change frequently and there are lots of options, it is nice to affirm the belief in building reusable pieces of functionality that abstract behavior from content.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;The patterns that are more interesting to talk about with AJAX relate to user experience though.&amp;nbsp; That's why we've got AJAX, right? AJAX exists to make it easier to build a user experience that is more intuitive, responseive and user friendly. The two points of interest we discussed related to history an user feedback. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;With AJAX, you lose the postback and therefore lose the back button.&amp;nbsp; That might seem like a bad thing, but instead, it can be treated as an opportunity.&amp;nbsp; For example, if a user is filling out a form that adds an order, you probably don't want them to be able to go back to the form with the old values after they submit.&amp;nbsp; Let's think about another example, though.&amp;nbsp; You may show pictures of products that a user can click through with typical paging controls.&amp;nbsp; Making them slick with AJAX is cool, but you could make the behavior of the page even more natural by allowing the back and forward buttons to do what the user expects: navigate through the images they just saw.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;A future release of the AJAX Control Toolkit (man is it difficult to track what is/will be available when) will most likely offer a history server control that exposes an API for managing web browser history.&amp;nbsp; This allows you to define logical views in your web site and decide exactly when to add history.&amp;nbsp; You can even structure these views such that they can be accessed via a URL for bookmarking/static linking ability.&amp;nbsp; For more info and the current source code for the control check out Nikhil's blog (&lt;/FONT&gt;&lt;A href="http://www.nikhilk.net/BackButtonSupport.aspx"&gt;&lt;FONT face=Tahoma size=2&gt;http://www.nikhilk.net/BackButtonSupport.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Another pattern to follow relates to giving a user feedback about what they changed.&amp;nbsp; One way to do this is by using the UpdateAnimation control that current ships in the AJAX Control Toolkit.&amp;nbsp; A new way is using the prototype UpdateIndicator control that is targeted for a future release.&amp;nbsp; I don't think the code for the control is available yet, but I'll post an update if I find it.&amp;nbsp; The server side control allows you scroll to a changed field and momentarily higlighting the change.&amp;nbsp; Implementing this type of behavior significantly improves the user experience and further blurs the line between web apps and richer fat client application abilities.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;For more info on AJAX patterns, check out the following sites:&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://ajaxpatterns.org"&gt;&lt;FONT face=Tahoma size=2&gt;http://ajaxpatterns.org&lt;/FONT&gt;&lt;/A&gt;&lt;BR&gt;&lt;FONT face=Tahoma size=2&gt;&lt;A href="http://developer.yahoo.com/ypatterns/"&gt;http://developer.yahoo.com/ypatterns/&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3100" width="1" height="1"&gt;</description></item><item><title>MEDC 2007</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/05/01/3092.aspx</link><pubDate>Tue, 01 May 2007 21:26:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3092</guid><dc:creator>bdougherty</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=3092</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/05/01/3092.aspx#comments</comments><description>&lt;P&gt;&lt;A href="https://www.medc2007.com/public/featuredspeakers.aspx"&gt;&lt;FONT face=Tahoma size=2&gt;Robbie Bach&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;, President of Entertainment &amp;amp; Devices Division, led today's keynote address at &lt;/FONT&gt;&lt;A href="http://www.medc2007.com/"&gt;&lt;FONT face=Tahoma size=2&gt;MEDC 2007&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;.&amp;nbsp; The overarching theme of the presentation was that Microsoft is known to be your connected solution in the workplace, but they want to also be your mobile solution.&amp;nbsp; MS wants to give users "what they want when they want it."&amp;nbsp; They are continuing to focus on expanding mobile&amp;nbsp;services&amp;nbsp;from both MS (SQL Server, Office, Dynamics) and partners (VCast, Yahoo!, Sling, Weatherbug,&amp;nbsp;vodaphone), improve development provide tools (VS.NET), and supporting the market (Mobile Marketplace, Verisign)&amp;nbsp;to&amp;nbsp;foster growth in the mobile landscape.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;The presentation was a little heavy of the marketing side of things, but there were some cool highlights:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Tahoma size=2&gt;Clarity's own &lt;A href="/blogs/jon_rauschenberger/default.aspx"&gt;Jon Rauschenberger&lt;/A&gt; demoed a&amp;nbsp;Crate &amp;amp; Barrel touch screen Gift Registry kiosk application, highlighting the use of &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/Expression/products/overview.aspx?key=blend"&gt;&lt;FONT face=Tahoma size=2&gt;Expression Blend&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;, &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/aa940538.aspx"&gt;&lt;FONT face=Tahoma size=2&gt;Target Designer&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;&amp;nbsp;and USB boot/deployment&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Tahoma size=2&gt;Microsoft Robotics Studio was demoed, using an XBOX control to drive a robot through a full 3-D, full-physics simulation environment&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Tahoma size=2&gt;Additional help for developers including SQL Server CE in-ROM, .NET CF 3.5 support for LINQ and support for unit tests&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Tahoma size=2&gt;A new technology shipping with .NET CF 3.5 Futures called Store And Forward that allows a mobile device to push data (like inventory information)&amp;nbsp;through Exchange to another mobile device&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Tahoma size=2&gt;Using web services on devices (WSD) to control things like lighting and the thermostat in your home remotely&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Tahoma size=2&gt;A demo showing a full&amp;nbsp;&lt;/FONT&gt;&lt;A href="http://www.microsoft.com/silverlight/"&gt;&lt;FONT face=Tahoma size=2&gt;Silverlight&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Tahoma size=2&gt;&amp;nbsp;web site running on IE mobile&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face=Tahoma size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3092" width="1" height="1"&gt;</description></item><item><title>New ASP.NET Dynamic Data Controls : Nifty, But Not Real World</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/05/01/3087.aspx</link><pubDate>Tue, 01 May 2007 05:06:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:3087</guid><dc:creator>bdougherty</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=3087</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/05/01/3087.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Today at &lt;A href="http://visitmix.com/"&gt;MIX&lt;/A&gt;, a new set of controls aimed at simplifying data binding in ASP.NET were announced as part of the &lt;A href="http://www.asp.net/downloads/futures/"&gt;ASP.NET Futures release&lt;/A&gt;.&amp;nbsp; The goal of these &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;controls is to make the process of creating a data bound web site extremely easy.&amp;nbsp; The theme of the presentation seemed to be "Use these controls to&amp;nbsp;rapidly develop a&amp;nbsp;starting point that you can replace portions of over time."&amp;nbsp; While the &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;controls do meet this goal, there is, in my opinion, only a very small set of real world projects &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;that would ever use them.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Some of you&amp;nbsp;roll your eyes when I voice my skepticism for the magical wizardry that Visual &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;Studio and some controls (Web or Winform) offer to make data access and display too easy and impractical for real world enterprise applications.&amp;nbsp; I can usually &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;support my position in a debate, though I many times I'm satisfied to say "it just doesn't feel right."&amp;nbsp; With these new &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;Dynamic Data Controls, though, I think we'll all be able to agree: They're just not practical for most enterprise &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;situations.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Let's review the offering before making a full judgement, though.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;The story of the Dynamic Data Controls starts by adding a data source (currently only a SQL &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;Server database) to the App_Data folder of your web site.&amp;nbsp; (You may also be able to simply select a &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;connection string, but it wasn't clear.)&amp;nbsp; Then you create a web page, optionally using the pre-built &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;Dynamic Data Web Form template.&amp;nbsp; Finally, you add one or more of the new Dynamic Data Controls and &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;there you have it.&amp;nbsp; The magic behind the curtain recognizes the columns, data types, foreign key constraints and other info &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;about your database and wires up a fully functional read/write data driven web site.&amp;nbsp; You can even skip adding the web page and with a simple tweak of the web config you can have the auto.axd mechanism create an entire site for your database.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;The new release offers several new controls.&amp;nbsp; The DynamicList is essentially &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;a grid with your typical edit, delete, and row select features.&amp;nbsp; DynamicDetails and DynamicInsert &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;controls gives you a details view and the ability to insert a record.&amp;nbsp; The DynamicFilter is a drop &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;down list or radio button (or maybe another control) that filters your data source.&amp;nbsp; The &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;DynamicRSS control exposes your data as an RSS feed.&amp;nbsp; Finally, there is the big daddy &lt;/FONT&gt;&lt;FONT face=Tahoma size=2&gt;DynamicAutoData control that is a composite of all of the above.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;All of the controls support the extender pattern of setting the ControlID property to the ID of the Control you want to use.&amp;nbsp; For example, if you want to make a DynamicFilter a DropDownList with so you can handle it's events, you would set the DynamicFilter's ControlID to the ID of the DropDownList.&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=code&gt;
&lt;P&gt;&amp;lt;asp:DynamicFilter ID="dfOrderID" ControlID="ddlOrderID"/&amp;gt; &lt;BR&gt;&amp;lt;asp:DropDownList ID="ddlOrderID" SelectedIndexChanged="ddlOrderID_SelectedIndexChanged"/&amp;gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;So to review, with zero code, you created a data driven web site.&amp;nbsp; You can even customize some of&amp;nbsp;the style and behavior.&amp;nbsp; But that's it.&amp;nbsp; You haven't built an enterprise LOB application.&amp;nbsp; And you really can't.&amp;nbsp; The meat is in the magic, and there is a little too much mystery meat for my taste.&amp;nbsp; Where's the security?&amp;nbsp; Where are the business rules?&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;Unfortunately, there is no good&amp;nbsp;answer, at least not yet.&amp;nbsp; The roadmap for the Dynamic Data Controls seems to revolve around&amp;nbsp;the use of&amp;nbsp;LINQ as the data layer and that is where you would wire up your business logic.&amp;nbsp; But integration with LINQ&amp;nbsp;isn't ready.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;I credit the team that built the Dynamic Data Controls for creating a neat tool.&amp;nbsp; But unfortuantely (at least for now) outside of&amp;nbsp;a purely internal or&amp;nbsp;administrative web site, I don't see there being any enterprise-level value.&amp;nbsp; Oh, and the whole thing&amp;nbsp;just doesn't feel right.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=3087" width="1" height="1"&gt;</description></item><item><title>Beam Me Up: An Initial Review of my new Cingular 3125 StarTrek</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/01/30/2636.aspx</link><pubDate>Tue, 30 Jan 2007 17:55:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:2636</guid><dc:creator>bdougherty</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=2636</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/01/30/2636.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Arial&gt;So I finally got a new phone!&amp;nbsp; I've&amp;nbsp;upgraded my MPX220 to the &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/windowsmobile/devices/devicedisplay.aspx?module=deviceDisplay;Smartphone;americas;263"&gt;&lt;FONT face=Arial&gt;Cingular 3125&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial&gt;, also known as the HTC Star Trek.&amp;nbsp; &lt;/FONT&gt;&lt;FONT face=Arial&gt;I've had the phone for a few weeks and so far I've been very happy.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=floatright&gt;&lt;IMG src="http://employees.claritycon.com/bdougherty/blog/images/3125/3125.jpg"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;STRONG&gt;Phone&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face=Arial&gt;First and most importantly, let's talk about the phone features.&amp;nbsp; It's thin and light, comparable to the RAZR, and has metallic textured exterior so it doesn't slide around.&amp;nbsp; The&amp;nbsp;call sound is solid - definitely loud enough.&amp;nbsp; It's comfortable to hold when making a call, one thing I didn't like about the Q or BlackJack which are wider than a typical phone.&amp;nbsp; The buttons are flat, but have dividers so you know what button your pressing.&amp;nbsp; The joypad in the middle is a bit small for my fat thumbs, but I've adjusted pretty well.&amp;nbsp; The screen is clear and bright and in general the Windows Mobile 5.0 OS seems to keep up&lt;/FONT&gt;&lt;FONT face=Arial&gt;.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;Battery life, another complaint among owners of the afore mentioned QWERTY phones is not an issue with the 3125.&amp;nbsp; I don't have to religiously charge it everyday and that's with some MP3 use and over air ActiveSynching.&amp;nbsp; The phone comes with both a wall charger and a USB charger, also used for synching.&amp;nbsp; This is great because I keep one at work and one at home.&amp;nbsp; The one downside, though, is that USB charger is definitely slower.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;Predictive dialing&amp;nbsp;works well, with one complaint.&amp;nbsp; My speed dial numbers used to display at the top of the list on my old phone.&amp;nbsp; Now when I&amp;nbsp;press 5, the J's, K's and L's from my recent history now show above my #5 speed dial, where as with my old phone, the speed dial number was at the top.&amp;nbsp; It still works the same (press and hold 5 and it calls that speed dial) but I miss the visual feedback.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;STRONG&gt;MP3 Player&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face=Arial&gt;UnAmerican as it may be, I don't own an iPod and instead use my phone as my MP3 player, just like I did my old one.&amp;nbsp; This is where the 3125 picks up steam.&amp;nbsp; The media controls on the outside are the killer feature I've been&amp;nbsp;waiting for.&amp;nbsp; It shows you what song is playing on the cool exterior display and I can pause and skip to different songs.&amp;nbsp; Only once have I accidently hit the buttons hard enough to inadvertantly start the media player.&amp;nbsp; The included earbud headphones have good sound and a volume control next to the microphone.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;While it still lags behind the iPod when it comes to usablity,&amp;nbsp;the new version of&amp;nbsp;Windows Media Player Mobile is a big improvement over previous versions.&amp;nbsp; It has a library concept allowing me to browse by artist, album or genre.&amp;nbsp; Synching through Media Player on my PC is better than it used to be, but still craps out every once in a while.&amp;nbsp; I haven't figure out why yet.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;In general the MP3 capabilities are what make this phone great.&amp;nbsp; With a 2GB micro-SD card added, it has a pretty good capacity.&amp;nbsp; I can use it on the train or at the gym.&amp;nbsp; I just need to get the right adapter and hopefully I can get it working in my car.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;STRONG&gt;Organizer&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face=Arial&gt;Lastly, there's the productivity side of the equation, and the reason I got a smartphone.&amp;nbsp; I can sych my calendar, email, contacts.&amp;nbsp; MSN Mobile works pretty well for checking my Hotmail, too.&amp;nbsp; The only big upgrades I got here are Exchange Push Notification and synchronization of tasks.&amp;nbsp; The former doesn't make a big difference for me, but the latter was big for me - I'm a big list maker.&amp;nbsp; The interface ifor tasks is still pretty prehistoric, but synching over the air is great.&amp;nbsp; I still may look for better task management software, though.&amp;nbsp; The phone also shipped with the ClearVuew suite of software for viewing documents, pdfs, and presentations.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;Overall I think the 3125 is a great phone.&amp;nbsp; It has solid phone features,&amp;nbsp;makes for a good MP3&amp;nbsp;player, and satisfies all the organization&amp;nbsp;needs of someone who would rather carry a small solid phone over a a brick with with a QWERTY keyboard and a stylus.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=2636" width="1" height="1"&gt;</description></item><item><title>SQL Server Compact Edition For Real and Not Everywhere</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/01/24/2633.aspx</link><pubDate>Thu, 25 Jan 2007 02:54:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:2633</guid><dc:creator>bdougherty</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=2633</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2007/01/24/2633.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;So SQL Server Compact Edition has been released officially.&amp;nbsp; Remember?&amp;nbsp;It's that product that was called SQL Server Everywhere...or was it SQL Server Mobile?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Jim Wilson has a nice post that summarizes where you can get all the goods:&lt;/FONT&gt;&lt;BR&gt;&lt;A href="http://pluralsight.com/blogs/jimw/archive/2007/01/15/45704.aspx"&gt;&lt;FONT face=Arial size=2&gt;http://pluralsight.com/blogs/jimw/archive/2007/01/15/45704.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;For more on the naming see Steve Lasker's blog:&lt;/FONT&gt;&lt;BR&gt;&lt;A href="http://blogs.msdn.com/stevelasker/archive/2006/10/31/sql-server-everywhere-gets-yet-another-name.aspx"&gt;&lt;FONT face=Arial size=2&gt;http://blogs.msdn.com/stevelasker/archive/2006/10/31/sql-server-everywhere-gets-yet-another-name.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=2633" width="1" height="1"&gt;</description></item><item><title>Finding an Instance of a Custom Generic Type at Runtime</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2006/10/31/2427.aspx</link><pubDate>Tue, 31 Oct 2006 12:28:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:2427</guid><dc:creator>bdougherty</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=2427</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2006/10/31/2427.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Arial&gt;Sometimes we write .NET code that needs to behave differently based on the type of the instance it is working with.&amp;nbsp;&amp;nbsp;In other words, branched logic based on type.&amp;nbsp; In&amp;nbsp;a custom collection, for example, we may have logic that says "if the item added is of my custom item type then&amp;nbsp;check one of its properties."&amp;nbsp; An example in the .NET Framework is the DataGridView.&amp;nbsp; It behaves differently based on the type of the data source that was set.&amp;nbsp; One set of behaviors for an ArrayList and additional logic for a DataSet.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;Usually the following code would satisfy the need:&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=code&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;If TypeOf _dataSource Is DataSet Then...&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;This type of detection gets a little tricky when your writing code to try to find a Generic class that you don't know the type parameter for. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;Assume you defined the following classes:&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=code&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;Public Class SomeCollection&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Public Sub Add(anyItem as Object)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;' If anyItem is SomeObject &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;' check the SomeInfo Property&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;End Sub&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;End Class&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;Public Class SomeObject(Of TInnerObject)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Public ReadOnly Property SomeInfo As String&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Get&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Return _info&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End Get&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;End Property&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;End Class&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;The first class is a collection that allows any item to be&amp;nbsp;added to it.&amp;nbsp; The second class is&amp;nbsp;a Generic class that you will sometimes add to your custom collection.&amp;nbsp;&amp;nbsp;If SomeCollection&amp;nbsp;always wanted to check the property SomeInfo on a SomeObject if it were added, you couldn't easily write the code to&amp;nbsp;do so&amp;nbsp;because you don't know what the type parameter for the instance is.&amp;nbsp; In other words,&amp;nbsp;you don't know to put in place of the question mark below:&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=code&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;If TypeOf anyItem Is SomeObject(Of ?&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;There are two similar ways to go about solving this problem.&amp;nbsp; The first is to declare an Interface that SomeObject implements.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=code&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;Public Interface ISomeObject&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ReadOnly Property SomeInfo As String&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;End Interface&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;Then you can write the code as &lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=code&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;If TypeOf anyItem Is ISomeObject Then...&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;What I prefer is to create a base class for your Generic object that has the same name but no type parameter and forces the implementation in the derived Generic class.&amp;nbsp; I think it is more readable and potentially easier to manage.&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=code&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;Public MustInherit Class SomeObject&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Public MustOverride ReadOnly Property SomeInfo As String&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;End Class&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;Public Class SomeObject(Of TInnerObject)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Inherits SomeObject&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Public Overrides ReadOnly Property SomeInfo As String&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Get&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Return _info&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;End Get&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;End Property&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;End Class&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;This way you can add the following code in SomeCollection's Add method:&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV class=code&gt;
&lt;P&gt;&lt;FONT face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;If TypeOf anyItem Is SomeObject Then...&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=2427" width="1" height="1"&gt;</description></item><item><title>Custom Serialization and the Misbehaving Dictionary</title><link>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2006/09/08/1775.aspx</link><pubDate>Fri, 08 Sep 2006 18:40:00 GMT</pubDate><guid isPermaLink="false">da947a97-509e-40e6-bbb5-1443ad47bf4e:1775</guid><dc:creator>bdougherty</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.claritycon.com/blogs/bryan_dougherty/rsscomments.aspx?PostID=1775</wfw:commentRss><comments>http://blogs.claritycon.com/blogs/bryan_dougherty/archive/2006/09/08/1775.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Arial&gt;&lt;EM&gt;Background&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;I recently needed to implement custom serialization in a class&amp;nbsp;that we'll call&amp;nbsp;MyCollection for simplicity.&amp;nbsp; The class supported a number of things including providing a Dictionary like interface as well as binding support.&amp;nbsp; Not surprisingly it maintained a couple collections including a Dictionary(Of TKey, TValue)&amp;nbsp;and a BindingList(Of T),&amp;nbsp;the latter exposing events needed for binding to a grid.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;EM&gt;The Problem&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;Since I was using binary serialization, serializing the BindingList would be problematic since any objects that hook the BindingList's events would also be serialized.&amp;nbsp; That includes a BindingSource object which doesn't like to be serialized.&amp;nbsp; Okay.&amp;nbsp; No problem.&amp;nbsp; All I'd need to do is only serialize out my Dictionary, and then rehydrate the BindingList after serialization.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;I can prevent serialization of my BindingList by decorating the private member with the &lt;A href="http://msdn2.microsoft.com/en-us/library/system.nonserializedattribute.aspx"&gt;&amp;lt;NonSerialized()&amp;gt;&lt;/A&gt; attribute. Then u&lt;/FONT&gt;&lt;FONT face=Arial&gt;sing the new &lt;A href="http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.ondeserializedattribute.aspx"&gt;&amp;lt;OnDeserialized()&amp;gt;&lt;/A&gt; attribute that is part of the .NET 2.0 Framework, this would be easy.&amp;nbsp; Just create a method in MyCollection of the correct signature, decorate it with this attribute, and&amp;nbsp;write a quick loop to add from the Dictionary to the BindingList.&amp;nbsp; That easy, right?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;EM&gt;Enter the Misbehaving Dictionary&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;For some reason, the Dictionary is not all quite there when my method gets called.&amp;nbsp; It's there, but empty.&amp;nbsp; But if I check it after the serialization is all done (which I thought my method was doing), it &lt;EM&gt;IS&lt;/EM&gt; filled with my objects.&amp;nbsp; I didn't get it. I tried some simple examples with non-Dictionary classes out and they all work fine.&amp;nbsp; Then I found empathy, or is it sympathy...well, at least I found someone with my problem:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://forums.lhotka.net/forums/5495/ShowThread.aspx"&gt;&lt;FONT face=Arial&gt;http://forums.lhotka.net/forums/5495/ShowThread.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;Happy to find that I wasn't crazy, I came up with a workaround.&amp;nbsp; Again using custom serialization attributes, this time the &lt;A href="http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.onserializingattribute.aspx"&gt;&amp;lt;OnSerializing()&amp;gt;&lt;/A&gt; attribute, I can force the serializer to call a method that will&amp;nbsp;copy my Dictionary's keys and values into arrays which are members that will be serialized.&amp;nbsp; Then during deserialization, I can rebuild my Dictionary based on the keys and then I'm back to where I wanted to be: able to rehydrate my BindingList from my Dictionary.&amp;nbsp; A little bit of a pain in the butt, but it works nicely.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=1775" width="1" height="1"&gt;</description></item></channel></rss>