<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.10" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Orchestra Technology</title>
	<link>http://blog.orchestratechnology.com.br</link>
	<description>Software Development</description>
	<pubDate>Wed, 05 May 2010 02:43:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.10</generator>
	<language>en</language>
			<item>
		<title>Code Review Workbook Template</title>
		<link>http://blog.orchestratechnology.com.br/2010/04/30/code-review-workbook-template/</link>
		<comments>http://blog.orchestratechnology.com.br/2010/04/30/code-review-workbook-template/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 12:56:56 +0000</pubDate>
		<dc:creator>Evandro Paula</dc:creator>
		
		<category>Ferramentas</category>

		<guid isPermaLink="false">http://blog.orchestratechnology.com.br/2010/04/30/code-review-workbook-template/</guid>
		<description><![CDATA[1. Requirements

Microsoft Office Excel 2007


2. Objective
Recently, I was engaged on a project to review a .NET application code. At the beginning, while clarifying customer’s expectations about the output of this job, I have found that customer wanted to have a dashboard that could him to have an idea of the “healthy” of the application or [...]]]></description>
			<content:encoded><![CDATA[<h2>1. Requirements</h2>
<ul>
<li>Microsoft Office Excel 2007</li>
</ul>
<p><br/></p>
<h2>2. Objective</h2>
<p>Recently, I was engaged on a project to review a .NET application code. At the beginning, while clarifying customer’s expectations about the output of this job, I have found that customer wanted to have a dashboard that could him to have an idea of the “healthy” of the application or to help him to decide when a version would be ready to be deployed in production.</p>
<p>First, I defined 4 categories of issues that could be found during revision process: performance, scalability, maintainability and security. Also, I have attributed to each on these categories a threshold based on what customer feels it is more important. The sum of these values cannot exceed 100% because <strong>“an application that needs to be very secure will not be as fast as it could be”</strong>.</p>
<p>This is very handy because companies of different segments have different expectations about software, for example, on one hand security could be a number one priority for financial companies, on the other hand performance could be a priority for telemarketing companies. </p>
<p><br/></p>
<h2>3. Walkthrough</h2>
<p>Enter the name of all development team members in the <strong>People</strong> sheet:<br />
<img src="http://www.orchestratechnology.com.br/blog/ferramentas/codereviewworkbook/PeopleSheet.jpg"><br />
<br/><br />
Enter the types of issues that can be found during code revision and their thresholds on the <strong>Threshold</strong> sheet. Remember that the sum of theses values cannot exceed 100%:<br />
<img src="http://www.orchestratechnology.com.br/blog/ferramentas/codereviewworkbook/ThresholdSheet.jpg"><br />
<br/><br />
Review the application code and fill up the <strong>Defects</strong> sheet:<br />
<img src="http://www.orchestratechnology.com.br/blog/ferramentas/codereviewworkbook/DefectsSheet.jpg"><br />
<br/><br />
Follow the results on the <strong>Report</strong> sheet and discuss them with your caustomer:</p>
<p><img src="http://www.orchestratechnology.com.br/blog/ferramentas/codereviewworkbook/ReportSheet.jpg"><br />
<br/></p>
<h2>4. Resources</h2>
<p>You can download the workbook template file from <a href="http://www.orchestratechnology.com.br/blog/ferramentas/codereviewworkbook/CodeReviewTemplate.zip">http://www.orchestratechnology.com.br/blog/ferramentas/codereviewworkbook/CodeReviewTemplate.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orchestratechnology.com.br/2010/04/30/code-review-workbook-template/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Multi-Thread Application Debugging Tips</title>
		<link>http://blog.orchestratechnology.com.br/2010/01/26/multi-thread-application-debugging-tips/</link>
		<comments>http://blog.orchestratechnology.com.br/2010/01/26/multi-thread-application-debugging-tips/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 15:34:09 +0000</pubDate>
		<dc:creator>Evandro Paula</dc:creator>
		
		<category>Visual Studio.NET 2008</category>

		<guid isPermaLink="false">http://blog.orchestratechnology.com.br/2010/01/26/multi-thread-application-debugging-tips/</guid>
		<description><![CDATA[1. Requirements
Windows 7 Enterprise Edition (32-Bit OS)
.Net Framework 3.5 SP1
Compiler  Version 3.5.30729.4918
Visual Studio 2008 Version 9.0.30729.1

2. Purpose
Sometimes it can be cumbersome to debug multi-thread applications, trying to use very simple features such as “Step Into” (F11), “Step Over” (F10) and “Step Out” (Shift + F11) can easily mess your mind up. Most developers that [...]]]></description>
			<content:encoded><![CDATA[<h2>1. Requirements</h2>
<p>Windows 7 Enterprise Edition (32-Bit OS)<br />
.Net Framework 3.5 SP1<br />
Compiler  Version 3.5.30729.4918<br />
Visual Studio 2008 Version 9.0.30729.1<br />
<br/></p>
<h2>2. Purpose</h2>
<p>Sometimes it can be cumbersome to debug multi-thread applications, trying to use very simple features such as “Step Into” (F11), “Step Over” (F10) and “Step Out” (Shift + F11) can easily mess your mind up. Most developers that use Visual Studio as their primary IDE, are not aware of its multi-thread debugging features. So, I decided to post several tips and tricks that can be very handy while debugging this kind of applications.<br />
<br/></p>
<h2>3. Demo</h2>
<p>Before we begin, a sample multi-thread application will be necessary to apply the techniques throughout this post. It is a simple Console Application that creates two threads, <strong>Thread A</strong> and <strong>Thread B</strong>, which will count from 0 to 100, printing “Thread A - 0”, “Thread A - 1”, and so forth. Take a look at the following illustrations:</p>
<pre style="font-size: 12px; background-color: #ffffcc; color: #0033cc;line-height:120%;white-space:pre-wrap;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;overflow:hidden">
using System;
using System.Threading;

namespace MultiThreadDebugging
{
    class Program
    {
        static void Main(string[] args)
        {
            Thread threadA = new Thread(Execute);
            threadA.Name = "Thread A";
            threadA.Start(threadA.Name);

            Thread threadB = new Thread(Execute);
            threadB.Name = "Thread B2";
            threadB.Start(threadB.Name);

            Console.ReadLine();
        }

        static void Execute(object threadName)
        {
            for (int i = 0; i < 100; i++)
            {
                Console.WriteLine(threadName + " - " + i);
            }
        }
    }
}
</pre>
<p>The following illustration shows the expected output  from the application:</p>
<p><center><br />
<img src="http://www.orchestratechnology.com.br/blog/vsnet2008/vsmultithreaddebug/ApplicationResult.jpg" border="0"/><br />
</center><br />
<br/><br />
Set up a break point on <strong>line 25</strong> and hit <strong>F5</strong> to run the console application.</p>
<p><center><br />
<img src="http://www.orchestratechnology.com.br/blog/vsnet2008/vsmultithreaddebug/VsSetupBreakpointLine25.jpg" border="0"/><br />
</center><br />
<br/><br />
After the execution stop on the breakpoint, click on menu <strong>Debug > Windows > Threads</strong> or press <strong>CRTL + D + T</strong> to exhibit the Threads window. Below, you will find an illustration of this window:</p>
<p><center><br />
<img src="http://www.orchestratechnology.com.br/blog/vsnet2008/vsmultithreaddebug/VsThreadsWindow.jpg" border="0"/><br />
</center><br />
<br/><br />
As you can see in the above picture, the Main Thread is differentiated with a green square and the current thread is marked with a yellow arrow. Also, other threads appear on the list, which are loaded by Visual Studio and CLR. Thread B does not appear in the thread list because it is waiting to execute. However, there is an easy way to show where are all the threads hanging around. I order to do that, click on menu </p>
<p>Click on the <strong>Show Threads</strong> in Source button located on Debug toolbar:</p>
<p><center><br />
<img src="http://www.orchestratechnology.com.br/blog/vsnet2008/vsmultithreaddebug/VsDebugToolbar.jpg" border="0"/><br />
</center><br />
<br/><br />
Next, you will see that an icon composed of two waves appear on the left side of the row numbers indicating where the Main Thread execution is hanging. Also, the line is highlited, in this case, with a gray background color. That is why Thread B does not appear on the list, it did not started yet.</p>
<p><center><br />
<img src="http://www.orchestratechnology.com.br/blog/vsnet2008/vsmultithreaddebug/VsThreadLocation.jpg" border="0"/><br />
</center><br />
<br/><br />
Now, that the basics are covered, let’s see how can tell the Debbugger to stop only when the executing thread is Thread B, which is very handy while executing very common features such as Step Into, Step Over and Step Out.</p>
<p>Stop running the console application and right click the breakpoint and choose Filter option:</p>
<p><center><br />
<img src="http://www.orchestratechnology.com.br/blog/vsnet2008/vsmultithreaddebug/VsBreakpointFilter.jpg" border="0"/><br />
</center><br />
<br/><br />
Using the ThreadName instead of ThreadId is most of the time better, because the thread id is provided by the operational system kernel and changes among. Hit F5 run the console application again and notice that while debugging the breakpoint will stop only for Thread B.</p>
<p><center><br />
<img src="http://www.orchestratechnology.com.br/blog/vsnet2008/vsmultithreaddebug/VsViewOtherThreadsLocation.jpg" border="0"/><br />
</center><br />
<br/><br />
Another feature that I would like to point here is breakingponts acting like trace. Let’s suppose that you would like to trace your application, a very powerful and common way is to instrument your with the trace mechanisms of the .NET platform. However, sometimes, you only need a simple information, so it’s possible to achieve the desired result without having to change your code.</p>
<p>Rick click the breakpoint, choose <b>When Hit</b> option and set the <b>“Print a message” with $TNAME = {i}</b>, where <b>$TNAME</b> will print the thread name (Thread A or Thread B) and <strong>{i}</strong> will print the i variable value. Take a look at following illustration:</p>
<p><center><br />
<img src="http://www.orchestratechnology.com.br/blog/vsnet2008/vsmultithreaddebug/VsWhenBrealpointIsHit.jpg" border="0"/><br />
<br/><br />
<img src="http://www.orchestratechnology.com.br/blog/vsnet2008/vsmultithreaddebug/VsWhenBrealpointIsHitOutput.jpg" border="0"/><br />
</center><br />
<br/><br />
Last tip, if want to save the <strong>Output Windows</strong> content on a text file just press <b>CTRL + S</b>.<br />
<br/></p>
<h2>4. Resources</h2>
<p>There is more content regarding breakpoint and tracepoints on <a href="MSDN http://msdn.microsoft.com/en-us/library/ktf38f66.aspx">MSDN http://msdn.microsoft.com/en-us/library/ktf38f66.aspx</a>.
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orchestratechnology.com.br/2010/01/26/multi-thread-application-debugging-tips/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Improving N-layer Application Encapsulation</title>
		<link>http://blog.orchestratechnology.com.br/2010/01/11/improving-n-layer-application-encapsulation/</link>
		<comments>http://blog.orchestratechnology.com.br/2010/01/11/improving-n-layer-application-encapsulation/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 17:36:50 +0000</pubDate>
		<dc:creator>Evandro Paula</dc:creator>
		
		<category>.NET 3.5</category>

		<category>Software Architecture</category>

		<guid isPermaLink="false">http://blog.orchestratechnology.com.br/2010/01/11/improving-n-layer-application-encapsulation/</guid>
		<description><![CDATA[1 Requirements

Windows 7 Enterprise Edition (32-Bit OS)
.Net Framework 3.5 SP1
C# Compiler  Version 3.5.30729.4918
Visual Studio 2008 Version 9.0.30729.1


2 Problem
Recently, I have been seeing people developing N-layer applications coding all classes from all layers with the public access modifier. The motivation for that is because functionalities that reside on an assembly needs be accessed from the [...]]]></description>
			<content:encoded><![CDATA[<h2>1 Requirements</h2>
<ul>
<li>Windows 7 Enterprise Edition (32-Bit OS)</li>
<li>.Net Framework 3.5 SP1</li>
<li>C# Compiler  Version 3.5.30729.4918</li>
<li>Visual Studio 2008 Version 9.0.30729.1</li>
</ul>
<p><br/></p>
<h2>2 Problem</h2>
<p>Recently, I have been seeing people developing N-layer applications coding all classes from all layers with the public access modifier. The motivation for that is because functionalities that reside on an assembly needs be accessed from the previous assembly in the call stack, for example, a class on the business logic layer needs to access another in the data access layer. Depending on the size of your team, the application complexity, project milestones and deadlines, etc., this design decision can lead to undesired results, such as:</p>
<ul>
<li>Inexperienced developers can accidentally make a mess with the calls, for example, coding the presentation layer to access directly the data access layer.</li>
<li>Developers pressured by a tight milestone/deadline can be tempted to do exact the same of previous item.</li>
<li>Suddenly, you realize that the robust exception handling mechanism implemented on the façades in the business logic layer is not working for several features. Moreover, the integration with third-party applications won’t be that easy because several features do not have a business logic entry.</li>
</ul>
<p>Before getting the hands dirty, I do think is important to state several concepts regarding layers.<br />
Dividing the application in layers allows you to create logical divisions to group code that have similar purpose. On one hand, this can help developers to understand how the application is organized, where they should put their code, etc. However, on the other hand, keep in mind that a logical architecture is not required to make your application work. Also, try not to confuse the term layer with tier, which is more related to physical division (process and/or machine). Below, there is an illustration of a simple N-layer application:<br />
<center><br />
<img src="http://www.orchestratechnology.com.br/Blog/SoftwareArchitecture/20100111_1459_SimpleNLayerApplication.png" border="0"/><br />
</center></p>
<p><br/></p>
<h2>3 Workaround</h2>
<p>There are several workarounds that can be applied to solve the encapsulation problems presented on the previous section.</p>
<p>One possibility it to create the layers on only one logical unit (assembly) coding all BLL, DAL and DTO classes and/or structs, which should be exposed with the internal access modifier, for example:<br />
<center><br />
<img src="http://www.orchestratechnology.com.br/Blog/SoftwareArchitecture/20100111_1457_Only1AssemblyApproach.png" border="0"/><br />
</center></p>
<p>I have been hearing several people discussing about this approach not being efficient, because the project would always be checked out to another developer, becoming a contention point during coding phase. Presonaly, I think this  can be true on several scenarios, such as:</p>
<ul>
<li>Project has more than least 20 developers and coding phase is soaring with people are adding objects to the Visual Studio project like crazy.</li>
<li>Project has 5 developers and a couple of them constantly forget to check-in the project after adding an object, preventing others to do their jobs. This can be a consequence of: lack of a simple check-in/check-out process; or inexperience of a team member, who does not know the trouble his making to others or he is to focus to get the job done and just forget to check-in the project.</li>
</ul>
<p><strong>Tip</strong>: after adding an object to a project, for example, a class, make the check-in without starting coding, this way you avoid breaking the code. After that, check the file out and start getting your hands dirty.</p>
<p>Another approach would be having the layers separated in different assemblies, coding all classes with the internal access modifier and configuring which assemblies would be able to make calls to these internal functionalities.<br />
To better exemplify this approach, the following steps will describe how it is possible to exposed functionalities from the Data Access Layer (DAL) only to the Business Logic Layer (BLL), supposing that DAL classes have the internal access modifier specified:<br />
<center><br />
<img src="http://www.orchestratechnology.com.br/Blog/SoftwareArchitecture/20100111_1459_InternalsVisibleTo_BLLAndDAL.png" border="0"/><br />
</center></p>
<ul>
<li>Sign both Application.BLL.dll and Application.DAL.dll with a strong name <strong style="color: #DD0000; background-color:#99ffcc;">(through VS IDE or sn.exe)</strong>;</li>
<li>Get the public key from the Application.BLL.dll assembly with <strong style="color: #DD0000; background-color:#99ffcc;">sn –Tp Application.BLL.dll</strong>;</li>
<li>Configure Application.DAL.dll to expose <strong style="color: #DD0000; background-color:#99ffcc;">internal </strong>classes to Application.BLL.dll. This can be achieved through adding the <strong style="color: #DD0000; background-color:#99ffcc;">[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(&#8221;Application.BLL, PublicKey=002400000480000094000000060200000024000052<br />
53413100040000010001003396ebc2b7199d23b73c40982b891fb3eb<br />
ecaa93deceaf189f12b38b252d7e144991ad1736ab900945e5b3d0e0<br />
15e833631cadb239c8325baa3f7662c7b1208456173cc8b233485bee<br />
32e4c8b5292b0d26703585737de948af9d95318751df369896a76cfb<br />
561ec1cad90a324a131bfeb7ecb54c9f35f262c2851234749ec8c9&#8243;)]</strong> in the AssemblyInfo.cs in Application.DAL project. <strong>Caution</strong>: your public key will be different from the one in this example;</li>
<li>Compile your solution and go for it.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.orchestratechnology.com.br/2010/01/11/improving-n-layer-application-encapsulation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>&#8220;Excellence is not a skill. It is an attitude&#8221;</title>
		<link>http://blog.orchestratechnology.com.br/2009/09/28/excellence-is-not-a-skill-it-is-an-attitude/</link>
		<comments>http://blog.orchestratechnology.com.br/2009/09/28/excellence-is-not-a-skill-it-is-an-attitude/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 14:45:12 +0000</pubDate>
		<dc:creator>Evandro Paula</dc:creator>
		
		<category>Frases célebres</category>

		<guid isPermaLink="false">http://blog.orchestratechnology.com.br/2009/09/28/excellence-is-not-a-skill-it-is-an-attitude/</guid>
		<description><![CDATA[Ralph Marston
http://greatday.com/ralph/personal.html

]]></description>
			<content:encoded><![CDATA[<p><strong>Ralph Marston</strong><br />
<a href="http://greatday.com/ralph/personal.html">http://greatday.com/ralph/personal.html</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orchestratechnology.com.br/2009/09/28/excellence-is-not-a-skill-it-is-an-attitude/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Leitura de Chaves de Configuração para Sistema Non-Stop</title>
		<link>http://blog.orchestratechnology.com.br/2009/09/28/leitura-de-chaves-de-configuracao-para-sistema-non-stop/</link>
		<comments>http://blog.orchestratechnology.com.br/2009/09/28/leitura-de-chaves-de-configuracao-para-sistema-non-stop/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 14:17:52 +0000</pubDate>
		<dc:creator>Evandro Paula</dc:creator>
		
		<category>.NET 3.5</category>

		<guid isPermaLink="false">http://blog.orchestratechnology.com.br/2009/09/28/leitura-de-chaves-de-configuracao-para-sistema-non-stop/</guid>
		<description><![CDATA[Objetivo
O propósito deste artigo é apresentar um mecanismo que viabilize a leitura de chaves de configuração &#8220;atualizadas&#8221; após a alteração do arquivo de configurações da aplicação (.exe.config).
Este mecanismo pode ser muito útil caso você tenha um sistema non-stop, como por exemplo um Windows Service, onde você não precisará reiniciar o serviço para que as novas [...]]]></description>
			<content:encoded><![CDATA[<h2>Objetivo</h2>
<p>O propósito deste artigo é apresentar um mecanismo que viabilize a leitura de chaves de configuração &#8220;atualizadas&#8221; após a alteração do arquivo de configurações da aplicação (<nome da aplicação>.exe.config).<br />
Este mecanismo pode ser muito útil caso você tenha um sistema non-stop, como por exemplo um Windows Service, onde você não precisará reiniciar o serviço para que as novas configurações sejam reconhecidas pelo serviço.<br />
O exemplo descrito ao longo deste post não se aplica ao ASP.NET, visto que por padrão, o IIS 6.0/7.0/7.5 cria um novo processo quando o web.config é alterado.</p>
<h2>Solução</h2>
<p>A solução consiste em criar um objeto <b>FileSystemWatcher</b> que receba uma notificação quando o arquivo de configurações for alterado. Segue abaixo o código-fonte de uma aplicação console:</p>
<pre style="font-size: 12px; background-color: #ffffcc; color: #0033cc;line-height:120%;white-space:pre-wrap;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;overflow:hidden">
class Program
{
    static void Main(string[] args)
    {
        <strong style="color: #DD0000;">/* Objeto FileSystemWatcher que sera notificado quando
         * o arquivo de configurações for alterado.
         */</strong>
        string filePath=System.Reflection.Assembly.GetExecutingAssembly().Location.Replace(&#8221;ConfigurationManagerCache.exe&#8221;, &#8220;&#8221;);
        System.IO.FileSystemWatcher watcher = new System.IO.FileSystemWatcher(filePath, &#8220;ConfigurationManagerCache.exe.config&#8221;);
        watcher.NotifyFilter = System.IO.NotifyFilters.LastAccess;
        watcher.Changed += new System.IO.FileSystemEventHandler(ConfigurationFileChange);
        watcher.EnableRaisingEvents = true;

        while (true)
        {
            System.Console.WriteLine(&#8221;Name={0}&#8221;, System.Configuration.ConfigurationManager.AppSettings[&#8221;Name&#8221;]);
            System.Console.WriteLine(&#8221;LocalDB={0}&#8221;, System.Configuration.ConfigurationManager.ConnectionStrings[&#8221;LocalDB&#8221;].ConnectionString);
            System.Console.WriteLine();
            System.Threading.Thread.Sleep(1000);
        }
    }

    static void ConfigurationFileChange(object sender, System.IO.FileSystemEventArgs e)
    {
        <strong style="color: #DD0000;">/* Este sleep e necessario para que o usuario tenha ate 5 segundos
         * para salvar e fechar o arquivo antes da tentativa de leitura
         * pelo programa o que causara uma excecao caso o arquivo ainda
         * esteja aberto.
         */</strong>
        System.Threading.Thread.Sleep(5000);

        <strong style="color: #DD0000;">//Faz SOMENTE o refresh das secoes connectionStrings e appSettings</strong>
        System.Configuration.ConfigurationManager.RefreshSection(&#8221;connectionStrings&#8221;);
        System.Configuration.ConfigurationManager.RefreshSection(&#8221;appSettings&#8221;);

        System.Console.WriteLine();
        System.Console.WriteLine(&#8221;&#8211; Sections &#8216;connectionStrings&#8217; and &#8216;appSettings&#8217; refreshed. &#8211;&#8221;);
        System.Console.WriteLine();
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.orchestratechnology.com.br/2009/09/28/leitura-de-chaves-de-configuracao-para-sistema-non-stop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gerador de Matriz CRUD 1.0.0.1</title>
		<link>http://blog.orchestratechnology.com.br/2009/05/12/gerador-de-matriz-crud-1001/</link>
		<comments>http://blog.orchestratechnology.com.br/2009/05/12/gerador-de-matriz-crud-1001/#comments</comments>
		<pubDate>Tue, 12 May 2009 15:17:44 +0000</pubDate>
		<dc:creator>Evandro Paula</dc:creator>
		
		<category>Ferramentas</category>

		<guid isPermaLink="false">http://blog.orchestratechnology.com.br/2009/05/12/gerador-de-matriz-crud-1001/</guid>
		<description><![CDATA[1 Alterações
A versão 1.0.0.1 da ferramena CRUDMatrixGenerator  possou por um processo de Code Refactory e possui as seguintes novas funcionalidades:

Detecção de queries executadas contra outros bancos de dados que não o atual.
Além de analisar Stored Procedure, a ferramente também analisará Views.
Inclusão da coluna Type, responsável por identificar o tipo de objeto analisado, Stored Procedure [...]]]></description>
			<content:encoded><![CDATA[<h2>1 Alterações</h2>
<p>A versão 1.0.0.1 da ferramena <strong>CRUDMatrixGenerator </strong> possou por um processo de <strong>Code Refactory</strong> e possui as seguintes novas funcionalidades:</p>
<ul>
<li>Detecção de queries executadas contra outros bancos de dados que não o atual.</li>
<li>Além de analisar <strong>Stored Procedure</strong>, a ferramente também analisará <strong>Views</strong>.</li>
<li>Inclusão da coluna <strong>Type</strong>, responsável por identificar o tipo de objeto analisado, <strong>Stored Procedure</strong> ou <strong>View</strong>.</li>
</ul>
<p>Veja abaixo as ilustrações, respectivamente, do log gerado pela ferramenta e da visualização dos dados no Excel (após procedimento importação):<br />
<br/><br />
<img src="http://www.orchestratechnology.com.br/blog/ferramentas/CRUDMatrixGeneratorLog1.0.0.1.jpg" alt="Log" /><br />
<br/><br />
<img src="http://www.orchestratechnology.com.br/blog/ferramentas/CRUDMatrixGeneratorExcel1.0.0.1.jpg" alt="Log" /><br />
<br/></p>
<h2>2 Instalador</h2>
<p>O instalador está disponível no endereço <a href="http://www.orchestratechnology.com.br/blog/ferramentas/CRUDMatrixGeneratorSetup_1.0.0.1.zip">CRUDMatrixGeneratorSetup_1.0.0.1.zip</a>.</p>
<h2>3 Código-fonte</h2>
<p>Você pode baixar o código-fonte desta ferramenta no endereço <a href="http://www.orchestratechnology.com.br/blog/ferramentas/CRUDMatrixGenerator_SourceCode_1.0.0.1.zip">CRUDMatrixGenerator_SourceCode_1.0.0.1.zip</a>.
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orchestratechnology.com.br/2009/05/12/gerador-de-matriz-crud-1001/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gerador de Matriz CRUD 1.0.0.0</title>
		<link>http://blog.orchestratechnology.com.br/2009/04/03/gerador-de-matriz-crud/</link>
		<comments>http://blog.orchestratechnology.com.br/2009/04/03/gerador-de-matriz-crud/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 17:44:30 +0000</pubDate>
		<dc:creator>Evandro Paula</dc:creator>
		
		<category>Ferramentas</category>

		<guid isPermaLink="false">http://blog.orchestratechnology.com.br/2009/04/03/gerador-de-matriz-crud/</guid>
		<description><![CDATA[1 Objetivo
Decidi desenvolver a ferramenta CRUDMatrixGenerator quando vi um amigo fazendo um levantamento para mapear quais stored procedures de um determinado banco de dados referenciavam quais tabelas. O processo era bem manual e poderia ser bastante trabalhoso dependendo do número de objetos no banco de dados.
2 Demonstração
A utilização da ferramente é bem simples, basta executar [...]]]></description>
			<content:encoded><![CDATA[<h2>1 Objetivo</h2>
<p>Decidi desenvolver a ferramenta <strong>CRUDMatrixGenerator</strong> quando vi um amigo fazendo um levantamento para mapear quais stored procedures de um determinado banco de dados referenciavam quais tabelas. O processo era bem manual e poderia ser bastante trabalhoso dependendo do número de objetos no banco de dados.</p>
<h2>2 Demonstração</h2>
<p>A utilização da ferramente é bem simples, basta executar o <strong>CRUDMatrixGenerator</strong> informando a string de conexão do banco de dados e o diretório onde o relatório deverá ser gravado, respectivamente, definidos pelos parâmetros <strong>-c</strong> e <strong>-o</strong>. Veja a ilustração abaixo:</p>
<p><img src="http://www.orchestratechnology.com.br/blog/ferramentas/CRUDMatrixGeneratorConsole.jpg" border ="0"/></p>
<p>De acordo com a execução ilustrada acima, um arquivo texto, cujo nome segue o formato <strong>[GUID].txt</strong>, é gravado no diretório <strong>C:\Temp</strong>. Veja a ilustração abaixo:</p>
<p><img src="http://www.orchestratechnology.com.br/blog/ferramentas/CRUDMatrixGeneratorLog.jpg" border ="0"/></p>
<p>Em seguida, basta importar o arquivo para o Excel informando o <strong><TAB></strong> como separador de colunas. Veja o resultado na ilustração abaxo:</p>
<p><img src="http://www.orchestratechnology.com.br/blog/ferramentas/CRUDMatrixGeneratorExcel.jpg" border ="0"/></p>
<h2>3 Instalador</h2>
<p>O instalador está disponível no endereço <a href="http://www.orchestratechnology.com.br/blog/ferramentas/CRUDMatrixGeneratorSetup.zip">CRUDMatrixGeneratorSetup.zip</a> e o script do banco de dados utilizado no exemplo está disponível em <a href="http://www.orchestratechnology.com.br/blog/ferramentas/DatabaseScript.zip">DatabaseScript.zip</a>.</p>
<h2>4 Código-fonte</h2>
<p>Você pode baixar o código-fonte desta ferramenta no endereço <a href="http://www.orchestratechnology.com.br/blog/ferramentas/CRUDMatrixGeneratorSourceCode.zip"><br />
CRUDMatrixGeneratorSourceCode.zip</a>.
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orchestratechnology.com.br/2009/04/03/gerador-de-matriz-crud/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bug - Verificação do Obsolete pelo Compilador do C#</title>
		<link>http://blog.orchestratechnology.com.br/2008/11/04/bug-verificacao-do-obsolete-pelo-compilador-do-c/</link>
		<comments>http://blog.orchestratechnology.com.br/2008/11/04/bug-verificacao-do-obsolete-pelo-compilador-do-c/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 20:45:21 +0000</pubDate>
		<dc:creator>Evandro Paula</dc:creator>
		
		<category>C#</category>

		<guid isPermaLink="false">http://blog.orchestratechnology.com.br/2008/11/04/bug-verificacao-do-obsolete-pelo-compilador-do-c/</guid>
		<description><![CDATA[1 Requerimentos de sistema
O bug relacionado neste post foi detectado utilizando-se os softwares abaixo:
• Windows Vista Enterprise Edition SP1.
• Visual Studio Team System 2008 (2008 9.0.21022.8 RTM).
• .NET Framework 3.5.
• Compilador C# 3.5.21022.8
2 Demonstração
Veja abaixo um exemplo de utilização do atributo Obsolete:

public class User
{
    private System.Collections.Generic.Dictionary&#60;int, string&#62; users;

    [System.Obsolete(&#8221;Esta [...]]]></description>
			<content:encoded><![CDATA[<h2>1 Requerimentos de sistema</h2>
<p>O bug relacionado neste post foi detectado utilizando-se os softwares abaixo:<br />
• Windows Vista Enterprise Edition SP1.<br />
• Visual Studio Team System 2008 (2008 9.0.21022.8 RTM).<br />
• .NET Framework 3.5.<br />
• Compilador C# 3.5.21022.8</p>
<h2>2 Demonstração</h2>
<p>Veja abaixo um exemplo de utilização do atributo <strong>Obsolete</strong>:</p>
<pre style="font-size: 12px; background-color: #ffffcc; color: #0033cc;line-height:120%;white-space:pre-wrap;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;overflow:hidden">
public class User
{
    private System.Collections.Generic.Dictionary&lt;int, string&gt; users;

    <strong style="background-color:#7FFF7F;">[System.Obsolete(&#8221;Esta propriedade está obsoleta.&#8221;, true)]</strong>
    public System.Collections.Generic.Dictionary&lt;int, string&gt; Users
    {
        get
        {
            return this.users;
        }
    }

    public User()
    {
        this.users=new System.Collections.Generic.Dictionary&lt;int,string&gt;();
        this.users.Add(0, &#8220;Evandro de Paula&#8221;);
    }
}
</pre>
<p>Note que a propriedade <strong>Users</strong> foi marcada como obsoleta, onde os parâmetros abaixo foram definidos como:<br />
• <strong>message = “Esta propriedade está obsoleta”</strong> (mensagem de erro ou alerta que é exibida durante a compilaçào quando a propriedade for utilizada).<br />
• <strong>error = true </strong>(indica que a utilização da propriedade obsoleta deve implicar em um erro de compilação).</p>
<p>Conforme o esperado, quando compilamos o código abaixo, obtemos um erro na linha em destaque:</p>
<pre style="font-size: 12px; background-color: #ffffcc; color: #0033cc;line-height:120%;white-space:pre-wrap;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;overflow:hidden">
class Program
{
    static void Main(string[] args)
    {
        User user = new User();
        System.Collections.Generic.Dictionary<int, string> users = <strong style="background-color:#7FFF7F;">user.Users;</strong>
        System.Console.ReadLine();
    }
}
</pre>
<p>Entretanto, se implemetarmos a alteração em destaque abaixo, onde não utilizamos diretamente a propriedade obsoleta, mas sim um elemento da coleção, notaremos que nenhum erro é informado durante o processo de compilação:</p>
<pre style="font-size: 12px; background-color: #ffffcc; color: #0033cc;line-height:120%;white-space:pre-wrap;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;overflow:hidden">
class Program
{
    static void Main(string[] args)
    {
        User user = new User();
        System.Console.WriteLine("Name: " + <strong style="background-color:#7FFF7F;">user.Users[0]</strong>);
        System.Console.ReadLine();
    }
}
</pre>
<h2>3 Conclusão</h2>
<p>Mantenha atenção redrobrada no emprego do atributo Obsolete na tentativa de minimizar a possibilidade de comportamentos inesperados pelo sistema.<br />
A boa notícia é que a correção deste bug já foi providenciada pelo time da Microsoft e deve estar disponível na próxima versão da plataforma .NET.</p>
<h2>4 Código-fonte</h2>
<p>Você pode baixar o código-fonte desta ferramenta no endereço <a href="http://www.orchestratechnology.com.br/blog/csharp/ObsoleteCheck.zip">http://www.orchestratechnology.com.br/blog/csharp/ObsoleteCheck.zip</a>.
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orchestratechnology.com.br/2008/11/04/bug-verificacao-do-obsolete-pelo-compilador-do-c/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Conversão de soluções criadas no Visual Studio 2008 para o Visual Studio 2005</title>
		<link>http://blog.orchestratechnology.com.br/2008/08/28/conversao-de-solucoes-criadas-no-visual-studio-2008-para-o-visual-studio-2005/</link>
		<comments>http://blog.orchestratechnology.com.br/2008/08/28/conversao-de-solucoes-criadas-no-visual-studio-2008-para-o-visual-studio-2005/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 19:25:21 +0000</pubDate>
		<dc:creator>Evandro Paula</dc:creator>
		
		<category>Ferramentas</category>

		<guid isPermaLink="false">http://blog.orchestratechnology.com.br/2008/08/28/conversao-de-solucoes-criadas-no-visual-studio-2008-para-o-visual-studio-2005/</guid>
		<description><![CDATA[1 Objetivo
Desenvolvi a ferramenta VS2008SolutionDowngrader com o propósito de converter soluções criadas no Visual Studio 2008 para o Visual Studio 2005. É importante mencionar que a ferramenta foi desenvolvida com o intuito de migrar apenas soluções com projetos C#.
Um backup dos arquivos .sln e .csproj. é realizado antes que o processo de conversão seja executado, [...]]]></description>
			<content:encoded><![CDATA[<h2>1 Objetivo</h2>
<p>Desenvolvi a ferramenta <strong>VS2008SolutionDowngrader</strong> com o propósito de converter soluções criadas no Visual Studio 2008 para o Visual Studio 2005. É importante mencionar que a ferramenta foi desenvolvida com o intuito de migrar apenas soluções com projetos C#.</p>
<p>Um backup dos arquivos <strong>.sln</strong> e <strong>.csproj</strong>. é realizado antes que o processo de conversão seja executado, isso garante que você não perca a versão original dos seus arquivos em caso de uma falha na ferramenta.</p>
<h2>2 Demonstração</h2>
<p>Abaixo você pode acompanhar uma demonstração de conversão da solução VS2008CSharpSolution, criada noVisual Studio Team System 2008, contendo 5 projetos do tipo: Class Library, Console Application, ASP.NET web site, Windows Application e Windows Service:</p>
<p>Solução criada no Visual Studio Team System 2008:</p>
<p><img src="http://www.orchestratechnology.com.br/blog/ferramentas/VS2008CSharpSolution.jpg" alt="Solução criada no Visual Studio Team System 2008" /></p>
<p>Executando a ferramenta de conversão:</p>
<p><img src="http://www.orchestratechnology.com.br/blog/ferramentas/ExecutingVS2008SolutionDowngrader.jpg" alt="Executando a ferramenta" /></p>
<p>Resultado da execução:</p>
<p><img src="http://www.orchestratechnology.com.br/blog/ferramentas/Output1VS2008SolutionDowngrader.jpg" alt="Output 1" /><br />
<img src="http://www.orchestratechnology.com.br/blog/ferramentas/Output2VS2008SolutionDowngrader.jpg" alt="Output 2" /></p>
<p>Abrindo a solução no Visual Studio Team System 2005:</p>
<p><img src="http://www.orchestratechnology.com.br/blog/ferramentas/VS2005CSharpSolution.jpg" alt="Output 2" /></p>
<h2>3 Instalador</h2>
<p>O instalador está disponível no endereço <a href="http://www.orchestratechnology.com.br/blog/ferramentas/VS2008SolutionDowngraderSetup.zip ">http://www.orchestratechnology.com.br/blog/ferramentas/VS2008SolutionDowngraderSetup.zip </a>.</p>
<h2>4 Código-fonte</h2>
<p>Você pode baixar o código-fonte desta ferramenta no endereço <a href="http://www.orchestratechnology.com.br/blog/ferramentas/VS2008SolutionDowngrader.zip ">http://www.orchestratechnology.com.br/blog/ferramentas/VS2008SolutionDowngrader.zip </a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orchestratechnology.com.br/2008/08/28/conversao-de-solucoes-criadas-no-visual-studio-2008-para-o-visual-studio-2005/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CREATE DATABASE</title>
		<link>http://blog.orchestratechnology.com.br/2008/08/21/boas-praticas-create-database/</link>
		<comments>http://blog.orchestratechnology.com.br/2008/08/21/boas-praticas-create-database/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 13:26:02 +0000</pubDate>
		<dc:creator>Evandro Paula</dc:creator>
		
		<category>SQL Server 2005</category>

		<guid isPermaLink="false">http://blog.orchestratechnology.com.br/2008/08/21/boas-praticas-create-database/</guid>
		<description><![CDATA[1 Introdução
No SQL Server é possível criarmos dois tipos de arquivos de dados, o primário e o secundário, sendo o primeiro tipo mandatório. De acordo com a documentação é possível criarmos 32.766 arquivos secundários.
Uma boa prática é deixar o arquivo de dados primário para o catálogo do banco de dados e armazenar os dados e [...]]]></description>
			<content:encoded><![CDATA[<h2>1 Introdução</h2>
<p>No SQL Server é possível criarmos dois tipos de arquivos de dados, o primário e o secundário, sendo o primeiro tipo mandatório. De acordo com a documentação é possível criarmos 32.766 arquivos secundários.</p>
<p>Uma boa prática é deixar o arquivo de dados primário para o catálogo do banco de dados e armazenar os dados e objetos, tais como, tabelas, procedimentos armazenados, visões, funções, etc., em arquivos secundários. Desta forma, podemos reduzir a contenção no acesso aos dados.</p>
<p>Grupos de arquivo são estruturas lógicas de agrupamento de arquivos que podem ser gerenciados como uma unidade. Assumindo a  recomendação apresentada no parágrafo anterior como premissa, por conseqüência é uma boa prática definir o arquivo de grupo do arquivo secundário como padrão, pois nele serão armazenados os dados e os objetos do banco de dados.</p>
<p>Veja o exemplo abaixo:</p>
<pre style="font-size: 12px; background-color: #ffffcc; color: #0033cc;line-height:120%;white-space:pre-wrap;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;overflow:hidden">
--CRIA O BANCO DE DADOS
PRINT 'Criando o banco de dados OrchestraTechnologyBlog...'
CREATE DATABASE OrchestraTechnologyBlog
ON
	PRIMARY
	(
		NAME='OrchestraTechnologyBlog',
		FILENAME='C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataOrchestraTechnologyBlogCatalog.mdf',
		SIZE=100MB,
		MAXSIZE=300MB,
		FILEGROWTH=50MB
	),
	FILEGROUP OrchestraTechnologyBlogFG1
	(
		NAME='OrchestraTechnologyBlogData1',
		FILENAME='C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataOrchestraTechnologyBlogData1.ndf',
		SIZE=500MB,
		MAXSIZE=UNLIMITED,
		FILEGROWTH=500MB
	)
	LOG ON
	(
		NAME='OrchestraTechnologyBlogLog',
		FILENAME='C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataOrchestraTechnologyBlogLog.ldf',
		SIZE=250MB,
		MAXSIZE=1GB,
		FILEGROWTH=15%
	)
GO
PRINT '>> Procesimento finalizado'

--DEFINE O FILEGROUP DE DADOS E OBJETOS DE BANCO COMO DEFAULT
PRINT 'Definindo o FILEGROUP OrchestraTechnologyBlogFG1 como padrao...'
ALTER DATABASE
	OrchestraTechnologyBlog
MODIFY FILEGROUP
	OrchestraTechnologyBlogFG1 DEFAULT
GO
PRINT '>> Procedimento finalizado'
</pre>
<h2>2 Pontos de atenção</h2>
<p>• Caso a propriedade o SIZE não seja especificada com um valor para arquivos do tipo secundários ou para o arquivo de log, os mesmos serão criados com o tamanho de 1MB.</p>
<p>• O valor máximo que pode ser definido na propriedade MAXSIZE para arquivos do tipo primário é de 16TB e para arquivos de log de 2TB. É possível definir esta propriedade como UNLIMITED para que o tamanho do arquivo cresça até que o espaço em disco acabe.</p>
<p>• O número 0 no FILEGROWTH serve para indicar que o arquivo não cresça automaticamente quando for necessário.</p>
<h2>3 Boas práticas</h2>
<p>• A recomendação da Microsoft para as extensões dos arquivos primário, secundário e de log é:  <strong>.mdf</strong> para o arquivo primário, <strong>.ndf</strong> para arquivos secundários e <strong>.ldf</strong> para arquivo de log.</p>
<p>• Baseado no plano de crescimento do banco de dados crie os arquivos com o maior tamanho possível para evitar a fragmentação, que por sua vez, exerce pressão no processo de I/O.</p>
<p>• Caso opte por utilizar o UNLIMITED no MAXSIZE, é vital ter um mecanismo para monitorar o espaço  em disco que envie alertas quando o mesmo estiver acabando, como por exemplo, o SCOM 2007.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orchestratechnology.com.br/2008/08/21/boas-praticas-create-database/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
