<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.11.81 (http://www.squarespace.com/) on Tue, 29 May 2012 03:49:56 GMT--><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Journal</title><link>http://www.kmsystems.com.au/journal/</link><description></description><lastBuildDate>Mon, 15 Nov 2010 01:37:12 +0000</lastBuildDate><copyright></copyright><language>en-AU</language><generator>Squarespace Site Server v5.11.81 (http://www.squarespace.com/)</generator><item><title>Share your Visual Studio code examples on your blog</title><dc:creator>David Abrahams</dc:creator><pubDate>Mon, 31 Aug 2009 00:21:20 +0000</pubDate><link>http://www.kmsystems.com.au/journal/2009/8/31/share-your-visual-studio-code-examples-on-your-blog.html</link><guid isPermaLink="false">285444:2903655:5042615</guid><description><![CDATA[<p>Jim's article <a href="http://jamesewelch.wordpress.com/2007/08/23/how-to-post-code-from-visual-studio-to-your-blog/">How to Post Code From Visual Studio to Your Blog</a> provides a very easy and effective way to add code examples from Visual Studio to your blog. Jim's article focuses on the blogging platform WordPress but it will work just as well in any blogging platform as your Visual Studio code is converted to <span class="caps">HTML.</span> As you can see it works great here in our Squarespace blog.</p>
<p>&nbsp;</p>
<div style="font-family: Courier New; font-size: 10pt; color: black; background: white;">
<pre style="margin: 0px; white-space: normal;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;17</span>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: green;">//</span></pre>
<pre style="margin: 0px; white-space: normal;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;18</span>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: green;">// GET: /ParentTags/</span></pre>
<pre style="margin: 0px; white-space: normal;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;19</span>&nbsp;</pre>
<pre style="margin: 0px; white-space: normal;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;20</span>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">public</span> <span style="color: #2b91af;">ActionResult</span> Index()</pre>
<pre style="margin: 0px; white-space: normal;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;21</span>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</pre>
<pre style="margin: 0px; white-space: normal;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;22</span>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">return</span> View();</pre>
<pre style="margin: 0px; white-space: normal;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;23</span>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</pre>
</div>]]></description><wfw:commentRss>http://www.kmsystems.com.au/journal/rss-comments-entry-5042615.xml</wfw:commentRss></item><item><title>jQuery Tag Suggestion in ASP.NET MVC</title><dc:creator>David Abrahams</dc:creator><pubDate>Tue, 25 Aug 2009 23:10:25 +0000</pubDate><link>http://www.kmsystems.com.au/journal/2009/8/26/jquery-tag-suggestion-in-aspnet-mvc.html</link><guid isPermaLink="false">285444:2903655:5005317</guid><description><![CDATA[<p>On a <span class="caps">ASP.NET MVC </span>project I am currently working on I have implemented Remy's <a href="http://remysharp.com/2007/12/28/jquery-tag-suggestion/">jQuery Tag Suggestion</a> <br /> plug in which works perfectly and makes a nice experience for people using my application.</p>
<p>I wanted to share a couple of learnings for others who would like to implement  this plugin in their <span class="caps">ASP.NET MVC </span>applications where they need to return data from a database instead of a static tag list/file.</p>
<p>To make it easier for you to implement a similar function I have created an ASP.NET MVC project which can be downloaded here <a href="http://www.kmsystems.com.au/storage/TagSuggestion.zip">Tag Suggestion ASP.NET MVC project files</a> and <a href="http://www.kmsystems.com.au/storage/TagSuggestionDB.zip">Tag Suggestion database back up</a>. You can also check out a working version of this source code here <a href="http://203.98.75.28/TagSuggestion">ASP.NET Tag Suggestion demo</a></p>
<p>Of course the first step is to download the tag.js file from Remy's article and  add this file to your Scripts folder in your <span class="caps">MVC </span>project.</p>
<p>Then you will need to add a reference to this file and add the tag script under  the Head html tag in your Site.Master file normally found under the Views/Shared folder.</p>
<p>The reference to the tag.js file will look something like</p>
<div style="font-family: Courier New; font-size: 10pt; color: black; background: white;">
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 12</span>&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: blue;">&lt;</span><span style="color: #a31515;">script</span><span style="color: red;"> src</span><span style="color: blue;">="</span><span style="background: #ffee62;">&lt;%</span>= Url.Content("~/Scripts/jquery-1.3.2.min.js")<span style="background: #ffee62;"> %&gt;</span><span style="color: blue;">"</span><span style="color: red;"> type</span><span style="color: blue;">="text/javascript"&gt;&lt;/</span><span style="color: #a31515;">script</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 13</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 14</span>&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: blue;">&lt;</span><span style="color: #a31515;">script</span><span style="color: red;"> src</span><span style="color: blue;">="</span><span style="background: #ffee62;">&lt;%</span>= Url.Content("~/Scripts/tag.js") <span style="background: #ffee62;">%&gt;</span><span style="color: blue;">"</span><span style="color: red;"> type</span><span style="color: blue;">="text/javascript"&gt;&lt;/</span><span style="color: #a31515;">script</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 15</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 16</span>&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="background: #ffee62;">&lt;%</span> <span style="color: blue;">if</span> (<span style="color: blue;">false</span>)</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 17</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  	{ <span style="background: #ffee62;">%&gt;</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 18</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 19</span>&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: blue;">&lt;</span><span style="color: #a31515;">script</span><span style="color: red;"> src</span><span style="color: blue;">="../../Scripts/jquery-1.3.2.min.js"</span><span style="color: red;"> type</span><span style="color: blue;">="text/javascript" &lt;/</span><span style="color: #a31515;">script</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 20</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 21</span>&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: blue;">&lt;</span><span style="color: #a31515;">script</span><span style="color: red;"> src</span><span style="color: blue;">="../../Scripts/tag.js"</span><span style="color: red;"> type</span><span style="color: blue;">="text/javascript"&gt;&lt;/</span><span style="color: #a31515;">script</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 22</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 23</span>&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="background: #ffee62;">&lt;%</span> }<span style="background: #ffee62;"> %&gt;</span></p>
</div>
<p>&nbsp;</p>
<p>and the tag script for the Ajax version of the Tag Suggestion which will look  up and return data from your database. The script should look like</p>
<div style="font-family: Courier New; font-size: 10pt; color: black; background: white;">
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 25</span>&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: blue;">&lt;</span><span style="color: #a31515;">script</span><span style="color: red;"> type</span><span style="color: blue;">="text/javascript"&gt;</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 26</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 27</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  	$(<span style="color: blue;">function</span>() {</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 28</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  	$(<span style="color: #a31515;">'#ParentTags'</span>).tagSuggest({</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 29</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  	url: <span style="color: #a31515;">'TagSuggestion'</span>,</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 30</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  	delay: 250</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 31</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  	});</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 32</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  	});</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 33</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 34</span>&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: blue;">&lt;/</span><span style="color: #a31515;">script</span><span style="color: blue;">&gt;</span></p>
</div>
<p>&nbsp;</p>
<p>Notice the #ParentTags which will be the id of the textbox you would like to use for  the Tag Suggestion feature. This textbox will call/fire the jQuery function. Also notice the url: 'TagSuggestion' which points to a action within the current controller file being used to return the view where you will be using this tag suggestion textbox.</p>
<p>Now you need to add the textbox to the view where you want to use the Tag Suggestion  like this</p>
<div style="font-family: Courier New; font-size: 10pt; color: black; background: white;">
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 19</span> <span style="background: #ffee62;">&lt;%</span><span style="color: blue;">=</span> Html.TextBox(<span style="color: #a31515;">"ParentTags"</span>)<span style="background: #ffee62;">%&gt;</span></p>
</div>
<p>&nbsp;</p>
<p>As you can see this text box has a name/id of "ParentTags" which will link to the script  also called #ParentTags. To make it easy and clean I have also got a field in my database called "ParentTags" so I can save the tags the person enters.</p>
<p>Last but not least we need to add the Action to the Controller which will be  used to render the view we added the textbox to above.</p>
<p>The Action code will look like</p>
<div style="font-family: Courier New; font-size: 10pt; color: black; background: white;">
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 82</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: blue;">public</span> <span style="color: #2b91af;">ActionResult</span> TagSuggestion()</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 83</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  	{</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 84</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 85</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: blue;">var</span> tagDetailsGrp =<span style="color: blue;"> from</span> tdg <span style="color: blue;">in</span> db.vw_TagDetails_Grps</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 86</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: blue;">orderby</span> tdg.DetailIDCount<span style="color: blue;"> descending</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 87</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: blue;">select</span> tdg;</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 88</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 89</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: #2b91af;">ArrayList</span> list =<span style="color: blue;"> new</span> <span style="color: #2b91af;">ArrayList</span>();</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 90</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 91</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: blue;">foreach</span> (<span style="color: #2b91af;">vw_TagDetails_Grp</span> item <span style="color: blue;">in</span> tagDetailsGrp)</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 92</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  	{</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 93</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  	list.Add(item.DetailTag);</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 94</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  	}</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 95</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 96</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 	<span style="color: blue;">return</span> <span style="color: blue;">this</span>.Json(list);</p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 97</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp; 98</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  	}</p>
</div>
<p>&nbsp;</p>
<p>This Action code goes to a view in my database which groups all of the tags from the table called TagDetails and returns this list of tags. The code then adds each tag to an ArrayList which is then  returned to the jQuery function in <span class="caps">JSON </span>format.</p>
<p>That's it now you should have your new jQuery Tag Suggestion function up and  running. I hope this helps to save you a bit of time and feel free to let me know if you have any questions.</p>]]></description><wfw:commentRss>http://www.kmsystems.com.au/journal/rss-comments-entry-5005317.xml</wfw:commentRss></item><item><title>Linq to SQL delete multiple/bulk records (batch delete)</title><dc:creator>David Abrahams</dc:creator><pubDate>Tue, 25 Aug 2009 09:19:43 +0000</pubDate><link>http://www.kmsystems.com.au/journal/2009/8/25/linq-to-sql-delete-multiplebulk-records-batch-delete.html</link><guid isPermaLink="false">285444:2903655:4999518</guid><description><![CDATA[<p>Normally when building ASP.NET applications Linq to SQL makes the job a whole lot easier. It takes care of all the data access for creating, updating and deleting individual records. However every so often I come across the need to delete multiple records such as the case with a one to many relationship, where I need to delete all related records for a specific group. Unfortunately this is not as simple as you would think using Linq to SQL as Linq to SQL only deals with one record at a time. For a large high performance application where large numbers of records need to be deleted the best approach would be to use a stored procedure. In some cases the delete is contained to small datasets and would not be used frequently so keeping all of your code in Linq to SQL keeps it clean and consistent. In this case I have found the sample code below does the trick.</p>
<p>MyAppDataContext db = new MyAppDataContext();<br /><br /> var deleteRelatedRecords =<br /> from relatedRecords in db.RelatedRecords<br /> where relatedRecords.MyForeignKeyID == MyPrimaryKeyID<br /> select relatedRecords;<br /><br /> foreach (var relatedRecords in deleteRelatedRecords)<br /> {<br /> db.RelatedRecords.DeleteOnSubmit(RelatedRecords);<br /> }<br /><br /> db.SubmitChanges();</p>
<p>This code works well if all you need to do is clean up/delete a small group of records, it first gets the group of records, then loops through the dataset flagging each one to be deleted. Once completed the changes are submitted committing the deletes.</p>
<p>Additional information and samples in other languages can be found here <a href="http://msdn.microsoft.com/en-us/library/bb386925.aspx">http://msdn.microsoft.com/en-us/library/bb386925.aspx</a></p>]]></description><wfw:commentRss>http://www.kmsystems.com.au/journal/rss-comments-entry-4999518.xml</wfw:commentRss></item><item><title>Award winning application</title><dc:creator>David Abrahams</dc:creator><pubDate>Fri, 10 Jul 2009 06:31:46 +0000</pubDate><link>http://www.kmsystems.com.au/journal/2009/7/10/award-winning-application.html</link><guid isPermaLink="false">285444:2903655:4579434</guid><description><![CDATA[<p>Congratulations! kmsystems client, <strong>IAG</strong> winners of the <a href="http://www.businessawards.com.au/2009/ABA_Media_Release_2009.pdf">Australian Business Awards &ndash; 2009 for the category of innovation</a> based on an application we built for them. We are very proud to have been able to be apart of their innovation project, such a great learning experience for us to apply our web 2.0 social media knowledge on. The end result an award winning application that has already produced significant dollar savings, savings on stationary paper such as manual forms and process steps, it doesn't get better than that.</p>]]></description><wfw:commentRss>http://www.kmsystems.com.au/journal/rss-comments-entry-4579434.xml</wfw:commentRss></item><item><title>Preview: ASP.NET MVC conversion of Whos Doin Wot</title><dc:creator>David Abrahams</dc:creator><pubDate>Tue, 30 Jun 2009 02:04:03 +0000</pubDate><link>http://www.kmsystems.com.au/journal/2009/6/30/preview-aspnet-mvc-conversion-of-whos-doin-wot.html</link><guid isPermaLink="false">285444:2903655:4476713</guid><description><![CDATA[<p>As I mentioned in my previous post <a href="http://www.kmsystems.com.au/journal/2009/6/26/aspnet-mvc-membership-management-users-and-roles.html">ASP.NET MVC Membership Management</a>&nbsp;I decided to&nbsp;port over a simple team management app we built called "Whos Doin Wot" from the Morfik RIA platform to ASP.NET MVC. I found the exercise&nbsp;to be a nice little training exercise and the chance to understand and play around with MVC. Also as a side benefit I have created some basic controllers and views for handling users and roles within ASP.NET membership (download available on the previous post detailed above).</p>
<p>I've spent a couple of days on it now and have a&nbsp;preview of the&nbsp;new MVC version up and running <a href="http://203.98.75.28/kmswdw">click here to have a go</a>.</p>
<p>Here are a few screen shots as well:</p>
<p><strong>Dashboard:</strong> is a clean and simple list of what the team are up to today, tomorrow, for the rest of the week and month.</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://kmsystems.squarespace.com/storage/wdw_Dashboard_50.jpg?__SQUARESPACE_CACHEVERSION=1246328137175" alt="" /></span></span></p>
<p>&nbsp;</p>
<p><strong>Groups:</strong> here you have the ability to set up different groups which you can then add people/users to.</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://kmsystems.squarespace.com/storage/wdw_Groups_50.jpg?__SQUARESPACE_CACHEVERSION=1246328331943" alt="" /></span></span></p>
<p>&nbsp;</p>
<p><strong>Add people:</strong> You have the ability to set up access for other team/group members so that they can access and contribute to specific groups</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://kmsystems.squarespace.com/storage/wdw_Add_Users_50.jpg?__SQUARESPACE_CACHEVERSION=1246328399545" alt="" /></span></span></p>
<p>&nbsp;</p>
<p><strong>Create a new entry:</strong> Here you can quickly add in entries to let the team know what you are up to for today, tomorrow, the week and month (if you like to plan ahead).</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://kmsystems.squarespace.com/storage/wdw_Create_50.jpg?__SQUARESPACE_CACHEVERSION=1246328486843" alt="" /></span></span></p>
<p>&nbsp;</p>]]></description><wfw:commentRss>http://www.kmsystems.com.au/journal/rss-comments-entry-4476713.xml</wfw:commentRss></item><item><title>ASP.NET MVC Membership Management (Users and Roles)</title><dc:creator>David Abrahams</dc:creator><pubDate>Fri, 26 Jun 2009 02:38:33 +0000</pubDate><link>http://www.kmsystems.com.au/journal/2009/6/26/aspnet-mvc-membership-management-users-and-roles.html</link><guid isPermaLink="false">285444:2903655:4444571</guid><description><![CDATA[<p>Here at kmsystems we have really been diving into <a href="http://www.asp.net/mvc/">ASP.NET MVC</a>&nbsp;with everyone in the team doing loads of learning, setting up some new projects using MVC and converting over some old ones. Not to be left out of all the MVC fun :) I've decided to dive in and port over a simple team management app we built called "Whos Doin Wot" from the&nbsp;<a href="http://www.morfik.com/">Morfik 2.0</a>&nbsp;RIA Tool which I put together a while ago now.</p>
<p>The new release of Whos Doin Wot isn't quite ready for use yet however I want to share some of the work I have done setting up user and role management. I'm a big fan of buy borrow, beg, steal before you build or role your own (just can't see the benefit of re-inventing the wheel if a great wheel already exists) so I started my search and found the following:</p>
<p><a href="http://mvcmembership.codeplex.com/">ASP.Net MVC Membership Starter Kit</a>&nbsp;which is a really promising membership management tool and would have been exactly what I was looking for, unfortunately the current release does not work on MVC Release 1.0</p>
<p><a href="http://netrsc.blogspot.com/2009/04/aspnet-mvc-membership-management.html">ASP.NET MVC Membership Management Roni Schuetz</a>&nbsp;which also looks great but costs 30 euros (around $50 Australian dollars) and given that it was just a blog post with no comments I wasn't too sure if I was just kissing my $50 goodbye (maybe I'll give it a go later).</p>
<p>As the options to buy, beg, borrow or steal were not that appealing and with the goal of learning more about MVC I decided to (god forbid) roll my own membership management. Anyway&nbsp;it wasn't going into a full blown management tool I wanted to&nbsp;keep it simple and light to just&nbsp;cover off the very basics.</p>
<p>If you are interested I have uploaded the <a href="http://www.kmsystems.com.au/storage/ASPNET_MVC_Simple_Membership_Management.zip">source code for you to download</a> modify and&nbsp;use in your own projects. This code is jsut a very basic base to start from and extend to meet your requirements. It would be great if you could share any improvements back here with us.</p>
<p>The code covers:</p>
<p>- List all users</p>
<p>- Add a new user</p>
<p>- Edit a user</p>
<p>- Delete a user</p>
<p>- View the roles associated to a user</p>
<p>- Remove a role from a user</p>
<p>- Add a role&nbsp;to a user</p>
<p>- List all roles</p>
<p>- Create a role</p>
<p>- Lists users in a role</p>
<p>- Delete a role</p>
<p>The code I created is based on using ASP.NET Membership in a SQL server database by default MVC points to a SQL Express database named "ASPNETDB.MDF"; under the application's "App_Data" directory. If you would like to use a different SQL server or dataabase&nbsp;update the "ApplicationServices"; connection string within the web.config file. You can run the "aspnet_regsql.exe" utility within the \Windows\Microsoft.NET\Framework\v2.0.50727\ directory to add membership and the other ASP.NET application services to any database.</p>]]></description><wfw:commentRss>http://www.kmsystems.com.au/journal/rss-comments-entry-4444571.xml</wfw:commentRss></item><item><title>Waterfall charts in SQL Reporting Services</title><dc:creator>David Abrahams</dc:creator><pubDate>Mon, 01 Jun 2009 22:12:49 +0000</pubDate><link>http://www.kmsystems.com.au/journal/2009/6/1/waterfall-charts-in-sql-reporting-services.html</link><guid isPermaLink="false">285444:2903655:4162056</guid><description><![CDATA[<p>Recently we completed a project to build a KPI dashboard for a large Australian organisation to show certain performance measures for each business unit. The challenge was that the client wanted a very specific kind of chart, &nbsp;basically a waterfall chart which displays the end target/goal as the final column. Using the <a href="http://www.dundas.com/Products/Chart/RS/index.aspx">Dundas charts</a> control this task would not be that difficult as we could have used a chart similar to this and made a few tweaks.</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://kmsystems.squarespace.com/storage/Chart_2D_Financial_Renko_2.png?__SQUARESPACE_CACHEVERSION=1243895136535" alt="" /></span></span></p>
<p>However due to the clients Reporting Services Architecture the costs of Dundas licenses was not feasible so we needed to come up with a way to produce a similar chart using the native Reporting Services chart control.</p>
<p>Here's what we learned:</p>
<ul>
<li>The chart type to use is a Stacked Column Chart</li>
<li>You need to add a&nbsp;data value the represent the data value you want to appear in the waterfall. In our case we added&nbsp;the KPI actuals&nbsp;eg:(Fields!KPIActual.Value)</li>
<li>Then you need to add the same data as a second data value to the stacked series as a running total and subtract the individual first data value at each point. We added the same KPI actual data as a second data value which would be stacked below the first but this time using a running total less each KPI actual&nbsp;eg:RunningValue(Fields!KPIActual.Value, Sum, "chart1_SeriesGroupKPI_Measures")-(Fields!KPIActual.Value).&nbsp;We also set the&nbsp;background colour fill for this series to white so that it would blend into the background of the chart an could not be seen&nbsp;</li>
</ul>
<p>&nbsp;The final result was a nice clean waterfall chart that shows progress towards an end target</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://kmsystems.squarespace.com/storage/KPI_Dashboard_Sample_75.png?__SQUARESPACE_CACHEVERSION=1243899255205" alt="" /></span></span></p>]]></description><wfw:commentRss>http://www.kmsystems.com.au/journal/rss-comments-entry-4162056.xml</wfw:commentRss></item><item><title>Greenhouse and Energy Reporting NGERS</title><dc:creator>David Abrahams</dc:creator><pubDate>Mon, 01 Jun 2009 06:25:57 +0000</pubDate><link>http://www.kmsystems.com.au/journal/2009/6/1/greenhouse-and-energy-reporting-ngers.html</link><guid isPermaLink="false">285444:2903655:4152230</guid><description><![CDATA[<p>We have been working with one of Australia's largest logistics companies, building various web applications to help improve some of their current business processes. One of the areas we discussed was their environmental impact and reporting requirements under the <a href="http://www.climatechange.gov.au/reporting/index.html"><em>National Greenhouse and Energy Reporting Act 2007</em></a>(the NGER Act).&nbsp;In short&nbsp;the Australian Government has passed an Act that requires organisations to report on greenhouse gas emissions, energy consumption and production.</p>
<p>After doing some research into the NGERS guidelines and requirements we have decided to build an application that will:</p>
<ul>
<li>Make it easier for organisations to capture and track information regarding their greenhouse gas emissions, energy consumption and production</li>
<li>Provide some value back to the business for going to the effort in capturing this information. Such as a better understanding of environmental expenses and possible areas for improvement/reduction</li>
</ul>
<p>Currently we are in the process of designing and developing the application. If you and your company need to report under NGERS and would like to talk to us about what&nbsp;could make&nbsp;your life easier in this area.&nbsp;Or if&nbsp;you&nbsp;would be interested in using this tool to make NGERS reporting easier then please <a href="http://www.kmsystems.com.au/contact/">contact us</a></p>
<p>I will add another post soon when we have a beta&nbsp;version ready for people to try out.</p>]]></description><wfw:commentRss>http://www.kmsystems.com.au/journal/rss-comments-entry-4152230.xml</wfw:commentRss></item><item><title>ASP.NET MVC Cascading DropDownLists</title><category>Application Development</category><category>MVC</category><dc:creator>Dien Nguyen</dc:creator><pubDate>Sun, 31 May 2009 04:54:17 +0000</pubDate><link>http://www.kmsystems.com.au/journal/2009/5/31/aspnet-mvc-cascading-dropdownlists.html</link><guid isPermaLink="false">285444:2903655:4145923</guid><description><![CDATA[<p>Creating DropDownLists using WebForms is easy enough, for those who are venturing into the the world of MVC this may not be as straight forward.</p>
<p>I&rsquo;ll be using the classic scenario of Cars and their related makes and models.</p>
<p><strong>CarController.cs</strong></p>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste"></a></p>
<pre class="code"><span style="color: blue">public class </span><span style="color: #2b91af">CarFormViewModel<br /></span>{<br />    <span style="color: #2b91af">MakeModelRepository </span>makeModelRepository = </pre>
<pre class="code">    <span style="color: blue">new </span><span style="color: #2b91af">MakeModelRepository</span>();<br /><br />    <span style="color: blue">private string </span>_carMake = <span style="color: #a31515">""</span>;<br /><br />    <span style="color: blue">public </span><span style="color: #2b91af">Car </span>Car { <span style="color: blue">get</span>; <span style="color: blue">private set</span>; }<br />    <span style="color: blue">public </span><span style="color: #2b91af">SelectList </span>CarMakes { <span style="color: blue">get</span>; <span style="color: blue">private set</span>; }<br />    <span style="color: blue">public </span><span style="color: #2b91af">SelectList </span>CarModels { <span style="color: blue">get</span>; <span style="color: blue">private set</span>; }<br />    <span style="color: blue">public string </span>CarMake<br />    {<br />        <span style="color: blue">get </span>{ <span style="color: blue">return </span>_carMake; }<br />        <span style="color: blue">set </span>{ _carMake = <span style="color: blue">value</span>; }<br />    }<br /><br />    <span style="color: green">// Constructor<br />    </span><span style="color: blue">public </span>CarFormViewModel(<span style="color: #2b91af">Car </span>car)<br />    {<br />        Car = car;<br />        CarMakes = <span style="color: blue">new </span><span style="color: #2b91af">SelectList</span>(makeModelRepository.</pre>
<pre class="code">        GetCarMakes(), <span style="color: #a31515">"Value"</span>, <span style="color: #a31515">"Text"</span>);<br /><br />        <span style="color: blue">if </span>(car.CarMakeModelId &gt; 0)<br />            CarMake = car.CarMakeModel.CarMake;<br /><br />        CarModels = <span style="color: blue">new </span><span style="color: #2b91af">SelectList</span>(makeModelRepository.</pre>
<pre class="code">        GetCarModels(CarMake), <span style="color: #a31515">"Value"</span>, <span style="color: #a31515">"Text"</span>, Car.CarMakeModelId);<br />    }<br />}</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Something to be aware of is the use of valueSelected when defining your SelectList, make sure your view items e.g. DropDownList names match your database field names. I found the selected value was not being set correctly when editing a records.</p>
<p><strong>CarForm.aspx</strong></p>
<pre class="code"><span style="background: #ffee62">&lt;%</span><span style="color: blue">@ </span><span style="color: #a31515">Control </span><span style="color: red">Language</span><span style="color: blue">="C#" </span><span style="color: red">Inherits</span><span style="color: blue">="System.Web.Mvc.ViewUserControl</span></pre>
<pre class="code"><span style="color: blue">&lt;Vehicles.Controllers.CarFormViewModel&gt;" </span><span style="background: #ffee62">%&gt;<br /><br /></span><span style="color: blue">&lt;</span><span style="color: #a31515">script </span><span style="color: red">type</span><span style="color: blue">="text/javascript"&gt;<br />    </span>$(<span style="color: blue">function</span>() {<br />        $(<span style="color: #a31515">"#CarMake"</span>).change(<span style="color: blue">function</span>() {<br />        <span style="color: blue">var </span>carMake = $(<span style="color: #a31515">"#CarMake &gt; option:selected"</span>).attr(<span style="color: #a31515">"value"</span>);<br />        <span style="color: blue">var </span>urlAction = <span style="color: #a31515">"&lt;%= Url.Action("</span>FindCarModels<span style="color: #a31515">", "</span>Car<span style="color: #a31515">") %&gt;"</span>;<br />        $.getJSON(urlAction, { carMake: carMake }, <span style="color: blue">function</span>(data) {<br />                $(<span style="color: #a31515">"#CarMakeModelId"</span>).addItems(data);<br />            });<br />        });<br />    });<br /><span style="color: blue">&lt;/</span><span style="color: #a31515">script</span><span style="color: blue">&gt;<br /><br /></span><span style="background: #ffee62">&lt;%</span><span style="color: blue">= </span>Html.ValidationSummary(<span style="color: #a31515">"Edit was unsuccessful. Please correct </span></pre>
<pre class="code"><span style="color: #a31515">the errors and try again."</span>) <span style="background: #ffee62">%&gt;<br />&lt;%</span> <span style="color: blue">using </span>(Html.BeginForm())<br />   {<span style="background: #ffee62">%&gt;<br /></span><span style="color: blue">&lt;</span><span style="color: #a31515">fieldset</span><span style="color: blue">&gt;<br />    &lt;</span><span style="color: #a31515">legend</span><span style="color: blue">&gt;</span>Car<span style="color: blue">&lt;/</span><span style="color: #a31515">legend</span><span style="color: blue">&gt;<br />    &lt;</span><span style="color: #a31515">p</span><span style="color: blue">&gt;<br />        &lt;</span><span style="color: #a31515">label </span><span style="color: red">for</span><span style="color: blue">="CarMake"&gt;<br />            </span>Make:<span style="color: blue">&lt;/</span><span style="color: #a31515">label</span><span style="color: blue">&gt;<br />        </span><span style="background: #ffee62">&lt;%</span><span style="color: blue">= </span>Html.DropDownList(<span style="color: #a31515">"CarMake"</span>, Model.CarMakes) <span style="background: #ffee62">%&gt;<br /></span>        <span style="background: #ffee62">&lt;%</span><span style="color: blue">= </span>Html.ValidationMessage(<span style="color: #a31515">"CarMake"</span>, <span style="color: #a31515">"*"</span>) <span style="background: #ffee62">%&gt;<br /></span>    <span style="color: blue">&lt;/</span><span style="color: #a31515">p</span><span style="color: blue">&gt;<br />    &lt;</span><span style="color: #a31515">p</span><span style="color: blue">&gt;<br />        &lt;</span><span style="color: #a31515">label </span><span style="color: red">for</span><span style="color: blue">="CarMakeModelId"&gt;<br />            </span>Model:<span style="color: blue">&lt;/</span><span style="color: #a31515">label</span><span style="color: blue">&gt;<br />        </span><span style="background: #ffee62">&lt;%</span><span style="color: blue">= </span>Html.DropDownList(<span style="color: #a31515">"CarMakeModelId"</span>, Model.CarModels) <span style="background: #ffee62">%&gt;<br /></span>        <span style="background: #ffee62">&lt;%</span><span style="color: blue">= </span>Html.ValidationMessage(<span style="color: #a31515">"CarMakeModelId"</span>, <span style="color: #a31515">"*"</span>) <span style="background: #ffee62">%&gt;<br /></span>    <span style="color: blue">&lt;/</span><span style="color: #a31515">p</span><span style="color: blue">&gt;<br />    &lt;</span><span style="color: #a31515">p</span><span style="color: blue">&gt;<br />        &lt;</span><span style="color: #a31515">input </span><span style="color: red">type</span><span style="color: blue">="submit" </span><span style="color: red">value</span><span style="color: blue">="Save" /&gt;<br />    &lt;/</span><span style="color: #a31515">p</span><span style="color: blue">&gt;<br />&lt;/</span><span style="color: #a31515">fieldset</span><span style="color: blue">&gt;<br /></span><span style="background: #ffee62">&lt;%</span> } <span style="background: #ffee62">%&gt;<br /></span><span style="color: blue">&lt;</span><span style="color: #a31515">div</span><span style="color: blue">&gt;<br />    </span><span style="background: #ffee62">&lt;%</span><span style="color: blue">=</span>Html.ActionLink(<span style="color: #a31515">"Back to List"</span>, <span style="color: #a31515">"Index"</span>) <span style="background: #ffee62">%&gt;<br /></span><span style="color: blue">&lt;/</span><span style="color: #a31515">div</span><span style="color: blue">&gt;</span></pre>
<p>Make sure to change the inherits property to reference your new ViewModel. Note the use of the Url.Action helper, this little snippet helps you creates the correct path to your controller action without the use of those dots e.g. &hellip;/&lt;controller&gt;/&lt;action&gt;/</p>
<p><strong>jHelper.js</strong></p>
<p>Borrowed from <a href="http://geekswithblogs.net/michelotti/archive/2008/06/28/mvc-json---jsonresult-and-jquery.aspx" target="_blank">Steve Michelotti</a>.</p>
<pre class="code">$.fn.clearSelect = <span style="color: blue">function</span>() {<br />    <span style="color: blue">return this</span>.each(<span style="color: blue">function</span>() {<br />        <span style="color: blue">if </span>(<span style="color: blue">this</span>.tagName == <span style="color: #a31515">'SELECT'</span>)<br />            <span style="color: blue">this</span>.options.length = 0;<br />    });<br />}<br /><br />$.fn.addItems = <span style="color: blue">function</span>(data) {<br />    <span style="color: blue">return this</span>.clearSelect().each(<span style="color: blue">function</span>() {<br />        <span style="color: blue">if </span>(<span style="color: blue">this</span>.tagName == <span style="color: #a31515">'SELECT'</span>) {<br />            <span style="color: blue">var </span>dropdownList = <span style="color: blue">this</span>;<br />            $.each(data, <span style="color: blue">function</span>(index, optionData) {<br />            <span style="color: blue">var </span>option = <span style="color: blue">new </span>Option(optionData.Text,</pre>
<pre class="code">                         optionData.Value);<br /><br />            <span style="color: blue">if </span>($.browser.msie) {<br />                dropdownList.add(option);<br />            }<br />            <span style="color: blue">else </span>{<br />                dropdownList.add(option, <span style="color: blue">null</span>);<br />            }<br />            });<br />        }<br />    });<br />}</pre>
<p>Little helper that clears and adds items to DropDownLists.</p>
<p>Something I found frustrating is when in debug mode a script reference would work find but when running using IIS the script would not load correctly. What you had to do was use those good old dots to get it loading correctly. My tip is to use the ResovleUrl helper.</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">script </span><span style="color: red">src</span><span style="color: blue">="</span><span style="background: #ffee62">&lt;%</span>= ResolveUrl("~/Scripts/jquery-1.3.1.js") <span style="background: #ffee62">%&gt;</span><span style="color: blue">" </span></pre>
<pre class="code"><span style="color: red">type</span><span style="color: blue">="text/javascript"&gt;&lt;/</span><span style="color: #a31515">script</span><span style="color: blue">&gt;<br /><br />&lt;</span><span style="color: #a31515">script </span><span style="color: red">src</span><span style="color: blue">="</span><span style="background: #ffee62">&lt;%</span>= ResolveUrl("~/Scripts/jHelper.js") <span style="background: #ffee62">%&gt;</span><span style="color: blue">" </span></pre>
<pre class="code"><span style="color: red">type</span><span style="color: blue">="text/javascript"&gt;&lt;/</span><span style="color: #a31515">script</span><span style="color: blue">&gt;</span></pre>
<p>There are some workarounds I&rsquo;ve seen that don&rsquo;t break intellisense but look a bit messy. I figure I&rsquo;ve lived without it for this long.</p>
<p><a href="http://www.kmsystems.com.au/storage/Vehicles.zip">Here is the source code</a>, if there is anything that is unclear or you have any questions feel free to email me.</p>]]></description><wfw:commentRss>http://www.kmsystems.com.au/journal/rss-comments-entry-4145923.xml</wfw:commentRss></item><item><title>Manifesto for Agile Software Development</title><dc:creator>David Abrahams</dc:creator><pubDate>Fri, 29 May 2009 04:29:53 +0000</pubDate><link>http://www.kmsystems.com.au/journal/2009/5/29/manifesto-for-agile-software-development.html</link><guid isPermaLink="false">285444:2903655:4118195</guid><description><![CDATA[<p>At kmsystems we have&nbsp;build a lot of software and in most cases the time frame and budget we have to work with is tight, very tight. The challenge is to not only to meet tight deadlines and budget constraints but above all deliver something of value. The output or result of what we develop must add value to our clients existing processes and business otherwise there is no point in building the solution in the first place. I'm talking about not just solving a problem but solving it in the best possible way that adds the most possible value. Let's face it problems can be solved in a lot of different ways for example you can implement a manual process good old pen and paper, use Excel, create a simple Access database, the list goes on. We build software and its our job to ensure that the software solution we provide adds the most value over all options.</p>
<p>To achieve this we have found agile development methodologies to be an effective way to keep costs and time overheads low yet deliver something that the client will use and get maximum value from.</p>
<p>As part of our agile development practises we try to follow the "Manifesto for Agile Software Development"</p>
<blockquote>
<p>We are uncovering better ways of developing <br />software by doing it and helping others do it. <br />Through this work we have come to value:</p>
<p><strong>Individuals and interactions</strong> over processes and tools <br /><strong>Working software</strong> over comprehensive documentation <br /><strong>Customer collaboration</strong> over contract negotiation <br /><strong>Responding to change</strong> over following a plan</p>
<p><br />That is, while there is value in the items on <br />the right, we value the items on the left more.</p>
<p><a href="http://agilemanifesto.org/">http://agilemanifesto.org/</a></p>
</blockquote>
<p>and we&nbsp;try to up hold these 12 principles which sit&nbsp;behind the manifesto:</p>
<ol>
<li>Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.</li>
<li>Welcome changing requirements, even late in development. Agile processes harness change for the customer's competitive advantage.</li>
<li>Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale.</li>
<li>Business people and developers must work together daily throughout the project.</li>
<li>Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done.</li>
<li>The most efficient and effective method of conveying information to and within a development team is face-to-face conversation.</li>
<li>Working software is the primary measure of progress.</li>
<li>Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.</li>
<li>Continuous attention to technical excellence and good design enhances agility.</li>
<li>Simplicity--the art of maximizing the amount of work not done--is essential.</li>
<li>The best architectures, requirements, and designs emerge from self-organizing teams.</li>
<li>At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly.</li>
</ol>
<p>It has taken us&nbsp;some time to grow and adopt agile development but I think as a team kmsystems has been able to work fairly closely to these principles and deliver some great software especially on a few recent projects. As a leader I trust my teams to get the job done, however one of the obstacles we face over and over again is engaging the customer in the agile process and keeping them engaged for the length of the project. The agile&nbsp;process does require a higher level of commitment from both parties but the output end result is a far better product. Unfortunately this is not easy to demonstrate up front. I think that open honest communication about the process will give your client and you a good start that will carry you through to being able to demonstrate the value. Remember deliver fast and review often.</p>
<p>&nbsp;</p>]]></description><wfw:commentRss>http://www.kmsystems.com.au/journal/rss-comments-entry-4118195.xml</wfw:commentRss></item></channel></rss>
