<?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-38911028</id><updated>2011-08-04T11:00:52.631-07:00</updated><category term='Code Metrics'/><category term='VS 2008'/><category term='exam'/><category term='certification'/><category term='Time Blogs'/><category term='prototyping'/><category term='Architecture'/><category term='mcpd'/><category term='Thinking'/><category term='ts'/><category term='CAB'/><category term='.Net'/><category term='Communication Customer Models UML Requirment Spcification'/><category term='microsoft'/><category term='Tools'/><category term='design'/><category term='Memory'/><category term='Code Quality'/><category term='Future'/><category term='SOA'/><category term='SCSF'/><category term='Form'/><category term='bi'/><category term='WeakEvent pattern;.Net 3.0;Memory leak;WeakReference;Collections;Events;BindingList;Observable'/><title type='text'>Trond-Eirik is rambling on about stuff</title><subtitle type='html'>General stuff about system architecture and development</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-38911028.post-9197599108667065195</id><published>2008-11-27T23:18:00.001-08:00</published><updated>2008-11-27T23:58:06.235-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOA'/><title type='text'>SOA does not belong in a system architecture</title><content type='html'>It seems as the words of the SOA hype is starting to fade off, and people is getting more realistic expectations to what SOA actually is and what it can do for them.&lt;br /&gt;&lt;br /&gt;From my point of view there seems as if a good number of architects have done a number of pretty bad design choices involving SOA. Often SOA is understood as something that should be used within a single system as a mechanism to separate the different layers of the system.&lt;br /&gt;&lt;br /&gt;SOA = Service Oriented Architecture.&lt;br /&gt;&lt;br /&gt;That doesn’t sound too bad, does it? Orienting our architecture around services? How can that be bad?&lt;br /&gt;&lt;br /&gt;Actually, it might be that bad. The problem might as well be how people understand the realization of a service. Many consider the following statement as true:&lt;br /&gt;&lt;br /&gt;A Service in SOA is the same as a WebService.&lt;br /&gt;&lt;br /&gt;The other definition that is a bit less extreme is to look at a service as a contract and layer boundary.&lt;br /&gt;&lt;br /&gt;Anyway, the practical result of this is that what goes in or out of a service is data. By data I mean dumb data. It might be formed as a Xml document, as string, as classes or other structural information. The point is that it is data structures that do not contain any business logic. Actually, that’s one of the main purposes of SOA: To separate the logic from the data as well as separate the technology dependency from the data, enabling different system to communicate between them.&lt;br /&gt;&lt;br /&gt;So, on one side we have a method that is able to transfer dumb data and that is suited to communicate between systems built on different technology and different times.&lt;br /&gt;On the other side we have architects trying to use this as a communication pattern between different layer of systems using the same technology, written at the same time and running in the same environment.&lt;br /&gt;&lt;br /&gt;Why is this bad? This is bad because at the second you introduce a service (especially if it is realized as a web service) in a system you end up with a flow of logic and data that goes like the following:&lt;br /&gt;-          Service read data from datastorage&lt;br /&gt;-          Service internally structures data in a good way, probably in a model&lt;br /&gt;-          Service internally verifies data structures&lt;br /&gt;-          Service converts data to a suited dumb external  format&lt;br /&gt;-          Service passes data on to the client&lt;br /&gt;-          Client receives dumb data&lt;br /&gt;-          Client internally structures data in a good way, probably in a model&lt;br /&gt;-          Client internally verifies data structures&lt;br /&gt;-          Client changes some data&lt;br /&gt;-          Client verifies business logic (some of it)&lt;br /&gt;-          Client structures data in the format wanted by the Service&lt;br /&gt;-          Client sends data to the Service&lt;br /&gt;-          Service internally structures data in a good way, probably in a model&lt;br /&gt;-          Service internally verifies data structures&lt;br /&gt;-          Service internally verifies business rules and logic&lt;br /&gt;-          Service saves data to data storage&lt;br /&gt;&lt;br /&gt;This seems bad. And it is! It’s actually awful. The added cost of this type of logic is extreme. The cost is both in pure code realization time, bug tracking, runtime speed and the agility and ability for the system to change.&lt;br /&gt;&lt;br /&gt;However, in some cases this is actually needed. But that is when you want to have interaction between systems that is very de-coupled and not actually related. It might for example be that you are communicating with a system in a different company. That company must be able to change it’s internal code without affect other companies. It might also, in some cases, be a suited way of communicating between systems in a large company.&lt;br /&gt;But it IS NOT for communication within a single system, not even if that system is big. If you want to archive separation in your system, use other patterns.&lt;br /&gt;&lt;br /&gt;SOA is a good idea, but it has to be used at the right places, and IMO that is not within a system architecture.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38911028-9197599108667065195?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/9197599108667065195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=9197599108667065195' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/9197599108667065195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/9197599108667065195'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2008/11/how-does-domain-driven-design-and-soa.html' title='SOA does not belong in a system architecture'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38911028.post-6503805908040610022</id><published>2008-06-17T04:50:00.000-07:00</published><updated>2008-06-17T05:12:47.652-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exam'/><category scheme='http://www.blogger.com/atom/ns#' term='mcpd'/><category scheme='http://www.blogger.com/atom/ns#' term='certification'/><category scheme='http://www.blogger.com/atom/ns#' term='microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='ts'/><title type='text'>Completed the certification, ready for the next round</title><content type='html'>&lt;p&gt;A while back, when I started working for Fundator, I started a certification run. The purpose of this was mainly to document my current knowledge and at the same time broaden the knowledge area a bit.&lt;/p&gt;&lt;p&gt;I have now completed this, by taking 6 MS exams, and I do currently have the following MS certifications:&lt;/p&gt;&lt;p&gt;&lt;em&gt;Microsoft Certified Professional Developer&lt;br /&gt;     Enterprise Application Developer&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Microsoft Certified Technology Specialist&lt;br /&gt;    .Net Framework 2.0: Web Applications&lt;br /&gt;    .Net Framework 2.0: Distributed Applications&lt;br /&gt;    .Net Framework 2.0: Windows Applications&lt;br /&gt;    SQL Server 2005&lt;/em&gt;&lt;/p&gt;&lt;p&gt;As you of course will notice, these certifications are already a bit outdated. The hot new stuff now is .Net 3.5, WPF and those certifications. I have also noticed that MS have just introduced their new Master series of certifications.&lt;/p&gt;&lt;p&gt;However, the area of knowledge needed for the new MS certifications is mostly extensions of these certifications, so I do absolutely think that these certifications will be good to have.&lt;/p&gt;&lt;p&gt;Now it will soon be summer holyday. For now I will stay low and relax, but after the summer I'll probably continue my certification run, but then it will be a lot more learning of new stuff...&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/38911028-6503805908040610022?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/6503805908040610022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=6503805908040610022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/6503805908040610022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/6503805908040610022'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2008/06/completed-certification-ready-for-next.html' title='Completed the certification, ready for the next round'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38911028.post-7397888174196774191</id><published>2008-06-16T13:28:00.001-07:00</published><updated>2008-06-17T04:49:35.143-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='design'/><category scheme='http://www.blogger.com/atom/ns#' term='prototyping'/><category scheme='http://www.blogger.com/atom/ns#' term='bi'/><title type='text'>Early prototyping</title><content type='html'>&lt;div class="Section1"&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-US"&gt;It haven’t been a lot of coding for me lately. &lt;br /&gt;&lt;br /&gt;I’m currently working on extending an existing product with a new area of functionality. This involves a lot of studying and learning new stuff.&lt;br /&gt;&lt;br /&gt;Some of the most exiting parts of this process is to notice how you gain more knowledge and understanding about the problem area as you go ahead and learn new stuff. I have been through this process several time before, but this time is a bit different as we are using some more time on the learning process. We are working in a broader area and there is no expert or customer that has full knowledge of the problem area.&lt;br /&gt;&lt;br /&gt;The task at hand is to carve the product into shape, figure out what it should do and how it should do it. Kind of creating a product vision.&lt;br /&gt;&lt;br /&gt;As a part of this I have done some very early prototyping. Earlier, when working with more concrete solutions, I have found that using Visual Studio in combination with bitmaps have worked relatively well. &lt;br /&gt;&lt;br /&gt;In this project that did not work at all. The outcome felt "to concrete", it did not leave enough room for the next phase and it quickly become too close to a real solution while at the same time being difficult to use.&lt;br /&gt;&lt;br /&gt;Based on that experience and some more testing I’m currently using several tools to create GUI prototyping.&lt;br /&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;- I’m using paper/drawing to test out initial ideas and thoughts&lt;br /&gt;- I’m using excel/word to test out special situations and presentation&lt;br /&gt;- I’m using paint to steel small pictures/figures/symbols and ideas from other products&lt;br /&gt;- I’m using power point to put together all elements, as well as adding simple animations to show transitions and illustrate the most important navigations&lt;br /&gt;&lt;br /&gt;I’m sure that there is a lot of other GUI prototyping tools out there. However, to practically solve raising issue, I have found this method, using simple and available tools to work quite well as a way of sharing ideas and possible solutions with others.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38911028-7397888174196774191?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/7397888174196774191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=7397888174196774191' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/7397888174196774191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/7397888174196774191'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2008/06/early-prototyping.html' title='Early prototyping'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38911028.post-6086541355711256865</id><published>2008-02-12T00:16:00.000-08:00</published><updated>2008-02-12T00:59:21.246-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Future'/><category scheme='http://www.blogger.com/atom/ns#' term='Architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='Thinking'/><title type='text'>What's happening with the portable devices</title><content type='html'>One of the issues that have been on my mind lately is the last large change in the hardware technology. There is a switch from single core processors to multi core processors.&lt;br /&gt;This is already very noticeable in how software programs is developed, at least if you are using the .Net Framework. It's not an obvious and huge change, but it's all those small pieces that is being added with each new version of the Framework.&lt;br /&gt;From the BackgroundWorker GUI component to all those more sever directed Async wrapper methods that are found in almost any server based call.&lt;br /&gt;&lt;br /&gt;It seems to me as we are going to see a lot more of these small adaptations in the .Net Framework. The latest I heard was that there was going to be added multi-thread support to for each loops so that the pre-compiler automatically should be able to split a for each loop into parallel tasks that was to be executed on different threads.&lt;br /&gt;&lt;br /&gt;However, all of that is old news. I think that is a trend we will se a lot of in the future, and we will se adaptation of both languages and framework to add better multithreading support.&lt;br /&gt;&lt;br /&gt;However, a different trend that I'm interested in is what seems to be a rapid change in portable devices as mobile phones and other portal devices.&lt;br /&gt;From being very limited devices with slow processors, very limited memory and display that is unable to produce any reasonable graphics, these devices are now very rapidly getting more CPU, memory, processing power and high-res displays. At the same time laptop PC's is getting smaller and smaller. This makes the gap between laptops and portable devices to get smaller and smaller all the time. The latest technology to really close the gap between these technologies is the SSD's (Solid State Drivers). The last, missing piece is the long promised super batteries. If those were actually hitting the marked I imagine that some real changes would be seen very fast.&lt;br /&gt;&lt;br /&gt;I think that it is very possible that we within few years from now will see a major shift in how these devices is used. I don’t expect any revolutionary, but a huge increase in the current trend of smart-phones and applications for these devices. And as this shift in how hardware is used, we will again see that the software industry will have to adapt and adjust the software solutions accordingly. Still, the change does not have to be that dramatically. All the current changes with Smart Clients, online-offline support for almost every application and other changes is all very adaptable and directed to this change.&lt;br /&gt;So, I think we’re on the right track… at least until something totally different happens instead ;-)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TEK&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38911028-6086541355711256865?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/6086541355711256865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=6086541355711256865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/6086541355711256865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/6086541355711256865'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2008/02/whats-happening-with-portable-devices.html' title='What&apos;s happening with the portable devices'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38911028.post-2460739524442626071</id><published>2007-10-04T00:36:00.000-07:00</published><updated>2007-10-04T00:35:27.525-07:00</updated><title type='text'>Microsoft is releasing the source code for .Net</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;It seems as Microsoft is planning on releasing the source code for the .Net Framework.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;According to this blog: &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;This is very interesting news, and it might possible be of huge help for developers. Especially those working with the more &amp;#8220;not so well documented&amp;#8221; parts of the .Net Framework.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;At the same time I&amp;#8217;m also a bit skeptical as this will enable the developers to look at the .Net framework more as a white box then a black box, and unintended writing code that is dependent on the inner parts of the .Net Framework to work as intendet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Maybe you find out that some return value only may be two out of tree values, and you then code for that. In the next release the third value is supported as well but our code is not supporting it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;All over I think this is an advantage, and I assume that it is only in very special troubleshooting scenarios you will be interested in doing this.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;TEK&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38911028-2460739524442626071?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/2460739524442626071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=2460739524442626071' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/2460739524442626071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/2460739524442626071'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2007/10/microsoft-is-releasing-source-code-for.html' title='Microsoft is releasing the source code for .Net'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38911028.post-6013198976043387143</id><published>2007-09-07T10:00:00.001-07:00</published><updated>2007-09-07T10:00:13.987-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code Quality'/><category scheme='http://www.blogger.com/atom/ns#' term='Code Metrics'/><category scheme='http://www.blogger.com/atom/ns#' term='VS 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Visual Studio 2008</title><content type='html'>&lt;p&gt;I was at MSDN Live in Trondheim yesterday. One of the sessions was about Visual Studio 2008 Team Systems.&lt;/p&gt;  &lt;p&gt;It seems like MS is putting some quite nice stuff into this product. They have for example started to add support for code metrics in to the Team edition of VS 2008.&lt;/p&gt;  &lt;p&gt;Metrics is a well known method of analyzing code and code complexity based on statistics extracted from the code. Typical information gathered is reference counters, lines of codes, number of ifs, loops and so on. Based on this information it's possible to start making some theoretical guesses about the quality of the code.   &lt;br /&gt;VS 2008 Team System now has added a client tool that does this and displays this information to the developer. This can then be used to evaluate the complexity of the code and give some ideas about areas where refactoring might be wise.&lt;/p&gt;  &lt;p&gt;I do absolutely not think that this is a golden bullet for application architecture or code quality. However I do believe that it might help to put focus on limiting complexity in code and coupling between modules.&lt;/p&gt;  &lt;p&gt;I'm quite excited about getting VS 2008 Team System installed and do some more evaluation of this and how it might work in real life.&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38911028-6013198976043387143?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/6013198976043387143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=6013198976043387143' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/6013198976043387143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/6013198976043387143'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2007/09/visual-studio-2008.html' title='Visual Studio 2008'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38911028.post-8111416258398241036</id><published>2007-09-07T09:21:00.001-07:00</published><updated>2007-09-08T11:18:46.181-07:00</updated><title type='text'>I have started working at Fundator AS</title><content type='html'>&lt;p&gt;I have recently changed my work location from Norconsult Informationssystemer AS to Fundator AS.&lt;/p&gt;  &lt;p&gt;Fundator is small, emploee-owned, consultant company. We are currently 20 employees with deep knowledge within the fields as business development, enterprice architecture, .Net and Java system development. This company has a lot of very skilled people, and I hope to learn a lot here. I'm looking forward to see what the future will bring.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38911028-8111416258398241036?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/8111416258398241036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=8111416258398241036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/8111416258398241036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/8111416258398241036'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2007/09/i-have-started-working-for-fundator-as.html' title='I have started working at Fundator AS'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38911028.post-9163183363637458925</id><published>2007-06-06T12:56:00.001-07:00</published><updated>2007-06-06T13:30:43.518-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Time Blogs'/><title type='text'>There is not enough time</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;In the last couple of months I have done some attempt to stay on top of stuff and get new inputs from sources as IT-related newspapers, blogs, MSDN and reading some books.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I really wonder if I&amp;#8217;m a totally slow reader, using way to little time on stuff or what. It&amp;#8217;s just so much stuff out there that I should have loved to read, understood, tested and commented upon. However, there is really-really not time in my life to keep on track with all of it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;And that&amp;#8217;s even if I&amp;#8217;m just sleeping 5 hours a night and drop all social life.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Maybe that also some part of the problem, I&amp;#8217;m actually trying to see my two children (and my wife) a couple of hours every day instead of sit down in my office and staring into my computer screen. And yes, it was that damn thing called &amp;#8220;work&amp;#8221;. What was that again? Ah, yeah. That was the reason for why I wanted to stay on top of stuff. And to get the basic stuff there done takes of course 8-12 hours a day&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I see that my RSS feed on &amp;#8220;Recent Blog Postings (MS Architecture)&amp;#8221; currently has 249 unread posts, and I&amp;#8217;m pretty sure that at least 80 of those are really interesting stuff!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;But hey, after one week away from the computer I&amp;#8217;m actually up to date on several of the other RSS feed&amp;#8217;s I&amp;#8217;m monitoring&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I think I&amp;#8217;ll get some more jogging/swimming/sporting/mounting walking under my feet the next couple of months and start studying speed reading or something like that &lt;/span&gt;&lt;span lang=EN-US style='font-family:Wingdings'&gt;J&lt;/span&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;For everyone out there contributing with all this great blogs and discussion/stuff, thanks!&lt;br&gt; Yes, I really mean it. There is so much great reading material out that there is right to the core of important issues that it&amp;#8217;s really, really cool! If there was only some more time&amp;#8230; What about introduction 48 hours days?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38911028-9163183363637458925?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/9163183363637458925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=9163183363637458925' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/9163183363637458925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/9163183363637458925'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2007/06/there-is-not-enough-time.html' title='There is not enough time'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38911028.post-9042475662202847735</id><published>2007-06-01T16:00:00.000-07:00</published><updated>2007-06-06T13:32:04.952-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Communication Customer Models UML Requirment Spcification'/><title type='text'>Communicating with the customer</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Over a number of years I have been working with a number of different customers while planning, designing and implementing systems.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Normally these customers have been people with great skills in their work, but with little or no experience in describing software systems.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;In the process we have been using a number of different tools to try to communicate better with the customers. What I have often noted is that if you try to tell the customer that &amp;#8220;we are using use-cases as a method of describing what the software should do&amp;#8221; or &amp;#8220;we are going to develop a requirement specification to describe how the system is going to work&amp;#8221; the customer often seems to be distracted by the terms used. The customers is often willing or even interested in using the methods suggested, but often it seems to meet practical issues when trying to actually do this.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;For me it seems as just introducing these terms and methods by names in an early process will by itself often cause the customer to feel unsecure or unfamiliar with the techniques and methods used when describing a system.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Due to this I think that you not necessarily should introduce naming for stuff in the early stages of a project. If you for example want to discuss and show the customer a use case diagram you should just show it to the user and discuss the content of the diagram, what the arrows means and so on.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Then, when the customer after some time actually discovers that the given type of diagram is coming up again-and-again you may fulfill his felt need of giving the diagram some name, for example &amp;#8220;use-case-diagram&amp;#8221; ;-)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;My point here is that, when working with people that is not in the industry, we should and must use our tools (their good tools) by we should also be very careful about how we approaches the customer when discussing the issues at hand. I think it is important to keep the focus on the issues that the customer is familiar with and avoid introducing terms and words that adds confusion to the communication.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38911028-9042475662202847735?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/9042475662202847735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=9042475662202847735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/9042475662202847735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/9042475662202847735'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2007/06/communicating-with-customer.html' title='Communicating with the customer'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38911028.post-9163992530261875137</id><published>2007-06-01T14:49:00.000-07:00</published><updated>2007-06-01T15:38:39.383-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WeakEvent pattern;.Net 3.0;Memory leak;WeakReference;Collections;Events;BindingList;Observable'/><title type='text'>.Net 3.0 is doing more for leaky .Net applications</title><content type='html'>After a bumpy start with .Net 1.1 (1.0 does not count) where several issues regarding memory consumption and especially releasing memory .Net seems to be going in the right direction.&lt;br /&gt;&lt;br /&gt;.Net has always been memory "hungry". The ide seems to be based on "unused memory is doing no good to anyone". &lt;br /&gt;So, problably based one something like that, MS seems to have decided that any .Net application should grap a really good chunk of memory if available.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;And that idea is resonable enough, in some closed single user fantasy world!&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;It soon became clear that altough .Net 1.1 applications was great at hugging memory, they were not so great at freeing it. Basically, whatever memory a .Net 1.1 application had got it's gready fingers on, was lost forever (or at least until the app closed down). In a multi user envirment with a lot of users running their applications over a long time this behaviour would very fast lead to out-of-memory exceptions as the first 20 instances of the application has already used all available memory.&lt;br /&gt;&lt;br /&gt;In .Net 2.0 this seems to have improved a great deal, and from what I can see the behaviour and freeing of memory is mutch better. Now an application actually seems to be able to release back some memory without shutting it down first.&lt;br /&gt;&lt;br /&gt;Now, in .Net 3.0 it finally seems as MS have understood that it is not enought to say: "Hey, we have a managed language and a garbage collector"&lt;br /&gt;&lt;br /&gt;You will still have memory issue if you do the wrong stuff. One of the sources for doing the wrong stuff is event handlers.&lt;br /&gt;&lt;br /&gt;Whenever you start listening to event from a event source using += you are actually creating a reference to that object. If you do not remove that reference, the event subscriber will be kept in memory as long as the event source is alive.&lt;br /&gt;If you for example hooks up to the Application.Idle event in a form, that form will not be available for the GC as long as the application is executing. &lt;br /&gt;&lt;br /&gt;On of these issues that is really important to consider is notification enabled collections. For example collections that implements IBindingList or just implements change events.&lt;br /&gt;Say that you have one such collection with 1000 items within. Then you create a reference to one of those 1000 items.&lt;br /&gt;&lt;br /&gt;For a "normal" collection, the collection has a reference to all items within the collection, the items in the collection has no reference to the collection. As soon as you no longer holds on to the collection itself, the collection and the 999 items that you are not refering to becomes available for the GC.&lt;br /&gt;&lt;br /&gt;If you have an event enabled list, the list must to be able to notify any listeners of changes in any object within the list. To do this the list has to subscribe to events from all the entities contained within the list.&lt;br /&gt;Using regular events this will create a reference from the objects within the collection to the collection itself.&lt;br /&gt;&lt;br /&gt;So, that single object in the list that you made a reference to will now also causes the list itself, and therby all the 999 other objects to be unavailable for the GC.&lt;br /&gt;This is of course not very nice when it comes to memory consumption.&lt;br /&gt;&lt;br /&gt;I soon discovered this when working with the business layer of &lt;a href="http://www.byggoffice.no"&gt;ByggOffice&lt;/a&gt;. To handle and avoid this situation I made a couple of specialized interfaces and a managment class that used the WeakReference object to support multicast events. The weak references made it possible to dispatch the events and at the same time make ureferenced entities available for the GC.&lt;br /&gt;This solution worked out very well.&lt;br /&gt;&lt;br /&gt;Now, in .Net 3.0 MS has finally started to take this issue serious and have introduced stuff as the &lt;em&gt;WeakEventManager&lt;/em&gt; class and &lt;em&gt;IWeakEventListner&lt;/em&gt; interface.&lt;br /&gt;They are also doing a lot of referals towords the "weak event pattern":&lt;br /&gt;&lt;br /&gt;"&lt;em&gt;In typical applications, it is possible that handlers that are attached to event sources will not be destroyed in coordination with the listener object that attached the handler to the source. This situation can lead to memory leaks. Windows Presentation Foundation (WPF) introduces a particular design pattern that can be used to address this issue, by providing a dedicated manager class for particular events and implementing an interface on listeners for that event. This design pattern is known as the WeakEvent pattern."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;You can read more about the "WeakEvent pattern" here: http://msdn2.microsoft.com/en-us/library/aa970850.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38911028-9163992530261875137?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/9163992530261875137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=9163992530261875137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/9163992530261875137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/9163992530261875137'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2007/06/net-30-is-doing-more-for-leaky-net.html' title='.Net 3.0 is doing more for leaky .Net applications'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38911028.post-4356271588355939598</id><published>2007-05-02T11:01:00.000-07:00</published><updated>2007-05-02T11:40:48.738-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='CAB'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='SCSF'/><title type='text'>MS Application blocks and software factories</title><content type='html'>For some years now Microsoft has been giving a number of application blocks, for example the &lt;a href="http://msdn2.microsoft.com/en-us/library/aa480450.aspx"&gt;Composite UI Application Block (CAB)&lt;/a&gt;. They also have software factories to make the application blocks easier to use from Visual Studio. One of these factories is the &lt;a href="http://msdn2.microsoft.com/en-us/library/aa480482.aspx"&gt;Smart Client Software  Factory (SCSF)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It seems like the application blocks is getting more mature these days then before. It has finnally been created a decent &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=5f9a8435-1651-4be2-956d-0446a89a7358&amp;displaylang=en"&gt;whitepaper&lt;/a&gt; for the CAB and the SCSF.&lt;br /&gt;It's not written by the same people that wrote the application blocks, something that problably is good.&lt;br /&gt;&lt;br /&gt;However, personally I'm still on the sceptic side regarding the usage of these application blocks in real-life applications. Most of the application I have been involved in developing has a quite long expected lifetime, maybe up to 10 years, and several years development time (small team).&lt;br /&gt;If you then look at the history of for example the CAB, you would have needed to do a lot of hard refactoring to follow up the new versions of the CAB and SCSF. At the same time the software factories will have a lot of influence on when and how you handling changes in the development environment, for example the transit from VS 2003 to VS 2005, and now coming up, the transit to Orcha.&lt;br /&gt;&lt;br /&gt;My current stand on stuff is that you should be sure you know what you do if you choose to use for example the CAB and SCSF in your projects.&lt;br /&gt;&lt;br /&gt;Anders Norås have a &lt;a href="http://andersnoras.com/blogs/anoras/archive/2007/02/24/software-factories-another-unlearned-ejb-lesson.aspx"&gt;great post on the topic&lt;/a&gt;, and he recently also included the source code for the &lt;a href="http://andersnoras.com/blogs/anoras/archive/2007/05/01/source-code-for-the-coho-light-sample.aspx"&gt;example project&lt;/a&gt; he is referring to in the blog.&lt;br /&gt;It's recommended reading!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38911028-4356271588355939598?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/4356271588355939598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=4356271588355939598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/4356271588355939598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/4356271588355939598'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2007/05/ms-application-blocks-and-software.html' title='MS Application blocks and software factories'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38911028.post-117589009761540501</id><published>2007-04-06T10:40:00.000-07:00</published><updated>2007-05-02T11:48:03.676-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Form'/><category scheme='http://www.blogger.com/atom/ns#' term='Memory'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>No more memory leakage, part I</title><content type='html'>When switching from C++ to C# one of the thing I was glad was gone was the need of always having to be aware of memory leaks caused by forgetting calling delete() and similar stuff.&lt;br /&gt;During the development of the ByggOffice application, I soon found out that this was not completely true. Even in managed .Net code you still have to watch out for situations that will cause memory leaks.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Do we have memory leakage in .Net applications?&lt;/strong&gt;&lt;br /&gt;A very simple way to start leaking memory in a .Net windows application is to just do what almost all examples shows you to do to handle UI state:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;protected override void OnLoad(EventArgs e) {  &lt;br /&gt;&amp;nbsp;&amp;nbsp;Application.Idle += new EventHandler(Application_Idle);&lt;br /&gt;}&lt;br /&gt;void Application_Idle(object sender, EventArgs e) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;// do some processing to check and update UI state&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The tiny little detail that is let out here is that this will in effect add a reference from the form to the Application object. And as you probably would guess, the Application object will not go out of scope as long as your application is running. &lt;br /&gt;&lt;br /&gt;This will cause the form to stay in memory as long as the application is running. And not only the form, but all objects that the form is referencing as well. &lt;br /&gt;And this goes even if you call Close, Dispose or whatever you like on the form. As long as it’s holding on to that reference to the Application object, it will not be collected by the GC and it will not free the memory used.&lt;br /&gt;&lt;br /&gt;In a real-life application this may very well mean that the form will consume several MB of memory each time it is shown. And each new instance of that form will consume the same memory all over again.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;But can’t it be solved?&lt;/strong&gt;&lt;br /&gt;Yes, it can.&lt;br /&gt;&lt;br /&gt;As listening to the Application.Idle event is actually a very useful way of updating the UI state you should still continue to use this method. &lt;br /&gt;The fix for this issue is actually quite easy; just remove the event handler in the Dispose method of the form like this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;protected override void Dispose(bool disposing) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;Application.Idle -= new EventHandler(Application_Idle);&lt;br /&gt;&amp;nbsp;&amp;nbsp;if (disposing &amp;&amp; (components != null)) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;components.Dispose();&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;base.Dispose(disposing);&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;The problem here is not to actually write the code, it’s to remember that you have to write the code and that this is not handled just because you are writing in a managed language.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;And BTW: that other small issue:&lt;/strong&gt;&lt;br /&gt;Just thought I should mention this while I’m onto it.&lt;br /&gt;Calling Close on a form shown using the ShowDialog() method will NOT dispose the form, and if the form is not disposed the Dispose method will not be called and the form will again be left in memory as long as the application is running.&lt;br /&gt;&lt;br /&gt;This means that you have two options.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;Ensure that anyone using your form as a dialog calls it like this:&lt;br /&gt;  &lt;code&gt;&lt;br /&gt;  using(MyForm frm = new MyForm()){&lt;br /&gt;  &amp;nbsp;&amp;nbsp;frm.ShowDialog(this); &lt;br /&gt;  }&lt;/code&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Move your event disconnection method to a different place, for example into the OnClosed method like this:&lt;br /&gt;  &lt;code&gt;&lt;br /&gt;  protected override void OnClosed(EventArgs e){&lt;br /&gt;  &amp;nbsp;&amp;nbsp;Application.Idle&amp;nbsp;-=&amp;nbsp;new&amp;nbsp;EventHandler(Application_Idle);&lt;br /&gt;  }&lt;/code&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;In theory the user should be using the using() approach as it will ensure that the forms Dispose() method is called in all cases and that any nessesarly deallocation done by the form is called.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;However, in the real life that is not how stuff is working and depending on others to do this is a long shoot that I would not recommend.&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38911028-117589009761540501?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/117589009761540501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=117589009761540501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/117589009761540501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/117589009761540501'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2007/04/no-more-memory-leakage-part-i.html' title='No more memory leakage, part I'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38911028.post-117587821585435145</id><published>2007-04-06T09:44:00.000-07:00</published><updated>2007-04-06T09:50:15.860-07:00</updated><title type='text'>Hello, and welcome to my blogspace</title><content type='html'>In this blog I will write about different stuff that I'm conserned about.&lt;br /&gt;Initially I think that this blog mainly will be regarding developer spesific stuff and not so mutch about personal stuff like my family. Maybe that will be added in a separate blog later on, we'll see.&lt;br /&gt;&lt;br /&gt;I really wonder if anyone is going to be reading this stuff. If not it will at least work as my own personal diary regarding development technics and simular stuff.&lt;br /&gt;&lt;br /&gt;Happy reading!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38911028-117587821585435145?l=trond-eirik.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://trond-eirik.blogspot.com/feeds/117587821585435145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=38911028&amp;postID=117587821585435145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/117587821585435145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38911028/posts/default/117587821585435145'/><link rel='alternate' type='text/html' href='http://trond-eirik.blogspot.com/2007/04/hello-and-welcome-to-my-blogspace.html' title='Hello, and welcome to my blogspace'/><author><name>TEK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
