<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-25223681</id><updated>2011-10-13T17:07:00.985-05:00</updated><category term='indexes'/><category term='VBScript'/><category term='logging'/><category term='it is done'/><category term='merging'/><category term='flash'/><category term='JPA'/><category term='xaml'/><category term='providers'/><category term='tools'/><category term='installation'/><category term='use cases'/><category term='documentation'/><category term='swing'/><category term='bugs'/><category term='enterprise development'/><category term='registry'/><category term='finding'/><category term='pojo'/><category term='gwt'/><category term='JScript.NET'/><category term='webojects'/><category term='ontology'/><category term='msbuild'/><category term='api'/><category term='autoincrement version'/><category term='RIA'/><category term='JConsole'/><category term='iexplorer'/><category term='jsr'/><category term='encryption'/><category term='sqlserver'/><category term='queries'/><category term='JSR 330'/><category term='seam-gen'/><category term='powershell'/><category term='configuration'/><category term='mantainability'/><category term='web 2.0'/><category term='over-engineered'/><category term='toy security'/><category term='rails'/><category term='software engineering'/><category term='Dataphor'/><category term='ECO'/><category term='richfaces'/><category term='.net'/><category term='performance'/><category term='eclipse'/><category term='injection'/><category term='ariba'/><category term='JEE'/><category term='limit'/><category term='Direct2Web'/><category term='code generation'/><category term='scripting'/><category term='xml'/><category term='linq'/><category term='scala'/><category term='jsf'/><category term='java'/><category term='refactoring'/><category term='uniquing'/><category term='security'/><category term='client side'/><category term='eclipselink'/><category term='dataset'/><category term='poco'/><category term='webbrowsers'/><category term='philosophy'/><category term='cloud'/><category term='user profiles'/><category term='interative'/><category term='flex'/><category term='pdf'/><category term='Relational'/><category term='geometry'/><category term='rest'/><category term='crud'/><category term='weld'/><category term='windowsforms.net'/><category term='compatibility'/><category term='escape'/><category term='object oriented'/><category term='html'/><category term='expressions web designer'/><category term='nakedobjects'/><category term='optimization'/><category term='unit testing'/><category term='asp.net'/><category term='japql'/><category term='crystal reports'/><category term='the third manifesto'/><category term='architecture'/><category term='encode'/><category term='EOF'/><category term='digital signature'/><category term='json'/><category term='nhibernate'/><category term='ioc'/><category term='ruby'/><category term='setup'/><category term='msdn'/><category term='jdbc'/><category term='javascript'/><category term='spec'/><category term='delete files'/><category term='documents'/><category term='forums'/><category term='glassfish'/><category term='tomcat'/><category term='faulting'/><category term='protocols'/><category term='http'/><category term='IDE'/><category term='assembly'/><category term='guidance automation'/><category term='csharp'/><category term='transactions'/><category term='TRDBMS'/><category term='ui design'/><category term='profile migration'/><category term='saving'/><category term='domain'/><category term='windows'/><category term='Spring'/><category term='code'/><category term='firewall'/><category term='d4'/><category term='intranet'/><category term='open laszlo'/><category term='rerender'/><category term='finished'/><category term='webslices'/><category term='tck'/><category term='javafx'/><category term='vs.net'/><category term='dto'/><category term='hibernate'/><category term='math'/><category term='stored procedures'/><category term='soap'/><category term='primary key'/><category term='php'/><category term='silverlight'/><category term='patterns'/><category term='ajax'/><category term='jql'/><category term='deployment'/><category term='jsp'/><category term='god object'/><category term='monitoring'/><category term='granite'/><category term='netbeans'/><category term='process isolation'/><category term='databases'/><category term='pagination'/><category term='ado.net'/><category term='layering'/><category term='sql'/><category term='bem'/><category term='administration'/><category term='languages'/><category term='orm'/><category term='abstractions'/><category term='jboss'/><category term='silver bullet'/><category term='clean build'/><category term='depreciation'/><category term='reshaper'/><category term='command line'/><category term='shippable'/><category term='mono'/><category term='model'/><category term='caching'/><category term='capuccino'/><category term='wmi'/><category term='Alphora'/><category term='conceptual queries'/><title type='text'>The eye sees only what the mind is prepared to comprehend</title><subtitle type='html'>&lt;p&gt;This blog will be about... Software Engineering... Object Oriented Analysis... Database Development, etc&lt;/p&gt;

&lt;p&gt;
I believe that imagination is stronger than knowledge -- myth is more potent than history -- dreams are more powerful than facts -- hope always triumphs over experience -- laughter is the cure for grief -- love is stronger than death.
&lt;/p&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default?start-index=101&amp;max-results=100'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>110</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-25223681.post-8757903522673809325</id><published>2010-10-19T15:54:00.001-05:00</published><updated>2010-10-19T15:55:27.872-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='iexplorer'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='webslices'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Web Slices: you need to use Alternative Display Source or javascript will not work</title><content type='html'>&lt;p&gt;If your WebSlices use the &lt;strong&gt;Basic Web Slice&lt;/strong&gt; model, javascript will &lt;strong&gt;not&lt;/strong&gt; work (this file is WebSlice.html):&lt;/p&gt; &amp;lt;html xmlns=&amp;quot;&lt;a href="http://www.w3.org/1999/xhtml&amp;quot;"&gt;http://www.w3.org/1999/xhtml&amp;quot;&lt;/a&gt;&amp;gt;  &lt;br /&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;  &lt;br /&gt;&amp;lt;/head&amp;gt;  &lt;br /&gt;&amp;lt;body&amp;gt;  &lt;br /&gt;  &lt;p&gt;&amp;lt;div class=&amp;quot;hslice&amp;quot; id=&amp;quot;SliceID&amp;quot;&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;span class=&amp;quot;entry-title&amp;quot;&amp;gt;Title of the web slice&amp;lt;/span&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;div class=&amp;quot;entry-content&amp;quot;&amp;gt;Preview of the &amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;document.getElementById('Message').innerHTML='Hello'; return false;&amp;quot;&amp;gt;web&amp;lt;/a&amp;gt; slice    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;div id=&amp;quot;Message&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/div&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;p&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Hola Rebanadas Web!    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/p&amp;gt;    &lt;br /&gt;&amp;#160; &amp;lt;/div&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;/body&amp;gt;   &lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/p&gt;  &lt;p&gt; you have to use &lt;strong&gt;Alternative Display Source&lt;/strong&gt; to make javascript work (this file is WebSlice.html):&lt;/p&gt;  &lt;p&gt;&amp;lt;html xmlns=&amp;quot;&lt;a href="http://www.w3.org/1999/xhtml&amp;quot;"&gt;http://www.w3.org/1999/xhtml&amp;quot;&lt;/a&gt;&amp;gt;    &lt;br /&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;    &lt;br /&gt;&amp;lt;/head&amp;gt;    &lt;br /&gt;&amp;lt;body&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;lt;div class=&amp;quot;hslice&amp;quot; id=&amp;quot;SliceID&amp;quot;&amp;gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;span class=&amp;quot;entry-title&amp;quot;&amp;gt;Title of the web slice&amp;lt;/span&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;a rel=&amp;quot;entry-content&amp;quot; href=&amp;quot;AlternativeDisplay.html&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;Alternative Display Source&amp;lt;/a&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;p&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Hola Rebanadas Web!    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/p&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160; &amp;lt;/div&amp;gt;&amp;lt;/body&amp;gt;    &lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;and in the file AlternativeDisplay.html you put the code that use to be in WebSlice.html (and that needs to use javascript):&lt;/p&gt;  &lt;p&gt;&amp;lt;html xmlns=&amp;quot;&lt;a href="http://www.w3.org/1999/xhtml&amp;quot;"&gt;http://www.w3.org/1999/xhtml&amp;quot;&lt;/a&gt;&amp;gt;    &lt;br /&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;    &lt;br /&gt;&amp;lt;/head&amp;gt;    &lt;br /&gt;&amp;lt;body&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;div class=&amp;quot;entry-content&amp;quot;&amp;gt;Preview of the &amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;document.getElementById('Message').innerHTML='Hello'; return false;&amp;quot;&amp;gt;web&amp;lt;/a&amp;gt; slice    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;div id=&amp;quot;Message&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/div&amp;gt; &lt;/p&gt;  &lt;p&gt;&amp;lt;/body&amp;gt;   &lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-8757903522673809325?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/8757903522673809325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=8757903522673809325' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8757903522673809325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8757903522673809325'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2010/10/web-slices-you-need-to-use-alternative.html' title='Web Slices: you need to use Alternative Display Source or javascript will not work'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-1469887576062020445</id><published>2010-08-02T15:54:00.001-05:00</published><updated>2010-08-03T13:42:23.865-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='domain'/><category scheme='http://www.blogger.com/atom/ns#' term='VBScript'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='profile migration'/><category scheme='http://www.blogger.com/atom/ns#' term='user profiles'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='wmi'/><title type='text'>How to migrate your local user profile to the domain</title><content type='html'>&lt;p&gt;Apparently, there is no easy way (&lt;a href="http://www.ehow.com/how_5315456_convert-local-account-domain-account.html"&gt;this&lt;/a&gt; or &lt;a href="http://msmvps.com/blogs/clustering/archive/2004/10/06/15096.aspx"&gt;this&lt;/a&gt; do NOT work), there use to be a tool to do this (Moveuser.exe), but it &lt;a href="http://support.microsoft.com/kb/930955"&gt;stopped working with Windows Vista&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The way to do it now is to write a VBScript that uses WMI, happily, I have found someone that has already done it &lt;a href="http://tacklebox.cns.ohiou.edu/Moveuser/"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;It basically seems to be using the &lt;a href="http://msdn.microsoft.com/en-us/library/ee886408%28v=VS.85%29.aspx"&gt;ChangeOwner Method of the Win32_UserProfile Class&lt;/a&gt;, one problem I have found so far is that if the profile to be “moved” in to the domain is heavy (many Gbytes of weight) the ChangeOwner method can take a really long time to do its job. A possible solution then is to move the files outside of the profile dir, run the migration process, and copy the files back (you might need to change the permission information of those files to be able to copy them back)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-1469887576062020445?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/1469887576062020445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=1469887576062020445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/1469887576062020445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/1469887576062020445'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2010/08/how-to-migrate-your-local-user-profile.html' title='How to migrate your local user profile to the domain'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-691856520898338615</id><published>2010-07-16T17:35:00.001-05:00</published><updated>2010-07-22T08:48:16.160-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='user profiles'/><category scheme='http://www.blogger.com/atom/ns#' term='registry'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='setup'/><title type='text'>How to move C:\Users to D:\Users</title><content type='html'>&lt;p&gt;There is no user friendly way to move your C:\Users folder to D:\ but the user unfriendly way to do it is not too hard (&lt;em&gt;it was a little hard to discover, I learned how to do this when I decided that I wanted to have C:\Winnt\Profiles dir at a different location, after I lost most of my data when my main disk failed, back when Windows NT 4.0 was the latest and greatest OS from Microsoft&lt;/em&gt;)&lt;/p&gt;  &lt;p&gt;Basically, after you installed Windows (this instructions are for Windows 7 but the general approach is valid since Windows NT 4.0)&amp;#160; you have to:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Login with “WhatEverIsYourUserName” account. &lt;/li&gt;    &lt;li&gt;Run the Command Prompt (cmd.exe) as an Administrator &lt;/li&gt;    &lt;li&gt;&lt;a href="http://lh4.ggpht.com/_yBIcMbSPmVc/TEYX6A5Z9LI/AAAAAAAAADA/8KJSxY90MfA/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_yBIcMbSPmVc/TEYX6RvhxhI/AAAAAAAAADE/1zreUJtONew/image_thumb.png?imgmax=800" width="244" height="153" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Copy the C:\Users\ folder to D:\Users using &lt;a href="http://en.wikipedia.org/wiki/Robocopy"&gt;Robocopy&lt;/a&gt;       &lt;br /&gt;      &lt;pre&gt;robocopy C:\Users D:\Users /E /COPYALL /R:0 /Z /XJ&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Open &lt;a href="http://en.wikipedia.org/wiki/Windows_Registry"&gt;regedit&lt;/a&gt; and modify the ProfileList entry so that it looks like this: &lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_yBIcMbSPmVc/TEDiqlmqS-I/AAAAAAAAACQ/KjAVgo-ziWw/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_yBIcMbSPmVc/TEDirMm-oxI/AAAAAAAAACU/vL7KsrR-liw/image_thumb%5B1%5D.png?imgmax=800" width="800" height="269" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;Create a new (&lt;em&gt;Administrator&lt;/em&gt;) Windows account that you will use to test the configuration change &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&amp;#160;&lt;a href="http://lh4.ggpht.com/_yBIcMbSPmVc/TEDirWNyETI/AAAAAAAAACY/CmHJ0GfTKQU/s1600-h/image%5B11%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_yBIcMbSPmVc/TEDir7BU77I/AAAAAAAAACc/_x6JOHQB5q8/image_thumb%5B5%5D.png?imgmax=800" width="509" height="424" /&gt;&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Restart &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Login with the “Test” Windows account &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Delete C:\Users &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;See that the&amp;#160; Start menu still works (&lt;strong&gt;if you made a mistake, your Start menu is now empty&lt;/strong&gt;) &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Delete the registry Key for your “WhatEverIsYourUserName” account (if you still want to use it). (&lt;em&gt;The registry Key is the yellow folder with the S-1-5… name that contains the value ProfileImagePath that points your now obsolete C:\ folder, remember,&amp;#160; you have to delete the whole folder/key, not just the ProfileImagePath value&lt;/em&gt;): &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&amp;#160;&lt;img border="0" alt="[image[23].png]" src="http://lh4.ggpht.com/_yBIcMbSPmVc/TEDkGfR2fdI/AAAAAAAAACw/FVJ8qj0VRto/s1600/image%5B23%5D.png" /&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Log out &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Now log in with your “WhatEverIsYourUserName” account &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;If you take a look at the registry now, it will look like this (The value in ProfileImagePath now starts with “D:\” instead of “C:\”): &lt;br /&gt;    &lt;br /&gt;&amp;#160;&lt;a href="http://lh4.ggpht.com/_yBIcMbSPmVc/TEDkHLpXMKI/AAAAAAAAAC4/A8azMIUZF90/s1600-h/image%5B27%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_yBIcMbSPmVc/TEDkHpi7iGI/AAAAAAAAAC8/Db52Pk70ftI/image_thumb%5B13%5D.png?imgmax=800" width="644" height="212" /&gt;&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Now you can delete the test account. &lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And that is it, now the users accounts live in D:\Users\&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-691856520898338615?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/691856520898338615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=691856520898338615' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/691856520898338615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/691856520898338615'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2010/07/how-to-move-cusers-to-dusers.html' title='How to move C:\Users to D:\Users'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_yBIcMbSPmVc/TEYX6RvhxhI/AAAAAAAAADE/1zreUJtONew/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-8584000021800498454</id><published>2010-07-08T11:45:00.006-05:00</published><updated>2010-11-11T12:53:37.414-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='databases'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='administration'/><category scheme='http://www.blogger.com/atom/ns#' term='sqlserver'/><title type='text'>Recover sa account</title><content type='html'>Today, a friend from the office locked himself out of SqlServer 2008 R2 Express, somehow he managed to remove the windows Administrator account form the list of sysadmin accounts in the SqlServer express installed in a development server.  &lt;br /&gt;&lt;br /&gt;I thought there was no way to recover from a mistake a like that, but another friend found the way and gave us a link &lt;a href="http://www.eggheadcafe.com/software/aspnet/34150451/enable-the-sa-account-or.aspx"&gt;with the solution&lt;/a&gt;.  &lt;br /&gt;&lt;br /&gt;Basically, we need to stop the SqlService, and restart it in "single user mode" and "minimal config mode"  &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sqlservr.exe -m -r -s SQLEXPRESS&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And the open another command window and run this commands:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;osql -E -S .\SQLEXPRESS &lt;br /&gt;exec sp_password @new='changeme', @loginame='sa' &lt;br /&gt;go &lt;br /&gt;alter login sa enable &lt;br /&gt;go &lt;br /&gt;exit &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And that was it. Remember, without the special "-m -r" options, the osql commands will fail.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: In case your SQL Server is &lt;b&gt;not &lt;/b&gt;configured to use &lt;b&gt;Mixed Mode &lt;/b&gt;for authentication, you may also need to make &lt;a href="http://support.microsoft.com/kb/285097"&gt;some modification to the registry settings&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Basically you need to find the registry entry for the instance:&lt;br /&gt;&lt;br /&gt;Default instance: &lt;br /&gt;&lt;pre&gt;HKLM\Software\Microsoft\MSSqlserver\MSSqlServer\LoginMode&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Named instance:&lt;br /&gt;&lt;pre&gt;HKLM\Software\Microsoft\Microsoft SQL Server\Instance Name\MSSQLServer\LoginMode&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div class="indent"&gt;&lt;span class="userInput"&gt;And&amp;nbsp; change the value of LoginMode to &lt;b&gt;2&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-8584000021800498454?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/8584000021800498454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=8584000021800498454' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8584000021800498454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8584000021800498454'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2010/07/recover-sa-account.html' title='Recover sa account'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-8367647016898230718</id><published>2010-03-15T19:18:00.002-06:00</published><updated>2010-05-06T12:07:25.312-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dataphor'/><category scheme='http://www.blogger.com/atom/ns#' term='databases'/><category scheme='http://www.blogger.com/atom/ns#' term='Relational'/><title type='text'>Formulating Expressions a Step at a Time: Lazy Evaluation</title><content type='html'>&lt;p&gt;I am reading this &lt;a href="http://my.safaribooksonline.com/9780596155865"&gt;book&lt;/a&gt;, and I found the section with the title “Formulating Expressions a Step at a Time” particularly interesting:&lt;/p&gt;  &lt;p&gt;First, the book shows you this the query for the sentence "Get pairs of supplier numbers such that the suppliers concerned are collocated (i.e., are in the same city)" written in &lt;a href="http://en.wikipedia.org/wiki/D_%28data_language_specification%29"&gt;Tutorial D&lt;/a&gt;:&lt;/p&gt;  &lt;pre&gt;( ( ( S RENAME ( SNO AS SA ) ) { SA , CITY } JOIN&lt;br /&gt;   ( S RENAME ( SNO AS SB ) ) { SB , CITY } )&lt;br /&gt;       WHERE SA &amp;lt; SB ) { SA , SB }&lt;/pre&gt;&lt;p&gt;And then it proceeds to show you how to write this query in a more readable (step by step) way:&lt;/p&gt;&lt;pre&gt;WITH ( S RENAME ( SNO AS SA ) ) { SA , CITY } AS R1 ,&lt;br /&gt;    ( S RENAME ( SNO AS SB ) ) { SB , CITY } AS R2 ,&lt;br /&gt;    R1 JOIN R2 AS R3 ,&lt;br /&gt;    R3 WHERE SA &amp;lt; SB AS R4 :&lt;br /&gt;    R4 { SA, SB }&lt;/pre&gt;&lt;p&gt;Finally, it shows you how to write this query in SQL:&lt;/p&gt;&lt;pre&gt;WITH T1 AS ( SELECT SNO AS SA , CITY&lt;br /&gt;            FROM   S ) ,&lt;br /&gt;    T2 AS ( SELECT SNO AS SB , CITY&lt;br /&gt;            FROM   S ) ,&lt;br /&gt;    T3 AS ( SELECT *&lt;br /&gt;            FROM   T1 NATURAL JOIN T2 ) ,&lt;br /&gt;    T4 AS ( SELECT *&lt;br /&gt;            FROM   T3&lt;br /&gt;            WHERE  SA &amp;lt; SB )&lt;br /&gt;    SELECT SA , SB&lt;br /&gt;    FROM   T4&lt;/pre&gt;&lt;p&gt;Thanks to the “&lt;strong&gt;with&lt;/strong&gt;” keyword, both in SQL and in Tutorial D, it is possible to deal with this query in a “step by step” way, instead of having to deal with it a single hard to write and hard to read expression (&lt;em&gt;note that this is &lt;strong&gt;not&lt;/strong&gt; a recursive query, so the &lt;strong&gt;with&lt;/strong&gt; keyword is not being used for that in this examples&lt;/em&gt;)&lt;/p&gt;&lt;p&gt;Sadly, so far I have been unable to find a equivalent for this syntax in Dataphor… While it is possible to write something like (I am not 100% confident the syntax is right, but I think it should give you the general idea):&lt;/p&gt;&lt;pre&gt;var R1 := S {SNO SA}&lt;br /&gt;var R2 := S {SNO SB}&lt;br /&gt;var R3 := R2 JOIN R3&lt;br /&gt;var R4 := R3 WHERE SA &amp;lt; SB&lt;br /&gt;select R4 {SA, SB}&lt;/pre&gt;&lt;p&gt;In Dataphor, the variables (R1, R2, etc) are not lazily evaluated, and therefore the performance is not as good, as in, for example, the SQL case (I ran a similar example in SqlServer, and the expressions were evaluated lazily, at the end, instead of one by one, resulting in far better performance). Maybe I am doing something wrong?&lt;/p&gt;&lt;p&gt;I wonder how hard would it be to make Dataphor generate SQL using the WITH keyword with those databases that support it (so far the latest versions of SQLServer (2008) and Oracle (10 &amp;amp; 11) seem to support this syntax)… I guess it is time to ask the Dataphor authors… &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-8367647016898230718?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/8367647016898230718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=8367647016898230718' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8367647016898230718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8367647016898230718'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2010/03/formulating-expressions-step-at-time.html' title='Formulating Expressions a Step at a Time: Lazy Evaluation'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-2712668385012120872</id><published>2010-03-04T19:24:00.001-06:00</published><updated>2010-03-04T19:25:37.794-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='databases'/><category scheme='http://www.blogger.com/atom/ns#' term='the third manifesto'/><category scheme='http://www.blogger.com/atom/ns#' term='Relational'/><category scheme='http://www.blogger.com/atom/ns#' term='TRDBMS'/><title type='text'>Null versus None</title><content type='html'>&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/None"&gt;None means Nothing&lt;/a&gt;, Nothing is a concept that describes the absence of anything at all. Nothing is sometimes confused with Null, but they are very different concepts because Nothing means absence of anything, while Null means unknown (you do not know if there is a thing or not). &lt;/p&gt;  &lt;p&gt;For Nothing, the normal Two valued logic applies (&lt;em&gt;Nothing=Nothing : true, Nothing = Something : false&lt;/em&gt;), for Null, &lt;a href="http://en.wikipedia.org/wiki/Ternary_logic"&gt;Three valued logic&lt;/a&gt; is necessary(Null=Null:&lt;strong&gt;unknown&lt;/strong&gt;, Null=Something:&lt;strong&gt;unknown&lt;/strong&gt;). Unfortunately, this 2 concepts have been used interchangeably without much thought, to point where the most common use for Null in relational databases is to mean Nothing (even when Null was designed to represent unknown by Codd). This confusion is aggravated by the fact that many mainstream application languages (Java, C#, C, etc) use the &lt;strong&gt;null&lt;/strong&gt; keyword to mean uninitialized variable which easily maps to the interpretation that null means the variable is pointing to &amp;quot;nothing&amp;quot; (no object). &lt;/p&gt;  &lt;p&gt;But for databases, Null was not invented to represent nothingness, &lt;a href="http://en.wikipedia.org/wiki/Null_%28SQL%29"&gt;was invented to represent that the value of something was not known&lt;/a&gt; (maybe be something, maybe nothing, we just &lt;strong&gt;do not know&lt;/strong&gt;).&lt;/p&gt;  &lt;p&gt;Now that Chris Date wants Null to be removed from Relational Databases, so that the incongruence and confusion brought in by Three valued logic is eliminated, the developers, accustomed to use Null to represent Nothing, resist to the idea asking: How am I going to represent the fact that a Person is not married? I use to do that by marking the Marriage Date? as a nullable Date. Now what? I need to split the table into 2 tables just to represent the fact that the Marriage Date? is not mandatory? That of course seems like the obvious, elegant (&lt;em&gt;if &lt;strong&gt;extremely cumbersome&lt;/strong&gt; answer&lt;/em&gt;). But the practical developer refuses to get into that trouble, it is just too much effort, it is simple easier to continue using Null. But... what about Nothing? why not just simply add &amp;quot;Nothing&amp;quot; as a possible value for to the Date domain? That way it is possible to say that the Person has no Marriage Date?, and still stay inside the realm of two valued logic. &lt;/p&gt;  &lt;p&gt;Is this solution, in any way in conflict with &lt;a href="http://www.thethirdmanifesto.com/"&gt;The Third Manifesto&lt;/a&gt;? I really would like to know… I wonder what will be the opinion of the community in the&amp;#160; &lt;a href="http://c2.com/cgi-bin/wiki?NullVersusNone"&gt;C2 Wiki&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-2712668385012120872?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/2712668385012120872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=2712668385012120872' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2712668385012120872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2712668385012120872'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2010/03/null-versus-none.html' title='Null versus None'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-7324806861781251994</id><published>2010-02-25T23:50:00.001-06:00</published><updated>2010-09-11T10:38:56.980-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='math'/><category scheme='http://www.blogger.com/atom/ns#' term='abstractions'/><category scheme='http://www.blogger.com/atom/ns#' term='geometry'/><title type='text'>Find me a circle</title><content type='html'>&lt;p&gt;A circle is a simple shape of Euclidean geometry consisting of those points in a plane which are equidistant from a given point called the center. The common distance of the points of a circle from its center is called its radius. &lt;/p&gt;  &lt;p&gt;But Circles can not, and do not exist in reality, anything that seems to be a Circle is actually a polygon with a very high number of sides... the closest to a Circle that we can get is to have each side of the polygon the size of &lt;a href="http://en.wikipedia.org/wiki/Planck_length"&gt;quantum distance&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Just try and draw a Circle in &lt;a href="http://www.gimp.org/"&gt;The Gimp&lt;/a&gt; (or in &lt;a href="http://www.getpaint.net/"&gt;Paint.NET&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_yBIcMbSPmVc/S4dmNky2j1I/AAAAAAAAAB0/aagx0P6c05Q/image_thumb%5B18%5D.png?imgmax=800" width="56" height="56" /&gt;&lt;/p&gt;  &lt;p&gt;Now zoom 600% in to it. You will see it is actually a polygon, composed of thousands of little pixels, the same is true for &amp;quot;circles&amp;quot; in reality, they are composed of thousands of little quantum pixels. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_yBIcMbSPmVc/S4dmOJc6vnI/AAAAAAAAAB4/4gX-dz28gDY/s1600-h/image%5B29%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_yBIcMbSPmVc/S4dmP0wvgpI/AAAAAAAAAB8/ig44rkT6HYk/image_thumb%5B19%5D.png?imgmax=800" width="244" height="243" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;So, Circles do not exist, they are just a math abstraction. And that is why we end up needing unattainable numbers like Pi to deal with the area inside of a circle... because there is no such thing as the area inside of a circle (because there are no circles). &lt;/p&gt;  &lt;p&gt;The area inside of anything in reality, that looks like a circle, can be calculated by dividing it in &amp;quot;quantum pixel areas&amp;quot;, and the adding those areas to get the total area inside of the supposed circle. Now, that would require a lot of effort, that is the reason we believe in circles, because they are a very useful abstraction (even if it is an abstraction that fails and produces Pi as a result of its failure) &lt;/p&gt;  &lt;p&gt;Among Archimedes mathematical accomplishments is the computation of pi, he used the method of exhaustion as a way to compute the area inside a circle by filling the circle with a polygon of a greater and greater number of sides. The quotient formed by the area of this polygon divided by the square of the circle radius can be made arbitrarily close to Pi as the number of polygon sides becomes large, proving that the area inside the circle of radius r is Pi * (r*r),Pi being defined as the ratio of the circumference to the diameter. &lt;/p&gt;  &lt;p&gt;When a circle's diameter is 1 unit, its circumference is Pi units. Why Pi is such simple concept but such a strange &amp;quot;number&amp;quot;? because Circles do not exist, Pi is an example of a Mathematics (Geometry?) abstraction leak. &lt;/p&gt;  &lt;p&gt;As we increase the number of sides, we approximate more, and more to the circle, but we can never really have a circle. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_yBIcMbSPmVc/S4dlEtZ7SYI/AAAAAAAAACA/8_sOxKdBwKA/s1600-h/image%5B23%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_yBIcMbSPmVc/S4dlFghxPVI/AAAAAAAAACE/f8lJnGooZg8/image_thumb%5B17%5D.png?imgmax=800" width="504" height="171" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is why we can never know the complete value of Pi, because there is now way to have a circle in a discrete quantum based reality, &amp;quot;circles&amp;quot; are a good model for this things with too many sides to count easily, but circles are just a model, not a reality&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;That is something, that as software developers we should always keep in mind: The Map (the Model) is not The Territory (the Reality)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-7324806861781251994?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/7324806861781251994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=7324806861781251994' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7324806861781251994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7324806861781251994'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2010/02/find-me-circle.html' title='Find me a circle'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_yBIcMbSPmVc/S4dmNky2j1I/AAAAAAAAAB0/aagx0P6c05Q/s72-c/image_thumb%5B18%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-8793251396405527963</id><published>2010-01-26T23:11:00.001-06:00</published><updated>2010-01-26T23:20:00.677-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stored procedures'/><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='Dataphor'/><category scheme='http://www.blogger.com/atom/ns#' term='databases'/><category scheme='http://www.blogger.com/atom/ns#' term='queries'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='pagination'/><category scheme='http://www.blogger.com/atom/ns#' term='Relational'/><title type='text'>Pagination in Dataphor</title><content type='html'>&lt;p&gt;First I created this operator: &lt;/p&gt;  &lt;pre&gt;create operator GetNext(var AID :Integer) : System.Integer &lt;br /&gt;begin &lt;br /&gt;AID:= AID+1; &lt;br /&gt;result:=AID; &lt;br /&gt;end ;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;and then I used it: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var id := 0; &lt;br /&gt;select SomeTable add {GetNext(id) rowid}; &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;It is nice, but it would be better if there were a way to do this without having to create an operator myself (it should already include one that does this) &lt;br /&gt;  &lt;br /&gt;Now If I want to do pagination, all I have to do is write:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var id := 0; &lt;br /&gt;select SomeTable add {GetNext(id) rowid} where rowid between 2 and 5;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;That will return rows between 2 and 5 from the “SomeTable” table.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now one of the most interesting feaures about Dataphor, are relvars (relational variables), that make it possible to do this:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var SomeComplexQuery := SomeTable where …...&lt;br /&gt;var id := 0;&lt;br /&gt;select SomeComplexQuery add {GetNext(id) rowid} where rowid between 2 and 5;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;That way, pagination can be added to a query of arbitrary complexity with minimum effort.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-8793251396405527963?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/8793251396405527963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=8793251396405527963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8793251396405527963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8793251396405527963'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2010/01/pagination-in-dataphor.html' title='Pagination in Dataphor'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-809042342966728343</id><published>2009-12-19T07:31:00.001-06:00</published><updated>2009-12-19T11:41:39.499-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='Dataphor'/><category scheme='http://www.blogger.com/atom/ns#' term='indexes'/><category scheme='http://www.blogger.com/atom/ns#' term='primary key'/><category scheme='http://www.blogger.com/atom/ns#' term='d4'/><category scheme='http://www.blogger.com/atom/ns#' term='sqlserver'/><title type='text'>Dataphor: How to create a table with a primary key</title><content type='html'>&lt;p&gt;Creating a table in Dataphor is easy:&lt;/p&gt;  &lt;pre&gt;&lt;p&gt;create table Debt  &lt;br /&gt;{  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ID : Integer,&lt;br /&gt;&lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; key { ID },&lt;br /&gt;};&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;That translates (when using MSSQL as storage) into (if we ask MSSQL to provide us with the SQL DDL):&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;p&gt;CREATE TABLE [dbo].[Debt](   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; [ID] [int] NOT NULL &lt;br /&gt;&lt;br /&gt;)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;CREATE UNIQUE CLUSTERED INDEX [UIDX_Debt_ID] ON [dbo].[Debt] &lt;br /&gt;( &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; [ID] ASC &lt;br /&gt;&lt;br /&gt;)&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;It is important to note that D4 does not have the concept of a &lt;strong&gt;primary key&lt;/strong&gt;, and that the “key” keyword results in a unique index, that while for all uses and purposes can work as a primary key, it is not recognized as such by MSSQL. It is possible to have several different “keys” in a Dataphor table.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-809042342966728343?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/809042342966728343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=809042342966728343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/809042342966728343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/809042342966728343'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/12/dataphor-how-to-create-table-with.html' title='Dataphor: How to create a table with a primary key'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-337664543600491642</id><published>2009-11-24T06:36:00.002-06:00</published><updated>2010-02-18T18:45:42.801-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='weld'/><category scheme='http://www.blogger.com/atom/ns#' term='ioc'/><category scheme='http://www.blogger.com/atom/ns#' term='injection'/><category scheme='http://www.blogger.com/atom/ns#' term='scala'/><title type='text'>Scala is not mature enough for Weld</title><content type='html'>&lt;p&gt;&lt;a href="http://www.scala-lang.org/"&gt;Scala&lt;/a&gt; is not mature enough for &lt;a href="http://www.seamframework.org/Weld"&gt;Weld&lt;/a&gt; (&lt;em&gt;or any other reflection related operation&lt;/em&gt;). Turns out that one of the feature that make Scala so interesting (&lt;em&gt;closures&lt;/em&gt;) is also a source of incompatibility (&lt;em&gt;the internal anonymous class files that generate are invalid&lt;/em&gt;) &lt;/p&gt;  &lt;p&gt;So, if for example, I have a code like this (inside any method in a class): &lt;/p&gt;  &lt;pre&gt;val classNames = Conversions.convertList(names).reduceLeft[String] { (acc, n) =&amp;gt;&lt;br /&gt;       acc + ", " + n&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;That generates an inner class that makes Java reflection unusable: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;java.lang.IncompatibleClassChangeError: com.googlecode.solder.dwr.WeldContainer and com.googlecode.solder.dwr.WeldContainer$$anonfun$getClasses$1 disagree on InnerClasses attribute&lt;br /&gt; at java.lang.Class.getDeclaringClass(Native Method)&lt;br /&gt; at java.lang.Class.getEnclosingClass(Class.java:1085)&lt;br /&gt; at java.lang.Class.getSimpleBinaryName(Class.java:1220)&lt;br /&gt; at java.lang.Class.getSimpleName(Class.java:1112)&lt;br /&gt; at org.jboss.weld.util.Names.typeToString(Names.java:251)&lt;br /&gt; at org.jboss.weld.util.Names.classToString(Names.java:263)&lt;br /&gt; at org.jboss.weld.introspector.jlr.WeldClassImpl.&amp;lt;init&amp;gt;(WeldClassImpl.java:151)&lt;br /&gt; at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:133)&lt;br /&gt; at org.jboss.weld.resources.ClassTransformer$2.call(ClassTransformer.java:72)&lt;br /&gt; at org.jboss.weld.resources.ClassTransformer$2.call(ClassTransformer.java:68)&lt;br /&gt; at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)&lt;br /&gt; at java.util.concurrent.FutureTask.run(FutureTask.java:138)&lt;br /&gt; at org.jboss.weld.util.collections.ConcurrentCache.putIfAbsent(ConcurrentCache.java:125)&lt;br /&gt; at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:67)&lt;br /&gt; at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:59)&lt;br /&gt; at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:86)&lt;br /&gt; at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:134)&lt;br /&gt; at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:367)&lt;br /&gt; at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:158)&lt;br /&gt; at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)&lt;br /&gt; at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)&lt;br /&gt; at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)&lt;br /&gt; at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)&lt;br /&gt; at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)&lt;br /&gt; at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)&lt;br /&gt; at org.apache.catalina.core.StandardService.start(StandardService.java:516)&lt;br /&gt; at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)&lt;br /&gt; at org.apache.catalina.startup.Catalina.start(Catalina.java:578)&lt;br /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;br /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;br /&gt; at java.lang.reflect.Method.invoke(Method.java:597)&lt;br /&gt; at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)&lt;br /&gt; at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Apparently this is a &lt;a href="https://lampsvn.epfl.ch/trac/scala/ticket/1167"&gt;known problem&lt;/a&gt; since 2008-08-03 (16 months so far) and AFAIK they are not in a hurry to fix it. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I guess that means I am going to have to start removing Scala from &lt;a href="http://code.google.com/p/solder/"&gt;my Weld project&lt;/a&gt;. I am sad about this because Scala is IMO a really beautiful language, that feels much cleaner than Java, but if the &lt;tt&gt;.class&lt;/tt&gt; files that it generates are not compatible with the rest of Java... it is just useless for me. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-337664543600491642?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/337664543600491642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=337664543600491642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/337664543600491642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/337664543600491642'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/11/scala-is-not-mature-enough-for-weld.html' title='Scala is not mature enough for Weld'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-422559133450025641</id><published>2009-11-16T13:10:00.004-06:00</published><updated>2010-02-18T18:46:41.935-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='weld'/><category scheme='http://www.blogger.com/atom/ns#' term='scala'/><title type='text'>Playing with Weld and Scala to create a new framework for JSPs</title><content type='html'>Today I built my first "serious" example  using &lt;a href="http://seamframework.org/Weld"&gt;Weld&lt;/a&gt; and &lt;a href="http://www.scala-lang.org/"&gt;Scala&lt;/a&gt;.&lt;br /&gt;You can take a look at it in &lt;a href="http://code.google.com/p/solder/"&gt;here.&lt;/a&gt;&lt;br /&gt;So far, Weld looks like really good framework, I am still not able to say that it will replace Spring as my "glue framework", but that could certainly become true.&lt;br /&gt;Scala also looks interesting (this also my first "serious" attempt at doing something with Scala), but the support for Scala in Eclipse is very fragile... the plug-in still needs a lot of polishing (no refatoring, no quickfixes, and the syntax coloring and cursor control sometimes goes crazy). I would not recommend the Scala plugin in Eclipse for "real work", but for hobbing is fine. (I wonder if the support for Scala in the Netbeans or the opensourced version of IntelliJ is better).&lt;br /&gt;&lt;a href="http://code.google.com/p/solder/"&gt; &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-422559133450025641?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/422559133450025641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=422559133450025641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/422559133450025641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/422559133450025641'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/11/playing-with-weld-and-scala-to-create.html' title='Playing with Weld and Scala to create a new framework for JSPs'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-8762341767332377735</id><published>2009-11-06T20:14:00.003-06:00</published><updated>2009-11-13T11:08:09.620-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipselink'/><category scheme='http://www.blogger.com/atom/ns#' term='orm'/><category scheme='http://www.blogger.com/atom/ns#' term='forums'/><category scheme='http://www.blogger.com/atom/ns#' term='JPA'/><title type='text'>JPA Myth: EclipseLink and Hibernate are compatible. Not true: Hibernate does NOT follow the JPA Spec</title><content type='html'>&lt;p&gt;Please take a look at the Hibernate JIRA issue &lt;a href="http://opensource.atlassian.com/projects/hibernate/browse/EJB-441"&gt;EJB-441&lt;/a&gt;, seen it? &lt;/p&gt;  &lt;p&gt;Now, please tell me if this is correct:&lt;/p&gt;  &lt;p&gt;According to Gavin King (author of Hibernate) &lt;a href="http://opensource.atlassian.com/projects/hibernate/browse/EJB-419"&gt;the JPA spec the @Column(nullable=false) is just a schema generation hint&lt;/a&gt;, and therefore JPA implementations should NOT use it for object level validation.&lt;/p&gt;  &lt;p&gt;I think that means that if an entity object with a null property marked with the @Column(nullable=false) is persisted using entityManager.persist() it should crash with a java.sql.SQLException as the root exception, thrown when the "&lt;strong&gt;INSERT&lt;/strong&gt;" statement failed after it was sent to the database by the JDBC driver (&lt;em&gt;as it happens in EclipseLink&lt;/em&gt;), and not because some implementation specific mechanism "pre-validated" it and prevented it from reaching the database (&lt;em&gt;as it happens in Hibernate thanks to org.hibernate.engine.Nullability.checkNullability&lt;/em&gt;).&lt;/p&gt;  &lt;p&gt;Is that correct? Because I don’t know anymore!&lt;/p&gt;  &lt;p&gt;Lets say that is correct, does that means that the following is correct too?:&lt;/p&gt;  &lt;p&gt;Validation should be entirely the responsibility of the JSR-303, and the properties of an entity should &lt;strong&gt;only&lt;/strong&gt; be checked for &lt;strong&gt;nullability&lt;/strong&gt; before sending to the database &lt;em&gt;if a &lt;a href="http://jcp.org/en/jsr/summary?id=303"&gt;JSR-303&lt;/a&gt; implementation is there to indicate that&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;Is that true? And if it is, then:&lt;/p&gt;  &lt;p&gt;What is exactly the difference between &lt;em&gt;@Basic(optional=&lt;strong&gt;true&lt;/strong&gt;)  and @Column(nullable=&lt;strong&gt;true&lt;/strong&gt;)&lt;/em&gt;? What happens when this 2 are applied to the same property, but they contradict each other? (As in : &lt;em&gt;@Basic(optional=&lt;strong&gt;false&lt;/strong&gt;)&lt;/em&gt;  and @Column(&lt;strong&gt;nullable=true&lt;/strong&gt;) or in &lt;em&gt;@Basic(&lt;strong&gt;optional=true&lt;/strong&gt;)&lt;/em&gt;  and &lt;em&gt;@Column(&lt;strong&gt;nullable=false&lt;/strong&gt;)&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;I could not find a statisfactory answer in the spec documentation, would &lt;strong&gt;anyone&lt;/strong&gt; be so kind as to resolve this issue? Because it Hibernate Forums they have decided that the way to deal with this inconsistencies and contradictions in Hibernate and in the JPA standard is &lt;a href="https://forum.hibernate.org/viewtopic.php?t=995684&amp;amp;start=0&amp;amp;postdays=0&amp;amp;postorder=asc&amp;amp;highlight=entitymanager+persist"&gt;to plain ignore me&lt;/a&gt; since  May of 2009.&lt;/p&gt;  &lt;p&gt;As you can see I tried to raise the issue with 2 JIRAS, forum post and easy to reproduce unit-tests, but nothing seems to work… what should I do then?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-8762341767332377735?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/8762341767332377735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=8762341767332377735' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8762341767332377735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8762341767332377735'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/11/jpa-myth-eclipselink-and-hibernate-are.html' title='JPA Myth: EclipseLink and Hibernate are compatible. Not true: Hibernate does NOT follow the JPA Spec'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-6532600778215173837</id><published>2009-10-26T08:07:00.001-06:00</published><updated>2009-10-26T08:08:00.877-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='vs.net'/><category scheme='http://www.blogger.com/atom/ns#' term='autoincrement version'/><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><title type='text'>How to have an auto incrementing assembly version number (Visual Studio)?</title><content type='html'>&lt;p&gt;The assembly version did not auto increment… why? if I was using AssemblyVersion correcty? (The “*” indicates which part of the version string you want to have autoincremented)&lt;/p&gt;  &lt;p&gt;[assembly: AssemblyVersion(&amp;quot;1.0.*&amp;quot;)]&lt;/p&gt;  &lt;p&gt;Well, it turns out the problem is that I was also using:&lt;/p&gt;  &lt;p&gt;[assembly: AssemblyFileVersion(&amp;quot;1.0.*&amp;quot;)]&lt;/p&gt;  &lt;p&gt;All I had to do is comment the line with AssemblyFileVersion in my AssemblyInfo.cs file, and it started working:&lt;/p&gt;  &lt;p&gt;[assembly: AssemblyVersion(&amp;quot;1.0.*&amp;quot;)]   &lt;br /&gt;&lt;font color="#808080"&gt;//[assembly: AssemblyFileVersion(&amp;quot;1.0.*&amp;quot;)]&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-6532600778215173837?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/6532600778215173837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=6532600778215173837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/6532600778215173837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/6532600778215173837'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/10/how-to-have-auto-incrementing-assembly.html' title='How to have an auto incrementing assembly version number (Visual Studio)?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-2252437258238873767</id><published>2009-09-15T11:14:00.001-05:00</published><updated>2009-09-16T14:03:51.660-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='firewall'/><category scheme='http://www.blogger.com/atom/ns#' term='JConsole'/><category scheme='http://www.blogger.com/atom/ns#' term='monitoring'/><category scheme='http://www.blogger.com/atom/ns#' term='over-engineered'/><title type='text'>Can I use JConsole to monitor an application through a firewall?</title><content type='html'>&lt;div&gt;&lt;/div&gt;  &lt;p&gt;A fragment of JConsole documentation (bold type emphasis added by me):&lt;/p&gt;  &lt;p&gt;The &lt;tt&gt;com.sun.management.jmxremote.port&lt;/tt&gt; management property specifies the port where the RMI Registry can be reached but the ports where the &lt;tt&gt;RMIServer&lt;/tt&gt; and&lt;tt&gt;RMIConnection&lt;/tt&gt; remote objects are exported is chosen by the RMI stack. &lt;strong&gt;To export the remote objects (&lt;tt&gt;RMIServer&lt;/tt&gt; and &lt;tt&gt;RMIConnection&lt;/tt&gt;) on a given port you need to create your own RMI connector server programmatically&lt;/strong&gt;, as described in the section&lt;/p&gt;  &lt;p&gt;&lt;i&gt;Mimicking Out-of-the-Box Management Using the JMX Remote API&lt;/i&gt; in the &lt;a href="http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html#gdfvv"&gt;Java SE Monitoring and Management Guide&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I actually need to write code to be able to monitor a Java application through a firewall! Talk about an unfinished product! and Sun guys even have the nerve to act surprised angry when&amp;#160; people say that Java is over-engineered.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-2252437258238873767?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/2252437258238873767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=2252437258238873767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2252437258238873767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2252437258238873767'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/09/can-i-use-jconsole-to-monitor.html' title='Can I use JConsole to monitor an application through a firewall?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-6534574937867332254</id><published>2009-09-08T09:39:00.005-05:00</published><updated>2009-09-16T14:05:58.977-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='webbrowsers'/><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='intranet'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='enterprise development'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Simplicity and Hubris: Web vs Enterprise Development</title><content type='html'>&lt;p align="justify"&gt;I would find it really funny that most people &lt;a href="http://stuffthathappens.com/blog/2008/03/05/simplicity/"&gt;do not understand the difference&lt;/a&gt; between &lt;a href="http://unqualified-reservations.blogspot.com/2009/07/wolfram-alpha-and-hubristic-user.html"&gt;intelligent and control interfaces&lt;/a&gt; if would not mean that lots of time and money are wasted trying to make intelligent interfaces work as control interfaces, or Web 2.0 Internet solutions work for Enterprise intranet problems.     &lt;br /&gt;    &lt;br /&gt;It is the typical &amp;quot;since Google/Apple/Facebook/Twitter/SomeFreeAndPublicWebSite uses it for X/Y/Z/Q it should be great for the system I am building&amp;quot; syndrome.     &lt;br /&gt;    &lt;br /&gt;Well, it might be great for them when they are trying to solve the X/Y/Z/Q problem, but as it turns out, many developers do not work at places that build the kind of systems this companies build, and are not trying to solve the kind of problems this companies are trying to solve.     &lt;br /&gt;    &lt;br /&gt;Some people think that since our problems do not seem as technologically&amp;#160; impressive as those targeted by free public websites they must be easier, or that since a solution worked for the super huge public web site X then it should also work for the tiny intranet system we are building, well, the truth is that most of the times this solutions do not help at all. Please don't get me wrong, some of their ideas are usable, but we need to remember that in the dreaded Intr&lt;strong&gt;a&lt;/strong&gt;net Enterprise development world rules are very different:     &lt;br /&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;We do &lt;span style="font-weight: bold"&gt;not have huge hardware resources &lt;/span&gt;at our disposal&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;We do &lt;span style="font-weight: bold"&gt;not have a huge budget &lt;/span&gt;and the hiring power to get the best and only the best experts to work with us&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Our systems are &lt;span style="font-weight: bold"&gt;not &lt;/span&gt;of the&amp;quot;just register in this form this once and after this use the site with the mouse&amp;quot; kind, our users &lt;span style="font-weight: bold"&gt;hate the mouse&lt;/span&gt;, because they are going to be capturing data all day, and for that, &lt;span style="font-weight: bold"&gt;the keyboard is king &lt;/span&gt;(and the mouse is irrelevant)&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;We need to &lt;span style="font-weight: bold"&gt;interact directly with &amp;quot;special hardware&amp;quot;&lt;/span&gt; (such as scanners, printers, finger print readers etc) and browsers do not know how to talk to those, &lt;span style="font-weight: bold"&gt;a browser can not even print with precision&lt;/span&gt; without help from &lt;span style="font-weight: bold"&gt;Acrobat Reader&lt;/span&gt;.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;We need the &lt;span style="font-weight: bold"&gt;behavior &lt;/span&gt;of our systems to be &lt;span style="font-weight: bold"&gt;consistent and always the same &lt;/span&gt;(Web Search engine users do not care if the search results present different information or the same information in different order as long as the &amp;quot;relevant&amp;quot; stuff is in the first pages, Enterprise users expect search results to be exactly the same as last time, unless they have done something to alter that, and when they do, the change they expect is predictable)&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Our users want &lt;span style="font-weight: bold"&gt;access to their data now&lt;/span&gt;, and do not care for excuses like &amp;quot;sorry but there is no access to the super massively great cloud because our infinitum connection/cable modem/whatever is failing&amp;quot;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Our users want &lt;span style="font-weight: bold"&gt;data to be confidential &lt;/span&gt;(although they &lt;span style="font-weight: bold"&gt;do not even understand the meaning of security and its costs&lt;/span&gt;). Having all your data &amp;quot;in the cloud&amp;quot; sounds great, until the country where the clouds exists decides that it wants to apply &amp;quot;economic sanctions&amp;quot; to yours and begins by forbidding you access to the data in the cloud because the company that owns it is controlled by their laws.&lt;span style="font-weight: bold"&gt; The day I see Google store its internal mission critical strategic information in Amazon's servers or vice-versa is the day I will believe that the Cloud is a safe place to store that kind of information.&lt;/span&gt;         &lt;br /&gt;&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;All those &amp;quot;Web 2.0&amp;quot; companies have done little to help this stuff (In fact, they have created lots of problems, by forcing us intranet Enterprise developers to use primitive runtime platforms (web browsers) to deliver our applications . It is not that they are evil, it is just that they are not targeting the kind of problems Enterprise developers need to solve. And I hate when I see people recommending approaches that worked fine for this companies for problems that just can not be solved with them. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-6534574937867332254?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/6534574937867332254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=6534574937867332254' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/6534574937867332254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/6534574937867332254'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/09/simplicity-and-hubris.html' title='Simplicity and Hubris: Web vs Enterprise Development'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-8442059683888790048</id><published>2009-08-30T22:47:00.001-05:00</published><updated>2009-08-30T22:49:58.194-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='powershell'/><category scheme='http://www.blogger.com/atom/ns#' term='delete files'/><category scheme='http://www.blogger.com/atom/ns#' term='vs.net'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='clean build'/><title type='text'>How can I use PowerShell to delete all the files with a particular extension</title><content type='html'>&lt;p&gt;Just run the command:&lt;/p&gt;  &lt;pre&gt;get-childitem rootdir -include *.extension -recurse | foreach ($_) {remove-item $_.fullname}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And that is it. Thanks &lt;a href="http://www.microsoft.com/technet/scriptcenter/resources/qanda/oct06/hey1023.mspx"&gt;Scripting Guy&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This is specially useful for me because very often, after I make changes in project reference in VS.NET some .dll files are left “out of sync” and and make parts your project act as if you did not re-compiled them. Sadly there is no easy way to tell VS.NET to get rid of all the .dll files that may be causing problems.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-8442059683888790048?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/8442059683888790048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=8442059683888790048' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8442059683888790048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8442059683888790048'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/08/how-can-i-use-powershell-to-delete-all.html' title='How can I use PowerShell to delete all the files with a particular extension'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-5832049050022929331</id><published>2009-08-30T12:55:00.003-05:00</published><updated>2010-01-05T13:33:16.093-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='documents'/><category scheme='http://www.blogger.com/atom/ns#' term='digital signature'/><category scheme='http://www.blogger.com/atom/ns#' term='pdf'/><category scheme='http://www.blogger.com/atom/ns#' term='encryption'/><category scheme='http://www.blogger.com/atom/ns#' term='toy security'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Make that PDF secure: Toy Security</title><content type='html'>&lt;p&gt;Make that PDF secure! That  is one of the funniest requests I have received from a boss at one of my jobs… I answered by asking: “Secure? How secure?” and my boss told me: well, I want the user to be unable to modify it, copy it or print it.&lt;/p&gt;  &lt;p&gt;Why do I say that this request is funny? Well, because this was a web application, the typical HTML+JavaScript+JSON/XML+Choose-the-Server-Side-Tech-You-Like application. Now, of course you can not really “display” a PDF with that technology, you need to have a PDF viewer like Acrobat Reader so that your user can “see” the PDF, and, of course, all the indented users for this intranet web applications had it installed.&lt;/p&gt;  &lt;p&gt;My boss had read that Acrobat had an option to make a PDF read-only with a password, and that it was even possible to “protect” the document so that it could not be printed… sounds like the solution… no? well, first of all , if you can see it, it means that the structure of the document is available to the reader, which means that the document is not really encrypted, and that means the any tool capable of reading and writing .pdf will be able to remove the password without even worrying about trying to guess it using a brute force (or even an heuristic) attack.&lt;/p&gt;  &lt;p&gt;What can you do then? Well you can actually encrypt it… that will prevent the user from modifying it… but it will also prevent it from being seen… unless the user has the password… which also means he/she can un-encrypt the document and remove the protection.&lt;/p&gt;  &lt;p&gt;There is no thing that can be done then? well, if security of this document is actually a priority, you could create a custom reader unable to print… that  should work should it? Well, not exactly, the user can always just press the “printscreen” key  that is available in all keyboards and get a copy of the document… I have read that it is possible to install some DRM level protections in some OSes that could detect that, but when you take it to that level,  a new questions is brought in to the table: is it worth the cost? does the document actually needs that kind of security? if not, it means this is a case of toy security, your boss just wants this feature because it sounds like a feature that “would impress the user” but not something that is really required by the application, he/she has not really give this features (and its implications) some thought.&lt;/p&gt;  &lt;p&gt;Lets say that at my boss says: “Yes, that level of security is really needed” (very unlikely, but could happen), well, that brings in the next question: what if the user just goes, takes one of then great modern digital cameras, and takes the picture from the screen monitor? (and then spends a few days retouching it in the Gimp or Photoshop).That means it will be able to steal the information, and even be able to print it. How can you prevent that from happening? How can you make a document that is actually secure even after that?&lt;/p&gt;  &lt;p&gt;Well, the answer is that if what you want to prevent is the theft of information, the only way is to not allow the user to see the document, if the user can see it, the user can copy it, one way of another (there is even the possibility that the user has photographic memory) and there is no way you can make the user “forget” that he saw the document.&lt;/p&gt;  &lt;p&gt;But lets say that what you want to do is detect if a document is a forgery that is, right at the moment that you see it printed on a paper, you want to be able to know if it came from your system (and it was altered by someone after it was copied  or not)… the only way to do that, is embedding the same information that the document has in a 2D barcode (including something that uniquely identifies the document), and also embed in another barcode a digital signature that is able to validate the data. That is the only way I know you can demonstrate that the document is a forgery… obviously, by the time you have explained this to you boss (if he/she has managed to make sense from it) the most likely thing is that he/she is unwilling to ask you to do all that it is needed to achieve this goal, mostly because it is nothing like what he/she wanted in the first place: it something much more abstract, and requires a barcode reader to verify the document.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-5832049050022929331?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/5832049050022929331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=5832049050022929331' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/5832049050022929331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/5832049050022929331'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/08/make-that-pdf-secure-toy-security.html' title='Make that PDF secure: Toy Security'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-4228063478804686876</id><published>2009-08-22T13:59:00.001-05:00</published><updated>2009-08-22T14:01:51.983-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='powershell'/><category scheme='http://www.blogger.com/atom/ns#' term='finding'/><category scheme='http://www.blogger.com/atom/ns#' term='command line'/><title type='text'>How to find files containing a string with Powershell</title><content type='html'>&lt;p&gt;A while ago a wrote a small post to remind me of &lt;a href="http://luxspes.blogspot.com/2008/01/how-to-find-files-containing-string.html"&gt;How to find files containing a string in Unix&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Now, I have learned how to do pretty much the same thing but with &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;Powershell&lt;/a&gt;:&lt;/p&gt;  &lt;pre&gt;get-childitem {directory} –include {file pattern} -recurse | select-string -pattern &amp;quot;{string to Find}&amp;quot; -casesensitive&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You can write a path in {directory} or nothing to use the current directory.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-4228063478804686876?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/4228063478804686876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=4228063478804686876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/4228063478804686876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/4228063478804686876'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/08/how-to-find-files-containing-string.html' title='How to find files containing a string with Powershell'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-3917901880719772159</id><published>2009-08-14T08:58:00.001-05:00</published><updated>2010-02-18T18:48:35.959-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='crud'/><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='protocols'/><title type='text'>Understanding REST Verbs and its relationship with CRUD</title><content type='html'>I used to  believe that REST verbs mapped to CRUD operations more or less like this:   &lt;p&gt;GET -&amp;gt; Read  &lt;br /&gt;DELETE -&amp;gt; Delete    &lt;br /&gt;POST-&amp;gt;Insert/Update   &lt;br /&gt;PUT -&amp;gt;Insert/Update&lt;/p&gt;  &lt;p&gt;Yes, I mapped both POST and PUT map to the same CRUD operation, but now I am not that sure this mapping is completely right… &lt;/p&gt;  &lt;p&gt;I have learned that the difference between POST and PUT is the URI, in PUT the URI identifies the entity enclosed with the request (the entity you wan to Insert or Update), while in POST the URI identifies the resource that will handle the enclosed entity.&lt;/p&gt;  &lt;p&gt;So, POST is like saying "Resource X, do something with this Entity", while PUT is more like "Insert/Update this Entity as Resource X"&lt;/p&gt;  &lt;p&gt;So POST is more like “Tell ‘X’ to do something with ‘E’” and that has really no direct mapping with a CRUD operation… of course, a POST, internally, can do one, or many of the CRUD operations using the data of the entity that is being passed to it as a parameter… Does that mean that POST maps to all CRUD operations?&lt;/p&gt;  &lt;p&gt;I guess I need to learn more about this…&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-3917901880719772159?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/3917901880719772159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=3917901880719772159' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3917901880719772159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3917901880719772159'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/08/understanding-rest-verbs-and-its.html' title='Understanding REST Verbs and its relationship with CRUD'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-7205690298135590863</id><published>2009-06-13T11:10:00.002-05:00</published><updated>2010-02-18T18:49:22.501-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='http'/><category scheme='http://www.blogger.com/atom/ns#' term='crud'/><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='ado.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><title type='text'>Greenspuns Tenth Rule Of Programming and ADO.NET Data Services</title><content type='html'>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;This is a humorous observation once made by &lt;a href="http://c2.com/cgi-bin/wiki?PhilipGreenspun"&gt;Philip Greenspun&lt;/a&gt;: &lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dd&gt;&lt;em&gt;Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of &lt;a href="http://c2.com/cgi-bin/wiki?CommonLisp"&gt;CommonLisp&lt;/a&gt;.&lt;/em&gt;&lt;/dd&gt;&lt;/dl&gt;  &lt;p&gt;Or the database variant (&lt;a href="http://c2.com/cgi-bin/wiki?GreencoddsTenthRuleOfProgramming" target="_blank"&gt;Greencodds Tenth Rule Of Programming&lt;/a&gt;):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Every sufficiently complex application/language/tool will either have to use a database or reinvent one the hard way&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I sometimes I feel that:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt; &lt;dd&gt;&lt;em&gt;Any sufficiently complicated procedural api contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of  query language.&lt;/em&gt;&lt;/dd&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Take for example, Web Services, they started a procedural thing where people created their own custom verbs for each service, then people realized that the semantics of HTTP constitutes a coordination language which is is sufficiently for any computational communication pattern, they realized that GET / PUT / POST / were enough for any program, but they again forgot about the query part, so after a  while they &lt;a href="http://luxspes.blogspot.com/2007/08/rest-dataservice-it-was-so-obvious.html" target="_blank"&gt;reinvented a query language&lt;/a&gt;  (like SQL) by creating create a query language based on URL query strings, as in &lt;a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" target="_blank"&gt;ADO.NET Data Services&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;Sometimes I feel all IT industry is like  a dog chasing its own tail… we invent Cobol to handle data procedurally only to invent SQL to handle data declaratively only to invent stored procedures and web services to handle it procedurally to then invent REST to handle it declaratively  I wonder what will be the name of the procedural silver bullet that will replace REST…&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-7205690298135590863?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/7205690298135590863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=7205690298135590863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7205690298135590863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7205690298135590863'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/06/greenspuns-tenth-rule-of-programming.html' title='Greenspuns Tenth Rule Of Programming and ADO.NET Data Services'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-1617409449539181845</id><published>2009-06-07T18:27:00.002-05:00</published><updated>2010-02-18T18:50:03.154-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='deployment'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><title type='text'>JEE Development Deployment: In the order wrong</title><content type='html'>&lt;p&gt;So, you start a new  we project in Eclipse 3.4.1 (or in Netbeans 6.5.1) and you run it, what happens is that basically the project gets copied in to the directory the application server uses to “keep” the applications it runs, then the application server starts, looks in to its directory for applications and starts your application, and you are able to see your project,if you are using Tomcat, or JBoss as lot people do, you will be able to see you web project on port 8080. Right? Wrong!&lt;/p&gt;  &lt;p&gt;what really happens is that  then the application server starts and then the project gets copied in to the directory the application server uses to “keep” the applications it runs, then the IDE opens the web browser, that connects to the port 8080 using an url that includes  the context of the application, its “name” so to speak, and then, the application server then realizes there a new application with that name in on its “directory applications” and starts it.&lt;/p&gt;  &lt;p&gt;Noticed the difference: &lt;/p&gt;  &lt;p&gt;What one typically believes it happens:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;the project gets copied in to the directory the application server uses to “keep” the applications it runs &lt;/li&gt;    &lt;li&gt;the IDE starts the application server &lt;/li&gt;    &lt;li&gt;looks in to its directory for applications and starts your application… &lt;/li&gt;    &lt;li&gt;now you will be able to see you web project on port 8080 &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;What really happens:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;the IDE starts the application server &lt;/li&gt;    &lt;li&gt;the project gets copied in to the directory the application server uses to “keep” the applications it runs &lt;/li&gt;    &lt;li&gt;then the IDE opens the web browser, that connects to the port 8080 using an url that includes  the context of the application &lt;/li&gt;    &lt;li&gt;the application server then realizes there a new application with that name in on its “directory applications” and starts it &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Now, why is it so important to understand in what order this happens?&lt;/p&gt;  &lt;p&gt;Well, because during development this processes is repeated again and again, until the application reach a point where it can be delivered to the customer the problem is that some times, one of the iterations of this process ends with an application so dysfunctional that it is able to crash the application server (and that will not stop until we get a &lt;a href="http://luxspes.blogspot.com/2008/08/j2ee-application-servers-and-eclipse.html" target="_blank"&gt;real virtual machine for java&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;But until we do get a better virtual machine, there is a more pressing problem, if we deploy an application that crashes the application server, the order in which the process is currently done makes it impossible to deploy the fixed version, unless we delete the previous version completely. Why do I say that: well lets analyze it, lets say we start with a fresh application server, where we have never installed our application:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;then the application server starts &lt;/li&gt;    &lt;li&gt;the project gets copied in to the directory the application server uses to “keep” the applications it runs &lt;/li&gt;    &lt;li&gt;then the IDE opens the web browser, that connects to the port 8080 using an url that includes  the context of the application &lt;/li&gt;    &lt;li&gt;the application server then realizes there a new application with that name in on its “directory applications” and starts it &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;This first version of our application is far from finished, but it does not have any bug capable of crashing the application server, so we add som more functionality, and we ask the IDE to run our application again, and what does the IDE do?:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;then the application server starts &lt;/li&gt;    &lt;li&gt;since the application server already knows it has our (failed) application installed, it does not need a visit from the browser to start it, in starts it immediately &lt;/li&gt;    &lt;li&gt;the project gets copied in to the directory the application server uses to “keep” the applications it runs, since the application is already there, only the changed files are copied &lt;/li&gt;    &lt;li&gt;if the changes are of a particular kind (alterations to web.xml for example) the applications server restarts the application so that it starts working with the new configuration &lt;/li&gt;    &lt;li&gt;then the IDE opens the web browser, that connects to the port 8080 using an url that includes  the context of the application &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;This second version of our application actually has a nasty bug, so after step 4, the application server hangs, and we are forced to kill it using the services provided by the operating system to deal with misbehaving processes, then we go back to our code, fix the problem, and we ask the IDE to run our application again, and what does the IDE do?:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;the IDE starts the application server &lt;/li&gt;    &lt;li&gt;since the application server already knows it has our (failed) application installed, it does not need a visit from the browser to start it, in starts it immediately &lt;/li&gt;    &lt;li&gt;The application server hangs. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;And that is it, the project files are never copied in to the directory the application server uses to “keep” the applications it runs, the critical problem here is that the IDE seems to wait for the application server to start correctly before copying the new files (it should copy them any way, that of course would not prevent it from hanging, but, after we had killed the process, the next time we ran the application server, if we had fixed the bug, it would not hang any more… but even then the behavior would be anti-intuitive, why the process is not like this is a mystery to me:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;the project gets copied in to the directory the application server uses to “keep” the applications it runs, since the application is already there, only the changed files are copied &lt;/li&gt;    &lt;li&gt;the IDE starts the application server &lt;/li&gt;    &lt;li&gt;since the application server already knows it has our (failed) application installed, it does not need a visit from the browser to start it, in starts it immediately &lt;/li&gt;    &lt;li&gt;Since we have fixed the bug, everything runs fine &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Do you know why it does not work like this? If you do, please… would you explain it to me?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-1617409449539181845?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/1617409449539181845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=1617409449539181845' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/1617409449539181845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/1617409449539181845'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/06/jee-development-deployment-in-order.html' title='JEE Development Deployment: In the order wrong'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-7917416513246911777</id><published>2009-04-23T08:07:00.002-05:00</published><updated>2010-02-18T18:50:43.512-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='caching'/><category scheme='http://www.blogger.com/atom/ns#' term='client side'/><category scheme='http://www.blogger.com/atom/ns#' term='ariba'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>Client side caching: Typical omission in server side component models?</title><content type='html'>&lt;p&gt;It seems like a simple problem, but it is not (to day, I have not been able to find a way to do this without complex Javascript coding): &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;You have chained comboboxes: County and State. &lt;/li&gt;    &lt;li&gt;You select USA in the Country combobox, and its 50 States are loaded in the States Combo (roundtrip to the server to fetch them) &lt;/li&gt;    &lt;li&gt;You select Mexico in the Country combobox, and its 32 States are loaded in the States  Combo (roundtrip to the server to fetch them) &lt;/li&gt;    &lt;li&gt;Now you select USA in the Country combobox again... how do I tell  the server side component framework that I do not want it to go to the server for them, since it went for them the last time I selected USA, I want it to use that as a cache and do not go for them until I tell it to do so? &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I provided this use case as just one illustration of a broader class of &lt;b&gt;client &lt;/b&gt;&lt;b&gt;side &lt;/b&gt;&lt;b&gt;caching&lt;/b&gt; scenarios, support for this kind of scenario might not be need for all use cases, I might not be needed, for example,  for user self-registration... sadly, I do not build that kind of application where I work now, the kind of application I have to build is the kind where the UI is used repeatedly: Yes, I build those dreaded "&lt;strong&gt;enterprise level&lt;/strong&gt;" applications used internally by a big organization.&lt;/p&gt;  &lt;p&gt;This kind of optimization might seem silly for the typical web application where the user rarely uses the same form more than once, but for enterprise applications, this behavior can be the difference between an application that is perceived to be responsive and useful, and an application that is perceived to be cumbersome and useless.&lt;/p&gt;  &lt;p&gt;This can not be done with “user code” in AribaWeb. It can not be done in JSF, and it can not be done in ASP.NET. But is extremely easy to do if you code in JavaScript and use ExtJS, or Cappucchino.&lt;/p&gt;  &lt;p&gt;I wonder... Is this problem really impossible to solve in a declarative way using server side component models? is this really the insurmountable frontier for server based frameworks? or could someone create a trick that made this work? &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-7917416513246911777?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/7917416513246911777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=7917416513246911777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7917416513246911777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7917416513246911777'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/04/client-side-caching-typical-omission-in.html' title='Client side caching: Typical omission in server side component models?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-3718124681689148783</id><published>2009-04-18T22:08:00.002-05:00</published><updated>2010-02-18T18:52:12.748-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rerender'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='richfaces'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>Inversion of re-render (subscription based re-rendering): Why it can not be this way?</title><content type='html'>&lt;p&gt;Anyone that has used &lt;a href="http://www.jboss.org/jbossrichfaces/" target="_blank"&gt;Richfaces&lt;/a&gt; knows that to rerender something, one needs to refer to it by id. &lt;/p&gt;  &lt;p&gt;Now, this is (in my opinion) an useful approach but also a very limited one, specially if componentization and code reuse are important goals during development &lt;/p&gt;  &lt;p&gt;Lets say I build a page (lets call it root page), that has a subview with a modalPanel, that includes a facelet component, that has a subview with modalPanel that includes another facelet component, and, when something is done here, I one another control, in the root page to be rerendered &lt;/p&gt;  &lt;p&gt;Now, I could of course pass along the ids of the component I need to be re-rendered, but... what if I need another component to be re-rendered too? do I pass along its id too? and what if the other component is also inside (a different) subview with a modalPanel, that includes a different facelet component... then all this id "passing" gets really messy, and creates dependencies in components that could otherwise be decoupled... and to make things worse, using meaningful ids in JSF is not considered a good practice, because meaningful ids (specially if used in name container like the subviews) rapidly increase the size of the pages (because they concatenate to ids of all the contained controls), contributing to bandwidth waste .  &lt;/p&gt;  &lt;p&gt;Now, I have a proposal, what if re-rendering were to work in an "inversed" way: instead of "A" saying that it will re-render "B", we say that "B" will be re-rendered when something (maybe "A") says so by broadcasting event "C". &lt;/p&gt;  &lt;p&gt;This would mean that "A" no longer needs to know the name of "B" and "B" wouldn’t need to know the name of "A" either, it would only need to know that it should re-render itself it something, somewhere broadcasted the event "C" &lt;/p&gt;  &lt;p&gt;Am I making sense here? Is this doable? Or am I not seeing a major limitation in JSF technology that prevents this from being built? (I am no expert in JSF, so I really can not say, but I do know that an event subscription based re-rendering engine would be a really nice tool to have)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-3718124681689148783?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/3718124681689148783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=3718124681689148783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3718124681689148783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3718124681689148783'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/04/inversion-of-re-render-subscription.html' title='Inversion of re-render (subscription based re-rendering): Why it can not be this way?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-6078007554642589878</id><published>2009-03-16T10:43:00.003-06:00</published><updated>2010-02-18T18:53:31.773-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='crud'/><category scheme='http://www.blogger.com/atom/ns#' term='compatibility'/><category scheme='http://www.blogger.com/atom/ns#' term='api'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipselink'/><category scheme='http://www.blogger.com/atom/ns#' term='spec'/><category scheme='http://www.blogger.com/atom/ns#' term='tck'/><category scheme='http://www.blogger.com/atom/ns#' term='JSR 330'/><category scheme='http://www.blogger.com/atom/ns#' term='jsr'/><category scheme='http://www.blogger.com/atom/ns#' term='JPA'/><title type='text'>EntityManager.persist: ¿What does/should it mean?</title><content type='html'>&lt;p&gt;Lets say you are presented with the following JPA @Entity:&lt;/p&gt;  &lt;pre&gt;&lt;p&gt;@Entity&lt;br /&gt;public class Customer {   &lt;/p&gt;&lt;p&gt;  private Long id;&lt;br /&gt;private String name;&lt;/p&gt;&lt;p&gt;  @Id&lt;br /&gt;@GeneratedValue(strategy=GenerationType.AUTO)&lt;br /&gt;public Long getId() {&lt;br /&gt;    return id;&lt;br /&gt;}   &lt;/p&gt;&lt;p&gt;  public void setId(Long id) {&lt;br /&gt;    this.id = id;&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;&lt;p&gt;  @Column(nullable=false)&lt;br /&gt;public String getName() {&lt;br /&gt;    return name;&lt;br /&gt;}   &lt;/p&gt;&lt;p&gt;  public void setName(String name) {&lt;br /&gt;    this.name = name;&lt;br /&gt;}&lt;br /&gt;}&lt;/p&gt; &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And then the following test&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;p&gt;   @Test&lt;br /&gt;public void persistCustomerInTransaction() throws Exception {&lt;br /&gt;    factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);&lt;/p&gt;&lt;p&gt;      EntityManager em = factory.createEntityManager();&lt;/p&gt;&lt;p&gt;      em.getTransaction().begin();&lt;/p&gt;&lt;p&gt;      Customer customer = new Customer();&lt;/p&gt;&lt;p&gt;      em.persist(customer);em.getTransaction().commit();&lt;/p&gt;&lt;p&gt;      em.close();   &lt;/p&gt;&lt;p&gt;  }&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And the following question: Where does it crash?:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt; &lt;li&gt;At the line em.persist(customer); because the name is configured as nullable=false, and we are trying to persist the Customer instance with a null value in the name property &lt;/li&gt;&lt;br /&gt;&lt;br /&gt; &lt;li&gt;em.getTransaction().commit(); because the name is configured as nullable=false, and we are trying to commit the transaction with a null value in the name property &lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Turns out… that the answer depends on the JPA provider you are using!!!! If using Hibernate, it crashes at em.persist, but if using EclipseLink, it crashes at em.getTransaction().commit.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now, this might seem irrelevant, but it is in fact very important, because EclipseLink behavior means that constraint validations are deferred until the point where the transaction is committed, and that means that the developer has a lot more freedom to manipulate its persistent objects: they can be in any (possibly invalid) state while they are being manipulated by the business logic of the application, and they only have to be “right” the moment one needs to commit them to the database (not before), this is specially useful, for example, when building a wizard like UI (or a plain simple CRUD UI with support for full object graphs) with EclipseLink, I can persist my objects as soon as I want, and if want to, for example, run some validation logic at the end, all I have to do is ask the EclipseLink to give a list of all the objects that are going to be written in to the database, with Hibernate, the entityManager does not help me manage new object instances, I have to manage them myself.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;What I find really surprising is that AFAIK there should be some kind of test to ensure that all JPA are compatible (&lt;em&gt;something called the TCK?),&lt;/em&gt; and I think that this kind of discrepancy should be detected by those tests... shouldn't it?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I think this support for deferred validation, and an API to get will be inserted, will be updated or will be deleted, will be very important to really integrate JPA with something like JSR 330, so that validation can really integrate with the lifecycle of a persistent POJO. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-6078007554642589878?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/6078007554642589878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=6078007554642589878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/6078007554642589878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/6078007554642589878'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/03/entitymanagerpersist-what-does-it-mean.html' title='EntityManager.persist: ¿What does/should it mean?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-8413900396049615511</id><published>2009-03-14T01:55:00.002-06:00</published><updated>2010-02-18T18:54:48.663-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='JPA'/><category scheme='http://www.blogger.com/atom/ns#' term='EOF'/><title type='text'>JPA/Hibernate (subjective?) weaknesses</title><content type='html'>&lt;p&gt;I have had to work with JPA/Hibernate for a few years now... and I feel it has some weaknesses I really do not like (&lt;em&gt;when compared with the first ORM I ever used, NextStep EOF&lt;/em&gt;), I am thinking about "switching to something else" but first i would like to be sure that the ORM I switch to does not have this weaknesses too.    &lt;br /&gt;List of (&lt;em&gt;subjective? perhaps I only perceive them because I was exposed to EOF first?&lt;/em&gt;) weaknesses in JPA/Hibernate: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;No way to manage an object that "will be persisted", in JPA/Hibernate if you call entityManager.persist(object) and the database does not support sequences (like MS-Sql) an insert will be triggered, and if any of the non nullable fields of the objects is null, it will crash. If your object has a compound primary key, things get worse, because the entityManager can not deal with it until the compound primary key is set, and if your compound primary key is formed by foreign keys pointing to objects that are new too, that means you will not be able to save stuff with with a simple single call to entityManager.persist to one of the objects, cascading will not help you (&lt;em&gt;I really miss something "magic" like the single shot EditingContext.saveAllChanges() in EOF&lt;/em&gt;) &lt;/li&gt;    &lt;li&gt;No easy way to know if "an object is dirty" (&lt;em&gt;if it has changed/deleted since it was read from the database, there is just no API for that&lt;/em&gt;), and since you can not know what objects will be persisted, and what object have changed, and what objects will be deleted from database, that means you can not easily create an unified API for centralized polymorphic validation (that is no easy way to create validateForSave, or validateForDelete methods in your persistent entity classes) &lt;/li&gt;    &lt;li&gt;No real equivalent for validateForXXX, JPA lifecycle callbacks are not match for validateForXXX because you can not query the database during the lifecycle callbacks, and if you throw an exception inside a lifecycle callback, the JPA/Hibernate entityManager enters an invalid state, and after that you can not continue to use your POJOs, you have to start over with a fresh entityManager... and without you modifications to the POJOs. Note that Hibernate new validation framework does not offer a real solution for this problem... and AFAIK JSR-000303 will not help with this either. &lt;/li&gt;    &lt;li&gt;No support for some kind of temporary id: In JPA/Hibernate, the id for an object is "null" until you flush it to the database, so if you need to reference a particular object instance from the user interface... there is plain no way to do it, you have to "save it first" to get a primary key. &lt;/li&gt;    &lt;li&gt;No support for Nested Contexts... ( &lt;em&gt;I think they would be a perfect fit for conversational frameworks like Seam or Shale&lt;/em&gt;). One of the goals of the ObjectContext is to provide an isolated area where local object changes can be performed without affecting other similar areas or the underlying storage. Nested Context changes can be saved to the parent Context without saving them to the database. Such child context is often called "nested". Nested contexts are useful in many situations, such as nested UI dialogs, complicated workflows, etc.      &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Those are my main disagreements with the way I have to work with JPA/Hibernate... will switching to JPA/EclipseLink, JPA/OpenJPA or the still not fully JPA compliant Apache Cayenne help me with those? I will be writing about my findings on this in my following posts&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-8413900396049615511?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/8413900396049615511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=8413900396049615511' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8413900396049615511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8413900396049615511'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/03/jpahiberate-subjective-weaknesses.html' title='JPA/Hibernate (subjective?) weaknesses'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-393305659838590235</id><published>2009-02-25T23:36:00.002-06:00</published><updated>2010-02-18T18:56:17.993-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='capuccino'/><category scheme='http://www.blogger.com/atom/ns#' term='ariba'/><category scheme='http://www.blogger.com/atom/ns#' term='webojects'/><category scheme='http://www.blogger.com/atom/ns#' term='rails'/><title type='text'>AribaWeb: The framework of my dreams?</title><content type='html'>&lt;p&gt;Could &lt;a href="http://aribaweb.org/" target="_blank"&gt;AribaWeb&lt;/a&gt;, finally be the framework of my dreams? that for which I have longed for ever since I stopped using WebObjects? The one to finally demonstrate those &lt;a href="http://www.ruby-lang.org/en/" target="_blank"&gt;Ruby&lt;/a&gt; guys that what makes Ruby so great is &lt;a href="http://rubyonrails.org/" target="_blank"&gt;Rails&lt;/a&gt;, and what made Java &lt;a href="http://java.sun.com/javaee/javaserverfaces/" target="_blank"&gt;inferior&lt;/a&gt; (&lt;em&gt;until before AribaWeb&lt;/em&gt;) was  its framework, but not the language itself?&lt;/p&gt;  &lt;p&gt;So far, it seems that, while not perfect (&lt;a href="http://groups.google.com/group/aribaweb/browse_thread/thread/992e15f19d08a7df" target="_blank"&gt;no client side caching&lt;/a&gt;, &lt;a href="http://groups.google.com/group/aribaweb/browse_thread/thread/e35f7cd547db24da" target="_blank"&gt;some Hibernate inherited validation limitations&lt;/a&gt;), AribaWeb gets many basics concept right (like &lt;a href="http://groups.google.com/group/aribaweb/browse_thread/thread/2db526f5290aad08" target="_blank"&gt;programmatic navigation&lt;/a&gt;, UI meta generation, runtime UI customization, MVC separation…)&lt;/p&gt;  &lt;p&gt;I am simply amazed…. &lt;/p&gt;  &lt;p&gt;Now someone just needs to integrate AribaWeb with &lt;a href="http://cappuccino.org/" target="_blank"&gt;Capuccino&lt;/a&gt;, and total world domination would be in their hands.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-393305659838590235?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/393305659838590235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=393305659838590235' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/393305659838590235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/393305659838590235'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/02/aribaweb-framework-of-my-dreams.html' title='AribaWeb: The framework of my dreams?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-5847878878894269181</id><published>2009-02-18T23:33:00.002-06:00</published><updated>2010-02-18T18:57:17.858-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nakedobjects'/><category scheme='http://www.blogger.com/atom/ns#' term='databases'/><category scheme='http://www.blogger.com/atom/ns#' term='crud'/><category scheme='http://www.blogger.com/atom/ns#' term='Direct2Web'/><category scheme='http://www.blogger.com/atom/ns#' term='seam-gen'/><title type='text'>Functionally Complete Crud Generator</title><content type='html'>&lt;p&gt;In my previous post I wrote about the &lt;a href="http://luxspes.blogspot.com/2009/02/irreducible-minimal-complexity.html" target="_blank"&gt;Irreducible Complexity Model&lt;/a&gt; ….now why is that model so important?&lt;/p&gt;  &lt;p&gt;Well, for a Crud Generator to be functionally complete it has to fulfill the following requirements:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Be able to generated the Crud Screens for the Irreducible Complexity Model&lt;/li&gt;    &lt;li&gt;It should be possible to “capture” the entire “model graph” as a single transaction starting from any node in the graph&lt;/li&gt;    &lt;li&gt;It should be possible to “skip” validation until the “save” button of the screen to save the node where we started is clicked, and, it should be easy to go from there to any of the screens used to edit the other nodes to fix any validation error.&lt;/li&gt;    &lt;li&gt;It should be possible to search for instances (rows?) of  the entity (class, table?)  by using a “query by example” node graph that can be built using one or all of the nodes of the model with any arbitrary depth.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;With this rules, I realize that the only &lt;em&gt;functionally complete crud generator&lt;/em&gt; that I have seen was Apple WebObjects Direct2Web… All others (JBoss SeamGen for example) are unable to deal with all the kinds of relationships in the Irreducible Complexity Model and, even without that limitation, are just unable to deal with requirements 2,3, and 4. because all of them force you to either violate transactionality by forcing you to save before navigation to the next node, or force you to pass all validation rules at a particular node before going to the next, or, have a really simple and powerless query by example UI.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-5847878878894269181?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/5847878878894269181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=5847878878894269181' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/5847878878894269181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/5847878878894269181'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/02/functionally-complete-crud-generator.html' title='Functionally Complete Crud Generator'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-1251686966640424040</id><published>2009-02-18T22:45:00.002-06:00</published><updated>2010-02-18T18:57:55.997-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='databases'/><category scheme='http://www.blogger.com/atom/ns#' term='model'/><title type='text'>Irreducible (Minimal?) Complexity: EntityModel (RelationalModel? DatabaseModel?)</title><content type='html'>&lt;p&gt;I am not sure that the name Irreducible Complexity Entity Model actually fits what I am about to describe, but I was the best I can think of: &lt;/p&gt;  &lt;p&gt;Lets think of an Entity Model (Database Model?, Relational Model?) that has at least one instance of each kind of entity relationship, so that it becomes representative of pretty much anything that can happen at any database: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A One To One relationship &lt;/li&gt;    &lt;li&gt;A One To Many relationship &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So we would have: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;TableA One To One TableB     &lt;br /&gt;TableB One To Many TableC &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;But then, we remember that there are recursive relationships so the list now is: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A One To  One relationship to the same table &lt;/li&gt;    &lt;li&gt;A One To One relationship to another table &lt;/li&gt;    &lt;li&gt;A One To Many relationship to the same table &lt;/li&gt;    &lt;li&gt;A One To Many relationship to another table &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So now we have: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;TableA One To One TableA &lt;/li&gt;    &lt;li&gt;TableA One To One TableB &lt;/li&gt;    &lt;li&gt;TableB One To Many TableB &lt;/li&gt;    &lt;li&gt;TableB One To Many TableC &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;But then we realize that there is si not representative of any case, because there is another kind of relationship, one that is “complex” (formed by 2 of the “simple” ones described before: Many To Many)  so:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A One To  One relationship to the same table &lt;/li&gt;    &lt;li&gt;A One To One relationship to another table &lt;/li&gt;    &lt;li&gt;A One To Many relationship to the same table &lt;/li&gt;    &lt;li&gt;A One To Many relationship to another table &lt;/li&gt;    &lt;li&gt;A Many To Many relationship to the same table &lt;/li&gt;    &lt;li&gt;A Many To Many relationship to another table &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So we have:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;TableA One To One TableA &lt;/li&gt;    &lt;li&gt;TableA One To One TableB &lt;/li&gt;    &lt;li&gt;TableB One To Many TableB &lt;/li&gt;    &lt;li&gt;TableB One To Many TableC &lt;/li&gt;    &lt;li&gt;TableC Many To Many to TableC (using TableCC as intermediate) &lt;/li&gt;    &lt;li&gt;TableC Many To Many to TableD (using TableCD as intermediate) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Now, with this one would think we have a representative case for each “conceptual” kind of entity relationship. Am I right? (For example Object Relational Mappers? offer a way to map relationships for their Object Oriented counterparts, and the only kinds of relationships that are supported by them (when going from the database to the object model) are: One To One, One To Many? and Many To Many?. (If going from the Object Model to the database, then "Inheritance" enters the game, so I guess the Irreducible Complexity Entity Model would have to include "Inherits From?" as a relationship type (note that Inherits From? is the only kind of relationship that can not be used in "reflective" way): &lt;/p&gt;  &lt;p&gt;    * A One To One relationship to the same class   &lt;br /&gt;    * A One To One relationship to another class    &lt;br /&gt;    * A One To Many? relationship to the same class    &lt;br /&gt;    * A One To Many? relationship to another class    &lt;br /&gt;    * A Many To Many? relationship to the same class    &lt;br /&gt;    * A Many To Many? relationship to another class    &lt;br /&gt;    * A Inherits From? relationship to another class &lt;/p&gt;  &lt;p&gt;And so we get: &lt;/p&gt;  &lt;p&gt;    * Class A One To One Class A   &lt;br /&gt;    * Class A One To One Class B    &lt;br /&gt;    * Class B One To Many Class B    &lt;br /&gt;    * Class B One To Many Class C    &lt;br /&gt;    * Class C Many To Many to Class C    &lt;br /&gt;    * Class C Many To Many to Class D    &lt;br /&gt;    * Class D Inherits From Class E &lt;/p&gt;  &lt;p&gt;But, then we realize there is another case, what if the relation is not to a concrete but to an abstract class? &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     Composition&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;A One To One relationship to the same class&lt;/li&gt;      &lt;li&gt;A One To One relationship to another class&lt;/li&gt;      &lt;li&gt;A One To Many relationship to the same class&lt;/li&gt;      &lt;li&gt;A One To Many relationship to another class&lt;/li&gt;      &lt;li&gt;A Many To Many relationship to the same class&lt;/li&gt;      &lt;li&gt;A Many To Many relationship to another class&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Inheritance&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;A Inherits From relationship to another Concrete Class?&lt;/li&gt;      &lt;li&gt;A Inherits From relationship to an Abstract Class &lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;And then (finally?) we realize that this "Concrete/Abstract" separation also applies to the Composition relationships: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;    Composition&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;A One To One relationship to the same abstract class&lt;/li&gt;      &lt;li&gt;A One To One relationship to the same concrete class&lt;/li&gt;      &lt;li&gt;A One To One relationship to another abstract class&lt;/li&gt;      &lt;li&gt;A One To One relationship to another concrete class &lt;/li&gt;      &lt;li&gt;A One To Many relationship to the same abstract class&lt;/li&gt;      &lt;li&gt;A One To Many relationship to the same concrete class &lt;/li&gt;      &lt;li&gt;A One To Many relationship to another abstract class&lt;/li&gt;      &lt;li&gt;A One To Many relationship to another concrete class &lt;/li&gt;      &lt;li&gt;A Many To Many relationship to the same abstract class&lt;/li&gt;      &lt;li&gt;A Many To Many relationship to the same concrete class &lt;/li&gt;      &lt;li&gt;A Many To Many relationship to another abstract class&lt;/li&gt;      &lt;li&gt;A Many To Many relationship to another concrete class &lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Inheritance&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;A Inherits From relationship to another Concrete Class?&lt;/li&gt;      &lt;li&gt;A Inherits From relationship to an Abstract Class&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;I wonder if I am missing a particular combination/ relationship kind… (or if there is a simpler way to express this…)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-1251686966640424040?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/1251686966640424040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=1251686966640424040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/1251686966640424040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/1251686966640424040'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2009/02/irreducible-minimal-complexity.html' title='Irreducible (Minimal?) Complexity: EntityModel (RelationalModel? DatabaseModel?)'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-7772648146652089374</id><published>2008-10-31T22:38:00.002-06:00</published><updated>2010-02-18T18:58:18.155-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='orm'/><category scheme='http://www.blogger.com/atom/ns#' term='conceptual queries'/><category scheme='http://www.blogger.com/atom/ns#' term='JPA'/><title type='text'>Conceptual Queries extension for JPAQL: JPAQL queries are too sensitive to model changes</title><content type='html'>&lt;p&gt;When a query is written in JPAQL, it still depends to much on the domain model (I think JPAQL could be extended to support &lt;a href="http://c2.com/cgi-bin/wiki?ConceptualQueries" target="_blank"&gt;Conceptual Queries&lt;/a&gt;&lt;a href="http://c2.com/cgi-bin/wiki?ConceptualQueries%29"&gt;)&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;For example, lets say you want to: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Find each white cat that lives in a house with doors made of wood &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;A cat is of one color, it lives in one house, a house can have 1 door and the door can be made of 1 material &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;So, the query in JPAQL looks like this: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;select c from Cat c where c.color=”white” and c.house.door.material.name = "wood"&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;But then, lets say our customer changes the requirements: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Find each white cat that lives in a house with doors made of wood &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;A cat is of one color, it&lt;/em&gt;&lt;em&gt; lives in many houses, a each house has many  doors and the door is made of  one or more materials (for example half glass, half wood)&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;Since our relationships are now @OneToMany so we write their names in plural, and we are newbies in JPAQL we try doing this (and it, of course does &lt;strong&gt;not&lt;/strong&gt; work):&lt;/p&gt;  &lt;p&gt;&lt;em&gt;select c from Cat c Cat c where c.color=”white” and c.houses.doors.materials.name = "wood"&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;Now, we can of course solve this problem using subqueries and the exists keyword, but that makes the resulting query way more complex, and even if the above worked, it still is a different query, but, in our english example, the query didn’t change:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Find each white cat that lives in a house with doors made of wood &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;So, why we can not write in JPAQL something like:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;select c from Cat c where c &lt;strong&gt;with&lt;/strong&gt; color= “white” and &lt;strong&gt;lives in&lt;/strong&gt; House &lt;strong&gt;has&lt;/strong&gt; Doors &lt;strong&gt;made of&lt;/strong&gt; Material &lt;strong&gt;with&lt;/strong&gt; name = "wood"&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;That way the query wouldn’t have to change even if the multiplicity of the relationships changed. Of course now the question is, from where do I get the “with”,“lives in”, “has”, “made of” and “with” well, simple:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The with operator is available for each non @Entity member of the class (for strings, integers, etc).&lt;/li&gt;    &lt;li&gt;For relationships with other entities we just add the conceptual name of the relationship name as an attribute in the @OneToMany or @ManyToOne annotations:&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Example:&lt;/p&gt;  &lt;p&gt;Before:&lt;/p&gt;  &lt;p&gt;public class Cat{ &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;@Column &lt;/p&gt;    &lt;p&gt;private String color; &lt;/p&gt;    &lt;p&gt;@ManyToOne(conceptualName=”&lt;strong&gt;lives in &lt;/strong&gt;”) &lt;/p&gt;    &lt;p&gt;private House houses;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;}&lt;/p&gt;  &lt;p&gt;After:&lt;/p&gt;  &lt;p&gt;public class Cat{&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;@Column&lt;/p&gt;    &lt;p&gt;private String color;&lt;/p&gt;    &lt;p&gt;@OneToMany(mappedBy=”cat”, conceptualName=”&lt;strong&gt;lives in &lt;/strong&gt;”)&lt;/p&gt;    &lt;p&gt;private Set&amp;lt;House&amp;gt; houses;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;}&lt;/p&gt;  &lt;p&gt;This way changes in the object model do not necessarily affect our queries. What do you think? Is this a good solution?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-7772648146652089374?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/7772648146652089374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=7772648146652089374' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7772648146652089374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7772648146652089374'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/10/conceptual-queries-extension-for-jpaql.html' title='Conceptual Queries extension for JPAQL: JPAQL queries are too sensitive to model changes'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-7599400063665914864</id><published>2008-10-21T21:04:00.002-05:00</published><updated>2010-02-18T18:58:46.643-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='process isolation'/><title type='text'>Process Isolation: JavaScript is getting it before Java!</title><content type='html'>&lt;p&gt;So, with Google Chrome, &lt;strong&gt;JavaScript&lt;/strong&gt; is finally getting process isolation (&lt;em&gt;even IE 8 will work in a Loosely Coupled Internet Explorer (LCIE)  mode that will give the JavaScript applications running there real OS level process isolation&lt;/em&gt;) and Java? well, Java &lt;a href="http://luxspes.blogspot.com/2008/08/j2ee-application-servers-and-eclipse.html" target="_blank"&gt;still does not have a anything like that&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-7599400063665914864?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/7599400063665914864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=7599400063665914864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7599400063665914864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7599400063665914864'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/10/process-isolation-javascript-is-getting.html' title='Process Isolation: JavaScript is getting it before Java!'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-1219502930403582661</id><published>2008-08-24T23:33:00.001-05:00</published><updated>2008-08-24T23:52:15.389-05:00</updated><title type='text'>The Scientific Method and Test Driven Development</title><content type='html'>&lt;p&gt;According to wikipedia the Scientific Method:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;b&gt;Scientific method&lt;/b&gt; refers to a body of &lt;a href="http://en.wikipedia.org/wiki/Technique"&gt;techniques&lt;/a&gt; for investigating &lt;a href="http://en.wikipedia.org/wiki/Phenomenon"&gt;phenomena&lt;/a&gt;, acquiring new &lt;a href="http://en.wikipedia.org/wiki/Knowledge"&gt;knowledge&lt;/a&gt;, or correcting and integrating previous knowledge. To be termed scientific, a method of inquiry must be based on gathering &lt;a href="http://en.wikipedia.org/wiki/Observable"&gt;observable&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Empirical"&gt;empirical&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Measure"&gt;measurable&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/Evidence"&gt;evidence&lt;/a&gt; subject to specific principles of &lt;a href="http://en.wikipedia.org/wiki/Reasoning"&gt;reasoning&lt;/a&gt;.&lt;sup&gt;&lt;a href="http://en.wikipedia.org/wiki/Scientific_method#cite_note-0"&gt;[1]&lt;/a&gt;&lt;/sup&gt; A scientific method consists of the collection of data through &lt;a href="http://en.wikipedia.org/wiki/Observation"&gt;observation&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Experiment"&gt;experimentation&lt;/a&gt;, and the formulation and testing of &lt;a href="http://en.wikipedia.org/wiki/Hypothesis"&gt;hypotheses&lt;/a&gt;.&lt;sup&gt;&lt;a href="http://en.wikipedia.org/wiki/Scientific_method#cite_note-1"&gt;[2]&lt;/a&gt;&lt;/sup&gt; Although procedures vary from one &lt;a href="http://en.wikipedia.org/wiki/Fields_of_science"&gt;field of inquiry&lt;/a&gt; to another, identifiable features distinguish scientific inquiry from other methodologies of knowledge. Scientific researchers propose &lt;a href="http://en.wikipedia.org/wiki/Hypothesis"&gt;hypotheses&lt;/a&gt; as explanations of phenomena, and design &lt;a href="http://en.wikipedia.org/wiki/Experiment"&gt;experimental&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/Research"&gt;studies&lt;/a&gt; to test these hypotheses. &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;and Test Driven Development:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;b&gt;Test-Driven Development&lt;/b&gt; (TDD) is a &lt;a href="http://en.wikipedia.org/wiki/Software_development"&gt;software development&lt;/a&gt; technique consisting of short iterations where new &lt;a href="http://en.wikipedia.org/wiki/Test_case"&gt;test cases&lt;/a&gt; covering the desired improvement or new functionality are written first, then the production code necessary to pass the tests is implemented, and finally the software is &lt;a href="http://en.wikipedia.org/wiki/Code_refactoring"&gt;refactored&lt;/a&gt; to accommodate changes. The availability of tests before actual development ensures rapid feedback after any change. Practitioners emphasize that test-driven development is a &lt;a href="http://en.wikipedia.org/wiki/Software_engineering"&gt;method of designing software&lt;/a&gt;, not merely a method of testing.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Can you see the parallels? Test are like experiments for the universe of predicates that describe your system requirements.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-1219502930403582661?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/1219502930403582661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=1219502930403582661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/1219502930403582661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/1219502930403582661'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/08/scientific-method-and-test-driven.html' title='The Scientific Method and Test Driven Development'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-3894190176227305704</id><published>2008-08-21T16:46:00.002-05:00</published><updated>2008-08-24T22:07:22.198-05:00</updated><title type='text'>JConsole Config</title><content type='html'>&lt;p&gt;Here is an excellent guide (&lt;em&gt;written by Mike Schouten of &lt;a href="http://www.componative2.com/content/controller/" target="_blank"&gt;Componative&lt;/a&gt;&lt;/em&gt;) on using and configuring&amp;#160; JConsole:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.componative2.com/content/controller/developer/insights/jconsole1" target="_blank"&gt;Monitor Your Applications With JConsole - Part 1&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.componative2.com/content/controller/developer/insights/jconsole2" target="_blank"&gt;Monitor Your Applications With JConsole - Part 2&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.componative2.com/content/controller/developer/insights/jconsole3" target="_blank"&gt;Monitor Your Applications With JConsole - Part 3&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I found Part 2 specially interesting, because it explained that JConsole uses&amp;#160; 2 ports to connect to a remote JVM, and only one of them is configurable the other one is random, the way to detect it is to create a &lt;code&gt;logging.properties&lt;/code&gt; file that looks something like this:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;&lt;br /&gt; handlers = java.util.logging.ConsoleHandler&lt;br /&gt; .level = INFO&lt;br /&gt;&lt;br /&gt; java.util.logging.ConsoleHandler.level = FINEST&lt;br /&gt; java.util.logging.ConsoleHandler.formatter = \&lt;br /&gt; 		java.util.logging.SimpleFormatter&lt;br /&gt;&lt;br /&gt; // Use FINER or FINEST for javax.management.remote.level - FINEST is&lt;br /&gt; // very verbose...&lt;br /&gt; javax.management.level = FINEST&lt;br /&gt; javax.management.remote.level = FINER&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now we can start JConsole with the following command to enable detailed logging of the &lt;code&gt;javax.management&lt;/code&gt; classes: &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;code&gt;jconsole -J-Djava.util.logging.config.file=logging.properties &lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Connecting to the remote JVM will now result in the opening of a separate output window containing the detailed logging, in that output it is now possible to see the random port:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/luxspespicasa/SLIh3IIDPnI/AAAAAAAAABE/Qp7-Szg4dGk/s1600-h/image%5B13%5D.png"&gt;&lt;img title="image" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="293" alt="image" src="http://lh3.ggpht.com/luxspespicasa/SLIh6PecgmI/AAAAAAAAABM/g0nkDcypkYM/image_thumb%5B11%5D.png?imgmax=800" width="443" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-3894190176227305704?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/3894190176227305704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=3894190176227305704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3894190176227305704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3894190176227305704'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/08/jconsole-config.html' title='JConsole Config'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/luxspespicasa/SLIh6PecgmI/AAAAAAAAABM/g0nkDcypkYM/s72-c/image_thumb%5B11%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-6622173602072104750</id><published>2008-08-16T21:06:00.001-05:00</published><updated>2008-08-17T02:56:23.789-05:00</updated><title type='text'>J2EE Application Servers and Eclipse plug-ins: Like going back in time</title><content type='html'>&lt;p&gt;All this Application Server development is funny... it is like going back to 16-bit Windows (&lt;i&gt;remember, back then,&amp;#160; if a single application crashed, everything went down with it&lt;/i&gt;). It is the same with this modern application servers, if one application goes crazy (&lt;i&gt;infinite loop, very long and slow process, memory leak, etc&lt;/i&gt;), it will take down the application server, and there is no way around that that I know of (&lt;i&gt;Same thing with Eclipse, if one plug-in goes crazy, everything goes down&lt;/i&gt;) it is funny (&lt;i&gt;and sad at the same time&lt;/i&gt;) because so much time and resources were wasted trying to give processes proper isolation at the OS level, and now we are using technologies that make that effort irrelevant. &lt;/p&gt;  &lt;p&gt;Perhaps, one day there will be a &lt;a href="http://java.sun.com/developer/technicalArticles/Programming/mvm/" target="_blank"&gt;Multi-tasking Virtual Machine&lt;/a&gt; (MVM) that solves this problem by providing an efficient and scalable implementation of and infrastructure&amp;#160; for multiple, isolated tasks, enabling the co-location of multiple server instances in a single MVM process. Such a technology would also enable the restructuring of a J2EE server implementation as a collection of isolated components, offering increased flexibility and reliability. But in the mean time, we are left with application servers where that are inherently unsafe. And that is really bad, specially for development and prototyping(&lt;em&gt;lots of time waiting for the shared components in a J2EE application server to reload if the application in development crashed it&lt;/em&gt;), but also for production (&lt;em&gt;it is really risky to deploy a new system in to a J2EE, if it crashes, it will take down all the other applications&lt;/em&gt;). And the same things happen to “integrated” solutions like, Eclipse, or more general technologies, like &lt;a href="http://www.osgi.org/About/HomePage" target="_blank"&gt;OSGi&lt;/a&gt;, if a particular plug-in or service crashes, it will crash the entire application.&lt;/p&gt;  &lt;p&gt;But the future for the MVM doesn’t look so bright, the &lt;a href="http://jcp.org/en/jsr/detail?id=121" target="_blank"&gt;JSR 121: Application Isolation API&lt;/a&gt; Specification looks abandoned since 2005… Perhaps for the JDK 7? or 8? I hate when I see this kind of project die from indifference… Perhaps now, with the &lt;a href="http://openjdk.java.net/" target="_blank"&gt;Open JDK&lt;/a&gt;, someone will find the way to implement it.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-6622173602072104750?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/6622173602072104750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=6622173602072104750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/6622173602072104750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/6622173602072104750'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/08/j2ee-application-servers-and-eclipse.html' title='J2EE Application Servers and Eclipse plug-ins: Like going back in time'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-8563062584154827745</id><published>2008-08-16T20:53:00.001-05:00</published><updated>2008-08-16T20:53:17.338-05:00</updated><title type='text'>This is getting repetitive…</title><content type='html'>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Software development, that is… it is getting repetitive:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Design the database (the database schema represents facts, but those facts will be incomplete) &lt;/li&gt;    &lt;li&gt;Code the business logic (Queries, queries, queries, in uncomfortable semi-standard SQL, there will be problems with:      &lt;ul&gt;       &lt;li&gt;performance (inefficient queries, lack of indexes, degradation because cascade updates or deletes or because of integrity verification) &lt;/li&gt;        &lt;li&gt;concurrence (overwritten data, death locks, inaccurate reads) &lt;/li&gt;        &lt;li&gt;code maintenance( SQL is ugly, cumbersome, hard to refactor, hard to modularize) &lt;/li&gt;        &lt;li&gt;ORM is either inefficient with rich domain model, or efficient and with an anemic domain model&lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Code de User Interface&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;If is a heavy client, it will be ugly (because people erroneously think that only web based applications can be pretty)&lt;/li&gt;      &lt;li&gt;If it is built in HTML as they current hype dictates it will have browser compatibility problems&lt;/li&gt;      &lt;li&gt;It will not map easily to the database model&amp;#160; / domain model (specially report like stuff). &lt;/li&gt;      &lt;li&gt;If it is a web application, it will use convoluted and not type safe communication between the different screens (server side navigation) or, it will use lots of JavaScript and essentially will a a one page application, and therefore it will become :&lt;/li&gt;      &lt;li&gt;In heavy clients all navigation will be deceptively simple and type safe, but that will lead to spaghetti like dependencies between the screens.&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Test&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Security concerns will be left to the end, and most queries will need recoding because what data can be seen is always dependant on the privileges of the users.&lt;/li&gt;      &lt;li&gt;Queries will return the wrong data when they are cross compared (a summary report like screen will say that earnings were of the day were $1352, but if you sum the amount of each of the sales, it will be $1456, or $1265, or something else. The most common reason? a status field that you forgot to take in account and that indicates that, for example, one of the sales was canceled, or one of the sales was in a foreign country money, or you forgot to take in consideration a discount.&lt;/li&gt;      &lt;li&gt;Dependant UI controls (like chained comboxes) when used in an unexpected order will fail (or, if used to save data, might fail when editing that data).&lt;/li&gt;      &lt;li&gt;Some controls that are only comfortable to use if the list of rows displayed in them is short (less than around 25 items), will have list of more than 250&amp;#160; elements, sometimes even thousands of elements, and will need to be replaced by search screens.&lt;/li&gt;      &lt;li&gt;Nobody will test the performance of the applications for the large amount of concurrent users that will use the system in productions.&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Production&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Some tables, with supposedly immutable data, will need CRUD functionality, since there is no time to create the CRUD screens, data will be inserted directly using POSQL (Plain Old SQL) , and sooner or later someone will have to edit or delete some data, make a mistake with the WHERE condition, and destroy a large amount of rows. The last backup will be a lot of weeks old, and data will need to be recaptured.&lt;/li&gt;      &lt;li&gt;Since there were no performance tests, the processor will go 100% and RAM will not be enough, the server will be incredibly slow, or plain crash.&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-8563062584154827745?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/8563062584154827745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=8563062584154827745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8563062584154827745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8563062584154827745'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/08/this-is-getting-repetitive.html' title='This is getting repetitive…'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-4527493324787816288</id><published>2008-08-13T01:01:00.002-05:00</published><updated>2008-12-10T22:58:21.777-06:00</updated><title type='text'>Navigation: No hard dependencies, no type dependencies, no code dependencies, Why?</title><content type='html'>&lt;p&gt;In Java, first we had &lt;a href="http://en.wikipedia.org/wiki/Java_Servlet" target="_blank"&gt;servlets&lt;/a&gt;, and each one of them answered to request made to a particular url (&lt;em&gt;or an url matching a particular expression&lt;/em&gt;), but it was hard to create pages that way, and it was even harder to create a system composed of many “pages” (&lt;em&gt;note the conceptual jump from servlets answering url requests to &amp;quot;pages”&lt;/em&gt;)&lt;/p&gt;  &lt;p&gt;Then, &lt;a href="http://en.wikipedia.org/wiki/JavaServer_Pages" target="_blank"&gt;JSPs&lt;/a&gt; were created, take a look at them and you will see that each JSP page knows nothing about any other, JSP was designed thinking that the best way to deal with many pages was to handle it them as “independent”: lets make each page unaware of what page is next (and what page was previously). Just as servlets were somehow unaware or each other.&lt;/p&gt;  &lt;p&gt;After that, &lt;a href="http://en.wikipedia.org/wiki/JavaServer_Faces" target="_blank"&gt;JSF&lt;/a&gt; was invented, this new technology sees &amp;quot;Pages&amp;quot; as components (&lt;em&gt;composed of other simpler components&lt;/em&gt;) forming a component tree. All the components in the same page collaborate to give life to a JSF page (&lt;em&gt;but it does it in a pretty limited way, unless you use &lt;a href="https://facelets.dev.java.net/" target="_blank"&gt;Facelets&lt;/a&gt;, but they weren't invented until later, and they didn't help much with navigation&lt;/em&gt;). By now, we &lt;strong&gt;should&lt;/strong&gt; &lt;strong&gt;be&lt;/strong&gt; far far away from the servlets with which we started... but still each page is unaware of what page is next (and what page was previously). Just as servlets were somehow unaware or each other.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Why?&lt;/p&gt;  &lt;p&gt;Then, we got &lt;a href="http://www.seamframework.org/" target="_blank"&gt;Seam&lt;/a&gt;, with its powerful &lt;em&gt;bijection&lt;/em&gt;, to help us deal with the job of exchanging information between pages. And its pages.xml files, to help us deal with the limited navigational capabilities available with plain JSF. But &lt;strong&gt;still&lt;/strong&gt; each page is unaware of what page is next (and what page was previously). Just as servlets were somehow unaware or each other.&lt;/p&gt;  &lt;p&gt;Why?&lt;/p&gt;  &lt;p&gt;In a somewhat parallel universe, perhaps in the Twilight Zone, &lt;a href="http://en.wikipedia.org/wiki/WebObjects" target="_blank"&gt;WebObjects&lt;/a&gt; was created, in WebObjects, we have no servlets, &amp;quot;Pages&amp;quot; are components (&lt;em&gt;composed of other simpler components&lt;/em&gt;) forming a component tree. All the components in the same page collaborate to give life to a WO page. And if you want, you can treat a WO page as a WO Component, they are pretty much the same thing, at it is trivial to change from one to the other, and create libraries of WO Components (&lt;em&gt;comparatively creating JSF components is so hard that is mind boggling&lt;/em&gt;). And each page &lt;strong&gt;is aware&lt;/strong&gt; of what page is next (and what page was previously). Let me state that again: &lt;em&gt;The code in each page &lt;strong&gt;is aware&lt;/strong&gt; of what page is next (and what page was previously).&lt;/em&gt; Here is a pseudo code example:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;pre&gt;&lt;p&gt;public WOComponent gotoProfilePage(){&lt;/p&gt;ProfilePage profilePage = new ProfilePage();&lt;p&gt;profilePage.setUser(this.getSelectedUser());&lt;br /&gt;return profilePage;&lt;/p&gt;&lt;p&gt;}&lt;br /&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;And that's it, that is how you send the currently selected user from the current page into the next page, plain and simple, you just create an object of the type of the page where you want to go, and use its getters and setters go share state with it... what could be simpler than that? why I have been unable to find a framework that deals with page navigation like this? Well, you might say, it is not that flexible, what if you want configurable navigation? Well, then you can do it like this: &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;p&gt;public WOComponent gotoProfilePage(){&lt;/p&gt;WOComponent profilePage = this.getPageWithName(&amp;quot;ProfilePage&amp;quot;);&lt;p&gt;profilePage.takeValueForKey(this.getSelectedUser(),&amp;quot;user&amp;quot;);&lt;br /&gt;return profilePage;&lt;/p&gt;&lt;p&gt;}&lt;br /&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;Any page with the name &amp;quot;ProfilePage&amp;quot; that has a &amp;quot;user&amp;quot; attribute will used for this navigation action. So... the question is still in the air... why? why I have been unable to find a web framework that deals with navigation in this way... why? We have frameworks that create dependencies between otherwise only dynamically related stuff, like &lt;a href="http://www.hibernate.org/" target="_blank"&gt;Hibernate&lt;/a&gt;, creating properties in java objects that mimic the dynamic relations in a database, but we refuse to offer the same services for page navigation... I don't get why... this seems as such a natural way to deal with this kind of problem... is there a disadvantage here that I am not seeing? Or was WebObjects really created in the Twilight Zone? &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold"&gt;Update&lt;/span&gt;: Just discovered &lt;span style="font-style: italic"&gt;another disadvantage of xml based navigation &lt;/span&gt;in JSF/Seam: It is &lt;span style="font-style: italic"&gt;not possible to use the java debugger or logging frameworks &amp;quot;out of the box&amp;quot;&lt;/span&gt; to debug the conditionals in the xml file, one has to wait for (or build) a custom debugger/logger for JSF/Seam navigation. &lt;br /&gt;&lt;br /&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-4527493324787816288?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/4527493324787816288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=4527493324787816288' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/4527493324787816288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/4527493324787816288'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/08/navigation-no-hard-dependencies-no-type.html' title='Navigation: No hard dependencies, no type dependencies, no code dependencies, Why?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-3815478357418350735</id><published>2008-07-30T21:49:00.002-05:00</published><updated>2010-01-26T23:25:29.884-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JEE'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='logging'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><category scheme='http://www.blogger.com/atom/ns#' term='Spring'/><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><title type='text'>Spring vs J2EE Application Servers</title><content type='html'>&lt;p&gt;Lately I have been playing with &lt;a href="http://www.oracle.com/technology/tech/java/oc4j/index.html" target="_blank"&gt;Oc4j&lt;/a&gt;, &lt;a href="http://tomcat.apache.org/" target="_blank"&gt;Tomcat&lt;/a&gt;, &lt;a href="https://glassfish.dev.java.net/" target="_blank"&gt;Glassfish&lt;/a&gt; and &lt;a href="http://www.jboss.org/jbossas/" target="_blank"&gt;JBoss&lt;/a&gt;, before that, I had only played with &lt;a href="http://www.springframework.org/" target="_blank"&gt;Spring&lt;/a&gt; and Tomcat (&lt;em&gt;but Tomcat was irrelevant, it was there only to start Spring&lt;/em&gt;) and now I have realized why Spring is much more comfortable than JEE, even with all the enhancements of JEE5: Spring is “inside” your application, for example, if you want to connect to Oracle with Spring, you add the JDBC jars to your application, and then configure your datasource in the applicationContext.xml file &lt;strong&gt;inside&lt;/strong&gt; your application, if you want to use &lt;strong&gt;&lt;a href="http://log4jdbc.sourceforge.net/" target="_blank"&gt;log4dbc&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="http://www.slf4j.org/" target="_blank"&gt;slf4j&lt;/a&gt;&lt;/strong&gt; to debug the SQL generated by &lt;a href="http://www.hibernate.org/" target="_blank"&gt;Hibernate&lt;/a&gt; (&lt;em&gt;BTW Hibernate .jars are also &lt;strong&gt;inside&lt;/strong&gt; your application&lt;/em&gt;) you can do it, and you only have to modify, again, the applicationContext.xml file &lt;strong&gt;inside&lt;/strong&gt; your application, if you want to add support for Spring transaction handling, or you want to expose some of your beans as &lt;a href="http://cxf.apache.org/" target="_blank"&gt;CeltiXFire&lt;/a&gt; Webservices, you describe all that: exactly, you guessed correctly: &lt;strong&gt;inside&lt;/strong&gt; your application. You really  &lt;strong&gt;don’t care&lt;/strong&gt; about the stuff &lt;strong&gt;outside&lt;/strong&gt; of your application.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;With JEE is the other way around, you have to worry about  stuff outside of your application (&lt;em&gt;for example, avoiding name conflicts in the JDBC datasources registered in JNDI&lt;/em&gt;), you have to worry about installing the  Oracle .jars in Tomcat, Glassfish or JBoss (&lt;em&gt;and worry about conflicts if the version installed as by default in Oc4j (or as shared in Tomcat) is not the one you want to use&lt;/em&gt;). You have to worry about compatibility with the way WebServices are handled and configured by your particular application server, etc.&lt;/p&gt;  &lt;p&gt;And finally, when you want to test stuff, you have to start the all the huge application server, even if you just want to test if your Login page is working correctly and if after logging in, the right permissions were loaded in the the current session.&lt;/p&gt;  &lt;p&gt;I think that is pretty much why JEE still feels uncomfortable when compared with Spring, JEE it is still &lt;strong&gt;about the application server, not about my application&lt;/strong&gt;: and I really &lt;strong&gt;don’t care&lt;/strong&gt; about the JEE application server, all &lt;strong&gt;I care about it is my application&lt;/strong&gt;. I think that JEE6 (or perhaps JEE7) should focus in finding the way to take the attention &lt;strong&gt;back in to the application&lt;/strong&gt;, perhaps by forcing the JEE application servers to offer their services the way Spring does it, from inside the application, and only if you want it, as a second, hard to configure option, make those services shared.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-3815478357418350735?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/3815478357418350735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=3815478357418350735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3815478357418350735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3815478357418350735'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/07/spring-vs-j2ee-application-servers.html' title='Spring vs J2EE Application Servers'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-2065706714656026729</id><published>2008-04-20T16:55:00.004-05:00</published><updated>2008-04-20T17:01:06.055-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ontology'/><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='philosophy'/><category scheme='http://www.blogger.com/atom/ns#' term='Relational'/><category scheme='http://www.blogger.com/atom/ns#' term='use cases'/><title type='text'>The Two Laws Of Dimensional Ontology</title><content type='html'>&lt;a href="http://www.pioneer.net/%7Etkerns/religsite/lecsite/lec-dimensontology.html"&gt;The Two Laws Of Dimensional Ontology&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Law I &lt;ul&gt;&lt;li&gt;"One and the same phenomenon projected out of its own dimension into dimensions lower than its own is depicted in such a way that the individual pictures contradict one another."   &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;Law II &lt;ul&gt;&lt;li&gt;"Different phenomena projected out of their own dimension into one dimension lower than their own are depicted in such a manner that the pictures are ambiguous."  &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt;I think this is two laws somehow explain what happens when we try to use a model to describe stuff in the real world, we end up representing things inaccurately and incompletely... the funny things that sometimes we seem to somehow change our angle of perspective, and then we realize that the our model is wrong... and try to fix it, and after that we believe that now it is right, but we will never have it right because the map is not the territory. Perhaps a similar problem arises when we try to use ObjectRelationalMapping, we  simply lose some of the information because of the perspective we choose to use... Object Orientation forces a particular structure it may not exists... and Relational... trying to see things from a neutral point of view end up not being helpful enough: it seems that humans tend to need to see things from a particular hierarchical perspective at a time, and find it hard to grasp things from all points of view at the same time.&lt;br /&gt;&lt;br /&gt;I started to think about this, because as a software engineer I am sometimes asked to create documentation about the software I am building (you know, the typical use cases stuff), and when you have to write a document of the kind a lot of times, the company where you work typically already have some document templates... now, typical document templates have a hierarchical (object oriented?) structure:  &lt;ul&gt;&lt;li&gt;UseCases &lt;ul&gt;&lt;li&gt;UseCase1 &lt;ul&gt;&lt;li&gt;Scenario 1 &lt;/li&gt;&lt;li&gt;Scenario 2 &lt;/li&gt;&lt;li&gt;Actors that participate in the use case &lt;/li&gt;&lt;li&gt;Classes (sterotyped as boundary in RobustnessAnalysis) that participate in the use case &lt;/li&gt;&lt;li&gt;Classes (sterotyped as control in RobustnessAnalysis) that participate in the use case &lt;/li&gt;&lt;li&gt;Classes (sterotyped as entities in RobustnessAnalysis) that participate in the use case &lt;/li&gt;&lt;li&gt;ActivityDiagram&lt;a linkindex="12" href="http://c2.com/cgi-bin/wiki?edit=ActivityDiagram"&gt;?&lt;/a&gt;  &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt;But then, they realize that some times, (for example to decide what uses cases will be affected by the modification of an entity class) they also need a document like this:  &lt;ul&gt;&lt;li&gt;Classes &lt;ul&gt;&lt;ul&gt;&lt;li&gt;Classes (stereotyped as boundary in RobustnessAnalysis) that participate in the use case &lt;ul&gt;&lt;li&gt;Class 1 &lt;ul&gt;&lt;li&gt;Use case 1 &lt;/li&gt;&lt;li&gt;Use case 2 &lt;/li&gt;&lt;li&gt;Actors interacting with the class &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;Class 2 &lt;ul&gt;&lt;li&gt;etc,etc.   &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt;Both documents have kind of the same internal model, but represent (view it?) form a different perspective, now, the strange thing, is that I do not know of a commecially successful desktop publishing and/or word processing application that allows you to specify such a model so that you can describe your  system once and only once and produce documents with several perspectives (I know products like Adobe FrameMaker are supposed to help you with this kind of semantical document structure, but, since they are (AFAIK) internally based on hierarchies, and not relational theory, they do not really allow the user to use all the power of the relational manipulation of data) I think that the problem might be that humans usually organize their ideas following some kind of hierarchical structure... or at least thats the way we are thought to do it at school, perhaps because of the limitations of printed material (a book made of paper can not be queried and reshaped relationally). But, now that we have all this electronic power to help us, we still try to organize stuff in hierarchies (or in messy graphs) and not relationally (internet is a messy graph, no a relational database... am I wrong? XHTML/XML are hierarchical, nobody would accuse them of being relational).   We simply find it easier to organize stuff in that way... is it really because that is the natural way in which we think? or is it because we still do not have good enough relational tools to deal with knowledge? is relationally actually about creating a model that is valid from any perspective? or it is more about easily changing the perspective? (But if we build those model from particular perspective, how can we expect relational to produce a model that is valid for more than one perspective?) And finally, why we do not have any Relational Word Processor/ Relational Document Standard&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-2065706714656026729?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/2065706714656026729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=2065706714656026729' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2065706714656026729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2065706714656026729'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/04/two-laws-of-dimensional-ontology.html' title='The Two Laws Of Dimensional Ontology'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-3217216521485463672</id><published>2008-04-15T16:45:00.003-05:00</published><updated>2008-04-15T16:56:04.534-05:00</updated><title type='text'>Business Case (Is it a good idea to modify an Activity?)</title><content type='html'>Today, we also covered Business Cases, it is an interesting subject, it basically tells you to compare projects using the following criteria:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Total Activity Disfunctionality&lt;/li&gt;&lt;li&gt;Total Activity Impact&lt;/li&gt;&lt;li&gt;Total Activity Factibility&lt;/li&gt;&lt;/ul&gt;If Impact and Factibility and Disfunctionality are high, then it is a good idea to go ahead with the project, on the other hand, if, for example Factibility is low, then, it would be impossible to really build the project, or if the Impact level is very low, then it might be easy to do it (hi factibility) but i will not help the organization much, so, it will not be a good idea to waste time building the project. If Disfunctionality is low, that means that the activity actually works really good, so, typically the impact of your changes will not be high.&lt;br /&gt;(Mmmm, I see some kind of relationship between Disfunctionality and Impact)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-3217216521485463672?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/3217216521485463672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=3217216521485463672' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3217216521485463672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3217216521485463672'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/04/business-case-is-it-good-idea-to-modify.html' title='Business Case (Is it a good idea to modify an Activity?)'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-6962549508682096073</id><published>2008-04-15T14:06:00.006-05:00</published><updated>2008-04-15T14:21:49.889-05:00</updated><title type='text'>The project triangle</title><content type='html'>In project management a very important concept is that of the project triangle: Scope, Resources, and Time, it is impossible to have more than two of them.&lt;br /&gt;I have had problems with this triangle.... always, typically because there is not time, and there is no money (Resources) and the Scope, well the Scope always increases.&lt;br /&gt;The main problem in my  experience is that not a lot of people has heard of this triangle, and those that do, say, well, it is a nice idea, but the reality of this project is that we need this done with cheaply, for tomorrow, and with unexperience personnel.&lt;br /&gt;When the projects is "Tipically Succesful" it is because it is not too late, or hasn't exceeded the budget too much... or the scope was not too insuficient.&lt;br /&gt;&lt;br /&gt;The problem is that everybody in software developerment needs to realize that it is not possible to control more than 2 of this factors. For example:&lt;br /&gt;&lt;br /&gt;If you have to do everything in a rush, scope will suffer, and if scope doesn't suffer, then costs will increase...&lt;br /&gt;&lt;br /&gt;Perhaps somebody (I?) should create an interactive version of this triangle... one that, when changed 2 factors tells you the implications in the third.&lt;br /&gt;&lt;br /&gt;I am starting to think that the project triangle is somewhat similar to radar charts....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-6962549508682096073?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/6962549508682096073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=6962549508682096073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/6962549508682096073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/6962549508682096073'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/04/project-triangle_15.html' title='The project triangle'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-6754692990171549908</id><published>2008-04-14T16:34:00.003-05:00</published><updated>2008-04-14T16:40:14.696-05:00</updated><title type='text'>Areas of Oportunity</title><content type='html'>&lt;ol&gt;&lt;li&gt;Take advantage of Eventum/Bugzilla and use it to feed Construx Extimate (Metrics, Estimation)&lt;/li&gt;&lt;li&gt;Take advantage of  Construx Estimate to feed  DotProject in a more accurate way (Metrics, Estimation)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Use the curse as a fundation to justify the use of configuration management tools&lt;/li&gt;&lt;li&gt;Give courses to increase technical level.&lt;/li&gt;&lt;li&gt;Implemente a processs lifecycle for the development of each feature (covering configuration management, architecture, etc) that will help to make estimates more accurate.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-6754692990171549908?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/6754692990171549908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=6754692990171549908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/6754692990171549908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/6754692990171549908'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/04/areas-of-oportunity.html' title='Areas of Oportunity'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-571828984409331238</id><published>2008-04-14T15:28:00.001-05:00</published><updated>2008-04-14T15:30:01.711-05:00</updated><title type='text'>Software Engineering the State of the Art</title><content type='html'>Today I started my course on project management, and my instructor gave me this very interesting link: &lt;a href="http://www.umsec.umn.edu/files/STATEOFART2005.pdf"&gt;Software Engineering the State of the Art&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-571828984409331238?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/571828984409331238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=571828984409331238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/571828984409331238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/571828984409331238'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/04/software-engineering-state-of-art.html' title='Software Engineering the State of the Art'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-3579830547300711765</id><published>2008-03-30T21:41:00.004-06:00</published><updated>2008-03-30T21:46:38.436-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dataphor'/><category scheme='http://www.blogger.com/atom/ns#' term='Alphora'/><category scheme='http://www.blogger.com/atom/ns#' term='Relational'/><category scheme='http://www.blogger.com/atom/ns#' term='TRDBMS'/><title type='text'>Alphora Dataphor is OpenSource!</title><content type='html'>Now that &lt;a href="ttp://dataphor.org/"&gt;AlphoraDataphor&lt;/a&gt; is opensource, I believe a relational reborn could come in the near future... I have been reading the manuals and, while I am an object weenie let me tell you all that I think Dataphor is a very exciting technology I hope it finds the way to make &lt;span style="font-weight: bold;"&gt;True relational database&lt;/span&gt; a buzz word like Ruby and that finally forces big companies like Oracle to make databases truly relational.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-3579830547300711765?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/3579830547300711765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=3579830547300711765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3579830547300711765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3579830547300711765'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/03/alphora-dataphor-is-opensource.html' title='Alphora Dataphor is OpenSource!'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-3773859906957346496</id><published>2008-03-13T23:20:00.002-06:00</published><updated>2008-03-13T23:24:56.239-06:00</updated><title type='text'>Short projects, not short team lifespan</title><content type='html'>Today, I had an epiphany, I realized that while project must be short, teams should last a lot of time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-3773859906957346496?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/3773859906957346496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=3773859906957346496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3773859906957346496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3773859906957346496'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/03/short-projects-not-short-team-lifespan.html' title='Short projects, not short team lifespan'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-9198153053434544860</id><published>2008-02-14T23:06:00.001-06:00</published><updated>2008-02-14T23:06:58.605-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='it is done'/><category scheme='http://www.blogger.com/atom/ns#' term='shippable'/><category scheme='http://www.blogger.com/atom/ns#' term='limit'/><category scheme='http://www.blogger.com/atom/ns#' term='software engineering'/><category scheme='http://www.blogger.com/atom/ns#' term='finished'/><title type='text'>It is infinitesimal, and Done is the Limit</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Today, I was reading some articles in InfoQ,,, one of them called my attention:&lt;br/&gt;&lt;br/&gt;&lt;a href='http://www.infoq.com/news/2008/02/done-shippable-quality'&gt;InfoQ: Does "Done" Mean "Shippable"?&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;It made remember a blog post a wrote months ago titled "&lt;a href='http://luxspes.blogspot.com/2007/01/when-will-that-feature-in-your-system.html'&gt;When will that feature in your system be finished&lt;/a&gt;"&lt;br/&gt;and here I am wondering... why if this kind of problem is so common... why if it seems to be happening to everyone...&lt;br/&gt;why we don't have some kind of manual to help ourselves to explain others that saying something "is done" has a very&lt;br/&gt;different meaning for different people... for different situations,,,, and, maybe the right  answer is that it is never done...&lt;br/&gt;&lt;br/&gt;A  good system should be able to evolve.... to get new features, to make the current ones more robust...to improve...&lt;br/&gt;I should never be "done" in an static way... it should be able to grow organically... it comes closer and closer to being "done" but it never gets really done... (we could even argue a "done" system is an almost dead system, because it would be a system that can not improve anymore)&lt;br/&gt;&lt;br/&gt;Maybe the problem is that reaching  the "done" state in software development is like trying to reach a &lt;a href='http://en.wikipedia.org/wiki/Limit_%28mathematics%29'&gt;limit&lt;/a&gt;  in math,  we get close, and closer, but if we do things right, we never reach the done state, because we always have things to add, or things to improve.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-9198153053434544860?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/9198153053434544860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=9198153053434544860' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/9198153053434544860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/9198153053434544860'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/02/it-is-infinitesimal-and-done-is-limit.html' title='It is infinitesimal, and Done is the Limit'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-3889336600353381321</id><published>2008-01-24T09:44:00.001-06:00</published><updated>2009-08-22T13:52:54.579-05:00</updated><title type='text'>How to find files containing a string in Unix</title><content type='html'>&lt;div style="text-align: left"&gt;For that, you can write:   &lt;br /&gt;    &lt;br /&gt;&lt;span style="font-family: courier new"&gt;find {directory} -type f | xargs grep -l &amp;quot;{stringToFind}&amp;quot;&lt;/span&gt;    &lt;br /&gt;    &lt;br /&gt;This is really useful... specially to find out how certain things work (configuration files, like for example    &lt;br /&gt;those used inside eclipse are really harder to find without this command)    &lt;br /&gt;&lt;/div&gt;  &lt;br /&gt;&lt;a href="http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/" target="_new"&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-3889336600353381321?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/3889336600353381321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=3889336600353381321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3889336600353381321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3889336600353381321'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2008/01/how-to-find-files-containing-string.html' title='How to find files containing a string in Unix'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-9079535431543573649</id><published>2007-12-10T15:05:00.000-06:00</published><updated>2007-12-23T20:32:27.442-06:00</updated><title type='text'>JBoss Archive Browsing</title><content type='html'>Today I learned that jboss-archive-browsing.jar is in fact an &amp;quot;slice&amp;quot; of the much bigger jboss-common.jar  &lt;br /&gt;and that, if I want to download the code from that project, I have to go &lt;a id="n1rq" title="here" href="http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCommonProject"&gt;here&lt;/a&gt;.   &lt;br /&gt;(&lt;i&gt;It is important to remember the code in jboss-archive-browsing has an ugly bug that makes it impossible to&lt;/i&gt;  &lt;br style="font-style: italic" /&gt;&lt;i&gt;use Hibernate if you entities are inside a .jar&lt;/i&gt;)    &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-9079535431543573649?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/9079535431543573649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=9079535431543573649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/9079535431543573649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/9079535431543573649'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/12/jboss-archive-browsing-today-i-learned.html' title='JBoss Archive Browsing'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-5078924103090585125</id><published>2007-12-02T11:04:00.001-06:00</published><updated>2007-12-02T11:04:01.281-06:00</updated><title type='text'>Complication &amp; Complexity: Not the same thing</title><content type='html'>&lt;p&gt;Today I learned that Complication &amp;amp; Complexity are not the same thing:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Complexity: A problem is complex when you do not know how to solve it, the solution might be simple, or complicated.&lt;/li&gt; &lt;li&gt;Complicated: A problem is complicated when you know the exact algorithm that solves it, but the algorithm has lots steps and/or you need to follow lot of well known rules.&lt;/li&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-5078924103090585125?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/5078924103090585125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=5078924103090585125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/5078924103090585125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/5078924103090585125'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/12/complication-complexity-not-same-thing.html' title='Complication &amp;amp; Complexity: Not the same thing'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-212571380054493772</id><published>2007-12-02T00:48:00.001-06:00</published><updated>2007-12-02T00:48:44.205-06:00</updated><title type='text'>Self learning: Knowledge is power</title><content type='html'>&lt;p&gt;Here I am reading about &lt;a href="http://openlearn.open.ac.uk/course/view.php?id=1588"&gt;Decision Making&lt;/a&gt;, &lt;a href="http://openlearn.open.ac.uk/course/view.php?id=3082"&gt;Software Engineering&lt;/a&gt; and &lt;a href="http://openlearn.open.ac.uk/course/view.php?id=2587"&gt;Network Security&lt;/a&gt;. That is what I love to do... reading... learning... but lately I have not felt inspired... I felt like... like there was nothing worth learning anymore... I guess I was just overwhelmed with work and the stress of life, because I am regaining my will to learn more... always learn more...&lt;/p&gt; &lt;p&gt;I think that maybe what re-started my desire for knowledge was a conversation I had today with my girlfriend... we were talking about how was it possible that most people didn't do problem analysis before trying to solve problems with their work processes... I think it is because they know anything about the real meaning of Six Sigma and how to measure quality in a process, we think it is logical to start analyzing the current situation because we learned that from our university courses on software engineering but... why should anyone else know about it? Most people are pressured at work to "just do something" to solve problem without stopping to determine first what are the root causes for the problem they need to solve, and they end up treating the symptoms instead of the disease, and transform a problem that could have been solved with a single action in to a chronic problem that needs to be handled again, and again and again.&lt;/p&gt; &lt;p&gt;The sad part is that a lot of time the solution for the problem has been known by some people for quite a long time, but the person that is assigned to solve the problem ASAP in a particular place doesn't know that the problem he is dealing with was solved a long time a go, and he/she end up spending an excessive amount of time and energy to discover a partial solution to a problem that would have been easy to solve if he/she had the right information.&lt;/p&gt; &lt;p&gt;My favorite example of this are source code versioning systems... the first one (&lt;b&gt;&lt;/b&gt;&lt;a href="http://en.wikipedia.org/wiki/Source_Code_Control_System"&gt;Source Code Control System (SCCS)&lt;/a&gt;) was invented in 1972, but today, 36 years later I still arrive at software departments or even software enterprises that do not use any software for version control... how is that possible if really good versioning systems like SubVersion are opensource and free? and have excellent integration with Windows (TortoiseSVN), I believe it is because of "lack of knowledge", people just doesn't know that there are free and easy software to deal versioning and they end up designing complex proceedings to manually handle the versioning of files... they do it that way because they plain do not know there are better ways...&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-212571380054493772?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/212571380054493772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=212571380054493772' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/212571380054493772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/212571380054493772'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/12/self-learning-knowledge-is-power.html' title='Self learning: Knowledge is power'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-1479027801413696795</id><published>2007-10-22T22:50:00.000-05:00</published><updated>2007-10-22T23:02:45.420-05:00</updated><title type='text'>Law of Conservation of Complexity</title><content type='html'>In short, the law of conservation of software complexity states that complexity can not be created or destroyed, it can only be changed from one place (or form) to another, such as when:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;File based persistence is changed for SQL based persistence.&lt;/li&gt;&lt;li&gt;An object relational mapper is used to translate objects in to tuples.&lt;/li&gt;&lt;li&gt;A remoting framework is used instead of plain TCP/UDP API&lt;/li&gt;&lt;li&gt;Any software is programmed in a highter level language&lt;/li&gt;&lt;li&gt;An object oriented framework framework is used to build a web app instead of a plain C cgi.&lt;/li&gt;&lt;li&gt;An operating system provides a GUI instead of just a command line&lt;/li&gt;&lt;/ul&gt;In all this cases, it seems as if complexity were reduced, but, in fact, it was only moved to a place where it can not be seen, that, in my opinion it the reason that motivated the creation of encapsulation in object oriented languages,  to make it easy to move complexity around, and  hide it from some developers to make their work easier (but, in the end, the complexity is still there, and sooner or later you will need the help of the creators of the framework/database/gui... or if is opensource and you have the time and energy, you might have the courage to go and fight directly with that hidden complexity... but the final fact is that complexity is never destroyed, it is just moved around.&lt;br /&gt;&lt;br /&gt;Maybe that is why ObjectWeenies and RelationaWeenies and FunctionalWeenies, and all other Weenies just cann't undestand each other... they all have different strategies to deal with complextiy and when one of the thinks that a particular place is the ideal place to hide complexity it turns out that is precisely the place that another one think is not the place where complexity should be dealt with....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-1479027801413696795?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/1479027801413696795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=1479027801413696795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/1479027801413696795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/1479027801413696795'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/10/law-of-conservation-of-complexity.html' title='Law of Conservation of Complexity'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-7267858624125467421</id><published>2007-10-20T10:25:00.001-05:00</published><updated>2010-01-26T23:24:17.064-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='soap'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='json'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='languages'/><category scheme='http://www.blogger.com/atom/ns#' term='jdbc'/><title type='text'>It was programmed with...</title><content type='html'>Lately I have been seen people at work saying "I built that system using Php" or "We should build all our applications with Java" or "All our applications should be built with Ajax" or "We should (or should not) use Java/J2EE", but in the majority of the cases it turns out that the final product is something that is not built with a single technology but a combination of several ones... and the problems with that show up when we start to integrate applications:&lt;br /&gt;&lt;ul&gt; &lt;li&gt;Integrating this applications will be easy they both use WebServices (&lt;em&gt;Yes, but one of them uses JSON, another SOAP, another REST and another used Hessian&lt;/em&gt;) &lt;/li&gt;&lt;li&gt;Lets combine this two web applications in to a single one (&lt;em&gt;Yes, but one of them is built using Spring+Hibernate and the other was built with JDBC+Home Made Wannabe Framework&lt;/em&gt;) &lt;/li&gt;&lt;li&gt;The architecture of this applications is very similar they are both OLTP applications, integrating their code bases will be easy (o&lt;em&gt;r exchanging developers between them will be easy&lt;/em&gt;) and it turns out one of them is built using Stored Procedures in PL/SQL, another uses TopLink and the last one uses IBatis. &lt;/li&gt;&lt;li&gt;This two applications are AJAX bases it will be easy to integrate them (o&lt;em&gt;r exchanging developers between them will be easy&lt;/em&gt;) .... ups, they use to completely different and perhaps even incompatible AJAX frameworks&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;So... are we really saying something that somehow resembles the truth when we say "I built that application with XXXX"? I think not... but then... why do we keep saying stuff like "That was built in Java" if there are 1000 different ways to build it with Java.... 1000 ways to build with AJAX, 1000 ways to build it with PHP, 1000 ways to build it in .NET ... and millions of ways to build it, if we start combining this "base" technologies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-7267858624125467421?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/7267858624125467421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=7267858624125467421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7267858624125467421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7267858624125467421'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/10/it-was-programmed-with-that.html' title='It was programmed with...'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-8461561795064553552</id><published>2007-10-06T09:23:00.001-05:00</published><updated>2010-01-26T23:23:37.004-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='gwt'/><category scheme='http://www.blogger.com/atom/ns#' term='orm'/><category scheme='http://www.blogger.com/atom/ns#' term='jsp'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><category scheme='http://www.blogger.com/atom/ns#' term='japql'/><title type='text'>Ruby is younger therefore better than Java?</title><content type='html'>&lt;p&gt;I wrote this as a response to &lt;a href="http://blog.rapidred.com/articles/2006/06/01/from-java-to-ruby-programmers-view"&gt;From Java to Ruby: Programmer's view&lt;/a&gt;, but I couldn't post it because of a bug in that site, so I decided to post it in my own blog:&lt;br /&gt;&lt;br /&gt;Isn't this a simplified view of the advantages of Ruby over Java? For example the lack of choice in Ruby means that &lt;em&gt;if the "one Ruby way" to do stuff is not good for you project... you will have to go to other technologies&lt;/em&gt; (Java for example). And that can happen pretty often:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Hibernate has many more options for integration with legacy databases than Ruby's Active Record... almost all databases now have JDBC drivers (you can not say the same about Ruby database support). &lt;/li&gt; &lt;li&gt;Spring offers integrated transaction handling that makes it possible to switch from JDBC transactions to JTA transactions without changing a single line of Java code (you just need to modify around 5 lines in an XML file) what is the equivalent for that in Ruby?&lt;/li&gt; &lt;li&gt;Calling stored procedures is not that easy with Ruby... what is the equivalent of HQL (JPAQL) for Ruby... can you honestly say that it can handle all the special cases HQL can... and with the same efficiency?&lt;/li&gt; &lt;li&gt;With java I can build a web application GWT style, JSF style or plain JSP style... and each style has advantages and disadvantages... do I have all that power with Rails? (&lt;em&gt;Of course, those frameworks can be re-built in Ruby, but the question is, do I have them now?)&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I think you are right when you say that it's healthy to start with a clean slate and rebuild based on a cleaner, simpler foundation, but before saying that the new foundation is actually better than the older one, you have to be sure that your new foundation is actually capable of handling all the special cases the old foundation was capable of handling... or remember that maybe if you remove all the abilities the old foundation has to handle special cases you might end up realizing that your new foundation is just a replica of the state that the old foundation had when it was younger. (&lt;em&gt;And even then the older foundation has the advantage that you can use it as it was used in the past, but you can not use a new foundation as it will be used in the future&lt;/em&gt;)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-8461561795064553552?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/8461561795064553552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=8461561795064553552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8461561795064553552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8461561795064553552'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/10/ruby-is-younger-therefore-better-than.html' title='Ruby is younger therefore better than Java?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-2710644955740872376</id><published>2007-08-24T08:47:00.000-05:00</published><updated>2007-08-24T08:51:09.890-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='depreciation'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='optimization'/><category scheme='http://www.blogger.com/atom/ns#' term='mantainability'/><title type='text'>Code depreciation</title><content type='html'>Depreciation is a term used in accounting, economics and finance with reference to the fact that assets with finite lives lose value over time (&lt;a href="http://en.wikipedia.org/wiki/Depreciation"&gt;from Wikipedia&lt;/a&gt;), I this case, I'd like to discuss &lt;span style="font-weight: bold;"&gt;code depreciation&lt;/span&gt; and its relationship with &lt;span style="font-weight: bold;"&gt;optimization &lt;/span&gt;and &lt;span style="font-weight: bold;"&gt;mantainability &lt;/span&gt;by proposing the following rule:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;If code is written for performance (compromising maintainability), the value of such performance optimization (and maintenance degradation) will depreciate, because the likehood of having either faster hardware or different developer maintaining the code increases as time passes.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the other hand, maintaintable code, increases its value for similar reasons:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;If code is written for maintainability (postponing performance enhancements), the value of that maintainability (and performace degradation) will increase its value, because the likehood of having either faster hardware or different developer maintaining the code increases as time passes.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;I added this definitions to &lt;a href="http://c2.com"&gt;C2&lt;/a&gt;... I wonder how (or if they) will evolve.&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-2710644955740872376?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/2710644955740872376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=2710644955740872376' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2710644955740872376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2710644955740872376'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/08/code-depreciation.html' title='Code depreciation'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-1777064345901473405</id><published>2007-08-22T18:09:00.000-05:00</published><updated>2007-11-29T06:55:57.238-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='orm'/><category scheme='http://www.blogger.com/atom/ns#' term='injection'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Data Transfer Object Injection</title><content type='html'>Data Transfer Object injection is a programming error which results in security holes., it is to a Remote Object Service based applications which use object graphs what SQL Injection is to web-based applications which use databases.&lt;br&gt;&lt;br&gt;DTO injection could happen where there is a remote object service that allows a client system to send and and object graph that is automatically converted by an object relational mapper in to SQL statements.&lt;br&gt;&lt;br&gt;Instead of sending a valid object graph, the attacker can send a different object graph, representing alterations to the database that go well beyond his security level. For example, a remote object service receives an object graph that represent changes in the objects that represent new users, or new permissions granted for existing users of the system.&lt;br&gt;&lt;br&gt;To prevent this problem it should be possible to specify at the object relational mapping level, which entities can be saved by the current user... many object relational mappers, or xml relational mappers automatically write the changes represented by the object graph to the database, without caring if the current application user has the privileges required to persist those objects... we can not rely on RDBMS security, because most remote object services use the same user for all the calls... and I think it that connecting with a different user for each remote object service would be bad for connection pooling (decreasing performance)&lt;br&gt;&lt;br&gt;I wonder if anyone else thinks this is a common security problem... Mmmm... I will add this to &lt;a href="http://c2.com/"&gt;C2&lt;/a&gt;... I wonder how (or if it) will evolve.  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-1777064345901473405?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/1777064345901473405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=1777064345901473405' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/1777064345901473405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/1777064345901473405'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/08/object-injection.html' title='Data Transfer Object Injection'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-2272785881516775636</id><published>2007-08-11T11:11:00.000-05:00</published><updated>2007-11-29T07:16:42.375-06:00</updated><title type='text'>REST DataService... it was so... obvious?</title><content type='html'>Hi!&lt;br&gt;When I built my first systems using .NET 1.0, I was exited with the idea of using "XML SOAP WebServices" to communicate my client side application with my remote side business logic... but, after I started developing it, I realized I had to do a lot of stuff that just seemed repetitive and hard to use, why did I have to create a WebMethod for each of the CRUD operations... and many for the "R" in CRUD for each possible "select" variation... and it was even more problematic because sometimes I just had to have a "dynamic querying UI" and couldn't find a good way to send the definition of a query in a good "XML" way...&lt;br&gt;Then I realized... why should I create a method for each variant? why not just have a single web method:&lt;br&gt;&lt;br&gt;&lt;span style="font-family: courier new"&gt;DataSet executeQuery(string Query)&lt;/span&gt;&lt;br&gt;&lt;br&gt;And I started changing all my code, anything that I wanted to obtain from the server could be obtained that way... (&lt;em&gt;but... I started wondering... is that the one and only true way to use data oriented web services? I remember reading somewhere that wasn't such a good idea.. that SOA wasn't invented for that.. after all, that was just a thin XML wrapper over my ADO.NET data provider...&lt;/em&gt;)&lt;br&gt;&lt;br&gt;Fast forward a few years.... a lot of people start talking about a &lt;a href="http://en.wikipedia.org/wiki/REST"&gt;doctoral dissertation written by Roy Fielding&lt;/a&gt;... and the reach the following conclusion "SOAP is just too complex" ,"Having to create a different web method for each action makes the interface complex and not that good for inter operation", "one needs to know too much to understand a SOAP web service because methods are not standard", "WSDL is too complex", "SOAP is going against the resource naming philosophy in HTTP", etc, etc.... And REST is the answer to all our problems...&lt;br&gt;&lt;br&gt;Well here I am taking a look to the experimental &lt;a href="http://astoria.mslivelabs.com/Default.aspx"&gt;REST Framework "Astoria" Microsoft is creating&lt;/a&gt;, and... it looks painfully &lt;a href="http://astoria.mslivelabs.com/OnlineServiceNorthwind.aspx"&gt;similar to DataSet executeQuery(string Query),&lt;/a&gt; but it has a difference... it is not using SQL... it is using a custom ad hoc querying mechanism... that... does the same things SQL does?.. Perhaps it will implement better some relational features that are badly designer in SQL but... what is the real advantage here? what is the real difference between this and a SOAP web services that receives SQL and returns an XML representing rows in a database?&lt;br&gt;&lt;br&gt;Is there really a difference? or it just that we (as an industry) needed to invent SOAP webservices to realize all we needed was a thin XML wrapper around SQL?  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-2272785881516775636?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/2272785881516775636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=2272785881516775636' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2272785881516775636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2272785881516775636'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/08/rest-dataservice-it-was-so-obvious.html' title='REST DataService... it was so... obvious?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-7551682526909420982</id><published>2007-07-28T11:59:00.000-05:00</published><updated>2007-11-29T07:21:07.511-06:00</updated><title type='text'>Why is validation so hard?</title><content type='html'>Here I am, trying to validate my persistent business objects before committing a transaction...&amp;nbsp; since I am using Hibernate... that means they are POJOs... &lt;div&gt;Hibernate has its validation framework, that allows for validation using Java 5 @Annotations... it is a nice idea... but I don't feel that comfortable validating that way... Annotation based validation is fine for simple validation (not null, min/max size,etc) but is not that good for more complex stuff (&lt;em&gt;validations formulas, stuff like "you can't buy that unless you have money in you account" or "a car has to have 4 wheels or it can not change is status to 'ready to run'"&lt;/em&gt;).&lt;/div&gt; &lt;div&gt;The problem IMHO with the Hibernate Validator, is that it is triggered on "PreInsert" or "PreUpdate"... and those events are triggered each time a "Flush" is called (&lt;em&gt;automatically or manually&lt;/em&gt;) but Flush is called with 2 different purposes, if is called explicitly, it often means "put this in to the database", and, when called automatically often means "put changes in to the database so that I can make queries without risk of inconsistencies" but it doesn't mean "the transaction is committed" (&lt;em&gt;although a lot of people use it with that intention&lt;/em&gt;)... now... what if I want to validate only "just before when the transaction is committed", not "on flush"... (&lt;em&gt;that can happen if I want to do complex validation that requires querying the database about its state, taking in consideration the modifications that my uncommitted POJOs will produce when flushed in to the database&lt;/em&gt;).&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div&gt;I believe that the main problem of the POJO nature of Hibernate persistence, is that POJOs do not know they are persistent, and therefore do not know that they need to be leave the database in a valid state after being flushed into it... I think Hibernate is missing a mechanism that can be called that does a kind of "fake commit" that applies all the changes to the database, then call a validation api that can check that all the applied changes are valid, and, only after that is verified, allow for the transaction to really commit (&lt;em&gt;and if validation fails, that it should never commit, it should rollback&lt;/em&gt;). &lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div&gt;In other words, it should be possible to validate stuff "before commit" not "before flushing", and it should be possible to flush 1 or more times before commit without having the validation triggered, since we might need to perform operations with the data flushed in to the database, and only if those operation give a valid result, commit...&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div&gt;The problem... I think, is that Hibernate event system doesn't cover "OnBeforeCommit" and even worse... it lacks a mechanism to inform this OnBeforeCommit of which objects were inserted, updated or deleted. (In fact, Hibernate knows that internally, but it doesn't expose an API to retrieve that information... and therefore transactions are blind to the changes that were flushed before the commit (&lt;em&gt;and that makes it really hard to just call the validation algorithms of those entities that modified inside that particular transaction&lt;/em&gt;)&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-7551682526909420982?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/7551682526909420982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=7551682526909420982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7551682526909420982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7551682526909420982'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/07/why-validation-is-so-hard.html' title='Why is validation so hard?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-8128501488242545633</id><published>2007-07-16T15:52:00.000-05:00</published><updated>2007-07-16T15:56:12.510-05:00</updated><title type='text'>NoResultException is a really stupid idea!</title><content type='html'>&lt;a href="http://java.sun.com/javaee/5/docs/api/javax/persistence/NoResultException.html"&gt;&lt;/a&gt;When I saw &lt;a href="http://java.sun.com/javaee/5/docs/api/javax/persistence/Query.html#getSingleResult%28%29"&gt;Query.getSingleResult()&lt;/a&gt; I thought, "yes, great idea, I always have to add an utility method like that..."&lt;br /&gt;But then, I met &lt;a href="http://java.sun.com/javaee/5/docs/api/javax/persistence/NoResultException.html"&gt;NoResultException&lt;/a&gt;... what a great way to screw a great idea!&lt;br /&gt;Why not just return null??!!! getSingleResult should return 1 element, or null if it can not find stuff!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-8128501488242545633?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/8128501488242545633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=8128501488242545633' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8128501488242545633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8128501488242545633'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/07/noresultexception-is-really-stupid-idea.html' title='NoResultException is a really stupid idea!'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-7471977841627655832</id><published>2007-07-14T12:38:00.000-05:00</published><updated>2007-11-29T07:28:55.011-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='unit testing'/><category scheme='http://www.blogger.com/atom/ns#' term='jql'/><category scheme='http://www.blogger.com/atom/ns#' term='linq'/><category scheme='http://www.blogger.com/atom/ns#' term='csharp'/><title type='text'>Unit testing Relational Queries (SQL or HQL or JQL or LINQ...)</title><content type='html'>Hi!&lt;br&gt;Most applications I have built have something to do with a database (&lt;span style="font-style: italic"&gt;I remember that while I was on college I used to think that was not exiting stuff, I used to dream about doing neural networks stuff, logic programming in Prolog, etc&lt;/span&gt;) but then I met WebObjects and its Object Relational Mapper (Enterprise Objects Framework) and I got really excited about object oriented data programming... but I always had a problem... to test my object oriented queries I had to "manually" translate them into SQL and test them against the database, and only after they give me what I thought were correct result I would write them using EOF Qualifiers...&lt;br&gt;Then I met Hibernate's HQL and I realized it is much more powerful than EOF Qualifiers, but I still had to translate it to SQL to test it, I know I can get the SQL that is generated from the HQL from the debug console, and paste it in my favorite SQL editor... but even then if I found a mistake, a lot of times it was easier to tweak it in SQL and the manually translate it HQL.&lt;br&gt;Currently, there are some extensions for Eclipse (Hibernate Tools) that make this more "direct" but, what if I don't like (or don't want, or can't) use Eclipse... it would be great if someone could, for example, make a plugin for &lt;a href="http://squirrel-sql.sourceforge.net/"&gt;SquirrelSQL&lt;/a&gt;, but until then... what options do I have?&lt;br&gt;&lt;br&gt;Then I learned about unit testing... and the answer came to my mind immediately: I just had to write a unit test for each of my queries. That worked fine... in the beginning... until I started having queries that returned thousands (or millions) of objects, and it wasn't such a good idea to output them to the debug console... and I had another problem... how should I write the "asserts" of query?... and how can I do it so that it doesn't make my test so slow that it becomes unusable? (I can, of course, check the results just by viewing them, but my brain is not that good to say if those 10,000 row really match with the idea I had when I wrote that HQL)&lt;br&gt;&lt;br&gt;So, I started to look "what do I do" to check if an SQL query is correct, lets say for example, that I write this:&lt;br&gt;&lt;br&gt;&lt;pre&gt;select count(*) from Address,Employee where Address.Id= Employee.AddressId and Employee.Id = 3&lt;/pre&gt;&lt;br&gt;(Translated to English: &lt;span style="font-style: italic"&gt;How many address the Employee with Id = 3 has&lt;/span&gt;?)&lt;br&gt;&lt;br&gt;Now... how do I test that? well I could add an assert after getting the result in java (or c#) like this:&lt;br&gt;&lt;br&gt;&lt;pre&gt;assert(count&amp;gt;0)&lt;/pre&gt;&lt;br&gt;But the, what happens if someone deletes the row with Id = 3 from the table Employee? That means my test will fail... or what what if someone deletes all the addresses from employee? and what if I want to test that if there are no addresses for an employee, the answer should be zero...&lt;br&gt;&lt;br&gt;That is a lot of work just to test if that simple query is right... and I think that work could be done automatically:&lt;br&gt;&lt;br&gt;Take a look at the SQL, it could be decomposed into:&lt;br&gt;&lt;pre&gt;&lt;br&gt;select count(*) from (select * from Address,Employee where Address.Id= Employee.AddressId and Employee.Id = 3) as EmployeeAddresses&lt;/pre&gt;&lt;br&gt;And then we could say, lets automatically check for the case when the resulting set is empty, and for the case when the result is not empty, to check for a case when the result is empty, we need and Employee with Addresses, so we generate:&lt;br&gt;&lt;br&gt;&lt;pre&gt;Select * from Employee where exists(select * from Address where Address.EmployeeId = Employee.Id)&lt;/pre&gt;&lt;br&gt;And take the Id first employee we get... and that should give us a non empty set if used in the original sql sentence that we are trying to test... after that, we automatically generate:&lt;br&gt;&lt;br&gt;&lt;pre&gt;Select * from Employee where not exists(select * from Address where Address.EmployeeId = Employee.Id)&lt;/pre&gt;&lt;br&gt;And take the Id first employee we get... and that should give us an empty set if used in the original sql sentence that we are trying to test...&lt;br&gt;&lt;br&gt;I call this queries "inverses" of the original one, it like when one is testing a multiplication, to see if 2 x 3 = 6, just do: 6/3 = 2 and 6/2 = 3, if 2, and 3 match the operands of the multiplication, you multiplication is right. The same thing goes for SQL, one just has to find the way to "invert" it, if I could automate this inversion, the automatically generated queries would help me by telling me things that might not be immediately obvious to me when I look at the original query, and that would help me check if my original query is right.... it would me some kind of "invariants" that would help me to better understand my querying... or maybe I could even write the invariants first, and then create a query and see if it matches my invariants...&lt;br&gt;&lt;br&gt;Mmmm.... maybe using a select there is another way to "invert" a query to test if it is right, using the actual inverse operation of selecting... that is "inserting", could I derive from:&lt;br&gt;&lt;br&gt;&lt;pre&gt;select count(*) from Address,Employee where Address.Id= Employee.AddressId and Employee.Id = 3&lt;/pre&gt;&lt;br&gt;Something like (In pseudocode):&lt;br&gt;&lt;br&gt;&lt;pre&gt;Insert Employee;&lt;/pre&gt;&lt;pre&gt;Store Employee.Id&lt;/pre&gt;&lt;pre&gt;Run select count(*) from Address,Employee where Address.Id= Employee.AddressId and Employee.Id = EmployeeId&lt;/pre&gt;&lt;pre&gt;Assert("The answer should be zero")&lt;/pre&gt;&lt;pre&gt;Insert Address related to Employee&lt;/pre&gt;&lt;pre&gt;Run select count(*) from Address,Employee where Address.Id= Employee.AddressId and Employee.Id = EmployeeId&lt;/pre&gt;&lt;pre&gt;Assert("The answer should be one")&lt;/pre&gt;&lt;br&gt;This has the advantage that I don't need a database with data already on it, but it has the disadvantage that takes lot of time to write an unit test like this in java, because to insert an employee, it might be necessary to:&lt;br&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Avoid breaking validation rules no related to this particular test, for example, an Employee must be related to a Department, but if the Department table is empty, then I should create a Department or I will not be able to insert an employee. &lt;br /&gt;&lt;li&gt;Avoid conflicts with validation rules directly related to this particular test, for example, what if I have an Hibernate interceptor that won't let me insert an address without 1 or more Addresses &lt;/li&gt;&lt;/ul&gt;The main problem here, I believe, is that f I insert a row leaving a not null column empty most databases won't wait until I try to commit the transaction to say "integrity violation" and rollback my changes... therefore it is impossible to write partial data just for the test that I have in front of me, but... could I automatically generate consistent inserts using as a source just the integrity rules at the database level... and the select that I want to test?&lt;br&gt;I think it can be done... the question is..&lt;br&gt;&lt;span style="font-size: 130%"&gt;What is the algorithm to generate the inserts needed to satisfy an SQL select statement?&lt;/span&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-7471977841627655832?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/7471977841627655832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=7471977841627655832' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7471977841627655832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7471977841627655832'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/07/unit-testing-relational-queries-sql-or.html' title='Unit testing Relational Queries (SQL or HQL or JQL or LINQ...)'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-2958709459060241862</id><published>2007-07-05T00:12:00.001-05:00</published><updated>2007-07-05T00:12:23.535-05:00</updated><title type='text'>The perfect infrastructure (framework?) for data systems</title><content type='html'>&lt;p&gt;The perfect&amp;nbsp; infrastructure (framework?) &amp;nbsp;for data systems:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Has an object relational query language (something like JQL or LINQ)&amp;nbsp;&lt;/li&gt; &lt;li&gt;Has a database with versioning (&lt;em&gt;like Subversion&lt;/em&gt;) so you can always consult the database as it was in a particular moment in time transparently&lt;/li&gt; &lt;li&gt;Supports transactions... and distributed transactions. (&lt;em&gt;like Spring&lt;/em&gt;)&lt;/li&gt; &lt;li&gt;Has a framework to exchange graphs of objects with a remote client, objects can be manipulated freely on the client, filtered and queried without hitting the database&amp;nbsp;without need, and are transparently loaded in to de client without having the n+1 problem. (&lt;em&gt;like an hybrid between Hibernate, Apple's EOF &amp;amp; Carrierwave&lt;/em&gt;)&lt;/li&gt; &lt;li&gt;Supports "client only transactions" and nested client only transactions (&lt;em&gt;like the Editing Context in WebObject's JavaClient applications&lt;/em&gt;) so that it is possible to make rollbacks without hitting the database, and it is even possible to make partial rollbacks... and have savepoint functionality, without going all the way to the database (unless you want to do so)&lt;/li&gt; &lt;li&gt;Client objects, server objects and database elements are kept in perfect sync automatically, but it is possible to add logic to a particular tier of the system without too much hassle.&lt;/li&gt; &lt;li&gt;Has a validation framework, that make it really easy to write efficient validation code following DRY, and that validates data on the client, on the application server and on the database.&lt;/li&gt; &lt;li&gt;Validation code, combined with the versioning capabilities of the infrastructure allows to save information partially, as easily as writing part of a paper, validating only as you completely the information, with multiple integrity levels&lt;/li&gt; &lt;li&gt;It is possible to disconnect the client from the server, and it will be able to save your changes until the connection is established again&lt;/li&gt; &lt;li&gt;The applications built with this perfect infrastructure auto update automatically.&lt;/li&gt; &lt;li&gt;With a very simple configuration tweak, it is possible to download the application "sliced" in pages, or as a complete bundle. This capability is so well integrated that the final user can choose the installation method, and the programmer doesn't even care about this feature.&lt;/li&gt; &lt;li&gt;The developer only needs to specify the requirements semi-formally in a language (like Amalgam) and he will receive a running application, that adapts dynamically to specification (unless he chooses to "freeze" a particular feature of the application, in which case, the default procedural code for that feature is automatically generated, and the developer can customize as he wishes ... or decide to un-freeze it.&lt;/li&gt; &lt;li&gt;Can be coded in any language compatible with a virtual machine that runs anywhere, or can be compiled to an specific platform.&lt;/li&gt; &lt;li&gt;Allows for easy report design... by the developer, or the user.&lt;/li&gt; &lt;li&gt;It is opensource (or sharedsource), so that in the extremely unlikely case of needing another feature, or finding a bug, it can be easily fixed by the developer&lt;/li&gt; &lt;li&gt;It is freely (as in beer) downloadable from the Internet. (or has a reasonable price)&lt;/li&gt; &lt;li&gt;It is fully documented, with lots of examples, going from very simple examples for beginners, to really complex real world applications with best practices for experts&lt;/li&gt; &lt;li&gt;Includes the source code with unit-test with 100% coverage of the code&lt;/li&gt; &lt;li&gt;Supports design by contract coding (from the database up to the client side).&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;You know what is the funny (or sad) part of all this? I have met frameworks that do 1, 2 or even 3 or more of this features... but none that does them all... will I ever see such a thing? is even possible to build it?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-2958709459060241862?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/2958709459060241862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=2958709459060241862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2958709459060241862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2958709459060241862'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/07/perfect-infrastructure-framework-for.html' title='The perfect infrastructure (framework?) for data systems'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-8719230722931695981</id><published>2007-07-03T09:11:00.000-05:00</published><updated>2007-07-03T09:45:41.066-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='uniquing'/><category scheme='http://www.blogger.com/atom/ns#' term='dto'/><category scheme='http://www.blogger.com/atom/ns#' term='granite'/><category scheme='http://www.blogger.com/atom/ns#' term='RIA'/><category scheme='http://www.blogger.com/atom/ns#' term='orm'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='merging'/><category scheme='http://www.blogger.com/atom/ns#' term='faulting'/><title type='text'>RIAs: Faulting &amp;Uniquing (or Merging?) (Granite, Ajax)</title><content type='html'>Today I realized that lazy loading support for &lt;a href="http://www.graniteds.org/"&gt;Granite Data Services&lt;/a&gt; is in its infacy... is more like "Partial Loading" (&lt;span style="font-style: italic;"&gt;it will load everything not initialized, and not initialized stuff will remain "unloaded" forever&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;I am thinking this leads to a pattern like this:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I need to work with persons, so I fetch a list of them from a remote service.&lt;/li&gt;&lt;li&gt;I choose to work with the person with id "3";&lt;/li&gt;&lt;li&gt; present the contacts of person "3". (&lt;span style="font-style: italic;"&gt;here is the tricky stuff, all the contacts that I load have a reference to person "3", what do I do about that? do I re fetch it, creating a different object and breaking &lt;/span&gt;&lt;a style="font-style: italic;" href="http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdFaultingUniquing.html"&gt;uniquing&lt;/a&gt;&lt;span style="font-style: italic;"&gt;, or do I look for a way to prevent that "same but different object" in my application?&lt;/span&gt; )&lt;/li&gt;&lt;/ol&gt;I guess that we will need something like &lt;a href="http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdFaultingUniquing.html"&gt;Faulting &amp; Uniquing&lt;/a&gt; , and a Client Side EditingContext (or Client Side EntityManger)... to control data in the client side... (&lt;span style="font-style: italic;"&gt;our own idea of LDS &lt;/span&gt;&lt;a style="font-style: italic;" href="http://livedocs.adobe.com/flex/201/langref/mx/data/DataStore.html"&gt;DataStore&lt;/a&gt;&lt;span style="font-style: italic;"&gt; ?&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;But... until granite has that... what could we do as a first step? it would be nice if we could "merge" a recently obtained object with one a fetched before... something like ADO.NET DataSet... (&lt;span style="font-style: italic;"&gt;I can not believe I am writing that I miss the DataSet&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;I have been thinking... a fully "AJAX"  traditional JavaScript based application would have the same problems if it had a complex enough UI... but I haven't heard of anything like it, it seems that most AJAX application developers build applications so simple that they don't even care about having to write and re-write client side data manipulation code... (or... maybe those applications don't even enough client side behavior to need it?).&lt;br /&gt;&lt;br /&gt;I guess that until Granite has his own "Data Management" the way to handle data will be... to imitate the practices of traditional AJAX applications?&lt;br /&gt;&lt;br /&gt;(&lt;span style="font-style: italic;"&gt;Mmmm, now with Google Gears... will we see how JavaScript based frameworks for automatic handling of DTOs and ORM start to appear everywhere?&lt;/span&gt; Parhaps this will revive the interest in something like &lt;a href="http://www.theserverside.com/news/thread.tss?thread_id=34216"&gt;SDO&lt;/a&gt;?)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-8719230722931695981?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/8719230722931695981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=8719230722931695981' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8719230722931695981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8719230722931695981'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/07/rias-faulting-or-merging-granite-ajax.html' title='RIAs: Faulting &amp;Uniquing (or Merging?) (Granite, Ajax)'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-3976850675990854595</id><published>2007-06-11T21:01:00.001-05:00</published><updated>2007-06-11T21:01:56.494-05:00</updated><title type='text'>SOA: Transactional Boundaries, The Paper / Computer Document Impedance Mismatch</title><content type='html'>&lt;p&gt;Here I am... I again, facing the exact same problem... this is becoming repetitive... I have to build an OLTP system... what is an OLTP system?&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;a href="http://en.wikipedia.org/wiki/OLTP"&gt;Online Transaction Processing&lt;/a&gt;&lt;/b&gt; (or &lt;b&gt;OLTP&lt;/b&gt;) is a class of programs that facilitate and manage transaction-oriented applications, typically for data entry and retrieval &lt;a href="http://en.wikipedia.org/wiki/Transaction_processing"&gt;transaction processing&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;And right there, in the wikipedia article about OLTP, it is possible to read about the Paper Computer Impedance Mismatch (I here I was feeling like I discovered something) "&lt;em&gt;The term Online Transaction Processing is somewhat ambiguous: some understand "transaction" as a reference to computer or database transactions, while others (such as the &lt;/em&gt;&lt;a href="http://www.tpc.org/"&gt;&lt;em&gt;Transaction Processing Performance Council&lt;/em&gt;&lt;/a&gt;&lt;em&gt;) define it in terms of business or commercial transactions&lt;/em&gt;."&lt;/p&gt; &lt;p&gt;Well, IMO, that is just a part (a very important part) of the P/C impedance mismatch... when we talk about a transaction oriented computer system... what are we talking about? about computer SQL X/Open DTP&amp;nbsp;transactions? or about business transactions...? Some people believe it is the same thing... Some other people have never realized the difference between paper and computer documents... and ask... why was I able to do X in paper but now it is invalid in the computer? To explain it.... lets go back to the origins...before computer documents.... lets say you have to register a fine against someone (someone committed a mistake against the law, and now they have to pay some money as punishment). So, you start writing down the document "a fine&amp;nbsp;of 8 gold coins&amp;nbsp;for...&amp;nbsp;" suddenly, you feel and urge to go to the latrine.... you stand up and run.... you have left the paper document incomplete... it doesn't say what was the mistake that originated it... it doesn't say who has to pay the 8 gold coins, it doesn't say by which authority is that person obliged to pay... but there is nothing to worry about... is already in ink over the paper... it doesn't matter if you have a real bad digestion problem and you can't continue for 2 months... when you return to the paper sheet, it will still say "a fine&amp;nbsp;of 8 gold coins&amp;nbsp;for...". that is persistence... exactly the same persistence used if you were saving the fine in modern AJAX based system... but if you were using that modern system, when you returned after 2 months, you would find that "your session has timed out" and you have lost the amount you written in the "amount" field (or maybe someone else had to use the computer, and they closed your account, or had to use the plug... and unplugged your computer...). So, with paper, you have to "actively" want to revert persistence (by destroying the piece of paper) but, with electronic persistence, loosing information is a lot easier, just close the current window without hitting save... and it is lost... and it can get lost even "after" hitting save... because... now... we have created a new enemy for persistence... we have "&lt;a href="http://en.wikipedia.org/wiki/Data_integrity"&gt;data integrity&lt;/a&gt;"... we have more problems than when we only had to fight for paper to write stuff down...&lt;/p&gt; &lt;p&gt;Why do I see integrity as an enemy of persistence? it is pretty simple, really... with the&amp;nbsp;new computer based OLTP systems, it is impossible to save "data without integrity" (corrupted data?), so, unless you know all the facts precisely, you can't write something down... (it doesn't matter that you know the fine is about selling a controlled substance, that it was issued by the DEA, and signed by "John Smith", if you don't know who has to pay it (Jane Doe for example) every time you hit the "save" button, the system is going to answer, in a very nice and polite way (if well designed) "I can not save that fine, because the "First Name" and "Last Name" of the person that has to pay for it are mandatory fields". Well, you say... just let me register the information I have "now", and after I get the missing data, I will return and add it, but the system wont hear your begging... and it will not save your data until it has "integrity"... but before you had to use this new&amp;nbsp;software system&amp;nbsp;you were able to write down this information in a piece of paper... it didn't matter if you had the full name of the person or you didn't, those people on the IT department I going to hear about you,&amp;nbsp; and they will have to change that stubborn attitude... &lt;/p&gt; &lt;p&gt;Well, it turns out, sometimes integrity is needed... what can you do with a fine without a name? suppose you have to manage another 100,000 similar documents... and that you don't know the name of the person that has to pay for half of them... and on some other thousands you don't know how much you have to pay... or why... and on others you don't even know any of this stuff (you just know someone has to pay something because of some unknown law, and that by adding all the fines in February, you will earn 50,000 dollars, because federal government told you that). Now you are in trouble, you have to start defining how much is the minimal information to describe a fine... you have to draw a line between "useful information with integrity" and "vague corrupted stuff" or you will start loosing track of what is happening with every document (&lt;em&gt;what makes a document a document, how much can you alter it before it becomes another document&lt;/em&gt;). &lt;/p&gt; &lt;p&gt;Suddenly you realize you can ask the computer to classify the document, and create two lists (that is one of the things computer do really well with structured information), so you ask the computer to create a list with "complete integral documents" and another with "incomplete documents", and you say "problem solved, I have 100,000 documents, and of those, 45,000 have integrity (full documents), all others are work in progress" but, after few days... you realize now you only&amp;nbsp;have 44,985 full documents... someone has been erasing the data in the documents because he got a bribe... and, unless you have a backup from previous week, you cant know which documents were corrupted... so, now it turns out that an already "integral" document, can go back and become "corrupted" real easy... and you cant even know that in those cases where the information was incomplete from the beginning, the source of the problem was that the original information was incomplete... or just that the person that has to write it on to the system is doing in an incomplete form... intentionally...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-3976850675990854595?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/3976850675990854595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=3976850675990854595' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3976850675990854595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3976850675990854595'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/06/soa-transactional-boundaries-paper.html' title='SOA: Transactional Boundaries, The Paper / Computer Document Impedance Mismatch'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-9148074971727817060</id><published>2007-05-31T20:51:00.001-05:00</published><updated>2007-12-02T02:12:34.104-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='interative'/><category scheme='http://www.blogger.com/atom/ns#' term='RIA'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='software engineering'/><category scheme='http://www.blogger.com/atom/ns#' term='mantainability'/><title type='text'>WebBrowser + Embedded WebServer + Embedded DataBase = Google Gears</title><content type='html'>&lt;p&gt;Hi!&lt;/p&gt; &lt;p&gt;Today I found out about a new Google project, Google Gears... a new browser plugin... that adds an SQL database and a local, only for that browser on that machine "Web Server" (oh, and an external WorkerPool for threaded asynchronous proceseses)...&lt;/p&gt; &lt;p&gt;So... now the that WebBrowser has an SQL database... a Worker Pool ... and a WebServer... it can run disconnected applications... you can save you emails locally... or your blog entries... or your RSS (&lt;em&gt;I believe that is what google reader does&lt;/em&gt;)... WebApplications are now... Desktop applications... (&lt;em&gt;or RIAs as they are called now&lt;/em&gt;).&lt;/p&gt; &lt;p&gt;So... now... what is the real advantage of&amp;nbsp; a RIAG (&lt;em&gt;a RIA with "Google Gears&lt;/em&gt;") vs a Desktop App? Well, lets look at its features.. the RIAG... is slower (&lt;em&gt;interpreted&lt;/em&gt;)... needs a plugin like Flash to do&amp;nbsp; real graphical stuff... it can't access anywhere on disk&amp;nbsp; (&lt;em&gt;we could say it has its own SQL based filesystem&lt;/em&gt;)... therefore it is still not better for graphically intensive applications (&lt;em&gt;I don't see a Photoshop or 3dStudio killer in the near future&lt;/em&gt;) ...&amp;nbsp; but could be a nice idea for desktop like stuff (&lt;em&gt;for example a disconnected mail reader, or perhaps even a disconnected wiki&lt;/em&gt;). But wait... we already have disconnected mail readers...&amp;nbsp; (&lt;em&gt;well, but they are not multiplatform.... mmmm... wait, Thunderbird IS multiplatform... and of course we have Java to create those multiplaform mail readers if we need to do so&lt;/em&gt;)... okay, but we can create a multiplatform Office like system (&lt;em&gt;yes, a revolutionary idea... wait... what about OpenOffice?&lt;/em&gt;) and of course building an Office in a technology like JavaScript will make it really fast in standard hardware (&lt;em&gt;like the very successful Java Office built by Corel a few years ago... wait... never heard of it? mmm, maybe it wasn't that successful... I wonder if that was because Java was really slow on hardware back then... &lt;/em&gt;)&lt;/p&gt; &lt;p&gt;Of course... none of that is going to stop Google Gears... people are just hypnotized with building stuff in the "web way" (even &lt;em&gt;if can be done easier on the Desktop&lt;/em&gt;)... the way I see it.. with all this stuff, as the "thin client" of the WebBrowser becomes a "rich client" it is also gaining weight, becoming fat, becoming a fat client... so... by this logic... adding a plugin to all available browsers... it is better than a Java applet... but I can't find a logical reason for that... the new RIAs are just applications that use the browsers as the platform.... the&amp;nbsp; difference with windows applications? that there are many different browsers following the HTML/JavaScript standard, and only 1 windows (&lt;em&gt;of course every browser follows the standard on its own particular way&lt;/em&gt;)... the difference with Java? (&lt;em&gt;there isn't, but RIAs are slower... and sliced in pages... that seem to be faster to download... but in fact they consume even more bandwidth than classic fat clients with their proprietary binary protocols&lt;/em&gt; ), perhaps the key here is the "openness" of HTML &amp;amp; XML and JSON as protocols for communication (&lt;em&gt;but that can also be done in Java, or in .NET &amp;amp; Mono&lt;/em&gt;)&lt;/p&gt; &lt;p&gt;So...&amp;nbsp; I just don't get it... what it is so great about adding a database plugin to the browser? by following this path all that we are doing is reinventing the wheel (&lt;em&gt;everything that can already be done outside the browser is being re-built inside it... until RIAs become as Fat as Fat-Clients... and then someone else invents the new Thin-Client... and the story repeats again&lt;/em&gt;). &lt;/p&gt; &lt;p&gt;I guess the software industry is really, really iterative... we need to go back to an re-try stuff from the previous iteration... to realize it wasn't such a bad idea... enhance that idea... and from there, realize that the idea from 2 iterations ago, was the solution for the drawbacks of our current problems...&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-9148074971727817060?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/9148074971727817060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=9148074971727817060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/9148074971727817060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/9148074971727817060'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/05/webbrowser-embedded-webserver-embedded.html' title='WebBrowser + Embedded WebServer + Embedded DataBase = Google Gears'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-7929962711638303108</id><published>2007-05-09T08:50:00.004-05:00</published><updated>2010-02-18T19:15:50.119-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='ui design'/><category scheme='http://www.blogger.com/atom/ns#' term='xaml'/><category scheme='http://www.blogger.com/atom/ns#' term='javafx'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Project OpenJFX</title><content type='html'>&lt;p&gt;Java counterattacks? The other day I posted that &lt;a href="http://luxspes.blogspot.com/2007/04/swing-dying-between-silverlight-flash.html"&gt;Silverlight and Flash might be going to kill Java&lt;/a&gt;... well Java is figting back:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.sun.com/software/javafx/index.jsp"&gt;&lt;em&gt;JavaFX&lt;/em&gt;&lt;/a&gt;&lt;em&gt; is a new family of Sun products based on Java technology and targeted at the high impact, rich content market.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;JavaFX Script is a highly productive scripting language that enables content developers to create rich media and content for deployment on Java environments. JavaFX Script is a declarative, statically typed programming language. It has first-class functions, declarative syntax, list-comprehensions, and incremental dependency-based evaluation. It can make direct calls to Java APIs that are on the platform. Since JavaFX Script is statically typed, it has the same code structuring, reuse, and encapsulation features (such as packages, classes, inheritance, and separate compilation and deployment units) that make it possible to create and maintain very large programs using Java technology. See the &lt;/em&gt;&lt;a href="https://openjfx.dev.java.net/JavaFX_FAQ.html"&gt;&lt;em&gt;FAQ&lt;/em&gt;&lt;/a&gt;&lt;em&gt; for more information.&lt;/em&gt;  &lt;/p&gt;&lt;p&gt;I am very impressed with the demos in the &lt;a href="https://openjfx.dev.java.net/"&gt;site&lt;/a&gt;, and the way less verbose way to describe interfaces (when compared with traditional Java Swing code, and I am thinking it could even be a threath for XAML &amp;amp; XML, &lt;a href="http://www.sdtimes.com/fullcolumn/column-20060901-05.html"&gt;some people on the net believe that XML is the poor man's parser, and that it is being overutilized to create stuff that should be implemented as an specific language&lt;/a&gt;... well, JavaFX is not XML... is this the start of a new trend?), I was also very exited to see how easy is to add animation to Java 2D application with this new API (everything that can be done with Flash will be possible... and maybe even more...). Now... the question are:  &lt;/p&gt;&lt;ul&gt; &lt;li&gt;Will Sun release a "UI Designers Pack" for Netbeans that will be pretty much something like &lt;a href="http://www.microsoft.com/expression/"&gt;Microsoft Expressions&lt;/a&gt; for Java?  &lt;/li&gt;&lt;li&gt;Could OpenJFX be adopted by projects like OpenLaszlo? &lt;/li&gt;&lt;li&gt;Is using JavaScript like languages the new trend? &lt;/li&gt;&lt;li&gt;Will JSON stuff become the new poor man's parser?&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-7929962711638303108?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/7929962711638303108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=7929962711638303108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7929962711638303108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7929962711638303108'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/05/project-openjfx.html' title='Project OpenJFX'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-3474638484104805255</id><published>2007-05-03T22:01:00.002-05:00</published><updated>2010-03-16T01:07:28.820-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='vs.net'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><title type='text'>Eclipse... Is NOT an IDE</title><content type='html'>&lt;p&gt;Okay... have been trying to use Eclipse 3.2 like an IDE all week... that failed miserably...&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;VisualStudio.NET is an IDE &lt;/li&gt;    &lt;li&gt;Borland Developer Studio is an IDE &lt;/li&gt;    &lt;li&gt;NetBeans is an IDE &lt;/li&gt;    &lt;li&gt;IntelliJ is an IDE &lt;/li&gt;    &lt;li&gt;FlexBuilder (an Eclipse plugin) is an IDE &lt;/li&gt;    &lt;li&gt;JBuilder (an Eclipse plugin) is an IDE&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;But... Eclipse... Eclipse... is a PE... &amp;quot;Plug Environment&amp;quot;, NOT an IDE: Integrated Development Environment.&lt;/p&gt;  &lt;p&gt;After you add JDT to it can be considered an IDE... if you only build Console tools (command line applications) but, if you want to build anything more complex than that... then&amp;#160; JDT&amp;#160; is a very &lt;strong&gt;limited&lt;/strong&gt; IDE.&lt;/p&gt;  &lt;p&gt;Yes, you can add lots of plugins to Eclipse... and make it become JBuilder... (like Borland did or as Macromedia did with FlexBuilder), but the thing is, that it is JBuilder (the plugin) the thing that IS the IDE, Eclipse is just the &lt;strong&gt;PLATFORM for the IDE&lt;/strong&gt;..., saying that Eclipse is an IDE it is like saying that Windows is word processor... or graphic design application... or why not, Windows is a IDE! (&lt;em&gt;Of course, that is crazy... well saying that Eclipse is an IDE is crazy... comparing it to any real IDE is crazy...&lt;/em&gt;) &lt;strong&gt;Eclipse is a PLATFORM&lt;/strong&gt;, and you can build an IDE on top of that, but, the quality (and INTEGRATION) of the free available plugins in Eclipse Callipso,&amp;#160; in my opinion is not enough to call it an IDE&lt;/p&gt;  &lt;p&gt;Netbeans is a great IDE, the best OpenSource IDE for Java for Swing or Web or J2EE applications, Eclipse is NOT and IDE. Period.&lt;/p&gt;  &lt;p&gt;(&lt;em&gt;I guess this is my first rant in a blog&lt;/em&gt;)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-3474638484104805255?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/3474638484104805255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=3474638484104805255' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3474638484104805255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3474638484104805255'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/05/eclipse-is-not-ide.html' title='Eclipse... Is NOT an IDE'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-8993681550351260536</id><published>2007-04-16T14:00:00.002-05:00</published><updated>2010-02-18T19:13:32.616-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='silverlight'/><category scheme='http://www.blogger.com/atom/ns#' term='swing'/><category scheme='http://www.blogger.com/atom/ns#' term='RIA'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='ui design'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Swing: Dying between Silverlight &amp; Flash?</title><content type='html'>&lt;p&gt;So... Now Microsoft has Silverlight and tools like Expressions to create really good looking animations and User Interfaces... and a really small 1Mbyte plugin that works in Windows &amp;amp; Mac OS X...&lt;/p&gt; &lt;p&gt;Adobe has Flash... and Flash CS3 &amp;amp; Flex to create really good looking animations and User Interfaces.... and a really small around 1 Mbyte plugin... that works... well... everywhere (Windows, Mac OS X, and yes, Linux)&lt;/p&gt; &lt;p&gt;And Java... well... has Swing and SWT... neither of them has a  a tool too easily create really good looking animations and User Interfaces... (Mattise is not bad, but it doesn't compare with Flash CS3 or Expressions), the JRE is huge, Swing and SWT have better integration with current  platform UI than ever before... (but, creating really good looking UIs, like those possible with Flash &amp;amp; Silverlight with just the help of a designer... well.. it is just not possible)&lt;/p&gt; &lt;p&gt;So...the Java vs .NET war.... is now the Silverlight vs Flash war? or now we have 3 powers?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-8993681550351260536?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/8993681550351260536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=8993681550351260536' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8993681550351260536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/8993681550351260536'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/04/swing-dying-between-silverlight-flash.html' title='Swing: Dying between Silverlight &amp;amp; Flash?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-5391468910747747636</id><published>2007-04-12T17:46:00.002-05:00</published><updated>2010-02-18T19:12:40.561-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='IDE'/><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><title type='text'>Open Source Design Studio for...</title><content type='html'>&lt;p&gt;Eclipse &amp;amp; Netbeans are built on Java, a good part (AFAIK not all) of Visual Studio is built on .NET, so why not...&lt;br /&gt;It is a lightweight design studio.  It is not a replacement for a full Eclipse IDE, but instead is a lightweight tool that allows easy development of applications and allows you to dive into the platform at an affordable price... but... its name says it all.... &lt;br /&gt;"&lt;a href="http://www.flexiblemxml.com/"&gt;Flexible&lt;/a&gt;"&lt;br /&gt;Just... exactly... what I need for Laszlo...&lt;br /&gt;The universe is not user friendly...&lt;/p&gt; &lt;p&gt;Perhaps for Laszlo 4.5? &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-5391468910747747636?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/5391468910747747636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=5391468910747747636' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/5391468910747747636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/5391468910747747636'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/04/open-source-design-studio-for.html' title='Open Source Design Studio for...'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-3903525247071616964</id><published>2007-04-12T13:02:00.002-05:00</published><updated>2010-02-18T19:11:31.766-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open laszlo'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='RIA'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>The Presentation Layer: Open Laszlo vs Flex</title><content type='html'>&lt;p&gt;Hi!&lt;/p&gt; &lt;p&gt;So I have been evaluation several presentation layer frameworks, trying to choose one for may future applications at my new job... my boss is very interested in developing applications with a "cinematic" experience... so, the main contenders are:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Open Laszlo 4  &lt;/li&gt;&lt;li&gt;Flex 2&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;So far, the main advantage of each one are:&lt;/p&gt; &lt;p&gt;Open Laszlo 4:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;OpenSource (&amp;amp; &lt;em&gt;free both ways&lt;/em&gt;)  &lt;/li&gt;&lt;li&gt;Flash &amp;amp; JScript UI generation  &lt;/li&gt;&lt;li&gt;Cinematic user experience&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Flex 2:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Flash UI generation  &lt;/li&gt;&lt;li&gt;Free SDK (&lt;em&gt;but AFAIK not OpenSource&lt;/em&gt;)  &lt;/li&gt;&lt;li&gt;Cinematic user experience  &lt;/li&gt;&lt;li&gt;UI Builder  &lt;/li&gt;&lt;li&gt;Interactive debugger  &lt;/li&gt;&lt;li&gt;Syntax Colored Editor for the Scripts  &lt;/li&gt;&lt;li&gt;Lots of Beginner to Advanced Tutorials  &lt;/li&gt;&lt;li&gt;Lots of Books  &lt;/li&gt;&lt;li&gt;Lots of examples with matching tutorials &amp;amp; books  &lt;/li&gt;&lt;li&gt;Cairngorm architectural framework  &lt;/li&gt;&lt;li&gt;E4X Support  &lt;/li&gt;&lt;li&gt;Based on ECMAScript 4&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The main disadvantages of Laszlo are Flex strength (and viceversa):&lt;/p&gt; &lt;p&gt;Open Laszlo 4:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;No UI Builder  &lt;/li&gt;&lt;li&gt;No interactive debugger  &lt;/li&gt;&lt;li&gt;No syntax coloring for the scripts  &lt;/li&gt;&lt;li&gt;Lack of advanced tutorials online  &lt;/li&gt;&lt;li&gt;Lack of Books (&lt;em&gt;There are only 2, one from the reviews I have read seems to be pretty much a copy of Laszlo reference documentation, and the other I think will be a really good one, but it is unfinished&lt;/em&gt;)  &lt;/li&gt;&lt;li&gt;Lack on architectural frameworks or guidance (&lt;em&gt;nothing like Cairngorm is available&lt;/em&gt;)  &lt;/li&gt;&lt;li&gt;No E4X support  &lt;/li&gt;&lt;li&gt;Based on ECMAScript 3 (&lt;em&gt;older version&lt;/em&gt;)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Flex 2:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Not OpenSource  &lt;/li&gt;&lt;li&gt;DataServices are expensive (&lt;em&gt;but maybe the Granite project will change that&lt;/em&gt;)  &lt;/li&gt;&lt;li&gt;The UI Builder needs lots of RAM (1&lt;em&gt; Gbyte is recommended by Adobe&lt;/em&gt;)  &lt;/li&gt;&lt;li&gt;The UI Builder is an Eclipse plugin (&lt;em&gt;this is a personal disadvantage, because I prefer Netbeans&lt;/em&gt;)&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;I really wanted Laszlo to win this competition ( &lt;em&gt;I just really like the product, the idea, and I believe competition is good for customers, so I feel that keeping Laszlo alive will be good for the future of both Laszlo &amp;amp; Flex consumers...&lt;/em&gt;) but... so far, it seems that Laszlo main advantage as an opensource project (&lt;em&gt;community &amp;amp; books support&lt;/em&gt;) is just not as advanced as Flex's (no good finished Laszlo books, no list of best practices, architectural guidance or architectural framework) so, I think the winner, for me, will have to be, for now, Flex... (&lt;em&gt;but I hope that next year Laszlo improves, and I hope I have the chance to use it in future projects&lt;/em&gt;)&lt;/p&gt; &lt;p&gt;My wish list for Open Laszlo 4.5:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Lots of beginner to expert tutorials of full applications (&lt;em&gt;with real world authentication &amp;amp; authorization &amp;amp; architecture best practices&lt;/em&gt;)  &lt;/li&gt;&lt;li&gt;Books, books, books!  &lt;/li&gt;&lt;li&gt;IDE agnostic UI Builder (&lt;em&gt;something like what is available for TIBCO&lt;/em&gt;)  &lt;/li&gt;&lt;li&gt;Architectural Framework (&lt;em&gt;something like Flex's Cairngorm but for Laszlo&lt;/em&gt;)  &lt;/li&gt;&lt;li&gt;J2EE Integration (&lt;em&gt;something like Flex's Granite project&lt;/em&gt;)  &lt;/li&gt;&lt;li&gt;Interactive IDE integrated script debugger (&lt;em&gt;even if only for Eclipse&lt;/em&gt;)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;My wish list for Open Laszlo 5.0:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;E4X support  &lt;/li&gt;&lt;li&gt;ECMAScript 4 support  &lt;/li&gt;&lt;li&gt;Something like GWT of Echo2 but with Laszlo as the underlying infrastructure. (&lt;em&gt;Java only coding&lt;/em&gt;)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Well, now I'll just wait and see...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-3903525247071616964?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/3903525247071616964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=3903525247071616964' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3903525247071616964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3903525247071616964'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/04/presentation-layer-open-laszlo-vs-flex.html' title='The Presentation Layer: Open Laszlo vs Flex'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-7624112055815545443</id><published>2007-03-30T08:37:00.001-06:00</published><updated>2010-02-18T19:10:34.420-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='philosophy'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><title type='text'>Life is a Wicked Problem</title><content type='html'>Yesterday I was reading about studying online (in the &lt;a href="http://www.open.ac.uk/"&gt;OpenUniversity&lt;/a&gt;), I was gladly surprised to see that some of their courses are now &lt;a href="http://openlearn.open.ac.uk/"&gt;available on line for free&lt;/a&gt;, and, that you can even remix the content using a free software for mind maps built bye the &lt;a href="http://www.compendiuminstitute.org/"&gt;Compendium Institute&lt;/a&gt;, the funny thing is that I ended up finding information &lt;a href="http://www.cognexus.org/id42.htm"&gt;wicked problems&lt;/a&gt; (&lt;span style="font-style: italic;"&gt;and currently I have one, choosing the java frameworks we will use at my current job&lt;/span&gt;)... wicked problems are those that (&lt;a href="http://en.wikipedia.org/wiki/Wicked_problem"&gt;from Wikipedia&lt;/a&gt;):&lt;br /&gt;&lt;ol&gt; &lt;li&gt;There is no definitive formulation of a wicked problem &lt;/li&gt;&lt;li&gt;Wicked problems have no stopping rule &lt;/li&gt;&lt;li&gt;Solutions to wicked problems are not true-or-false, but good-or-bad &lt;/li&gt;&lt;li&gt;There is no immediate and no ultimate test of a solution to a wicked problem &lt;/li&gt;&lt;li&gt;Every solution to a wicked problem is a "one-shot operation"; because there is no opportunity to learn by trial-and-error, every attempt counts significantly &lt;/li&gt;&lt;li&gt;Wicked problems do not have an enumerable (or an exhaustively describable) set of potential solutions, nor is there a well-described set of permissible operations that may be incorporated into the plan &lt;/li&gt;&lt;li&gt;Every wicked problem is essentially unique &lt;/li&gt;&lt;li&gt;Every wicked problem can be considered to be a symptom of another problem &lt;/li&gt;&lt;li&gt;The existence of a discrepancy representing a wicked problem can be explained in numerous ways. The choice of explanation determines the nature of the problem's resolution &lt;/li&gt;&lt;li&gt;The planner has no right to be wrong (Planners are liable for the consequences of the actions they generate)&lt;/li&gt;&lt;/ol&gt;And it turns out that:&lt;br /&gt;&lt;ul&gt; &lt;li&gt;Software development is a wicked problem (and that is my job) &lt;/li&gt;&lt;li&gt;Life is a wicked problem (and... well, I am alive)&lt;/li&gt;&lt;/ul&gt;One thing I specially liked was a document explaining in a very detailed how wicked problems happen (&lt;a href="http://cognexus.org/wpf/wickedproblems.pdf"&gt;read it here&lt;/a&gt;), and it turns out that a really good way to explain it is with a graphic, like &lt;a href="http://www.cognexus.org/0e966200.png"&gt;this one&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now.. that image can be produced, by thinking that each person participating on the solving of a wicked problem has his own "pendulum" and moves from "solution thinking" to "problem thinking" on his own, not synchronized way... if find this funny... because a few days ago I was seeing Kent Beck's presentation "&lt;a href="http://video.google.com/videoplay?docid=7830246530742207581"&gt;Ease at Work&lt;/a&gt;", where he describes how a lot of software developers feel (&lt;span style="font-style: italic;"&gt;one day we are super wizards... the next we are crap.... the next we are wizards again&lt;/span&gt;), but we are not hired and fired in perfect sync with how we feel (&lt;span style="font-style: italic;"&gt;sometimes we are even treated as wizards while inside we feel like losers and vice versa&lt;/span&gt;), and in his presentation Kent Beck says that software development is not only about programmers, that is about people, people interacting to get a problem solved (you can't have a software business without software developers, but you also can't have it without managers, even if it just a "&lt;a href="http://members.optusnet.com.au/%7Echarles57/Creative/Techniques/sixhats.htm"&gt;change of hat&lt;/a&gt;"), so, this got me thinking... that the problem Kent Beck is describing, is precisely, a Wicked Problem. What do you think?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-7624112055815545443?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/7624112055815545443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=7624112055815545443' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7624112055815545443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/7624112055815545443'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/03/life-is-wicked-problem.html' title='Life is a Wicked Problem'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-3667510722795312049</id><published>2007-02-23T10:37:00.001-06:00</published><updated>2010-02-18T19:10:11.419-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='object oriented'/><title type='text'>OO Principles</title><content type='html'>Hi! Today I am reading the book Head First Object-Oriented Analysis and Design, I specially liked the OO Principles, I have already read about them in c2, but I really like the way they are summarized in this book:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;OCP: Classes should be open for extension, but closed for modification. (&lt;span style="font-style: italic;"&gt;to avoid new requirements breaking old tested code&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;DRY: Don't repeat yourself, avoid duplicate code by abstracting out things that are common and placing them in a single location. (&lt;span style="font-style: italic;"&gt;to avoid having to fix the same thing in different places, or solving the same problema again, and again and again... I believe this is releated to YAGNI balances OAOO.... i guess I could say that YAGNI balances DRY, and therefore DRY equals OAOO&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;SRP: Single responsability principle, every object in your system should hava a single responsibility, and all the object's services shoul be focused on carry in out that single responsability. (&lt;span style="font-style: italic;"&gt;to avoid Big Ball of Mud, a huge object that does everything, that is hard to extend, hart to understand, and lots of stupid little object that do nothing, mmmm, this reminds me of a pricinciple I read about a long time ago about balancing the intelligence between your objects&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;LSP: Subclasses should be suitable for their base clases (&lt;span style="font-style: italic;"&gt;to avoid confusing code, on which you believe you can use a member of class hierarchy, and after trying you realize thet the result is not the expected one&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-3667510722795312049?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/3667510722795312049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=3667510722795312049' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3667510722795312049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/3667510722795312049'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/02/oo-principles.html' title='OO Principles'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-2822569401508826832</id><published>2007-02-22T10:07:00.000-06:00</published><updated>2007-04-12T12:31:09.585-05:00</updated><title type='text'>OpenLaszlo &amp; Spring &amp; Hibernate</title><content type='html'>Hi!&lt;br&gt;Okey, changed my job again, time to rest from .NET and to refresh my Java abilities... my goal for this week is to find an easy way to teach everyone at my new job how to build a great application using: Hibernate + Spring + OpenLazlo...&lt;br&gt;My Java abilities are a little rusty so this is going to be a really entertaining challenge..&lt;br&gt;&lt;br&gt;Here are some links I have found about this:&lt;br&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://jroller.com/page/tanays?entry=integrating_laszlo_with_spring_mvc"&gt;Integrating Laszlo with spring MVC and XStream&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Seems that finding information on Laszlo is harder than I thought...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-2822569401508826832?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/2822569401508826832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=2822569401508826832' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2822569401508826832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/2822569401508826832'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/02/openlaszlo-spring-hibernate.html' title='OpenLaszlo &amp;amp; Spring &amp;amp; Hibernate'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-116864277112613036</id><published>2007-01-12T16:59:00.000-06:00</published><updated>2007-01-27T20:29:44.815-06:00</updated><title type='text'>When will that feature in your system will be finished?</title><content type='html'>&lt;p&gt;That seems like a very simple question: "When will feature "X" be finished?", specially if do not have a lot of  experience being the manager of a software development team... but the problem... is that the task of developing a feature has, as many things in software development different faces... its one more example of &lt;a href="http://www.noogenesis.com/pineapple/blind_men_elephant.html"&gt;The Blind Men and the Elephant&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;In this case.. when is the feature "finished"?:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;After the Developer says it is finished?&lt;/li&gt; &lt;li&gt;After the Architect says the code is maintainable and extensible?&lt;/li&gt; &lt;li&gt;After the Tester says that the feature is bug free?&lt;/li&gt; &lt;li&gt;After the User says that the feature meets his expectations?&lt;/li&gt; &lt;li&gt;All of the above?&lt;/li&gt; &lt;li&gt;None of the above?   Then... when:&lt;u&gt;                                                &lt;/u&gt;?&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;It is easy to see that I believe it is not a question easy to answer... why do believe that?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Well in my opinion the main difficulty to answer it is that that software development is not a linear activity, with a beginning and an end, but an iterative activity, if the Architect doesn't believe the the code is maintainable and extensible, then the code will have to be modified (&lt;em&gt;either by him or by the Developer&lt;/em&gt;) and after that, if the Tester finds bugs, the code will have to be modified again to fix the bugs... but those modifications might introduce more bugs to the code, so the code will have to be tested again... its a cyclical process, it has to be done many times before reaching the end, in other words, it is not an "if" answer, but a "while not" answer.&lt;/p&gt; &lt;p&gt;Therefore: &lt;span style="font-style: italic;"&gt;effort in trying to reach the end can be registered... but it is impossible to tell how far from the end we are&lt;/span&gt;... maybe one, maybe ten, maybe a hundred iterations away.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-116864277112613036?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/116864277112613036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=116864277112613036' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116864277112613036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116864277112613036'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/01/when-will-that-feature-in-your-system.html' title='When will that feature in your system will be finished?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-116802601281482150</id><published>2007-01-05T13:40:00.000-06:00</published><updated>2007-01-05T13:42:28.346-06:00</updated><title type='text'>Is Linq really such a good idea? Are SQL Strings inside C# really such a bad idea?</title><content type='html'>&lt;p&gt;Today, a friend at work asked me a question "how to sort in a stored procedure?" Of course there is a simple answer:&lt;/p&gt;&lt;code&gt; &lt;p&gt;CREATE PROCEDURE [dbo].[Sorter]()&lt;/p&gt; &lt;p&gt;AS&lt;/p&gt; &lt;p&gt;SELECT * FROM Table ORDER BY Field &lt;/p&gt; &lt;p&gt;&amp;nbsp; &lt;/code&gt; &lt;p&gt;But... what if you want to &lt;a href="http://www.sqlteam.com/item.asp?ItemID=2209"&gt;order by any field of the table&lt;/a&gt;? That is a "dynamic order by"... well then: &lt;code&gt; &lt;p&gt;CREATE PROCEDURE [dbo].[Sorter](@SortOrder tinyint = NULL&lt;/p&gt; &lt;p&gt;AS&lt;/p&gt; &lt;p&gt;SELECT Field1, Field2, Field3 FROM Customers ORDER BY CASE WHEN @SortOrder = 1 THEN Field1 WHEN @SortOrder = 2 THEN Field2 ELSE&amp;nbsp;Field3 END &lt;/code&gt;&lt;/p&gt; &lt;p&gt;Great!... well not that much, because it only works as expected if all 3 fields are of the same type (of course we could convert them all to string... I mean "nchar")  &lt;p&gt;My friend has all this problems because he is trying to avoid the dynamic slq approach (either creating his own dynamic sql generator, or using any of the available ORMs)  &lt;p&gt;But this post is about &lt;a href="http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx"&gt;LINQ&lt;/a&gt;... with LINQ, we will have relational extensions right there inside C#... that means no more language mixing (SQL inside strings inside C#)... but that also means... no more dynamic manipulation of SQL (AFAIK C# can not manipulate C# as a string, they way it does with SQL)... So... will LINQ really simplify&amp;nbsp;development of data manipulation applications? or will it complicate it more by preventing us from easly&amp;nbsp;and dinamically manipulate queries&amp;nbsp;? or is this just an SQL&amp;nbsp;limitation (maybe SQL should allow as to have parametrized sorting?)?  &lt;p&gt;I guess I'll have to do more research...  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-116802601281482150?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/116802601281482150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=116802601281482150' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116802601281482150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116802601281482150'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/01/is-linq-really-such-good-idea-are-sql.html' title='Is Linq really such a good idea? Are SQL Strings inside C# really such a bad idea?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-116785587774410646</id><published>2007-01-03T14:24:00.000-06:00</published><updated>2007-01-03T14:24:37.800-06:00</updated><title type='text'>Handling Relative &amp; Absolute URLs with System.Web.VirtualPathUtility</title><content type='html'>&lt;p&gt;Until today, I translated between relative &amp;amp; absolute paths in ASP.NET "by hand". Example:&lt;/p&gt;&lt;code&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;private string ToAbsolute(string url)&lt;br&gt;{&lt;br&gt;if (url.StartsWith("~")) &lt;/p&gt; &lt;p&gt;return (HttpContext.Current.Request.ApplicationPath +&lt;br&gt;url.Substring(1)).Replace("//", "/");&lt;br&gt;return url;&lt;br&gt;}  &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/code&gt; &lt;p&gt;But now, it turns out the with ASP.NET 2.0... I can achieve this effect... by simply calling &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.virtualpathutility(VS.80).aspx"&gt;VirtualPathUtility&lt;/a&gt;:&lt;/p&gt;&lt;code&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;VirtualPathUtility.ToAbsolute(url)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/code&gt; &lt;p&gt;Much simpler... don't you think?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-116785587774410646?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/116785587774410646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=116785587774410646' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116785587774410646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116785587774410646'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2007/01/handling-relative-absolute-urls-with.html' title='Handling Relative &amp;amp; Absolute URLs with System.Web.VirtualPathUtility'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-116364632900075561</id><published>2006-11-15T21:05:00.001-06:00</published><updated>2010-01-26T23:41:24.983-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><title type='text'>Autocomplete for ASP.NET Ajax Beta 2 is Ready!</title><content type='html'>&lt;p&gt;Finally the &lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2006/11/15/ASP.NET-Ajax-Beta_3A00_-AutoCompleteBehavior-without-a-Web-Service.aspx"&gt;autocomplete for ASP.NET Ajax Beta 2 is ready&lt;/a&gt;!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-116364632900075561?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/116364632900075561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=116364632900075561' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116364632900075561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116364632900075561'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/11/autocomplete-for-aspnet-ajax-beta-2-is.html' title='Autocomplete for ASP.NET Ajax Beta 2 is Ready!'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-116226888868758506</id><published>2006-10-30T22:28:00.001-06:00</published><updated>2010-01-26T23:40:52.780-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='escape'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='JScript.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='encode'/><title type='text'>HttpUtility.UrlEncode is NOT equivalent to javascript "escape"</title><content type='html'>&lt;p&gt;A few days ago, I posted about &lt;a href="http://luxspes.blogspot.com/2006/10/fixed-problem-with-smartautocomplete.html"&gt;how to fix a "," problem &lt;/a&gt;in an &lt;a href="http://infinitiesloop.blogspot.com/2006/05/atlas-smart-auto-completion.html"&gt;very good autocomplete control&lt;/a&gt;.  &lt;/p&gt; &lt;p&gt;As part of the solution I proposed to use "&lt;a href="http://httputility.urlencode/"&gt;HttpUtility.UrlEncode&lt;/a&gt;" thinking that it was equivalent to javascript "&lt;a href="http://www.w3schools.com/jsref/jsref_escape.asp"&gt;escape&lt;/a&gt;" function, but.. &lt;strong&gt;it is not equivalent&lt;/strong&gt;!&lt;/p&gt; &lt;p&gt;For example, HttpUtility.UrlEncode &lt;strong&gt;encodes&lt;/strong&gt; the " " (whitespace) to "+", while javascript encode &lt;strong&gt;escapes&lt;/strong&gt; the " " to "%20".&lt;/p&gt; &lt;p&gt;The same things goes for encodeURI in case you were wondering (&lt;em&gt;and please don't even bother trying with HttpUtility.HtmlEncode, its purpose is completely different&lt;/em&gt;)&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;The answer? good old JScript.NET (in the server side):&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library//microsoft.jscript.globalobject.escape.aspx"&gt;Microsoft.JScript.GlobalObject.encode(string)&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The documentation reads "This method supports the .NET Framework infrastructure and is not intended to be used directly from your code." but, since there is no other option, and I NOT going to implement this by myself, i think this is the best option available.&lt;/p&gt; &lt;p&gt;Do you know any other way to do it? would you please share it with me?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-116226888868758506?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/116226888868758506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=116226888868758506' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116226888868758506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116226888868758506'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/10/httputilityurlencode-is-not-equivalent.html' title='HttpUtility.UrlEncode is NOT equivalent to javascript &amp;quot;escape&amp;quot;'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-116199087299669111</id><published>2006-10-27T18:14:00.001-05:00</published><updated>2010-02-18T19:09:41.088-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='philosophy'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='object oriented'/><title type='text'>Objecthood!</title><content type='html'>&lt;p&gt;According to the wikipedia, &lt;a href="http://en.wikipedia.org/wiki/Objecthood"&gt;objecthood&lt;/a&gt; is: "&lt;em&gt;is the state of being an &lt;/em&gt;&lt;a href="http://en.wikipedia.org/wiki/Object_%28philosophy%29"&gt;&lt;em&gt;object&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;" I particularly liked that article, specially the part that says that:&lt;/p&gt; &lt;p&gt;"Theories of objecthood address two problems: &lt;i&gt;the change problem&lt;/i&gt; and &lt;i&gt;the problem of substance&lt;/i&gt;."&lt;/p&gt; &lt;p&gt;The answer to change problem is the answer to the following question, if object manifest themselves as cluster of properties... if you remove all the properties... what remains? According to &lt;a href="http://en.wikipedia.org/wiki/Substance_theory"&gt;substance theory&lt;/a&gt;, the answer is a &lt;i&gt;substance&lt;/i&gt; (that which &lt;i&gt;stands under&lt;/i&gt; the change)... if we apply this to Object Relational mapping... then.. the &lt;strong&gt;objectId (primary key)&lt;/strong&gt; is the substance? Could this be used as a philosophical justification for the immutability of the primary key?&lt;/p&gt; &lt;p&gt;Then the text in the wikipedia continues: "&lt;em&gt;Because substances are only experienced through their properties, a substance itself is never directly experienced.&lt;/em&gt;" Is that a justification for never using the id (&lt;em&gt;keeping it private&lt;/em&gt;)? Of course, there is another theory, the theory that since substance can not be experimented... then it doesn't exist, that is the "&lt;em&gt;bundle theory&lt;/em&gt;".&lt;/p&gt; &lt;p&gt;In bundle theory all objects are merely a cluster of their properties and therefore... everything changes always... and no such thing as object ids/ primary keys really exist in the real world. This has an impact in relationships too, because we usually define a relationship as something that binds together 2 or more objects (at their substance level?)... but since object's substance doesn't actually exist then there isn't such thing as a "relationship" between two objects..&lt;/p&gt; &lt;p&gt;According to this relationships can only exist as something defined at the "property cluster level".. two (or more) objects aren't really related at the substance level... they simply "share a property" (is that why in SQL there isn't a way to make queries taking advantage of the integrity relationships? is "shared property" a better name for integrity relationships?)&lt;/p&gt; &lt;p&gt;And the thing gets worse: "&lt;em&gt;Whether objects are just collections of properties or separate from those properties appears to be a strict dichotomy. That is, it seems that objects must be either collections of properties or something else."&lt;/em&gt; Is that the philosophical foundation for the "object/relational impedance mismatch"?&lt;/p&gt; &lt;p&gt;It seems that the conflict between a relational (&lt;em&gt;bundle theory&lt;/em&gt;) and object (&lt;em&gt;substance&lt;/em&gt;) worldview is there since way before a relational database or an object oriented language was invented... &lt;/p&gt; &lt;p&gt;I wonder what else could I learn from reading about this philosophical theories... (&lt;em&gt;could there be a third one? is there a software programming paradigm for it?&lt;/em&gt;)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-116199087299669111?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/116199087299669111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=116199087299669111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116199087299669111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116199087299669111'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/10/objecthood.html' title='Objecthood!'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-116198081090912544</id><published>2006-10-27T15:26:00.000-05:00</published><updated>2007-08-10T22:27:58.440-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stored procedures'/><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='queries'/><category scheme='http://www.blogger.com/atom/ns#' term='orm'/><category scheme='http://www.blogger.com/atom/ns#' term='nhibernate'/><title type='text'>Okey, things I miss about NHibernate</title><content type='html'>&lt;p&gt;Lately I have been working without a formal object relational mapping &lt;span style="font-style: italic;"&gt;(you know, using custom "hand made" business objects, and fetching data from the database using stored procedures&lt;/span&gt;)&lt;/p&gt; &lt;p&gt;Here are the things I miss from NHibernate:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Automatic caching of objects by primary key&lt;/li&gt; &lt;li&gt;Easy support for primary keys with multiple fields&lt;/li&gt; &lt;li&gt;Polymorphic Queries (&lt;span style="font-style: italic;"&gt;and all the benefits of persistent inheritance&lt;/span&gt;)&lt;/li&gt; &lt;li&gt;Queries with "." navigation "&lt;span style="font-style: italic;"&gt;object.Relationship.Relationship.Field = :parameter&lt;/span&gt;"&lt;/li&gt; &lt;li&gt;Prefecthing relationships: "load Products with their to one relationship with Vendor preloaded"&lt;/li&gt; &lt;li&gt;Easy pagination (&lt;em&gt;instead of trying to figure out how to do it in combination with stored procedures for a particular version of a particular database (&lt;span style="font-weight: bold;"&gt;that can be a real nightmare&lt;/span&gt;&lt;/em&gt;))&lt;/li&gt;&lt;li&gt;Interactive single and multicolumn sorting (&lt;span style="font-style: italic;"&gt;try to do it with stored procedures, and of course without cheating by using the &lt;a href="http://msdn2.microsoft.com/en-us/library/aa258848%28SQL.80%29.aspx"&gt;execute command&lt;/a&gt;&lt;/span&gt;, remember &lt;span style="font-style: italic;"&gt;if you use &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;execute&lt;/span&gt; all the so called "security benefits" of stored procedures vs dynamic sql dissapear&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;Concurrency support (&lt;span style="font-style: italic;"&gt;automatical increment of a "version" field when saving changes, even if those changes are not just field changes, but relationship changes, custom exception type for concurrency errors, optimistic locking&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Query by example (no need&lt;span class="Apple-style-span" style="font-style: italic;"&gt; to concatenate strings by hand based on whether a field is null, no need to worry about upper case or lower case comparision when comparing each field, no need to update a query definition if a column is added or dropped from a table&lt;/span&gt;)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;And, if somehow you have to work with a database that doesn't have support for stored procedures (&lt;span class="Apple-style-span" style="font-style: italic;"&gt;and you can't use NHibernate&lt;/span&gt;)... things get even more "interesting":&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Alias for ugly table names and ugly field names (instead of "&lt;em&gt;&lt;span class="Apple-style-span" style="font-family: courier new;"&gt;select * from PDT where  PCKT = 1&lt;/span&gt;&lt;/em&gt;" you write "&lt;em&gt;&lt;span class="Apple-style-span" style="font-family: courier new;"&gt;select * from Products where PackageType = 1&lt;/span&gt;&lt;/em&gt;"&lt;/li&gt; &lt;li&gt;Named Parameters: Instead of "&lt;em&gt;&lt;span class="Apple-style-span" style="font-family: courier new;"&gt;select * from PDT where  PCKT = ? and RQTY = ?&lt;/span&gt;"&lt;/em&gt; you can write: "&lt;em&gt;&lt;span class="Apple-style-span" style="font-family: courier new;"&gt;select * from Products where  PackageType= :packageType and RemainingQuantity = :remainingQuantity&lt;/span&gt;" &lt;/em&gt;this is specially a nightmare when one has to use OleDb, and it gets worse with Inserts or Updates: "&lt;em&gt;&lt;span class="Apple-style-span" style="font-family: courier new;"&gt;INSERT INTO PDT (NN,PCKT,RQTY,DRP,PRNBR) VALUES (?,?,?,?,?)&lt;/span&gt;&lt;/em&gt;" instead of the simple: "&lt;em&gt;&lt;span class="Apple-style-span" style="font-family: courier new;"&gt;s&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: courier new;"&gt;ession.save(product&lt;/span&gt;)&lt;/em&gt;"&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I will update this list as it increases...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-116198081090912544?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/116198081090912544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=116198081090912544' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116198081090912544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116198081090912544'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/10/okey-things-i-miss-about-nhibernate.html' title='Okey, things I miss about NHibernate'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-116139433916957221</id><published>2006-10-20T20:32:00.000-05:00</published><updated>2006-10-31T10:24:25.303-06:00</updated><title type='text'>Fixed "," problem with SmartAutoComplete</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;Going back to the &lt;a href="http://infinitiesloop.blogspot.com/2006/05/atlas-smart-auto-completion.html"&gt;"," problem&lt;/a&gt; the solution seems to be modifing this &lt;br&gt;in the SmartAutoCompleteExtender.cs&amp;nbsp; (remember to&amp;nbsp;add a reference to the&amp;nbsp;&lt;strong&gt;Microsoft.JScript.dll to use &lt;a href="http://luxspes.blogspot.com/2006/10/httputilityurlencode-is-not-equivalent.html"&gt;GlobalObject.escape instead of HttpUtility.UrlEncode&lt;/a&gt;&lt;/strong&gt;)  &lt;p&gt;&lt;em&gt;public string GetCallbackResult()&lt;br&gt;{&lt;br&gt;if (_completionItems == null)&lt;br&gt;return string.Empty; &lt;br&gt;for (int i = 0; i &amp;lt; _completionItems.Length; i++)&lt;br&gt;{&lt;br&gt;_completionItems[i] =&lt;strong&gt; (GlobalObject.escape(_completionItems[i])); &lt;/strong&gt;&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;}&lt;br&gt;string join = string.Join(",", _completionItems); &lt;br&gt;return join;&lt;br&gt;} &lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;And&lt;/em&gt; this in SmartAutoCompleteExtenderBehavior.js  &lt;p&gt;&lt;em&gt;this._onCallbackComplete = function(result, context)&lt;br&gt;{&lt;br&gt;var results = result.split(',');&lt;br&gt;var decodedResults = new Array();&lt;br&gt;for (var i=0; i&amp;lt;results.length; i++) { &lt;br&gt;decodedResults.push(&lt;strong&gt;unescape(results.getItem(i))&lt;/strong&gt;);&lt;br&gt;}&lt;br&gt;if(_enableCache)&lt;br&gt;{&lt;br&gt;if(!_cache)&lt;br&gt;_cache = { };&lt;br&gt;_cache[context] = decodedResults;&lt;br&gt;}&lt;br&gt;_autoCompleteBehavior._update(context, decodedResults, false);&lt;br&gt;}&lt;/em&gt;  &lt;p&gt;The trick is to "escape" things in C#... and "unescape" them in JavaScript (I hope this helps someone else with this issue, it works fine for me)  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-116139433916957221?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/116139433916957221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=116139433916957221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116139433916957221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116139433916957221'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/10/fixed-problem-with-smartautocomplete.html' title='Fixed &amp;quot;,&amp;quot; problem with SmartAutoComplete'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-116110663293978162</id><published>2006-10-17T12:37:00.001-05:00</published><updated>2010-01-26T23:40:19.245-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='expressions web designer'/><title type='text'>Microsoft Expressions Web Designer</title><content type='html'>&lt;p&gt;Downloaded it...&lt;/p&gt; &lt;p&gt;Looks great...&lt;/p&gt; &lt;p&gt;Great CSS support...&lt;/p&gt; &lt;p&gt;&lt;strong&gt;No&lt;/strong&gt; support for third party web controls...&lt;/p&gt; &lt;p&gt;&lt;strong&gt;No&lt;/strong&gt; support for web user controls (.ascx)...&lt;/p&gt; &lt;p&gt;&lt;strong&gt;No&lt;/strong&gt; visual support for skins...&lt;/p&gt; &lt;p&gt;Closed it...&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Wait and hope&lt;/strong&gt; that the released version is not as &lt;strong&gt;heavily limited&lt;/strong&gt; as the Beta1... right now is &lt;strong&gt;pretty useless&lt;/strong&gt; for any serious ASP.NET development&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-116110663293978162?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/116110663293978162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=116110663293978162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116110663293978162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/116110663293978162'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/10/microsoft-expressions-web-designer.html' title='Microsoft Expressions Web Designer'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-115980517400868867</id><published>2006-10-02T11:06:00.000-05:00</published><updated>2007-12-02T02:16:12.495-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RIA'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='csharp'/><title type='text'>Are we asking too much of WebApps?</title><content type='html'>&lt;p&gt;Currently in most enterprises, if an application has to be built... it will be built as a WebApp... what do I mean with "WebApp"? well you know, its an application with an HTML User Interface, (helped with a bit of JavaScript here an there). Everybody seems to think that is the best solution for all problems (no deployment, no client platform dependency, lots of programmers that "know-how" to build this kind of applications, lower security risks (no need to have a direct connection to the database from a remote client, no need to open special ports... only the well known 80 port).&lt;/p&gt; &lt;p&gt;But... are web apps really such a good idea? or it is just another example of "to a hammer every problem looks like a nail"?&lt;/p&gt; &lt;ul&gt; &lt;li&gt;You don't have to do deployment: well, that is such an advantage, no need to install, no need to update... but it has is dark side... the UI (that in most cases won't change often) has to travel with your data... and with the ever increasing need for more interactivity in the UI.. that means your really complex UI is going to travel to the client every time...&amp;nbsp; &lt;li&gt;No client platform dependency: Great, it can run in Windows, Linux, MacOS I don't have to worry right? ... wrong! you have to worry about browser compatibility, (will it work in firefox? will it work in explorer? will it work in safari?)  &lt;li&gt;Lots of cheap programmers that "know how"... (forthcoming)  &lt;li&gt;Lower security risks... (forthcoming)&lt;/li&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-115980517400868867?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/115980517400868867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=115980517400868867' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115980517400868867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115980517400868867'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/10/are-we-asking-too-much-of-webapps_02.html' title='Are we asking too much of WebApps?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-115859681637324574</id><published>2006-09-18T11:26:00.002-05:00</published><updated>2010-01-26T23:39:51.682-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>ASP.NET 2.0 Security... Damages Layer Separation</title><content type='html'>&lt;p&gt;I have been reading about "&lt;a href="http://www.technoag.com/2006/01/11/the-demise-of-the-security-application-block/"&gt;The Demise of the Security Application Block&lt;/a&gt;" and I quote:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;"&lt;em&gt;Specifically, the factories, interfaces and providers for authentication, roles and profile have been removed. Equivalent functionality is provided by the new System.Web.Security.Membership class and System.Web.Profile namespace&lt;/em&gt;."&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I think that is a really &lt;strong&gt;big mistake&lt;/strong&gt; architecturally speaking... why? well because System.Web.Security.Membership class and System.Web.Profile are for&lt;br /&gt;WEB applications, not for WindowsForms.NET applications, and authentication and authorization should be services independent of the presentation&lt;br /&gt;mechanism, the Security Application Block should wrap the System.Web.Security.Membership class and System.Web.Profile namespace functionalities&lt;br /&gt;and allow the developer to work in a presentation independent way (&lt;em&gt;or Microsoft should change System.Web.Security.Membership class and System.Web.Profile and make them&lt;br /&gt;System.Security.Membership class and System.Profile&lt;/em&gt;)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I think the easier thing to do is to bring back the the factories, interfaces and providers for authentication, roles and profile of the Security Application Block that provided this services without violating layer separation (&lt;em&gt;following the good example of&lt;/em&gt; &lt;a href="http://java.sun.com/products/jaas/"&gt;&lt;em&gt;JASS&lt;/em&gt;&lt;/a&gt;).&lt;/p&gt;&lt;br /&gt;&lt;p&gt;And perhaps, in the future the "revived" Security Application Block should be merged with .NET code... or a new presentation independent API named ".&lt;em&gt;NET Authentication and Authorization Service&lt;/em&gt;" (&lt;strong&gt;NASS&lt;/strong&gt;?) should be created...&lt;/p&gt;&lt;br /&gt;&lt;p&gt;What do you think?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-115859681637324574?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/115859681637324574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=115859681637324574' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115859681637324574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115859681637324574'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/09/aspnet-20-security-damages-layer.html' title='ASP.NET 2.0 Security... Damages Layer Separation'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-115859510265993716</id><published>2006-09-18T10:58:00.001-05:00</published><updated>2010-01-26T23:27:29.048-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='layering'/><category scheme='http://www.blogger.com/atom/ns#' term='msdn'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><title type='text'>Layer Separation Violation: Web Configuration Manager... one of ASP.NET 2.0 mistakes?</title><content type='html'>&lt;p&gt;The management of configuration in .NET applications was improved in .NET 2.0, now it is easier to have custom configuration sections, and we even have pre-built configuration section for Connection Strings (very useful for ADO.NET applications)&lt;/p&gt; &lt;p&gt;But... there are some design decisions I just don't get... "Configuration" is a separate concern from presentation (&lt;em&gt;configuration can be used to set UI behavior, but in my opinion, configuration is in a lower layer&lt;/em&gt;), but now we have the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.configuration.webconfigurationmanager.aspx"&gt;WebConfigurationManager&lt;/a&gt; for web applications and the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.configuration.configurationmanager.aspx"&gt;ConfigurationManager&lt;/a&gt; for client applications ... &lt;/p&gt; &lt;p&gt;From MSDN website: &lt;/p&gt; &lt;p&gt;&lt;em&gt;Using &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.configuration.webconfigurationmanager.aspx"&gt;WebConfigurationManager&lt;/a&gt; is the preferred way to work with configuration files related to Web applications. For client applications, use the &lt;/em&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.configuration.configurationmanager.aspx"&gt;&lt;em&gt;ConfigurationManager&lt;/em&gt;&lt;/a&gt;&lt;em&gt; class.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;First, I thought... "this is going to be a problem", now I won't be able to read configuration in the lower layers (&lt;em&gt;business facade, business rules, data access&lt;/em&gt;) without having to use my own proprietary "trick" to hide the fact that for those layers it is irrelevant whether the application has a WebUI or a WinUI... how could the .Net team make such a bad decision?&lt;/p&gt; &lt;p&gt;But then I realized... that i can use the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.configuration.configurationmanager.aspx"&gt;ConfigurationManager&lt;/a&gt; from an WebUI (ASP.NET Application) without any problem... so my lower layers don't suffer from contamination from the presentation mechanism...&lt;/p&gt; &lt;p&gt;But now i am wondering... If the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.configuration.configurationmanager.aspx"&gt;ConfigurationManager&lt;/a&gt; works perfectly... and doesn't tie my code to a particular presentation code... why should I use the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.configuration.webconfigurationmanager.aspx"&gt;WebConfigurationManager&lt;/a&gt;.... in fact... why should anyone use the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.configuration.webconfigurationmanager.aspx"&gt;WebConfigurationManager&lt;/a&gt; ? I just haven't figured out that...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-115859510265993716?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/115859510265993716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=115859510265993716' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115859510265993716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115859510265993716'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/09/layer-separation-violation-web.html' title='Layer Separation Violation: Web Configuration Manager... one of ASP.NET 2.0 mistakes?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-115784012305063290</id><published>2006-09-09T17:15:00.000-05:00</published><updated>2006-09-13T13:44:39.713-05:00</updated><title type='text'>The Tao of the Software Architect</title><content type='html'>&lt;p&gt;Today I read about the &lt;a href="http://www.sei.cmu.edu/architecture/index.html"&gt;Software Architect role&lt;/a&gt; in the SEI website, and I found a lot of very useful information:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://www.sei.cmu.edu/architecture/essential_bookshelf.html"&gt;Books that an architect should read&lt;/a&gt;  &lt;li&gt;&lt;a href="http://www.sei.cmu.edu/architecture/essays.html"&gt;Essays&lt;/a&gt;  &lt;li&gt;&lt;a href="http://www.sei.cmu.edu/architecture/arch_curriculum.html"&gt;Ways to become certified or accredited as a person than can create or evaluate architecture&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;And, the essay that&amp;nbsp;I liked the most was "&lt;a href="http://www-128.ibm.com/developerworks/rational/library/4032.html"&gt;The Tao of the Software Architect&lt;/a&gt;" (&lt;em&gt;That can also be found in IBM website&lt;/em&gt;)&lt;/p&gt; &lt;p&gt;From the "The Tao for the software architect" I specially liked this part:&lt;/p&gt; &lt;p&gt;&lt;em&gt;When the &lt;strong&gt;process&lt;/strong&gt; is lost, there is &lt;strong&gt;good practice&lt;/strong&gt;.&lt;br&gt;When &lt;strong&gt;good practice&lt;/strong&gt; is lost, there are &lt;strong&gt;rules&lt;/strong&gt;.&lt;br&gt;When &lt;strong&gt;rules&lt;/strong&gt; are lost, there is &lt;strong&gt;ritual&lt;/strong&gt;.&lt;br&gt;&lt;strong&gt;Ritual&lt;/strong&gt; is the beginning of &lt;strong&gt;chaos&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;I have seen places where ritual has taken control of everything, and people there believe they are doing things right, because they are following the ritual, but they don't realize that they are in chaos,&amp;nbsp; because they no longer understand why are they doing what they do... and that is really bad, because they don't look for ways to get out of the chaos, because they think that what they do is fine, because they are following the ritual (&lt;em&gt;even if the&amp;nbsp;ritual&amp;nbsp; doesn't achieve anything valuable for the organization&lt;/em&gt;)&lt;/p&gt; &lt;p&gt;Another part i also liked a lot is this: &lt;/p&gt; &lt;p&gt;&lt;em&gt;If you want to be a great leader,&lt;br&gt;stop trying to control.&lt;br&gt;Let go of fixed plans and concepts and&lt;br&gt;the team will govern itself.&lt;br&gt;The more prohibitions you have,&lt;br&gt;the less disciplined the team will be.&lt;br&gt;The more you coerce,&lt;br&gt;the less secure the team will be.&lt;br&gt;The more external help you call,&lt;br&gt;the less self-reliant the team will be.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;I believe I have that problem, sometimes&amp;nbsp;I&amp;nbsp;become a "control freak" and want everything to be built the way I say it, in the time I say it, exactly as I say it... but, as I gain experience I am starting to realize that is not the way to build a system, to be a good architect I have to help set a process that will be used to build the system, and make sure that the process is followed and that the processes evolves with the team and the system being built and at the same time get out of the way and let the team flourish... &lt;/p&gt; &lt;p&gt;As with most of this Zen-like things.. the truth is somewhere in the middle:&lt;/p&gt; &lt;p&gt;Too little control and you will have chaos, too much&amp;nbsp;&amp;nbsp;control...specially just for the sake of following the ritual...&amp;nbsp;and you will negatively affect the team motivation, creativity... and productivity.&lt;/p&gt; &lt;p&gt;I guess I need to find the Middle Path for Software Architecture...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-115784012305063290?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/115784012305063290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=115784012305063290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115784012305063290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115784012305063290'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/09/tao-of-software-architect.html' title='The Tao of the Software Architect'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-115766715170331920</id><published>2006-09-07T17:00:00.001-05:00</published><updated>2010-01-26T23:38:53.788-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='administration'/><title type='text'>Administering an ASP.NET WebSite</title><content type='html'>Hi! One of my friends showed me how to access the ASP.NET Administration WebSite without calling it from within VS.NET:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Create a virtual directory ASP.NETWebAdminFiles in IIS that point to &lt;span style="font-weight: bold;"&gt;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Open properties windows of the new virtual directory, make sure that it is configured to run with &lt;span style="font-weight: bold;"&gt;ASP.NET 2.0&lt;/span&gt;, and in &lt;span style="font-weight: bold;"&gt;Security tab&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;uncheck Anonymous Access, check Integrated Windows Authentication.&lt;/span&gt; After that, you will be able to connect to WebAdminTools using the following syntax &lt;span style="font-weight: bold;"&gt;http://localhost/ASP.NETWebAdminFiles/default.aspx?applicationPhysicalPath=XXX&amp;amp;applicationUrl=/YYY&lt;/span&gt; in my case, it is: &lt;span style="font-weight: bold;"&gt;http://localhost/ASP.NETWebAdminFiles/default.aspx?applicationPhysicalPath=D:\Tasks\Libranyon\Photonyon\&amp;amp;applicationUrl=/Photonyon&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; Although I don't recommend to do it, if you want to access WebAdminTool from other computer, open &lt;span style="font-weight: bold;"&gt;WebAdminPage.cs&lt;/span&gt; from (&lt;span style="font-weight: bold;"&gt;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\App_Code&lt;/span&gt;) and comment the following code block  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:'Courier New';font-size:10pt;color:blue;"   lang="EN-US" &gt;if&lt;/span&gt;&lt;span style=";font-family:'Courier New';font-size:10pt;"  lang="EN-US" &gt; (!application.Context.Request.IsLocal) {&lt;o:p&gt;&lt;/o:p&gt; &lt;/span&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:'Courier New';font-size:10pt;"  lang="EN-US" &gt;&lt;span&gt;&lt;/span&gt;&lt;span style="color:teal;"&gt;SecurityException&lt;/span&gt; securityException = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:teal;"&gt;SecurityException &lt;/span&gt;( (&lt;span style="color:blue;"&gt;string&lt;/span&gt;) HttpContext.GetGlobalResourceObject( &lt;span style="color:maroon;"&gt;"GlobalResources"&lt;/span&gt;, &lt;span style="color:maroon;"&gt;"WebAdmin_ConfigurationIsLocalOnly"&lt;/span&gt; ));&lt;o:p&gt;&lt;/o:p&gt; &lt;span&gt;&lt;/span&gt;WebAdminPage.SetCurrentException(application.Context, securityException);&lt;o:p&gt;&lt;/o:p&gt; &lt;span&gt;&lt;/span&gt;application.Server.Transfer(&lt;span style="color:maroon;"&gt;"~/error.aspx"&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:'Courier New';font-size:10pt;"  lang="EN-US" &gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:'Courier New';font-size:10pt;"  &gt;}&lt;/span&gt;&lt;/p&gt;&lt;span style="font-weight: bold;"&gt;WebAdminTool &lt;/span&gt;still be protected by Integrated Windows Authentication, so you still some have some defense here. I have found this same instructions &lt;a href="http://www.chat11.com/ASP.Net_User_Management"&gt;here&lt;/a&gt;, so I guess my friend got them from there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-115766715170331920?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/115766715170331920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=115766715170331920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115766715170331920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115766715170331920'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/09/administering-aspnet-website.html' title='Administering an ASP.NET WebSite'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-115716198562576684</id><published>2006-09-01T20:49:00.001-05:00</published><updated>2010-01-26T23:36:34.617-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bugs'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='reshaper'/><category scheme='http://www.blogger.com/atom/ns#' term='refactoring'/><title type='text'>Refactoring Bug in VS.NET 2005</title><content type='html'>Every time you modify the name of an element in a webform, it triggers refactoring&lt;br /&gt;and checks all  the project... and that is just plain not necessary...  it is a&lt;br /&gt;really really annoying bug! Perhaps they will &lt;a href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=92239"&gt;fix it in a future release&lt;/a&gt;.... I just&lt;br /&gt;hope I could turn off all VS.NET refactorings... (and let &lt;a href="http://www.jetbrains.com/resharper/"&gt;Reshaper&lt;/a&gt; do the job)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-115716198562576684?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/115716198562576684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=115716198562576684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115716198562576684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115716198562576684'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/09/refactoring-bug-in-vsnet-2005.html' title='Refactoring Bug in VS.NET 2005'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-115704999455142094</id><published>2006-08-31T13:43:00.000-05:00</published><updated>2006-09-07T21:25:33.390-05:00</updated><title type='text'>Extreme Normal Form</title><content type='html'>&lt;p&gt;Today I read about "&lt;a href="http://c2.com/cgi/wiki?ExtremeNormalForm"&gt;Extreme Normal Form&lt;/a&gt;"... and well I really liked it: &lt;/p&gt; &lt;p&gt;&lt;em&gt;Your classes are small and your methods are small;&lt;br&gt; you've said everything &lt;/em&gt;&lt;a href="http://c2.com/cgi/wiki?OnceAndOnlyOnce"&gt;&lt;em&gt;OnceAndOnlyOnce&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and you've removed the last piece of unnecessary code.&lt;br&gt; Somewhere far away an Aikido master stands in a quiet room.&lt;br&gt; He is centered.. aware.. ready for anything.&lt;br&gt; Outside a sprinter shakes out her legs and settles into the block, waiting for the crack of the gun while a cool wind arches across the track.&lt;br&gt; Softly, a bell sounds.. all your tests have passed.&lt;br&gt; Your code is in &lt;/em&gt;&lt;a href="http://c2.com/cgi/wiki?ExtremeNormalForm"&gt;&lt;em&gt;ExtremeNormalForm&lt;/em&gt;&lt;/a&gt;&lt;em&gt;... tuned to today and poised to strike at tomorrow.&lt;/em&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;I also liked a lot &lt;a href="http://c2.com/cgi/wiki?OnceAndOnlyOnce"&gt;OnceAndOnlyOnce&lt;/a&gt; balances &lt;a href="http://c2.com/cgi/wiki?YouArentGonnaNeedIt"&gt;YouArentGonnaNeedIt&lt;/a&gt;. I have never liked the idea of applying &lt;a href="http://c2.com/cgi/wiki?YouArentGonnaNeedIt"&gt;YouArentGonnaNeedIt&lt;/a&gt; by itself, but now I believe that by using &lt;a href="http://c2.com/cgi/wiki?OnceAndOnlyOnce"&gt;OnceAndOnlyOnce&lt;/a&gt; a good balance can be achieved. Read it &lt;a href="http://c2.com/cgi/wiki?OaooBalancesYagni"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-115704999455142094?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/115704999455142094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=115704999455142094' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115704999455142094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/115704999455142094'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/08/extreme-normal-form.html' title='Extreme Normal Form'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114831378287868459</id><published>2006-05-22T10:34:00.001-05:00</published><updated>2010-01-26T23:36:02.770-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stored procedures'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='object oriented'/><category scheme='http://www.blogger.com/atom/ns#' term='god object'/><category scheme='http://www.blogger.com/atom/ns#' term='silver bullet'/><title type='text'>OMG: Object Orientation and Stored Procedures</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Oh_my_God%21"&gt;OMG!&lt;/a&gt; how many times have I read the argument "using stored procedures is object oriented programming" just think of the database as an object, and think that each stored procedure is an method of the database....&lt;br /&gt;Now... I am &lt;span style="font-weight: bold;"&gt;not&lt;/span&gt; going to say that using stored procedures is wrong... and I am &lt;span style="font-weight: bold;"&gt;not&lt;/span&gt; going to say that the only correct way of solving software problems is using object orientation... ( &lt;span style="font-style: italic;"&gt;I do prefer to use object orientation, I a do prefer to use an object relational mapper instead of a stored procedures&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;specially for &lt;a href="http://en.wikipedia.org/wiki/OLTP"&gt;OLTP&lt;/a&gt; application&lt;/span&gt;s, &lt;span style="font-style: italic;"&gt;I think application built that way are more maintainable, more portable between database, can be built faster, scale better, etc,etc&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;But for batch processing, stored procedures have a clear advantage, and in my experience many business problems are solved by using an OLTP application, and a short but very important list of batch process... (&lt;span style="font-style: italic;"&gt;of course the problem here is that if you built you application using an ORM, probably you have a lot of you business logic already implemented in a presentation-independent form, and, depending on the size of you database, you could program you batch process using your business objects... that has its disadvantages (&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;slower performance that stored procedures&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;) and its advantages (&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;reutilization&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;)... I believe reutilization and maintenance are more important that performance... specially because it is possible to worry about performance in the wrong way: for example &lt;a href="http://en.wikipedia.org/wiki/Optimization_%28computer_science%29#When_to_optimize"&gt;Premature Optimization&lt;/a&gt;&lt;/span&gt; )&lt;br /&gt;&lt;br /&gt;But the main point of this post, is that, first, I didn't think that using stored procedures was object oriented programming... it was "procedural programming"... or perhaps even "relational programming" but certainly not object oriented programming (&lt;em&gt;where is the inheritance? where is the polymorphism?&lt;/em&gt;) but... after giving it some more thought... I realized that while it could not be "&lt;strong&gt;&lt;a href="http://en.wikipedia.org/wiki/Object-oriented_programming"&gt;object oriented&lt;/a&gt;&lt;/strong&gt;" it could be "&lt;strong&gt;&lt;a href="http://en.wikipedia.org/wiki/Object-based_language"&gt;object based&lt;/a&gt;&lt;/strong&gt;"... stored procedures can encapsulate your tables (&lt;em&gt;one of the major advantages of stored procedures&lt;/em&gt;) and you can see them as methods to a your "database" object...&lt;br /&gt;&lt;br /&gt;So... now... your (OLTP?) system is a thin presentation layer on top of the "database object"... now... is there something in favor... or against that in object oriented design theory?.... mmm.... it achieves Presentation/Business Logic separation... and that is good... but I still feel there is something that doesn't feel right...&lt;br /&gt;&lt;br /&gt;OMG! Well, it turns out there is! : Now the database is a &lt;a href="http://en.wikipedia.org/wiki/God_object"&gt;God Object.&lt;/a&gt;&lt;br /&gt;From Wikipedia: &lt;span style="font-style: italic;"&gt;A&lt;/span&gt; &lt;strong style="font-style: italic;"&gt;God object&lt;/strong&gt; &lt;span style="font-style: italic;"&gt;is an object that knows&lt;/span&gt; &lt;em style="font-style: italic;"&gt;too much&lt;/em&gt; &lt;span style="font-style: italic;"&gt;or does&lt;/span&gt; &lt;em style="font-style: italic;"&gt;too much&lt;/em&gt;&lt;span style="font-style: italic;"&gt;. The God object is an example of an anti-pattern&lt;/span&gt;, it goes against &lt;a href="http://en.wikipedia.org/wiki/Divide_and_conquer_algorithm"&gt;divide &amp;amp; conquer&lt;/a&gt; ... using a God object is analogue of failing to use &lt;a href="http://en.wikipedia.org/wiki/Subroutine" title="Subroutine"&gt;subroutines&lt;/a&gt; in procedural programming languages, because so much code references it, it makes maintenance difficult...&lt;br /&gt;&lt;br /&gt;So... the next time someone tells you that using stored procedures is good object oriented programming... you could answer him or her: &lt;span style="font-weight: bold;"&gt;Oh My God (Object)&lt;/span&gt;! (&lt;em&gt;You could think of it as &lt;strong&gt;object based&lt;/strong&gt;, but, form an object oriented point if view.. it is a recommended solution? couldn't it be seen as an &lt;strong&gt;anti-pattern&lt;/strong&gt;? I am &lt;strong&gt;not&lt;/strong&gt; saying it is &lt;strong&gt;wrong&lt;/strong&gt;, I am just saying that from an object oriented point of view, &lt;strong&gt;it might not be the best way to solve the problem&lt;/strong&gt;... of course, using object orientation might not be the right way to solve this particular problem, after all, object orientation is not a&lt;/em&gt; &lt;a href="http://en.wikipedia.org/wiki/Silver_bullet"&gt;&lt;em&gt;Silver Bullet&lt;/em&gt;&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114831378287868459?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114831378287868459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114831378287868459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114831378287868459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114831378287868459'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/05/omg-object-orientation-and-stored.html' title='OMG: Object Orientation and Stored Procedures'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114783321690472876</id><published>2006-05-16T21:31:00.001-05:00</published><updated>2010-01-26T23:34:34.114-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='installation'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='crystal reports'/><category scheme='http://www.blogger.com/atom/ns#' term='windowsforms.net'/><title type='text'>Installing Crystal Reports for VS.NET 2005</title><content type='html'>&lt;p&gt;After wasting several hours, it turns out that, before installing a WindowsForms for .NET 2.0 application that requires CrystalReports, one needs to install &lt;strong&gt;CRRedist2005_x86.msi&lt;/strong&gt; from &lt;strong&gt;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\CrystalReports&lt;/strong&gt; it should be easier to find...&lt;/p&gt; &lt;p&gt;In that folder there is also a &lt;strong&gt;product.xml&lt;/strong&gt; that could be for bootstrapping the &lt;strong&gt;CRRedist2005_x86.msi&lt;/strong&gt; with you own .msi so that you can install everything in one step (&lt;em&gt;well, I think it is for that&lt;/em&gt;) I have to do more research...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114783321690472876?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114783321690472876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114783321690472876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114783321690472876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114783321690472876'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/05/installing-crystal-reports-for-vsnet.html' title='Installing Crystal Reports for VS.NET 2005'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114767674448155858</id><published>2006-05-15T02:05:00.000-05:00</published><updated>2006-05-15T02:42:17.246-05:00</updated><title type='text'>Frederik Gheysels' weblog</title><content type='html'> &lt;p&gt;&lt;a href="http://fgheysels.blogspot.com/"&gt;Frederik Gheysels' weblog&lt;/a&gt; &lt;br/&gt; &lt;br/&gt; It was almost as if I heard myself complaining about the bad design most RAD tools promote... what I wonder is.. why couldn't RAD tools promote doing it in "the right way" with proper MVC separation and everything.... &lt;br/&gt; &lt;br/&gt; It is like the new Java Studio Creator for Sun, the first version copied the DataSet idea from VS.NET and copied it IMHO in the worst possible may (by assuming incorrectly that .NET databinding only worked for the DataSet and not for any .NET object... it is true that it seems like that on the first look, but if you analyze the API closer, you can see it is biased to make it easier for the DataSet, but it does allows for pure object databinding... and what do the Sun guys do? they make it only work for tables! without object support! (&lt;em&gt;they tried to fix it for Java Studio Creator 2, but the object-view has a &lt;strong&gt;bug&lt;/strong&gt; that makes it unusable... I just cant believe it, how could they make such a mistake having really good ORM tools like Hibernate, EOF, Castor o Cayenne, I was expecting full object databinding from them... but, until now, there is nothing close to .NET databinding in the Java world&lt;/em&gt;)&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114767674448155858?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114767674448155858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114767674448155858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114767674448155858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114767674448155858'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/05/frederik-gheysels-weblog.html' title='Frederik Gheysels&apos; weblog'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114766116097728583</id><published>2006-05-14T21:46:00.000-05:00</published><updated>2006-05-14T21:46:01.190-05:00</updated><title type='text'>Esteban's Blog (A Delphi Programming dedicated blog): Ad Hoc SQL vs Stored Procedures</title><content type='html'>&lt;a href="http://estebanp.blogspot.com/2005/05/ad-hoc-sql-vs-stored-procedures.html#comments"&gt;Esteban's Blog (A Delphi Programming dedicated blog): Ad Hoc SQL vs Stored Procedures&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I am happy I found this blog entry, I have been looking for a disscusion about Ad Hoc SQL vs Stored Procedures it is important to know both sides of the discussion, so that the next time it is necesary to choose, one can provide the best possible solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114766116097728583?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114766116097728583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114766116097728583' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114766116097728583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114766116097728583'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/05/estebans-blog-delphi-programming.html' title='Esteban&apos;s Blog (A Delphi Programming dedicated blog): Ad Hoc SQL vs Stored Procedures'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114757416850952884</id><published>2006-05-13T21:33:00.000-05:00</published><updated>2006-05-15T02:40:30.316-05:00</updated><title type='text'>Why can't Hibernate just load objects on demand?</title><content type='html'> &lt;p&gt;&lt;span class="postbody"&gt;Today I was reading: &lt;a href="http://hibernate.org/43.html#A10"&gt;Why can't Hibernate just load objects on demand&lt;/a&gt;? &lt;br/&gt; I find some of its affirmations interesting (I realize this is kind of a sensitive topic, but I just don't feel that the information there is convincing enough, specially if you have used other ORM that do have distributed non-transactional lazy loading: &lt;br/&gt; &lt;br/&gt;&lt;/span&gt;&lt;/p&gt; &lt;table cellpadding="3" width="100%" align="center" cellspacing="1" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="quote"&gt;&lt;br/&gt; &lt;em&gt;If Hibernate would, hidden from the developer and outside of any transaction demarcation, start random database connections and transactions, why have transaction demarcation at all?&lt;/em&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;span class="postbody"&gt;&lt;br/&gt; &lt;br/&gt; That really is a very good question, what exactly it is so good about having transaction demarcation? (wouldn't it be better to have "automatic transactional demarcation"?) like this:&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;br/&gt; &lt;code&gt;Customer newCustomer = &lt;strong&gt;new&lt;/strong&gt; Customer(EcoSpace); &lt;br/&gt; newCustomer.Name = "&lt;span style="COLOR: #0000ff"&gt;Air Software Ltd&lt;/span&gt;"; &lt;br/&gt; newCustomer.Telephone = &lt;span style="COLOR: #0000ff"&gt;"+44 (0)121 243 6689&lt;/span&gt;"; &lt;br/&gt; &lt;br/&gt; TelephoneNumber alternateTelephoneNumber = &lt;strong&gt;new&lt;/strong&gt; TelephoneNumber(EcoSpace); &lt;br/&gt; alternateTelephoneNumber.Name := "&lt;span style="COLOR: #0000ff"&gt;Home number&lt;/span&gt;"; &lt;br/&gt; alternateTelephoneNumber.Number = &lt;span style="COLOR: #0000ff"&gt;"+44 (0)121 999 9999&lt;/span&gt;"; &lt;br/&gt; newCustomer.ContactDetails.Add(alternateTelephoneNumber) &lt;br/&gt; &lt;br/&gt; EcoSpace.UpdateDatabase();&lt;/code&gt; &lt;br/&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="postbody"&gt;Wouldn't it be better, if, as we have the Session, and the transactions...we could have an equivalent to &lt;span style="TEXT-DECORATION: underline"&gt;&lt;a href="http://bdn.borland.com/article/33259#WhatIsAnEcoSpace" class="postlink" target="_blank"&gt;ECO's EcoSpace&lt;/a&gt;?&lt;/span&gt; &lt;br/&gt; &lt;br/&gt; (&lt;strong&gt;Important Note&lt;/strong&gt;: &lt;strong&gt;I am NOT saying ECO is better than NHibernate&lt;/strong&gt;, in fact I had to choose between the two for a project, &lt;strong&gt;and IMO NHibernate was a better choice&lt;/strong&gt;, because its mapping capabilities for legacy databases are far superior, and its lower level session/transaction base API gave me more control, and HQL is IMO more powerful than OCL... &lt;strong&gt;but not all projects need that level of control&lt;/strong&gt;, and... specially for new projects that do not need to interoperate with legacy apps, or that will have full control of the database ECO could be a much better alternative because of its easier to use API with automatic transactional demarcation and non-transactional lazy loading)&lt;/span&gt;&lt;/p&gt; &lt;table cellpadding="3" width="100%" align="center" cellspacing="1" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="quote"&gt;&lt;br/&gt; &lt;em&gt;What happens when Hibernate opens a new database connection to load a collection, but the owning entity has been deleted meanwhile?&lt;/em&gt; &lt;br/&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;span class="postbody"&gt;&lt;br/&gt; I guess in that case it should throw an exception... but I don't see this a justification for transaction demarcation... IMHO the same problem can happen with regular "manual session opening an closing" &lt;br/&gt; &lt;br/&gt;&lt;/span&gt;&lt;/p&gt; &lt;table cellpadding="3" width="100%" align="center" cellspacing="1" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="quote"&gt;&lt;em&gt;(Note that this problem does not appear with the two-transaction strategy as described above [in the question Can I use two transactions in one Session?] - the single Session provides repeatable reads for entities.)&lt;/em&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;span class="postbody"&gt;&lt;br/&gt; Yes, but that also means I need to have a session and transaction open during user think time... &lt;br/&gt; &lt;br/&gt;&lt;/span&gt;&lt;/p&gt; &lt;table cellpadding="3" width="100%" align="center" cellspacing="1" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="quote"&gt;&lt;em&gt;Why even have a service layer when every object can be retrieved by simply navigating to it?&lt;/em&gt; &lt;br/&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;span class="postbody"&gt;That is really a problematic question... in fact... the question is my point exactly... why should I bother having a service layer if every object can be retrieved by simply navigating to it? IMHO not having to build a service layer sound like a good thing... doesn't it? &lt;br/&gt; &lt;br/&gt; &lt;br/&gt;&lt;/span&gt;&lt;/p&gt; &lt;table cellpadding="3" width="100%" align="center" cellspacing="1" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="quote"&gt;&lt;em&gt;All of this leads to no solution, because Hibernate is a service for online transaction processing (and certain kinds of batch operations) and not a "streaming objects from some persistent data store in undefined units of work"-service. Also, in addition to the n+1 selects problem, do we really need an n+1 transaction and connection problem? &lt;br/&gt;&lt;/em&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;span class="postbody"&gt;So... that means... that if we want distributed non-transactional lazy loading we should build a &lt;span style="FONT-STYLE: italic"&gt;streaming objects from some persistent data store in undefined units of work service&lt;/span&gt;? is that what other ORMs (like Borland ECO or Apple's EOF are? who draws the line? I know that the owners of Hibernate are free to choose, but is this decision theoretically supported? I'd like to know how...) &lt;br/&gt; &lt;br/&gt; &lt;br/&gt;&lt;/span&gt;&lt;/p&gt; &lt;table cellpadding="3" width="100%" align="center" cellspacing="1" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="quote"&gt;&lt;em&gt;The solution for this issue is of course proper unit of work demarcation and design, supported by possibly an interception technique as shown in the pattern here, and/or the correct fetch technique so that all required information for a particular unit of work can be retrieved with minimum impact, best performance, and scalability.&lt;/em&gt; &lt;br/&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;span class="postbody"&gt;Yes, but OpenSessionInView is only a good idea if you are building a web application.. and if you want only one transaction per request/response cycle... if you UI deviates from that... then it is no longer such a good idea... &lt;br/&gt; &lt;br/&gt; &lt;br/&gt;&lt;/span&gt;&lt;/p&gt; &lt;table cellpadding="3" width="100%" align="center" cellspacing="1" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="quote"&gt;Note: Some people still believe that this pattern creates a dependency between the presentation layer and Hibernate. It does not...&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;span class="postbody"&gt;&lt;br/&gt; &lt;em&gt;Well, then, why OpenSessionInView isn't a good idea for interactive UIs in smartclients? isn't changing form ASP.NET to WindowsForms a change on the presentation layer? so.. If i built my application to share its business logic between a WindowsForms and an ASP.NET presentation and I am going to have problems... then that means I am tied to a particular presentation layer... isn't it?&lt;/em&gt;&lt;/span&gt; &lt;br/&gt; &lt;br/&gt;&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114757416850952884?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114757416850952884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114757416850952884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114757416850952884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114757416850952884'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/05/why-cant-hibernate-just-load-objects.html' title='Why can&apos;t Hibernate just load objects on demand?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114756491836362954</id><published>2006-05-13T18:52:00.001-05:00</published><updated>2010-02-18T19:04:17.134-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='orm'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='ECO'/><category scheme='http://www.blogger.com/atom/ns#' term='bem'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='EOF'/><title type='text'>Object Relational Mapper vs Business Entity Manager</title><content type='html'>&lt;p&gt;&lt;span class="postbody"&gt;In my opinion the best two are &lt;span style="font-weight: bold;"&gt;Hibernate&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;EOF&lt;/span&gt;, I think a mix between them could create "&lt;strong&gt;the ultimate&lt;/strong&gt;" Object Relational Mapper... or the ultimate Business Entity Manager...?&lt;br /&gt;&lt;br /&gt;EOF (the best BEM?)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Enterprise_Objects_Framework"&gt;General Overview&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://developer.apple.com/documentation/WebObjects/Enterprise_Objects/"&gt;Manual&lt;/a&gt;&lt;br /&gt;&lt;/li&gt; &lt;/ul&gt; &lt;span class="postbody"&gt;Hibernate (the best ORM?)&lt;br /&gt;&lt;/span&gt; &lt;ul&gt; &lt;li&gt;&lt;span class="postbody"&gt;&lt;a href="http://www.hibernate.org/"&gt;General Overview&lt;/a&gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="postbody"&gt;&lt;a href="http://www.hibernate.org/5.html"&gt;Manual&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt; &lt;span class="postbody"&gt;&lt;span class="postbody"&gt;&lt;br /&gt;An interesting topic for analysis could be the limits between an Object Relational Mapper and an Business Entity Manager. Some people think that Hibernate shouldn't evolve to become more like EOF, because it should aim &lt;span style="font-style: italic;"&gt;to do one and only one thing (be the best ORM)&lt;/span&gt; and other people think that it would be nice to have the services that an Business Entity Manager gives you:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; &lt;ul&gt; &lt;li&gt;&lt;span class="postbody"&gt;automatic connection handling&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="postbody"&gt;automatic transactions handling&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="postbody"&gt;multiple undo levels&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="postbody"&gt;real nested transactions&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="postbody"&gt;client and server objects&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="postbody"&gt;distributed non-transactional lazy loading&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="postbody"&gt;etc,etc&lt;br /&gt;&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt; &lt;span class="postbody"&gt;&lt;br /&gt;There are also some people that think that a Business Entity Manager is more closer to the MDA "objective", so I think it is important to take a look at (&lt;a href="http://bdn.borland.com/article/0,1410,30375,00.html"&gt;Using Borland's ECO to develop model-powered applications for .NET&lt;/a&gt;) an many &lt;a href="http://bdn.borland.com/delphi/eco"&gt;related articles&lt;/a&gt;, the specially interesting thing for me about ECO is its &lt;a href="http://en.wikipedia.org/wiki/Object_Constraint_Language"&gt;OCL&lt;/a&gt; support (&lt;span style="font-style: italic;"&gt;that can be used, for example to configure constraints that help ensuring that only consistent data is saved into the database... it is kind of a &lt;a href="http://archive.eiffel.com/doc/manuals/technology/contract/"&gt;Design by Contract&lt;/a&gt; for the domain model&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;IMO the &lt;a href="http://www.castleproject.org/index.php/ActiveRecord"&gt;Active Record&lt;/a&gt; pattern is getting too much popularity (&lt;span style="font-style: italic;"&gt;perhaps thanks to &lt;a href="http://www.rubyonrails.org/"&gt;&lt;span style="font-weight: bold;"&gt;Ruby&lt;/span&gt;&lt;/a&gt; , but I think it leads to an &lt;a href="http://www.martinfowler.com/bliki/AnemicDomainModel.html"&gt;anemic domain model&lt;/a&gt;&lt;/span&gt; ) and Domain Model based in Business Entity Managers is not as popular (&lt;span style="font-style: italic;"&gt;thanks to the problems in EJB1 and EJB2&lt;/span&gt;) but it is important to remember that &lt;span style="font-weight: bold;"&gt;EJB is not the only way&lt;/span&gt; to build an Business Entity Manager, there are ways to build Business Entity Managers that are a lot &lt;span style="font-weight: bold;"&gt;more lightweight and user friendly&lt;/span&gt; than EJB, (just investigate more about &lt;span style="font-weight: bold;"&gt;EOF and ECO&lt;/span&gt;)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114756491836362954?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114756491836362954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114756491836362954' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114756491836362954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114756491836362954'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/05/object-relational-mapper-vs-bussines.html' title='Object Relational Mapper vs Business Entity Manager'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114713421376731377</id><published>2006-05-08T19:21:00.000-05:00</published><updated>2006-05-08T19:23:55.423-05:00</updated><title type='text'>NG-UIPAB V3 Alpha 3... UnitTesting!</title><content type='html'> &lt;p&gt;Hi! &lt;br/&gt; This releases has several minor bug fixes, the majority of them because I have upgraded the UnitTests for UIPAB 2.0 and that allowed me to test all the changes the UIP has suffered in my hands. This will make it easier to add new features without the fear of finding I broke something important.&lt;/p&gt; &lt;p&gt;The majority of the bugs fixed were related to the difference between the HybridDictionary and the new generic Dictionary&amp;lt;K,V&amp;gt; with an HybridDictionary it as right to ask for an unknown key:&lt;/p&gt; &lt;p&gt;if(hybridDictionaryInstance["&lt;span style="COLOR: #0000ff"&gt;SomeUnknownKey&lt;/span&gt;"]==null) {&lt;/p&gt; &lt;p&gt;//The SomeUnknonwKey is not in the HybridDictionary&lt;/p&gt; &lt;p&gt;}&lt;/p&gt; &lt;p&gt;But in .NET 2.0, that code throws a "Key not found" exception and I have to:&lt;/p&gt; &lt;p&gt;if(!genericDictionaryInstance.ContainsKey("&lt;span style="COLOR: #0000ff"&gt;SomeUnknownKey&lt;/span&gt;")) {&lt;/p&gt; &lt;p&gt;//The SomeUnknownKey is not in the Generic Dictionary&lt;/p&gt; &lt;p&gt;}&lt;/p&gt; &lt;p&gt;The other problem was WindowsFormViewManager.GetCurrentViews(taskId) I am sure that my choice for return type was the correct one (IDictionary&amp;lt;string, IList&amp;lt;WindowsFormView&amp;gt;&amp;gt;) but it seems to be consistent with my interpretation of the internal workings of the UIPAB&lt;/p&gt; &lt;p&gt;So, in the test, where it said:&lt;/p&gt; &lt;p&gt;Hashtable views = WindowsFormViewManager.GetCurrentViews(taskId);&lt;/p&gt; &lt;p&gt;Now says:&lt;/p&gt; &lt;p&gt;IDictionary&amp;lt;string, IList&amp;lt;WindowsFormView&amp;gt;&amp;gt; views; &lt;br/&gt; views = WindowsFormViewManager.GetCurrentViews(taskId);&lt;/p&gt; &lt;p&gt;And, where it said:&lt;/p&gt; &lt;p&gt;views["&lt;span style="COLOR: #0000ff"&gt;name&lt;/span&gt;"];&lt;/p&gt; &lt;p&gt;it now says:&lt;/p&gt; &lt;p&gt;view["&lt;span style="COLOR: #0000ff"&gt;name&lt;/span&gt;"][0]&lt;/p&gt; &lt;p&gt;But I am not that convinced about the usability of this structure... perhaps I should simplify it in the next release. (The previous code IMO seems to handle this in an inconsistent way... some code assumes that the view is a dictionary strings and WindowsFormViews, and other code assumes that the key is a string, but the value is an IList... I guess i need to analyze this more thoughtfully&lt;/p&gt; &lt;p&gt;&lt;br/&gt; &lt;br/&gt;&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114713421376731377?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114713421376731377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114713421376731377' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114713421376731377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114713421376731377'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/05/ng-uipab-v3-alpha-3.html' title='NG-UIPAB V3 Alpha 3... UnitTesting!'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114699417496488715</id><published>2006-05-07T04:27:00.001-05:00</published><updated>2010-02-18T19:02:25.408-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ui design'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><title type='text'>UI Design: The principle of grammar</title><content type='html'>&lt;p&gt;While looking for information to "backup my personal research" on &lt;a href="http://luxspes.blogspot.com/2006/04/ui-design-edit-then-list-vs-list-then.html"&gt;UI Design (and its relation with the underlying object graph an persistence mechanisms)&lt;/a&gt; I found this page "&lt;a href="http://www.sylvantech.com/%7Etalin/projects/ui_design.html" target="_blank"&gt;A Summary of User Interface Design Principles&lt;/a&gt;". And I got particularly interested in the 8th principle &lt;em&gt;The principle of grammar: A user interface is a kind of language -- know what the rules are&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;That principle says that the two most common grammars are known as "Action -&amp;gt; Object" and "Object -&amp;gt; Action". In Action-&amp;gt;Object, the operation (or tool) is selected first (&lt;em&gt;Similar to Edit then List?&lt;/em&gt;) and in "Object -&amp;gt; Action" the object is selected first and persists from one operation to the next (&lt;em&gt;Similar to List then Edit?&lt;/em&gt;).&lt;/p&gt; &lt;p&gt;On the other hand this two "most common grammars" are IMHO not exactly "data manipulation oriented (DMO)", because the principle states that in "Action -&amp;gt; Object": &lt;em&gt;When a subsequent object is chosen, the tool immediately operates upon the object. The selection of the tool persists from one operation to the next, so that many objects can be operated on one by one without having to re-select the tool&lt;/em&gt;. And in a typical DMO you do not choose the "edit" tool and then apply it to an list of different objects... so this grammar seems to apply more to a typical "tools for editing documents" kind of UI. But Object -&amp;gt; Actions matches better with List (You have to select an object) then Edit (The action).... I will have to look more in to this...&lt;/p&gt; &lt;p&gt;Another principle that is related to my doubts in UI Design is the 10th (and it is specially related to &lt;a href="http://luxspes.blogspot.com/2006/05/ui-design-when-do-you-save.html"&gt;UI Design: When do you save?&lt;/a&gt;) is "&lt;em&gt;The principle of safety: Let the user develop confidence by providing a safety net&lt;/em&gt;" according to this principle, the UI should provide a safety net for new users, but provide the option to "work in unsafe mode" for the advanced users. I think that the most important feature a program should provide is a "a safe cancel button that really cancels" and an "undo mechanisms" (&lt;em&gt;because, as much as we would like the user to pay attention to our message box, the truth is that both novice and advanced users dismiss them without to much care, and after that, only "Undo" can save them&lt;/em&gt;)&lt;/p&gt; &lt;p&gt;&lt;em&gt;The principle of context -- Limit user activity to one well-defined context unless there's a good reason not to&lt;/em&gt; (11th) IMO is more related to the modality of an UI that the 8th... perhaps because in general I tend to use modal windows when I want the user focused in a particular context, and I don't want him to "click around" and do possible conflicting actions (&lt;em&gt;like trying to delete the record he is currently editing&lt;/em&gt;)&lt;/p&gt; &lt;p&gt;I also liked the 14th principle: "&lt;em&gt;The principle of humility -- Listen to what ordinary people have to say&lt;/em&gt;" it reminded my that I have to pay attention to the user (&lt;em&gt;A single designer's intuition about what is good and bad in an application is insufficient. &lt;strong&gt;Program creators are a small, and not terribly representative, subset of the general computing population&lt;/strong&gt;&lt;/em&gt;.), but that the user is &lt;strong&gt;not&lt;/strong&gt; the owner of all the answers: "&lt;em&gt;One must be true to one's vision. A product built entirely from customer feedback is doomed to mediocrity, &lt;strong&gt;because what users want most are the features that they cannot anticipate&lt;/strong&gt;&lt;/em&gt;."&lt;/p&gt; The only thing I didn't liked about this principles were the examples, they were all about the typical "document editing UIs" like Word processors, Painting programs, etc, and not about data manipulating applications(applications built on top of CRUD and transaction principles) Mmmmm, perhaps I should write my own examples and post them here... If you have an example, please, share it with me...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114699417496488715?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114699417496488715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114699417496488715' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114699417496488715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114699417496488715'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/05/ui-design-principle-of-grammar.html' title='UI Design: The principle of grammar'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114685916990480404</id><published>2006-05-05T14:57:00.001-05:00</published><updated>2010-02-18T19:02:51.807-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='transactions'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='saving'/><title type='text'>UI Design: When do you save?</title><content type='html'>&lt;p&gt;Hi!&lt;/p&gt; &lt;p&gt;How do developers save?? I know I know, after reading some of the comments on &lt;a href="http://luxspes.blogspot.com/2006/04/ui-design-edit-then-list-vs-list-then.html"&gt;UI Design: Edit then List vs List then Edit&lt;/a&gt; I learned that most developers believe that the UI Design is a user concern, not a developer concern (build the UI as the User wants it, not as the developer wants it)... I have been wondering...&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Do the users really know what they want?&lt;/li&gt; &lt;li&gt;Do the users really appreciate some of the internal behaviors the UI provides?&lt;/li&gt; &lt;li&gt;Do all software projects have enough budget and type to make real usability test?&lt;/li&gt; &lt;li&gt;Do all customers pay an amount of money for a project that justifies the extra effort of building a well designed UI?&lt;/li&gt; &lt;li&gt;Do you as a developer have a framework that make all this issues moot and for you is so extremely easy to build a good UI that you always built it in the absolute best way?&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;Lets take, for example the "Save" or "Cancel" button in a typical CRUD application, and lets say the UI is build following &lt;strong&gt;List then Edit&lt;/strong&gt;:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;The user search all customers named "John"&lt;/li&gt; &lt;li&gt;The user selects the first one from the list&lt;/li&gt; &lt;li&gt;The user clicks the edit button on the tool-bar (in the List window)&lt;/li&gt; &lt;li&gt;The Edit window appears, the user modifies everything (&lt;strong&gt;from some fields, to complex to many, to one, many to many and many to many relationships&lt;/strong&gt;) and then...&lt;/li&gt; &lt;li style="list-style-type: none;"&gt; &lt;ul&gt; &lt;li&gt;The user clicks "&lt;strong&gt;save&lt;/strong&gt;" because he is happy with his changes&lt;/li&gt; &lt;li&gt;The user clicks "cancel" because he is &lt;strong&gt;not&lt;/strong&gt; happy with his changes.&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;p&gt;Now... a well behaved system, shouldn't write anything into the database until the "save" button is clicked (regardless of the complexity of the "edit customers" UI) and a well designed persistence API should make it as easy as "editingContext.Rollback()" to achieve that effect... and, if we weren't editing an customer, and from a performance perspective, if as a result of the editing of customer we created new "detail" objects(or rows) and we decided to cancel the operation, the server shouldn't even be aware that we created those objects, and then "roll-backed" its existence.&lt;/p&gt; &lt;p&gt;But the questions now is:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Do we all always check that &lt;strong&gt;nothing&lt;/strong&gt; is written on the database until we click "save"? and "Does the user care?"&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;I know I always try to check that if and only if the save button is clicked I save... but I have met lots of other developers that do not care... if for example, they have to add new addresses to the customer they write the new addresses into the database the moment they create them (&lt;strong&gt;from inside the edit customer ui!&lt;/strong&gt;) and after the "cancel" button is clicked, this to many relationship is not rollbacked... they just don't care...&lt;/p&gt; &lt;p&gt;Now... I have to admit that I have done this sometimes (&lt;em&gt;when in a extreme hurry to deliver a new form&lt;/em&gt;) , and "i feel" like it is enough if I add a message box warning (of those the user never reads) saying "&lt;strong&gt;if you add a new address all your changes will be committed to the database&lt;/strong&gt;" ... the user, as always, just dismisses the warning and proceeds to add addresses... and perhaps click cancel later... nevertheless as soon as I have time, I fix the form so that it only saves when the save button is clicked... (&lt;em&gt;and sometimes, with complex nested UIs that is a pretty hard job&lt;/em&gt;)&lt;/p&gt; &lt;p&gt;But... the thing is that I have seen lots of systems built with the idea "&lt;em&gt;if you write it on the screen, and you do as much as click any button your changes will be saved&lt;/em&gt;" I have seen it specially in web based systems, but also in smartclients... and I have had the opportunity to hear all kinds of complains of this systems, and I have even replaced some of them with "&lt;em&gt;only if you click save you save&lt;/em&gt;" systems... but I have never heard a single user saying "&lt;em&gt;it is nice that the cancel button really works now&lt;/em&gt;" or "&lt;em&gt;i hated the previous system because I clicked cancel and it saved my changes&lt;/em&gt;" but... strangely I have heard some of them complaining "&lt;em&gt;I added 50 addresses to a customer, and then by mistake i clicked cancel, and then by mistake again I answered "yes" to the question "Are you sure you want to cancel your changes&lt;/em&gt;" and my changes were lost!!!!&lt;/p&gt; &lt;p&gt;But that has been my experience... maybe you do know a user that appreciates a consistent behavior in the "save" and "cancel" buttons...&lt;/p&gt; &lt;p&gt;How do you decide the transactional UI boundaries of your system? Do you really ask the user "do you want the cancel button" to really work? Do you always have the time to build 2 o 3 different UI prototypes and really test usability? Do your users really appreciate the extra 2 o 3 days that may take you to build a transactionally consistent UI? or the they prefer an UI that is built faster and if they made any mistakes, they "&lt;em&gt;edit again&lt;/em&gt;" and rollback the mistakes manually (&lt;em&gt;and they are happy with that behavior&lt;/em&gt;)? have you ever received a complain from a user saying "i want a cancel button that really works"? Do you implement cancel by calling an API similar to "editingContext.Rollback()" or do you cancel in "a custom way" (by explicitly deleting changes already made to the database) ? do you offer real "save" and "cancel" buttons even in your web based applications?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114685916990480404?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114685916990480404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114685916990480404' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114685916990480404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114685916990480404'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/05/ui-design-when-do-you-save.html' title='UI Design: When do you save?'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114653461111609316</id><published>2006-05-01T20:47:00.002-05:00</published><updated>2010-02-18T19:08:41.101-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><category scheme='http://www.blogger.com/atom/ns#' term='windowsforms.net'/><title type='text'>Security Contexts in WindowsForms and In ASP.NET</title><content type='html'>&lt;p&gt;In Windows forms, if you want to set the current user, all you have to write is:&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:1em;"&gt;Thread&lt;span style="font-size:1em;"&gt;.CurrentPrincipal =&lt;/span&gt; &lt;strong&gt;&lt;span style="color: rgb(0, 0, 255);font-size:1em;" &gt;new&lt;/span&gt;&lt;/strong&gt; &lt;span style="color: rgb(0, 128, 128);font-size:1em;" &gt;CustomPrincipal&lt;/span&gt;&lt;span style="font-size:1em;"&gt;(&lt;/span&gt;&lt;strong&gt;&lt;span style="color: rgb(0, 0, 255);font-size:1em;" &gt;new&lt;/span&gt;&lt;/strong&gt; &lt;span style="color: rgb(0, 128, 128);font-size:1em;" &gt;CustomIdentity&lt;/span&gt;&lt;span style="font-size:1em;"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);font-size:1em;" &gt;"login"&lt;/span&gt;&lt;span style="font-size:1em;"&gt;,&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);font-size:1em;" &gt;"password"&lt;/span&gt;&lt;span style="font-size:1em;"&gt;));&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;But in ASP.NET you can not ask the current thread for the user, because you will get the same thread on every request... so.. where should you store this information? It seems that the place is in the &lt;a href="http://msdn2.microsoft.com/en-US/library/system.web.httpcontext.user.aspx" target="_blank"&gt;HttpContext.User&lt;/a&gt; Property as described on &lt;a href="http://www.devx.com/SummitDays/Article/6666/0/page/3" target="_blank"&gt;devx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I think I should look more into this...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114653461111609316?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114653461111609316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114653461111609316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114653461111609316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114653461111609316'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/05/security-contexts-in-windowsforms-and.html' title='Security Contexts in WindowsForms and In ASP.NET'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114650124950158456</id><published>2006-05-01T11:31:00.000-05:00</published><updated>2006-05-01T11:34:09.596-05:00</updated><title type='text'>NGUIP ObjectBuilder Integration</title><content type='html'> &lt;p&gt;I have added support for the ObjectBuilder in 2 places:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Inside the GenericFactory (so that everything that was created by it can now enjoy the benefits of creation by the ObjectBuilder)&lt;/li&gt; &lt;li&gt;Inside the "FactoriesFactory" so, now the factories that create the controllers, the viewmanager, the state, etc, are &lt;strong&gt;singleton&lt;/strong&gt; (thanks to &lt;strong&gt;SingletonPolicy&lt;/strong&gt;)&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;The FactoriesFactory acts as a "central" registry for other factories (&lt;em&gt;or perhaps services in my next release&lt;/em&gt;) and it is a property of the Navigators base class (&lt;em&gt;that way it is available everywhere in the internal API&lt;/em&gt;) but currently the contents of this registry are fixed, I am not sure where should I add code to customize the initialization...&lt;/p&gt; &lt;p&gt;You can "get" a factory with the following code:&lt;/p&gt; &lt;p&gt;&lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; FactoriesFactory.Get&amp;lt;&lt;span style="COLOR: #008080"&gt;IViewManagerFactory&lt;/span&gt;&amp;gt;();&lt;/p&gt; &lt;p&gt;Notice that we ask for an &lt;strong&gt;interface&lt;/strong&gt; (the Factories are registered in the object builder using an &lt;strong&gt;ITypeMappingPolicy&lt;/strong&gt; to achieve that effect).&lt;/p&gt; &lt;p&gt;I was thinking about adding and event or virtual method it in the UIPManager to allow for customization of the factories list... but i forgot that in webmode the Navigators are created at the WebFormView... and I would really like to have an "unified" place to do this... any suggestions?&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114650124950158456?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114650124950158456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114650124950158456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114650124950158456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114650124950158456'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/05/nguip-objectbuilder-integration.html' title='NGUIP ObjectBuilder Integration'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114646199101659627</id><published>2006-05-01T00:37:00.000-05:00</published><updated>2006-05-01T00:39:51.083-05:00</updated><title type='text'>User Interface Process Application Block V3 Alpha2 (Unofficial)</title><content type='html'> &lt;p&gt;I am almost ready to release Alpha 2 of the unofficial User Interface Process Application Block, I made several changes, here is a list with some of them:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;No more non-generic ArrayLists (they have all been converted to Lists with generics)&lt;/li&gt; &lt;li&gt;No more HybridDictionary (they have all been converted to Dictionaries with generics)&lt;/li&gt; &lt;li&gt;the UIPManager is now a singleton (first step in to a plug-in architecture)&lt;/li&gt; &lt;li&gt;The StateCache is now a singleton an implements a new interface IStateCache (first step in to a plug-in architecture)&lt;/li&gt; &lt;li&gt;The factories are also coordinated by a singleton FactoriesFactory that now implements the interface IFactoriesFactory&lt;/li&gt; &lt;li&gt;Instead of calling the FactoriesFactory singleton everywhere, now it is a parameter of the Navigator base class (first step in to a plug-in architecture)&lt;/li&gt; &lt;li&gt;Factories now receive as a parameter in their constructor the IGenericFactory they will use internally to create objects.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;I am not sure if I will release it as it is right now... or wait until I add support for the ObjectBuilder, I am also deciding if I should call the ObjectBuilder from inside of the GenericFactory, or if a I should create a "ServiceCollection" to manage all the factories, similar to the one available in the CompositeUI&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114646199101659627?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114646199101659627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114646199101659627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114646199101659627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114646199101659627'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/05/user-interface-process-application.html' title='User Interface Process Application Block V3 Alpha2 (Unofficial)'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114635674135629218</id><published>2006-04-29T19:16:00.001-05:00</published><updated>2010-02-18T19:06:38.421-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='orm'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='ui design'/><category scheme='http://www.blogger.com/atom/ns#' term='nhibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><title type='text'>UI Design: Edit then List vs List then Edit</title><content type='html'>&lt;p&gt;Today I was thinking about the way I build UIs (&lt;strong&gt;List then Edit&lt;/strong&gt;) and the way most people I know build UIs (&lt;strong&gt;Edit then List&lt;/strong&gt;) and the relation that the way you build you UI has with the way you store the data you manipulate in you UI.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;List then Edit&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;In this "pattern" for UI structure, after the user selects an option in the menu he sees a window that allows searching with some controls (&lt;em&gt;generally in the top of the window&lt;/em&gt;),and with some control in the bottom that represents the search results, then the user selects one of the search results (&lt;em&gt;an object, or row if you prefer&lt;/em&gt;) and he proceeds to work (&lt;em&gt;edit, modify&lt;/em&gt;) it, for that he opens a new window "the editor" (&lt;em&gt;perhaps by double clicking the selected object, perhaps by clicking an "edit" button in the list window&lt;/em&gt;) in the editor he may modify the object being edited as much as he likes, and then click "save" if he wants to commit his changes or "cancel" if he wants to rollback them.&lt;br /&gt;If the user wants to create a new object, the list has a "new" button that also calls the "editor" so that the user can set the initial values for the fields before the object is committed to the database for the first time&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Edit then List&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;In this other "pattern" for UI structure, after we select an option in the menu we are right there in the editor, but all the controls that could allow us to modify the current object (&lt;em&gt;or row&lt;/em&gt;) are disabled, because we haven't searched for any (&lt;em&gt;or created a new one&lt;/em&gt;) from here the user can choose to create a new object that action has the effect of enabling all the control in the editor, or search for an already persisted object (&lt;em&gt;or row&lt;/em&gt;) by clicking the "search button", that shows the search "list" window, in the top of that window there are controls to configure the search criteria, and in the top a control to represent the search results, from here the user can choose one of the search results (&lt;em&gt;an object or row&lt;/em&gt;), and click on the "accept" button, which takes him back to the editor that now is displaying the previously selected object, here the use may choose to make some changes and click "save", or just cancel click "cancel" but actions have the effect of disabling the controls in the editor UI until the buttons "search" or "new" are used again.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Edit in List&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-size:100%;"&gt;When an application generally follows List the Edit, sometimes, if the info in the selected object is very simple, the user may modify it right there, but for for objects with medium to complex (several fields, to one or to many relations with other objects) calling a window to modify the object is more comfortable for the user&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Search (&lt;em&gt;List&lt;/em&gt;) in Editor&lt;/span&gt;&lt;br /&gt;Some times, the developer likes to use the same UI to Edit and to Search, this works like some kind of "query by example", that is when user enters the editor, instead of being disabled an waiting for a click on the "new" or "search" button, the controls are enabled, and if the user writes some data in to them and clicks "search" the already persisted object (or row) that is more similar to the partial information already written in the editor is loaded. Sometimes there are many objects that match the query by example, here is when a &lt;a href="http://msdn2.microsoft.com/en-us/library/8zhc8d2f.aspx"&gt;navigator control&lt;/a&gt; can be a nice thing to have.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Master List, Detail Editor&lt;/span&gt;&lt;br /&gt;This is also a very common configuration, both the list and the editor are in the same window, the list generally in the top, and the editor in the bottom, I think this somewhat corresponds with &lt;a href="http://designinginterfaces.com/Two-Panel_Selector" target="_blank"&gt;Two Panel Selector&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:130%;"&gt;Persistence&lt;/span&gt;&lt;br /&gt;Okey, until now I have exposed what I think are the some of the common "patterns" used to create UIs that manipulate data, now... what I find more interesting about this is the the way this "patterns" affect the way the data is stored or retrieved from persistence:&lt;br /&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;If we use Edit then List: &lt;ul&gt; &lt;li&gt;The Edit is displayed on the screen&lt;/li&gt; &lt;li&gt;The user clicks "search" and the search List window appears&lt;/li&gt; &lt;li&gt;The user configures the search criteria in the List window&lt;/li&gt; &lt;li&gt;The objects (or row) matching the criteria are shown in the List window&lt;/li&gt; &lt;li&gt;The user selects one of the matching objects and click in the "accept button" in the List window&lt;/li&gt; &lt;li&gt;We return to the Edit window, that now is displaying the selected object.&lt;/li&gt; &lt;li&gt;We can make changes to the current object by clicking "save" or click "cancel" to dismiss the changes, if we do either action the Edit controls are disabled and we again have to click "search" or "new" to work with an object&lt;/li&gt; &lt;li&gt;The &lt;strong&gt;problem&lt;/strong&gt; here, is that the user might want to see the same search results he used the last time, but each time we call the search List window, we are creating a new object, and all of the configuration from the last time we called it is already lost (this disadvantage has a "nice side", because we don't have to worry about showing "stale data" to our user)&lt;/li&gt; &lt;li&gt;Another &lt;strong&gt;disadvantage&lt;/strong&gt; is that maybe not all the controls we use to manipulate the data in the edit windows are "databindable" so we have to manually reset the state of the Edit window, and if we don't do it correctly we could have bugs that "&lt;em&gt;transfer&lt;/em&gt; &lt;em&gt;information between edit&lt;/em&gt;s". (&lt;span style="font-style: italic;"&gt;First I edit John and set his age to 24, then I edit Mary, and her age is also shown as 24, but her age is 56, and we had no intention of changing it, it happened because we forgot to clear the text-box value&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;If we use List and then Edit: &lt;ul&gt; &lt;li&gt;The list is displayed on the screen&lt;/li&gt; &lt;li&gt;The user configures the search criteria in the List window&lt;/li&gt; &lt;li&gt;The objects (or row) matching the criteria are shown in the List window&lt;/li&gt; &lt;li&gt;The user selects one of the matching objects and click in the "edit button" in the List window.&lt;/li&gt; &lt;li&gt;The "Edit" window appears on top of the List window, and is displaying the selected object.&lt;/li&gt; &lt;li&gt;We can make changes to the current object by clicking "save" or click "cancel" to dismiss the changes, if we do either action the Edit window is closed and we return to the List window&lt;/li&gt; &lt;li&gt;One of the &lt;strong&gt;advantages&lt;/strong&gt; of this approach is that we don't have to worry about the "&lt;em&gt;transfer between edits&lt;/em&gt;" bug, because each time we call the Edit window, it is a new window, without any data, ready to configure itself to match the data contained in the object we are going to edit.&lt;/li&gt; &lt;/ul&gt; &lt;ul&gt; &lt;li&gt;Then &lt;strong&gt;problem&lt;/strong&gt; of keeping the search results to reuse them is also &lt;strong&gt;automatically solved&lt;/strong&gt;, because the search List window was never closed, it was there all time, behind the edit window.&lt;/li&gt; &lt;li&gt;But the problem now is that some of data shown there may not be updated, or perhaps, it has data that has never been on the database, and that we do not want on the database, how can that be? well, we edited the object in the edit window, and the databinding ensured that the changes were written to the object &lt;strong&gt;before&lt;/strong&gt; we clicked "save" or "cancel", if our intention is to keep those changes and we clicked "save" in the Edit window then we don't have a problem... but if we clicked cancel, now we need to rollback in memory changes and some of this changes could have modified relationships with other objects, or properties of the other objects, we could have created, deleted or updated a complex graph of objects but "&lt;em&gt;only in memory&lt;/em&gt;" and now, we need to rollback all this changes, if we are using an Object Relational Mapper (ORM) that supports this (like Apple's &lt;a href="http://en.wikipedia.org/wiki/Enterprise_Objects_Framework" target="_blank"&gt;EOF&lt;/a&gt;) or a relational cache that allows for in memory transactions (like the .NET &lt;a href="http://msdn2.microsoft.com/en-us/library/system.data.dataset.aspx" target="_blank"&gt;DataSet&lt;/a&gt;) we can solve this problem easily (of course the DataSet has &lt;a href="http://luxspes.blogspot.com/2006/04/adonet-vs-objectrelationalmapping.html"&gt;other disadvantages&lt;/a&gt;), but if we are using an ORM like NHibernate that AFAIK does not rollback in memory changes then you have a problem, you have to re-fetch the information from the database.&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;p&gt;This seems like a big omission from the &lt;a href="http://www.hibernate.org/343.html" target="_blank"&gt;NHibernate&lt;/a&gt; guys... but it isn't exactly so, everything I have exposed here, has been on the assumption that we are working in a "&lt;a href="http://msdn.microsoft.com/smartclient/" target="_blank"&gt;Smart-Client&lt;/a&gt;" that holds local information, and &lt;a href="http://www.hibernate.org/"&gt;Hibernate&lt;/a&gt; was born in "the web world". In the web, you "need" to re-fetch the information on each request (&lt;em&gt;so when you go from editor to list or from list to editor you always reload the data&lt;/em&gt;) and you don't really pass the object you are going to edit from the list to the edit, it easier, and more efficient to just pass the primary key, of course the problem there is that you can only do that with objects previously persisted in the database, if you object is new it has to be serializable and some times that just isn't advisable (&lt;em&gt;but that is an issue for another discussion&lt;/em&gt;)...&lt;/p&gt; &lt;p&gt;The thing with web based application is that the controls in the UI don't actually store the information directly in your object, their store it in the view-state, or in the query-string, in cookies, in the session or in an object that "&lt;em&gt;represents the form&lt;/em&gt;", and only when you finally want to save, you extract the information from the web-controls and write it in to your object (&lt;em&gt;at least that is more/less was the way I did it in the Java servlet world&lt;/em&gt;) but this is a "feature" that might be going away... the problem is that with the new &lt;a href="http://java.sun.com/javaee/javaserverfaces/" target="_blank"&gt;JSF&lt;/a&gt; databinding, or with the &lt;a href="http://msdn.microsoft.com/msdnmag/issues/04/08/GridView/"&gt;new databinding facilities of ASP.NET 2.0&lt;/a&gt;, you can actually bind you controls directly with you datasources... and then how will we rollback the in memory changes? should we build a framework on top of NHibernate, a kind of "in memory object context" that handles the commits and rollbacks in memory?&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:1.2em;"&gt;More Questions&lt;/span&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;And what about the case when a list window calls an edit window that has an embedded list control that calls another edit window? (&lt;em&gt;complex multiple level or nested interfaces&lt;/em&gt;) should the object relational mapper make it easier for me to build this kind of UIs?&lt;/li&gt; &lt;li&gt;Or Should a new kind of framework deal with the problem of communicating the persistent objects with the UI?&lt;/li&gt; &lt;li&gt;is using DTOs really the solution? Does Apple's EOF go beyond the responsibility of an ORM by providing in memory transactions?&lt;/li&gt; &lt;li&gt;If NHibernate can almost transparently persist objects to the UI, shouldn't this other framework be able do the same and transparently present the object in to the UI without having to manually create objects to do this job?&lt;br /&gt;&lt;br /&gt;I am thinking about publishing this post as an article in the &lt;a href="http://en.wikipedia.org/wiki/Main_Page"&gt;Wikipedia&lt;/a&gt; to see how it evolves... I would love to read some comments about this article to improve it.&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114635674135629218?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114635674135629218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114635674135629218' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114635674135629218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114635674135629218'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/04/ui-design-edit-then-list-vs-list-then.html' title='UI Design: Edit then List vs List then Edit'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114587729134909420</id><published>2006-04-24T06:08:00.001-05:00</published><updated>2006-04-29T19:15:02.243-05:00</updated><title type='text'>User Interface Process Application Block V3 (Unofficial)</title><content type='html'>I have created "my proposal for V3 for the UIP" (Microsoft seems to want that we all change to the Composite UI framework... while I agree it is amazing and superior in many ways, I miss some features of the UIP, like the Navigator or ASP.NET support, my final goal would be to make UIPv3 a kind of "module" for the CompositeUI AppBlock that make it easier to migrate UIPv2 to .NET 2.0 and brings the advantages of the ObjetBuilder IoC to ASP.NET)&lt;br /&gt;&lt;br /&gt;Okey, okey, what did I uploaded? Unoficial UIPv3 Alpha1 includes the bugfixes from hswami , my last version for the UIP.Attributes, separation of the UIP internal logic in layers (Common, Factories,UIProcess (Core) &amp;amp; Attributes), replacement of weakly typed Hashtable an HybridDictionary with strongly typed Generic&lt;&gt; Dictionary and other minor bugfixes here and there.&lt;br /&gt;&lt;br /&gt;This is just the first step, IMHO the main problem with UIP internal architecture was that it was not layered, so changing the way objects were created in a centralized way was hard... for the next release (Alpha2 probably next weekend) I will integrate the new Factories layer with the ObjectBuilder and replace internal ArrayLists with strongly typed generics....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114587729134909420?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114587729134909420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114587729134909420' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114587729134909420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114587729134909420'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/04/user-interface-process-application_24.html' title='User Interface Process Application Block V3 (Unofficial)'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-25223681.post-114505803599223616</id><published>2006-04-14T18:31:00.000-05:00</published><updated>2006-05-01T00:48:39.180-05:00</updated><title type='text'>Dynamically Loading Assembly for MSBuild Task</title><content type='html'> &lt;p&gt;For a task that has to analyze an assembly using reflection (in this case &lt;br/&gt; a task to export the hbm.xml or the Sql from an assembly with Plain Old .NET Objects &lt;br/&gt; using NHibernate.Attributes) &lt;br/&gt; one has to be able to load and unload the assembly dynamically (without that, it is &lt;br/&gt; impossible to "build" two times the solution , because the first build will "block" the &lt;br/&gt; assembly with the annotated Plain Old .NET Objects) &lt;br/&gt; So, first I tried with loading the assembly using the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms172331%28VS.80%29.aspx"&gt;Reflection Only Context&lt;/a&gt; but it turned out that the code inside of the NHibernate.Mapping.Attributes.HbmSerializer uses the &lt;br/&gt; constructors of the attributes, which can not be called, &lt;a href="http://msdn2.microsoft.com/en-US/library/a4a92379%28VS.80%29.aspx"&gt;to examine custom attributes loaded in the reflection-only context&lt;/a&gt;, use the &lt;a href="http://msdn2.microsoft.com/en-US/library/system.reflection.customattributedata%28VS.80%29.aspx" onclick="javascript:TrackThisClick('ctl00_LibFrame_MainContent_ctl00','ctl00_LibFrame_MainContent_ctl01',this);"&gt;CustomAttributeData&lt;/a&gt; class. &lt;br/&gt; Well... I wasn't going to recode the HbmSerializer to make it work with the new .NET 2.0 API (not for now) so I have only one option left... create a new AppDomain an make the analysis there... but doing that is proving to be harder than I originally thought&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/25223681-114505803599223616?l=luxspes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://luxspes.blogspot.com/feeds/114505803599223616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=25223681&amp;postID=114505803599223616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114505803599223616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/25223681/posts/default/114505803599223616'/><link rel='alternate' type='text/html' href='http://luxspes.blogspot.com/2006/04/dynamically-loading-assembly-for.html' title='Dynamically Loading Assembly for MSBuild Task'/><author><name>Luxspes</name><uri>http://www.blogger.com/profile/16636706720254040664</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_yBIcMbSPmVc/TEjiCVSBxuI/AAAAAAAAADI/kmRiFEZgg20/S220/yo+cyborg.jpg'/></author><thr:total>0</thr:total></entry></feed>
