<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CapableObjects</title>
	<atom:link href="http://www.new.capableobjects.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.new.capableobjects.com</link>
	<description>Model Driven Development Pure and Simple</description>
	<lastBuildDate>Fri, 03 May 2013 08:57:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Access groups</title>
		<link>http://www.new.capableobjects.com/2013/05/03/access-groups/</link>
		<comments>http://www.new.capableobjects.com/2013/05/03/access-groups/#comments</comments>
		<pubDate>Fri, 03 May 2013 08:57:33 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[WECPOF]]></category>

		<guid isPermaLink="false">http://www.new.capableobjects.com/2013/05/03/access-groups/</guid>
		<description><![CDATA[You probably have different users in your system and these users are probably associated with an access group somehow (ActiveDirectory or something in your application). You will want to allow and disallow user groups to execute actions. This could be &#8230; <a href="http://www.new.capableobjects.com/2013/05/03/access-groups/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You probably have different users in your system and these users are probably associated with an access group somehow (ActiveDirectory or something in your application).</p>
<p>You will want to allow and disallow user groups to execute actions.</p>
<p>This could be done as enable expressions on the Actions – but that would not be very nice since it would kidnap the use of enable from the normal things we use enable for (check data state). Also if a user is never allowed to execute “TheAdminInterface” it might be best to hide that action from view all together.</p>
<p>To facilitate this Modlr has a new concept called AccessGroups:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2013/05/image.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2013/05/image_thumb.png" width="644" height="448"></a></p>
<p>Clicking up the AccessGroup dialog shows you this:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2013/05/image1.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2013/05/image_thumb1.png" width="553" height="479"></a></p>
<p>Here you can add groups and define the EnableExpression and VisibleExpression for the AccessGroups.</p>
<p>An AccessGroup the contain actions and you can add and remove the association here.</p>
<p>If an action is a member of multiple AccessGroups the result will be : (Group1.IsEnable OR Group2.IsEnable OR Group3.IsEnable) AND action.IsEnable</p>
<p>And for visible the result is (Group1.IsVisible OR Group2.IsVisible OR Group3.IsVisible) AND action.OptInInContext</p>
<div style="clear:both;margin:0;padding:0;">&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.new.capableobjects.com/2013/05/03/access-groups/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Business Delete Rules</title>
		<link>http://www.new.capableobjects.com/2013/04/29/business-delete-rules/</link>
		<comments>http://www.new.capableobjects.com/2013/04/29/business-delete-rules/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 13:26:09 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Declarative]]></category>
		<category><![CDATA[Modlr]]></category>
		<category><![CDATA[WECPOF]]></category>

		<guid isPermaLink="false">http://www.new.capableobjects.com/2013/04/29/business-delete-rules/</guid>
		<description><![CDATA[When you create a model &#8211; deletion of objects is seldom on top of your mind. But sooner or later users are going to want to remove objects from the system executing your model. The main problem with deletion is &#8230; <a href="http://www.new.capableobjects.com/2013/04/29/business-delete-rules/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When you create a model &#8211; deletion of objects is seldom on top of your mind. But sooner or later users are going to want to remove objects from the system executing your model.</p>
<p>The main problem with deletion is the what<em> business rules</em> that deletion should adhere to. The technical rules the deletion adheres to are covered by aggregation and the deleteaction as described <a href="http://www.new.capableobjects.com/2011/02/16/composite-and-aggregate-and-what-they-imply/" target="_blank">earlier here</a>.</p>
<p>We have now also added the IBusinessDeleteService that works like this; on every associationend you can set one of four values: NotDecided, MustBeEmpty, NeedNotBeEmptyButWarn, NeedNotBeEmptyNoWarning. The default value is NotDecided.</p>
<p>Now – what you should do with this meta information is up to you. You are free to implement your own flavor of the IBusinessDeleteService or you can just implement the IBusinessDeleteService.OnInformTheUser event&nbsp; on the standard implementation.</p>
<p>WECPOF implements this event and shows a dialog to the user.</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2013/04/image.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2013/04/image_thumb.png" width="365" height="260"></a></p>
<p>When you have the BusinessDeleteRule set to NeedNotBeEmptyButWarn you will get messages like these:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2013/04/image1.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2013/04/image_thumb1.png" width="473" height="188"></a></p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2013/04/image2.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2013/04/image_thumb2.png" width="473" height="188"></a></p>
<p>If you have BusinessDeleteRule set to NotDecided you get a message like this:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2013/04/image3.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2013/04/image_thumb3.png" width="472" height="188"></a></p>
<p>If you have the BusinessDeleteRule set to MustBeEmpty you get this:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2013/04/image4.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2013/04/image_thumb4.png" width="480" height="173"></a></p>
<h2>Delete constraints</h2>
<p>Further more you may have explicit business rules that controls if it is ok to delete an object or not – you can now handle these as normal class constraints. Constraints has been extended with an attribute IsDeleteConstraint – if this is set the default implementation of the IBusinessDeleteService will call the OnInformUser event with the message constraint as a parameter. WECPOF uses this to show a dialog to the user and stopping the delete until the constraint-break is fixed.</p>
<p>This new service helps you to feel in control and good about deletion. It will not automatically solve all your delete issues – but we believe that it will enable you to easily solve them all as they are needed. Agile so to speak.</p>
<div style="clear:both;margin:0;padding:0;">&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.new.capableobjects.com/2013/04/29/business-delete-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting taggedvalues in runtime without code</title>
		<link>http://www.new.capableobjects.com/2013/04/12/getting-taggedvalues-in-runtime-without-code/</link>
		<comments>http://www.new.capableobjects.com/2013/04/12/getting-taggedvalues-in-runtime-without-code/#comments</comments>
		<pubDate>Fri, 12 Apr 2013 13:25:05 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[OCL]]></category>
		<category><![CDATA[WECPOF]]></category>

		<guid isPermaLink="false">http://www.new.capableobjects.com/2013/04/12/getting-taggedvalues-in-runtime-without-code/</guid>
		<description><![CDATA[When you use WECPOF you can create a whole system with use of the Model alone. As you do you might want to pick up information stored in the TaggedValues of the model. You can do that like this: G.allinstances-&#62;first.oclType.TaggedValue(&#8216;Eco.PresentationUnit&#8217;) &#8230; <a href="http://www.new.capableobjects.com/2013/04/12/getting-taggedvalues-in-runtime-without-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When you use WECPOF you can create a whole system with use of the Model alone.</p>
<p>As you do you might want to pick up information stored in the TaggedValues of the model.</p>
<p>You can do that like this:</p>
<p>G.allinstances-&gt;first.oclType.TaggedValue(&#8216;Eco.PresentationUnit&#8217;)</p>
<p>But this approach will not let you get to TaggedValues on features like attributes or association ends.</p>
<p>For this purpose we added TaggedValueOnFeature. Use it like this:</p>
<p>G.allinstances-&gt;first.oclType.TaggedValueOnFeature(&#8216;Eco.PresentationUnit&#8217;,'SomeAttribute&#8217;)</p>
<div style="clear:both;margin:0;padding:0;">&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.new.capableobjects.com/2013/04/12/getting-taggedvalues-in-runtime-without-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IAsyncSupportService</title>
		<link>http://www.new.capableobjects.com/2013/04/09/iasyncsupportservice/</link>
		<comments>http://www.new.capableobjects.com/2013/04/09/iasyncsupportservice/#comments</comments>
		<pubDate>Tue, 09 Apr 2013 16:39:20 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[CO-Unique]]></category>
		<category><![CDATA[IAsyncSupportService]]></category>

		<guid isPermaLink="false">http://www.new.capableobjects.com/2013/04/09/iasyncsupportservice/</guid>
		<description><![CDATA[The IAsyncSupportService is the service that coordinates two threads for one ecospace. The desired effect is to get loading, saving and any other potentially time consuming logic to run in the non-UI-thread, also called the AsyncThread, and to keep the &#8230; <a href="http://www.new.capableobjects.com/2013/04/09/iasyncsupportservice/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The IAsyncSupportService is the service that coordinates two threads for one ecospace.</p>
<p>The desired effect is to get loading, saving and any other potentially time consuming logic to run in the non-UI-thread, also called the AsyncThread, and to keep the UI-thread free from EVERYTHING except responding to UI events – like user input or view redraw refresh.</p>
<p>The goal of this separation is to get an application as responsive as possible for the user.</p>
<p>There are other scenarios when you want to use multiple threads with ECO. But the scenario that the IAsyncSupportService solves is the one of “creating responsive applications”.</p>
<p>WECPOF use IAsyncSupportService internally – so when using WECPOF you need not think a lot about the workings of the IAsyncSupportService.</p>
<h2>When you do not use WECPOF you should <strong><font style="background-color: #ffff00">follow these rules</font></strong>:</h2>
<ol>
<li>Do all your business logic in the async thread (all persistence server communication will be in this thread)</li>
<li>If you address UI components directly like bring up windows, change the value of a textbox by addressing the textbox directly rather than by databind, compile reports etc – when you do these kind of things – always use the UI-thread.</li>
</ol>
<h2>So – simple enough rules –&nbsp; but how do you follow them?</h2>
<p>This is one way to make logic execute in the Async thread</p>
<pre class="code"><span style="color: #2b91af">       IAsyncSupportService </span>asyn=_RootHandle.EcoSpace.GetEcoService&lt;<span style="color: #2b91af">IAsyncSupportService</span>&gt;();
       asyn.PerformTaskNowIfInAsyncThread(() =&gt;
       {

         <font color="#0000ff">// Things here will always be done in the async thread</font></pre>
<pre class="code">       }</pre>
<p>&nbsp;&nbsp;&nbsp; But is not uncommon that you want to do business logic, then update the textbox or what have you:</p>
<pre class="code"><span style="color: #2b91af">       IAsyncSupportService </span>asyn=_RootHandle.EcoSpace.GetEcoService&lt;<span style="color: #2b91af">IAsyncSupportService</span>&gt;();
       asyn.PerformTaskAsync(() =&gt;
       {

         <font color="#0000ff">// Things here will always be done in the async thread</font></pre>
<pre class="code">         asyn.DispatchTaskToMainThread(() =&gt;
         {
<font color="#0000ff">            // Things here will always be done in the UI/Main thread</font></pre>
<pre class="code">         });</pre>
<pre class="code">       }</pre>
<p>If you code like this whenever you invoke business logic from the UI-thread (like when you click a button or menu) then your app will be responsive and never lock up – even if there is a network delay for loading a lot of data.</p>
<p>If you turn the IAsyncSupportService off – then the PerformTaskAsync and the DispatchTaskToMainThread will fall thru directly and execute directly&nbsp; &#8211; so code written like this will work either way – IAsyncSupportService on or off.</p>
<h2>Turning it on or off:</h2>
<pre class="code"><span style="color: blue">public interface </span><span style="color: #2b91af">IAsyncSupportService
</span>{
    <span style="color: gray">/// &lt;summary&gt;
    /// </span><span style="color: green">For Silverlight with Persistence AsyncService MUST BE ON
    </span><span style="color: gray">/// </span><span style="color: green">We recommend leaving it on for other NEW WPF and WinForms applications - and executing business logic in AsyncTasks.
    </span><span style="color: gray">/// </span><span style="color: green">For ASP.NET the AsyncHandling should be turned off (default off).
    </span><span style="color: gray">/// &lt;/summary&gt;
    </span><span style="color: blue">void </span>TurnOnAsyncHandling();
    <span style="color: gray">/// &lt;summary&gt;
    /// </span><span style="color: green">We recommend leaving it on for other NEW WPF and WinForms applications - and executing business logic in AsyncTasks.
    </span><span style="color: gray">/// </span><span style="color: green">For ASP.NET the AsyncHandling should be turned off.
    </span><span style="color: gray">/// &lt;/summary&gt;
    </span><span style="color: blue">void </span>TurnOffAsyncHandling();
   …</pre>
<h2>Staying informed</h2>
<p>When you have an application that does a lot of stuff in the async thread – it is nice and good style to indicate that work is going on to the user – because even if the app never locks up – the UI might still be needing more data – data that will show up once all the work is done if the user can be bothered to wait for it.</p>
<p>The IAsyncServiceHelper expose some events for this purpose. Use these to show an animation or what you need. WECPOF use these to light up a “loading” animation, and an “Error” icon when appropriate.</p>
<pre class="code"><span style="color: gray">/// &lt;summary&gt;
/// </span><span style="color: green">Implement this event to inform yourself about exceptions in the AsyncThread
</span><span style="color: gray">/// &lt;/summary&gt;
</span><span style="color: blue">event </span><span style="color: #2b91af">EventHandler </span>AsyncExceptionsEvent;
<span style="color: gray">/// &lt;summary&gt;
/// </span><span style="color: green">Implement this event to Start a busy animation
</span><span style="color: gray">/// &lt;/summary&gt;
</span><span style="color: blue">event </span><span style="color: #2b91af">EventHandler </span>AsyncQueueHasFormedEvent;
<span style="color: gray">/// &lt;summary&gt;
/// </span><span style="color: green">Implement this event to Stop a busy animation
</span><span style="color: gray">/// &lt;/summary&gt;
</span><span style="color: blue">event </span><span style="color: #2b91af">EventHandler </span>AsyncQueueDissolvedEvent;
<span style="color: gray">/// &lt;summary&gt;
/// </span><span style="color: green">Implement this event to tick a progress indicator
</span><span style="color: gray">/// &lt;/summary&gt;
</span><span style="color: blue">event </span><span style="color: #2b91af">EventHandler </span>AsyncQueueTickEvent;
</pre>
<pre class="code">&nbsp;</pre>
<div style="clear:both;margin:0;padding:0;">&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.new.capableobjects.com/2013/04/09/iasyncsupportservice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Action names</title>
		<link>http://www.new.capableobjects.com/2013/01/09/action-names/</link>
		<comments>http://www.new.capableobjects.com/2013/01/09/action-names/#comments</comments>
		<pubDate>Wed, 09 Jan 2013 15:27:03 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Actions]]></category>
		<category><![CDATA[AppComplete]]></category>
		<category><![CDATA[WECPOF]]></category>

		<guid isPermaLink="false">http://www.new.capableobjects.com/2013/01/09/action-names/</guid>
		<description><![CDATA[When declaring Actions in Modlr you have the option of giving a name (required) and a Presentation (defaults to &#60;Name&#62;). The reason for the two different properties are that the ActionName is important to modlr itself – it is used &#8230; <a href="http://www.new.capableobjects.com/2013/01/09/action-names/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When declaring Actions in Modlr you have the option of giving a name (required) and a Presentation (defaults to &lt;Name&gt;).</p>
<p>The reason for the two different properties are that the ActionName is important to modlr itself – it is used for presentation of the action and as reference name of the action. The presentation is however the text we use when presenting the action in a contextmenu or in the WECPOF leftside action column.</p>
<p>Since the Presentation often resembles the Name we have introduced the following shorthand/activecontent:</p>
<table border="0" cellspacing="0" cellpadding="2" width="485">
<tbody>
<tr>
<td valign="top" width="145">ActionName</td>
<td valign="top" width="147">Presentation value</td>
<td valign="top" width="191">Presentation result</td>
</tr>
<tr>
<td valign="top" width="145">Somename</td>
<td valign="top" width="147">&lt;Name&gt;</td>
<td valign="top" width="191">Somename</td>
</tr>
<tr>
<td valign="top" width="145">SomeName</td>
<td valign="top" width="147">&lt;Name&gt;</td>
<td valign="top" width="191">Some Name</td>
</tr>
<tr>
<td valign="top" width="145">SomeName</td>
<td valign="top" width="155">Extra1 &lt;Name&gt; Extra2</td>
<td valign="top" width="191">Extra1 Some Name Extra 2</td>
</tr>
<tr>
<td valign="top" width="145">SomeName</td>
<td valign="top" width="155">&lt;AsString&gt;</td>
<td valign="top" width="191">“DefaultStringRep of context object”</td>
</tr>
<tr>
<td valign="top" width="145">SomeName</td>
<td valign="top" width="155">&lt;Name&gt; &lt;AsString&gt;</td>
<td valign="top" width="191">Some Name “DefaultStringRep of context object”</td>
</tr>
<tr>
<td valign="top" width="145">SomeName</td>
<td valign="top" width="155">&lt;AsString:Attribute1&gt;</td>
<td valign="top" width="191">“Value of attribute1 of context object”</td>
</tr>
<tr>
<td valign="top" width="145">SomeName</td>
<td valign="top" width="155">Extra1 &lt;Name&gt; Extra2 &lt;AsString:Attribute1&gt; Extra3</td>
<td valign="top" width="191">Extra1 Some Name Extra 2 “Value of attribute1 of context object” Extra 3</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>The context object is of course the object that the actions is acting on. So it is intended to be used with “Class actions”.</p>
<h2>Constraints descriptions</h2>
<p>As we introduced the above mentioned shorthand we also made the &lt;AsString:attributeX&gt; part available in the constraints Description texts. This way your constraints descriptions can get context info. If you have the need for a complex expression, like navigation for pulling attributes from neighbor classes you are advised to create the expression as a derived attribute that you then can reference from your constraint description text.</p>
<div style="clear:both;margin:0;padding:0;">&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.new.capableobjects.com/2013/01/09/action-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Import data</title>
		<link>http://www.new.capableobjects.com/2012/12/14/import-data/</link>
		<comments>http://www.new.capableobjects.com/2012/12/14/import-data/#comments</comments>
		<pubDate>Fri, 14 Dec 2012 15:37:01 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Import]]></category>
		<category><![CDATA[ViewModel]]></category>

		<guid isPermaLink="false">http://www.new.capableobjects.com/2012/12/14/import-data/</guid>
		<description><![CDATA[This article describes a new feature of the EcoSpaceDebugger. The feature lets you easily import any tab separated data into any eco-based system and enable you to define transformation on how to interpret the data and also look up values &#8230; <a href="http://www.new.capableobjects.com/2012/12/14/import-data/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This article describes a new feature of the EcoSpaceDebugger. The feature lets you easily import any tab separated data into any eco-based system and enable you to define transformation on how to interpret the data and also look up values in order to set links.</p>
<p>So suppose you find some data somewhere. </p>
<p>&nbsp;</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image_thumb.png" width="377" height="484"></a></p>
<p>And you have model that should hold it:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image1.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image_thumb1.png" width="244" height="237"></a></p>
<p>And that you can create a view model that explains how to receive the data</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image_thumb2.png" width="452" height="294"></a></p>
<p>Now click up the system prototyper:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image3.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image_thumb3.png" width="442" height="179"></a></p>
<p>Start the system and click up the debugger:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image4.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image_thumb4.png" width="244" height="235"></a></p>
<p>Switch to the “Import tab separated” tab, enter the ViewModel that you want to control the import, press “Get headers from viewmodel” to the names in columns – in this case Code and Name:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image5.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image_thumb5.png" width="644" height="419"></a></p>
<p>Paste in your tab separated data and press GO:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image6.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image_thumb6.png" width="644" height="419"></a></p>
<p>Now you have created objects – switch to the “Dirty Objects” to save them…</p>
<p>&nbsp;</p>
<h2>The “UseKey” flag</h2>
<p>The UseKey instructs the logic to pick the first column, and try to look up this value with &lt;ClassFromViewModel&gt;.allinstances-&gt;select(keyname=’valueinfirstcolumn’). If an object is returned it will be used for update – if none is returned a new will be created. This will give one such evaluation per imported row. </p>
<h2>Setting links</h2>
<p>Often you will want to assign a link when importing your data. This is done by designing a ViewModel that has PickLists. This is powerful since the lookup will be made on the result of the expression of the Associated viewModel Class. The lookup will be done in memory in dictionaries and will be very fast.</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image7.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/12/image_thumb7.png" width="538" height="233"></a></p>
<h2>Creating link objects</h2>
<p>Link objects can be created the same way. You will need to provide the two keys needed for the association in the first 2 columns. </p>
<div style="clear:both;margin:0;padding:0;">&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.new.capableobjects.com/2012/12/14/import-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WECPOF Goodies 3 Special viewmodel names</title>
		<link>http://www.new.capableobjects.com/2012/11/07/wecpof-goodies-3-special-viewmodel-names/</link>
		<comments>http://www.new.capableobjects.com/2012/11/07/wecpof-goodies-3-special-viewmodel-names/#comments</comments>
		<pubDate>Wed, 07 Nov 2012 14:42:53 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[WECPOF]]></category>

		<guid isPermaLink="false">http://www.new.capableobjects.com/2012/11/07/wecpof-goodies-3-special-viewmodel-names/</guid>
		<description><![CDATA[There are currently two ViewModel names that has special meaning to WECPOF. The first is “DropTargetViewModel” this is added to the WECPOF screen &#160; This is good for things you always want to show or as a scratchpad where you &#8230; <a href="http://www.new.capableobjects.com/2012/11/07/wecpof-goodies-3-special-viewmodel-names/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are currently two ViewModel names that has special meaning to WECPOF. The first is “<font style="background-color: #ffff00">DropTargetViewModel</font>” this is added to the WECPOF screen</p>
<p>&nbsp;</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/11/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/11/image_thumb.png" width="244" height="220"></a></p>
<p>This is good for things you always want to show or as a scratchpad where you can drag objects (see article about DragDropActions).</p>
<p>The second special name is “<font style="background-color: #ffff00">DefaultBackgroundViewModel</font>” and that viewmodel is added here:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/11/image1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/11/image_thumb1.png" width="244" height="220"></a></p>
<p>And this will show whenever you do not have any tabs open. This is good for information you want to present to the user when they start the application. Like maybe you want an easy navigation screen, or a message from SysAdmin about something, or a list of things with broken constraints.</p>
<div style="clear:both;margin:0;padding:0;">&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.new.capableobjects.com/2012/11/07/wecpof-goodies-3-special-viewmodel-names/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WECPOF Goodies 2&#8211;GridAction</title>
		<link>http://www.new.capableobjects.com/2012/10/15/wecpof-goodies-2gridaction/</link>
		<comments>http://www.new.capableobjects.com/2012/10/15/wecpof-goodies-2gridaction/#comments</comments>
		<pubDate>Mon, 15 Oct 2012 22:02:09 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Seeker]]></category>
		<category><![CDATA[ViewModel]]></category>
		<category><![CDATA[WECPOF]]></category>

		<guid isPermaLink="false">http://www.new.capableobjects.com/2012/10/15/wecpof-goodies-2gridaction/</guid>
		<description><![CDATA[It is real easy to create an action that creates objects – but the result is not always very user friendly. It is not friendly to force the user to first hit a button to create a new row in &#8230; <a href="http://www.new.capableobjects.com/2012/10/15/wecpof-goodies-2gridaction/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It is real easy to create an action that creates objects – but the result is not always very user friendly. It is not friendly to force the user to first hit a button to create a new row in a grid – then move to the new row to enter the text.</p>
<p>We made an effort to solve this issue in a generic way. We call the solution GridAction.</p>
<h2>Example</h2>
<p>Given this model</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image3.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb3.png" width="387" height="193"></a></p>
<p>And this view model</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image4.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb4.png" width="604" height="484"></a></p>
<p>You can get this WECPOF UI</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image5.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb5.png" width="644" height="463"></a></p>
<p>Now we can very well require that the user first press the action “Create Class1” and then navigate to the new row and enters Attribut1.</p>
<p>But by adding an Action to the Nesting in Viewmodel that the Grid displays we get another way of doing it – the GridAction way:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image6.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb6.png" width="640" height="172"></a></p>
<p>By doing this – WECPOF adds a null row at the bottom of the lines in our grid:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image7.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb7.png" width="312" height="117"></a></p>
<p>The null row has the Action name on it – written in italic to separate it from normal rows (representing Class1 objects in this case).</p>
<p>User can write into the GridActionRow, and when user press enter or otherwise submit the edit this will happen:</p>
<p>1. A ViewModel context variable called vGridActionArgument will be assigned the text you wrote</p>
<p>2. The action will execute</p>
<p>So consider this implementation of the GridAction_NewClass1 action: </p>
<p><em><strong>let x=Class1.Create in<br />(<br />&nbsp; x.Attribute1:=vGridActionArgument<br />)</strong></em></p>
<p>This will create a new Class1 object and assign the Attribute1 to the value entered in the GridActionRow:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image8.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb8.png" width="475" height="311"></a></p>
<p>The user experience is a lot better!</p>
<p>In the Class2 grid – that in this ViewModelView is a detail of the Class1 master – the GridAction expression looks like this:</p>
<p><strong><em>let x=Class2.Create in<br />(<br />&nbsp; x.Name:=vGridActionArgument;<br />&nbsp; x.Class1:=vCurrent_AllInstances<br />)</em></strong></p>
<p>So it both gets the new name and assigns to the correct Class1 owner – and the user just typed the name in the last row and pressed enter.</p>
<h2>Further more…</h2>
<p>If you make use of multi variable seekers – it is desirable to let the GridActionArgument in some grid act as the search expression.</p>
<p>So if you have a UI that enables you to add tenants to houses:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image9.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb9.png" width="460" height="372"></a></p>
<p>You want to user to be able to search and add in one blow – add a GridAction that is defined as this:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image10.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb10.png" width="455" height="604"></a></p>
<p>And the Search UI:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image11.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb11.png" width="644" height="434"></a>
<p>Now – when the user types and press enter this will happen:</p>
<p>1. vGridActionArgument gets the typed value</p>
<p>2. The action is executed</p>
<p>3. The action is defined to bring up the Seeker for Person</p>
<p>4. The vSeekParam that is used as filter will be set by the actions OnShow expression</p>
<p>5. <font style="background-color: #ffff00">WECPOF MAGIC</font> will detect that this is a seeker and press enter – thus starting the search</p>
<p>6. If the result of the search is 1 exactly 1 then <font style="background-color: #ffff00">WECPOF MAGIC</font> will recognize this as a good result and execute the After Modal Ok expression and thus closing the search UI and also assigning the tenant.</p>
<p>7. If the search result was different than 1 (zero or many but not 1) the search UI will stay open – so that the user can find some other criteria </p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image12.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb12.png" width="205" height="227"></a></p>
<p>Search result:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image13.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb13.png" width="463" height="236"></a></p>
<p>So the result was 2 rows – the search stays open…</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image14.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb14.png" width="379" height="240"></a></p>
<p>Only 1 hit so everything is done for me:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image15.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb15.png" width="376" height="254"></a></p>
<div style="clear:both;margin:0;padding:0;">&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.new.capableobjects.com/2012/10/15/wecpof-goodies-2gridaction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WECPOF Goodies 1</title>
		<link>http://www.new.capableobjects.com/2012/10/04/wecpof-goodies-1/</link>
		<comments>http://www.new.capableobjects.com/2012/10/04/wecpof-goodies-1/#comments</comments>
		<pubDate>Thu, 04 Oct 2012 15:05:39 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[WECPOF]]></category>

		<guid isPermaLink="false">http://www.new.capableobjects.com/2012/10/04/wecpof-goodies-1/</guid>
		<description><![CDATA[When doing search UI’s with multiple search expressions like this: The used search expression is deduced from the rules explained here: http://www.new.capableobjects.com/2011/02/27/the-multi-variable-seeker/ But having that is all fine – we need a way to tell the user what to expect &#8230; <a href="http://www.new.capableobjects.com/2012/10/04/wecpof-goodies-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When doing search UI’s with multiple search expressions like this:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb.png" width="644" height="451"></a></p>
<p>The used search expression is deduced from the rules explained here: <a title="http://www.new.capableobjects.com/2011/02/27/the-multi-variable-seeker/" href="http://www.new.capableobjects.com/2011/02/27/the-multi-variable-seeker/">http://www.new.capableobjects.com/2011/02/27/the-multi-variable-seeker/</a></p>
<p>But having that is all fine – we need a way to tell the user what to expect from the search – ie it is often so that one search expression is associated with a specific column in search result and users have indicated that it is important to understand what the search logic has done.</p>
<p>So we added a tagged value on the SearchExpressions:&nbsp; Eco.HiliteGridColumn , and you are supposed to set this to the value NameOfViewModelClassThatIsTheSearchResult.NameOfTheColumnToHiliteWhenThisParticularSearchExpressionIsInEffect.</p>
<p>If you do it may look like this:</p>
<p>SearchExpression TaggedValue Eco.HiliteGridColumn=SearchResultGrid.Efternamn</p>
<p>SearchExpression2 TaggedValue Eco.HiliteGridColumn=SearchResultGrid.Förnamn</p>
<p>And when you search in WECPOF:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb1.png" width="644" height="426"></a></p>
<p>And another click (that moves the search to the other expression):</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/10/image_thumb2.png" width="644" height="426"></a></p>
<div style="clear:both;margin:0;padding:0;">&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.new.capableobjects.com/2012/10/04/wecpof-goodies-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BorPred&#8211;Things are what you make them&#8211;so why not try easy</title>
		<link>http://www.new.capableobjects.com/2012/09/30/borpredthings-are-what-you-make-themso-why-not-try-easy/</link>
		<comments>http://www.new.capableobjects.com/2012/09/30/borpredthings-are-what-you-make-themso-why-not-try-easy/#comments</comments>
		<pubDate>Sun, 30 Sep 2012 16:02:44 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[BoringPredictable]]></category>
		<category><![CDATA[Declarative]]></category>
		<category><![CDATA[ViewModel]]></category>
		<category><![CDATA[WECPOF]]></category>

		<guid isPermaLink="false">http://www.new.capableobjects.com/2012/09/30/borpredthings-are-what-you-make-themso-why-not-try-easy/</guid>
		<description><![CDATA[Almost all systems has the need to export and import data. Since it is always very easy to hack something up that does the job – the solution is often to hack something up that does the job – and &#8230; <a href="http://www.new.capableobjects.com/2012/09/30/borpredthings-are-what-you-make-themso-why-not-try-easy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Almost all systems has the need to export and import data. Since it is always very easy to hack something up that does the job – the solution is often to hack something up that does the job – and thus increase the entropy of your system. Not good in the long run.</p>
<p>The BoringPredictableServer has a declarative way to explain what you export and import at the modeling level so that you always are fully documented and never lose grip of what you have.</p>
<p>This solution – as so many others we have in borpred &#8211; make use of the ViewModels. Since the ViewModel constitutes a declarative way to transform your model it is very well suited for the job to explain the transformations from your model to a export file, and from an import file to your model.</p>
<h2>Excel</h2>
<p>Excel is a well known and easy to work with – so we assume your files will be in or transformable to Excel.</p>
<p>An Example</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb.png" width="644" height="439"></a></p>
<p>&nbsp;</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb1.png" width="644" height="385"></a></p>
<p>Defining a model to hold some data and a ViewModel that use some of that data.</p>
<p>I also define a small UI-ViewModel so that we enter some test data:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb2.png" width="644" height="385"></a></p>
<p>I tell BorPred to execute this model in slot A0:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image3.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb3.png" width="622" height="484"></a></p>
<p>&nbsp;</p>
<p>I start WECPOF to enter some data:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image4.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb4.png" width="644" height="475"></a></p>
<p>I Visit the BorPredServer:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image5.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb5.png" width="537" height="484"></a></p>
<p>I export allinstances of the specific class in the specific format defined by the viewmodel:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image6.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb6.png" width="537" height="484"></a></p>
<p>I get the result as an open document spreadsheet:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image7.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb7.png" width="590" height="484"></a></p>
<p>I change the data a little:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image8.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb8.png" width="590" height="484"></a></p>
<p>I save this as Text – tab-separated , an then go back to borpredserver:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image9.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb9.png" width="537" height="484"></a></p>
<p>&nbsp;</p>
<p>I point out the ViewModel to use when importing and also the file to use:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image10.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb10.png" width="537" height="484"></a></p>
<p>I then hit Refresh in the WECPOF app to view the imported data:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image11.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb11.png" width="644" height="475"></a></p>
<p>If I would like to update existing objects instead of creating new ones I need to supply the attribute we will use as key and make sure that this is the first column in the import file. Like this:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image12.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb12.png" width="590" height="484"></a></p>
<p>&nbsp;</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image13.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb13.png" width="537" height="484"></a></p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image14.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb14.png" width="644" height="475"></a></p>
<p>The excel import and export can be accessed as webservices thru the borpredserver:</p>
<p><a href="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image15.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.new.capableobjects.com/wp-content/uploads/2012/09/image_thumb15.png" width="535" height="484"></a></p>
<h2>Summary</h2>
<p>So this was another little boring and predictable function that we added to BorPred.&nbsp; You should switch your EcoPersistenceServer to BorPred now – you might not jump with joy because of the switch but you remove a lot of boring and predictable tasks that you would otherwise need to spend time on. </p>
<div style="clear:both;margin:0;padding:0;">&nbsp;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.new.capableobjects.com/2012/09/30/borpredthings-are-what-you-make-themso-why-not-try-easy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
