<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>DevFranca</title>
	<atom:link href="http://www.devfranca.com.br/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devfranca.com.br</link>
	<description>Tecnologia no Interior</description>
	<pubDate>Tue, 04 May 2010 17:11:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Utilizando A API do Google Maps no ASP.NET</title>
		<link>http://www.devfranca.com.br/2010/05/04/utilizando-a-api-do-google-maps-no-aspnet/</link>
		<comments>http://www.devfranca.com.br/2010/05/04/utilizando-a-api-do-google-maps-no-aspnet/#comments</comments>
		<pubDate>Tue, 04 May 2010 17:04:34 +0000</pubDate>
		<dc:creator>Bruno Bemfica</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Artigos]]></category>

		<category><![CDATA[Dicas]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[Google Maps]]></category>

		<guid isPermaLink="false">http://www.devfranca.com.br/2010/05/04/utilizando-a-api-do-google-maps-no-aspnet/</guid>
		<description><![CDATA[Este artigo destina-se a mostrar como utilizar a API do Google Maps integrada a um site ASP.NET, para que possamos exibir a localização de endereços diretamente na nossa página.
   
Primeiros passos
 O primeiro passo é fazer um cadastro no próprio google para obter uma chave de acesso ao Maps. Isso pode ser feito [...]]]></description>
			<content:encoded><![CDATA[<p>Este artigo destina-se a mostrar como utilizar a API do <a href="http://maps.google.com">Google Maps</a> integrada a um site ASP.NET, para que possamos exibir a localização de endereços diretamente na nossa página.<br />
 <span id="more-446"></span>  </p>
<h2>Primeiros passos</h2>
<p> O primeiro passo é fazer um cadastro no próprio google para obter uma chave de acesso ao Maps. Isso pode ser feito <a href="http://code.google.com/intl/pt-BR/apis/maps/signup.html">aqui</a>. Já tendo sua chave de acesso, pegaremos agora o <a href="http://googlemaps.subgurim.net/">Subgurim</a>, uma biblioteca freeware para acesso à API dos mapas do Google. Faça o Download e extraia na pasta Projects do Visual Studio. Crie um novo projeto de ASP.NET webforms, e dê a ele o nome que preferir. Em seguida, no Solution Explorer, clique com o botão direito em References, e vá em Add Reference. Clique na aba Browse, navegue até a pasta onde foi extraída a DLL do Subgurim, e adicione-a ao projeto. Após isso, abra seu web.config e adicione a chave que você obteve:
<pre>&lt;configuration
xmlns=&quot;http://schemas.microsoft.com/.NetConfiguration/v2.0&quot;&gt;
    ...
    &lt;appSettings&gt;
        &lt;add key=&quot;googlemaps.subgurim.net&quot; value=&quot;ChaveDeAcesso&quot;/&gt;
    &lt;/appSettings&gt;
     ...
&lt;/configuration&gt;</pre>
<p>Aqui cabe citar algo curioso: Eu modifiquei o nome da chave, de &quot;googlemaps.subgurim.net&quot; para apenas &quot;googlemaps&quot;, e ao executar a página nos ambientes de teste e produção, obtive uma mensagem de erro dizendo que a chave estava sendo utilizada em outro site, embora estivesse rodando normalmente na minha máquina de desenvolvimento. Provavelmente há alguma dependência forte dentro da biblioteca com relação ao nome do atributo. Sugiro que deixem exatamente este nome. </p>
<h2>Mãos à obra</h2>
<p>Vamos supor que temos uma empresa, cuja matriz fica em Porto Alegre, com filiais em Curitiba e São Paulo. Queremos exibir nosso endereço no mapa, assim que o cliente selecionar a filial que deseja em um DropDownList. O mapa será inicialmente carregado com o endereço da matriz. Criaremos um DropDownlist cujo Value é o endereço da empresa, e o texto exibido é composto por cidade e estado. Note que é preciso<strong> registrar o assembly</strong>, logo após a diretiva inicial da página. O código do seu arquivo ASPX deve ficar assim: </p>
<pre>&lt;%@ Page Language=&quot;C#&quot;
AutoEventWireup=&quot;true&quot; CodeBehind=&quot;Default.aspx.cs&quot;
Inherits=&quot;TesteComMapas._Default&quot; %&gt;
&lt;%@ register assembly=&quot;GMaps&quot;
namespace=&quot;Subgurim.Controles&quot; tagprefix=&quot;maps&quot; %&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0
Transitional//EN&quot;
&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;
&lt;head runat=&quot;server&quot;&gt;
    &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
    &lt;asp:ScriptManager runat=server ID=&quot;smanager&quot;/&gt;
    &lt;div&gt;&lt;asp:UpdatePanel ID=&quot;upanel&quot; runat=server&gt;
    &lt;ContentTemplate&gt;
    &lt;asp:Label ID=&quot;lbl1&quot;
Text=&quot;Selecione a filial: &quot; Visible=true runat=server/&gt;
      &lt;asp:DropDownList ID=&quot;cboEnderecos&quot;
runat=&quot;server&quot;  AutoPostBack=true
        onselectedindexchanged=&quot;cboEnderecos_SelectedIndexChanged&quot;&gt;
         &lt;asp:ListItem
Value=&quot;Avenida Ipiranga, 600, Partenon,
Porto Alegre - Rio Grande do Sul, Brasil&quot;
;&gt;Matriz - Porto Alegre - RS&lt;/asp:ListItem&gt;
        &lt;asp:ListItem
Value=&quot;Avenida Paulista, 1000, Consolação,
São Paulo, Brasil&quot;&gt;Filial São Paulo - SP&lt;/asp:ListItem&gt;
        &lt;asp:ListItem
Value=&quot;Praça Rui Barbosa,100 Centro,
Curitiba - Paraná, Brasil&quot;&gt;Filial Curitiba - PR&lt;/asp:ListItem&gt;
      &lt;/asp:DropDownList&gt;

       &lt;maps:GMap ID=&quot;GoogleMaps&quot;
           runat=&quot;server&quot;/&gt;
           &lt;/ContentTemplate&gt;
           &lt;/asp:UpdatePanel&gt;
    &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Adicionei aqui um <em>UpdatePanel</em>, para dar a impressão de atualização automática, e um <em>ScriptManager</em> para gerenciá-lo. Utilizaremos as propriedades <em>Value</em> de cada um dos itens da DropDownlist como parâmetro para obter o mapa do Google. Dessa forma, o usuário não terá de digitar o endereço para obter a localização no mapa, pois é a nossa intenção automatizar tudo. Reproduza o código abaixo, no seu arquivo CS de code-behind: </p>
<pre>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Subgurim.Controles;
using System.Configuration;
namespace TesteComMapas {

public partial class _Default : System.Web.UI.Page {

 protected void Page_Load(object sender, EventArgs e) {
           this.ExibirMapa();
        }
 protected void cboEnderecos_SelectedIndexChanged(object sender,
                                                  EventArgs e) {
            this.ExibirMapa();
        }

        protected void ExibirMapa() {
            //Adicionando nossa chave ao mapa
            GoogleMaps.Key = ConfigurationSettings.
                AppSettings[&quot;googlemaps.subgurim.net&quot;];

            // Habilitando o zoom no mapa
            GoogleMaps.enableHookMouseWheelToZoom = true;

            //Obtendo as informações de latitude e longitura
            //à partir do endereço
            GLatLng latitudeLongitude = GoogleMaps.
                               getGeoCodeRequest(cboEnderecos.
                                    SelectedValue)
                                   .Placemark.coordinates;

            // Definir o tipo do mapa
            // Satellite, Hybrid, Physical, Normal
            GoogleMaps.mapType = GMapType.GTypes.Hybrid;

            // Definimos o ponto inicial do mapa para o endereço
            // e o segundo parâmetro é o zoom inicial
            GoogleMaps.setCenter(latitudeLongitude, 15);
            //Criando as marcações do mapa
            GIcon icon = new GIcon();
            icon.markerIconOptions =
		new MarkerIconOptions(50, 50,
                             System.Drawing.Color.Red);
            GMarker marker =
			new GMarker(latitudeLongitude, icon);

            //Criando o balão com o endereço do Mapa
            GInfoWindow window =
			new GInfoWindow(marker,cboEnderecos.
                                         SelectedValue,true);
            GoogleMaps.Add(window);

            // Criando controles referentes ao tipo de mapa,
            //tamanho e tipo de visão.
            //Esses controles serão melhor entendidos na
            //visualização do mapa:
            GControl mapType = new GControl(GControl.preBuilt.
                                               MapTypeControl);
            GControl overview = new GControl(GControl.preBuilt.
                                             GOverviewMapControl);
            GControl small = new GControl(GControl.preBuilt.
                                              SmallMapControl);
            GoogleMaps.addControl(mapType);
            GoogleMaps.addControl(overview);
            GoogleMaps.addControl(small);
        }
    }
}</pre>
<h2>Detalhamento</h2>
<p>Importamos os namespaces <em>Subgurim.controles</em> para termos acesso aos webcontrols responsáveis pela exibição do mapa, e o <em>System.Configuration</em> para que pudéssemos acessar a chave do Google através do web.config. O Google maps necessita das coordenadas(Latitude e Longitude) para centralizar um ponto e/ou traçar dois pontos através da <a href="http://pt.wikipedia.org/wiki/Teoria_dos_grafos">Teoria dos grafos</a>, por isso enviamos uma requisição com o endereço inicialmente, obtivemos as coordenadas e só então as passamos como parâmetros para o mapa. É importante lembrar que o Google Maps não é 100% preciso. Às vezes, remover o bairro da string do endereço, ou trocar o endereço por &quot;CEP:NumeroDoCep, Brasil&quot; encontra endereços ditos desconhecidos, não encontrados como demonstrei aqui. Sugiro que, caso necessário, façam uma rotina condicional para contornar esse problema. Bem, por enquanto é isso. Críticas e sugestões, os comentários estão abertos. Abraços e keep coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devfranca.com.br/2010/05/04/utilizando-a-api-do-google-maps-no-aspnet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Auto complete flex</title>
		<link>http://www.devfranca.com.br/2010/05/01/auto-complete-flex/</link>
		<comments>http://www.devfranca.com.br/2010/05/01/auto-complete-flex/#comments</comments>
		<pubDate>Sat, 01 May 2010 14:57:00 +0000</pubDate>
		<dc:creator>Cristian Klauss</dc:creator>
		
		<category><![CDATA[Dicas]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[RIA]]></category>

		<category><![CDATA[auto complete]]></category>

		<category><![CDATA[componentes]]></category>

		<guid isPermaLink="false">http://www.devfranca.com.br/2010/05/01/auto-complete-flex/</guid>
		<description><![CDATA[Olá! Quem já não precisou de um auto complete em uma aplicação. Foi pensando nisto que a Adobe desenvolveu um componente auto complete muito bom, neste exemplo vou mostrar como usá-lo. Segue abaixo o exemplo:
&#60;?xml version="1.0" encoding="utf-8"?&#62;

&#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"

  xmlns:adobe="com.adobe.flex.extras.controls.*"&#62;

&#60;mx:XMLList id="xml"&#62;

    &#60;usuario&#62;

        &#60;nome&#62;João&#60;/nome&#62;

  [...]]]></description>
			<content:encoded><![CDATA[<p>Olá! Quem já não precisou de um auto complete em uma aplicação. Foi pensando nisto que a Adobe desenvolveu um componente auto complete muito bom, neste exemplo vou mostrar como usá-lo. Segue abaixo o exemplo:</p>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"><span style="color: #0000ff">&lt;?</span>xml version="1.0" encoding="utf-8"<span style="color: #0000ff">?&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"><span style="color: #0000ff">&lt;</span><span style="color: #c71585">mx</span>:<span style="color: #800000">Application</span> <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">mx</span>=<span style="color: #0000ff">"http://www.adobe.com/2006/mxml"</span> <span style="color: #ff0000">layout</span>=<span style="color: #0000ff">"absolute"</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">adobe</span>=<span style="color: #0000ff">"com.adobe.flex.extras.controls.*"</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"><span style="color: #0000ff">&lt;</span><span style="color: #c71585">mx</span>:<span style="color: #800000">XMLList</span> <span style="color: #ff0000">id</span>=<span style="color: #0000ff">"xml"</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">usuario</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">nome</span><span style="color: #0000ff">&gt;</span>João<span style="color: #0000ff">&lt;/</span><span style="color: #800000">nome</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">usuario</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">     <span style="color: #0000ff">&lt;</span><span style="color: #800000">usuario</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">nome</span><span style="color: #0000ff">&gt;</span>José<span style="color: #0000ff">&lt;/</span><span style="color: #800000">nome</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">usuario</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">usuario</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">nome</span><span style="color: #0000ff">&gt;</span>Antonio<span style="color: #0000ff">&lt;/</span><span style="color: #800000">nome</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">usuario</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">usuario</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">nome</span><span style="color: #0000ff">&gt;</span>Maria<span style="color: #0000ff">&lt;/</span><span style="color: #800000">nome</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">usuario</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">usuario</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">nome</span><span style="color: #0000ff">&gt;</span>Aparecida<span style="color: #0000ff">&lt;/</span><span style="color: #800000">nome</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">usuario</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"><span style="color: #0000ff">&lt;/</span><span style="color: #c71585">mx</span>:<span style="color: #800000">XMLList</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"><span style="color: #0000ff">&lt;</span><span style="color: #c71585">adobe</span>:<span style="color: #800000">AutoComplete</span> <span style="color: #ff0000">labelField</span>=<span style="color: #0000ff">"nome"</span> <span style="color: #ff0000">dataProvider</span>=<span style="color: #0000ff">"{xml}"</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">   <span style="color: #ff0000">x</span>=<span style="color: #0000ff">"357"</span> <span style="color: #ff0000">y</span>=<span style="color: #0000ff">"231"</span> <span style="color: #ff0000">width</span>=<span style="color: #0000ff">"453"</span><span style="color: #0000ff">/&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"><span style="color: #0000ff">&lt;</span><span style="color: #c71585">mx</span>:<span style="color: #800000">DataGrid</span> <span style="color: #ff0000">id</span>=<span style="color: #0000ff">"dg"</span> <span style="color: #ff0000">width</span>=<span style="color: #0000ff">"453"</span>  <span style="color: #ff0000">height</span>=<span style="color: #0000ff">"203"</span> <span style="color: #ff0000">dataProvider</span>=<span style="color: #0000ff">"{xml}"</span> <span style="color: #ff0000">x</span>=<span style="color: #0000ff">"357"</span> <span style="color: #ff0000">y</span>=<span style="color: #0000ff">"261"</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <span style="color: #0000ff">&lt;</span><span style="color: #c71585">mx</span>:<span style="color: #800000">columns</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #0000ff">&lt;</span><span style="color: #c71585">mx</span>:<span style="color: #800000">DataGridColumn</span> <span style="color: #ff0000">dataField</span>=<span style="color: #0000ff">"nome"</span> <span style="color: #ff0000">headerText</span>=<span style="color: #0000ff">"Nome"</span><span style="color: #0000ff">/&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <span style="color: #0000ff">&lt;/</span><span style="color: #c71585">mx</span>:<span style="color: #800000">columns</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"><span style="color: #0000ff">&lt;/</span><span style="color: #c71585">mx</span>:<span style="color: #800000">DataGrid</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"><span style="color: #0000ff">&lt;/</span><span style="color: #c71585">mx</span>:<span style="color: #800000">Application</span><span style="color: #0000ff">&gt;</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"></pre>
<p>Logo no inicio criamos um lista com <strong>XMLList</strong>, dentro dele existem vários objetos usuario com o atributo nome, é com este xml que nosso auto complete irá funcionar.&nbsp; Então vem nosso componente <strong>AutoComplete</strong> que é disponibilizado pela Adobe. No atributo <strong>labelField</strong> colocamos o nome do atributo onde será feito a pesquisa. </p>
<p>Em seguida colocamos nossos objetos em um grid para que os mesmos possam ser visualizados.</p>
<p>Fonte do componete:&nbsp; <a href="http://www.devfranca.com.br/exemplosFlex/01Maio2010/AutoComplete.txt" target="_blank">link</a></p>
<p>Até a próxima. Abraços.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devfranca.com.br/2010/05/01/auto-complete-flex/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mudar cor do DataGridColumn</title>
		<link>http://www.devfranca.com.br/2010/04/27/mudar-cor-do-datagridcolumn/</link>
		<comments>http://www.devfranca.com.br/2010/04/27/mudar-cor-do-datagridcolumn/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 17:35:00 +0000</pubDate>
		<dc:creator>Cristian Klauss</dc:creator>
		
		<category><![CDATA[Dicas]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[RIA]]></category>

		<category><![CDATA[datagrid]]></category>

		<category><![CDATA[datagridcolumn]]></category>

		<guid isPermaLink="false">http://www.devfranca.com.br/2010/04/27/mudar-cor-do-datagridcolumn/</guid>
		<description><![CDATA[Olá! Hoje venho falar um pouco sobre o componente DataGridColumn que representa uma coluna do DataGrid. O exemplo abaixo popula um DataGrid e muda a cor de uma coluna com referêrencia no seu status, se for ativo ficar verde, se for inativo fica vermelho.&#160; Segue o exemplo:
&#60;?xml version="1.0" encoding="utf-8"?&#62;

&#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"&#62;

&#60;mx:XMLList id="xml"&#62;

    [...]]]></description>
			<content:encoded><![CDATA[<p>Olá! Hoje venho falar um pouco sobre o componente DataGridColumn que representa uma coluna do DataGrid. O exemplo abaixo popula um DataGrid e muda a cor de uma coluna com referêrencia no seu status, se for ativo ficar verde, se for inativo fica vermelho.&nbsp; Segue o exemplo:</p>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">&lt;?xml version="<span style="color: #8b0000">1.0</span>" encoding="<span style="color: #8b0000">utf-8</span>"?&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">&lt;mx:Application xmlns:mx="<span style="color: #8b0000">http://www.adobe.com/2006/mxml</span>" layout="<span style="color: #8b0000">absolute</span>"&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">&lt;mx:XMLList id="<span style="color: #8b0000">xml</span>"&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    &lt;usuario&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        &lt;nome&gt;João&lt;/nome&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        &lt;<span style="color: #0000ff">status</span>&gt;Ativo&lt;/<span style="color: #0000ff">status</span>&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    &lt;/usuario&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">     &lt;usuario&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        &lt;nome&gt;José&lt;/nome&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        &lt;<span style="color: #0000ff">status</span>&gt;Ativo&lt;/<span style="color: #0000ff">status</span>&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    &lt;/usuario&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    &lt;usuario&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        &lt;nome&gt;Antonio&lt;/nome&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        &lt;<span style="color: #0000ff">status</span>&gt;Inativo&lt;/<span style="color: #0000ff">status</span>&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    &lt;/usuario&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">&lt;/mx:XMLList&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">&lt;mx:DataGrid id="<span style="color: #8b0000">dg</span>" width="<span style="color: #8b0000">526</span>" dataProvider="<span style="color: #8b0000">{xml}</span>" x="<span style="color: #8b0000">321</span>" y="<span style="color: #8b0000">169</span>"&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  &lt;mx:columns&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    &lt;mx:DataGridColumn dataField="<span style="color: #8b0000">nome</span>" headerText="<span style="color: #8b0000">Nome</span>"/&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    &lt;mx:DataGridColumn paddingLeft="<span style="color: #8b0000">5</span>" dataField="<span style="color: #8b0000">status</span>" headerText="<span style="color: #8b0000">Status</span>" sortable="<span style="color: #8b0000">false</span>"&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">      &lt;mx:itemRenderer&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        &lt;mx:Component&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">          &lt;mx:VBox horizontalScrollPolicy="<span style="color: #8b0000">off</span>"&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">            &lt;mx:Script&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">              &lt;![CDATA[
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">              <span style="color: #008000">///Retorna uma cor determinada dependendo do status</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">              <span style="color: #0000ff">public</span> <span style="color: #0000ff">function</span> formataCorStatus(<span style="color: #0000ff">status</span>:<span style="color: #0000ff">String</span>):uint{
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">                <span style="color: #0000ff">switch</span>(<span style="color: #0000ff">status</span>){
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">                  <span style="color: #0000ff">case</span> "<span style="color: #8b0000">Ativo</span>":
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">                    <span style="color: #0000ff">return</span> 0x009900; <span style="color: #008000">//cor verde</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">                  <span style="color: #0000ff">case</span> "<span style="color: #8b0000">Inativo</span>":
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">                    <span style="color: #0000ff">return</span> 0xFF0000; <span style="color: #008000">//cor vermelha</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">                  <span style="color: #0000ff">default</span>:
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">                    <span style="color: #0000ff">return</span> 0x000000; <span style="color: #008000">//cor preta</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">                }
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">              }
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">              ]]&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">            &lt;/mx:Script&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">            &lt;mx:HBox&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">              &lt;mx:Label text="<span style="color: #8b0000">{data.status}</span>" color="<span style="color: #8b0000">{formataCorStatus(data.status)}</span>"/&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">            &lt;/mx:HBox&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">          &lt;/mx:VBox&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        &lt;/mx:Component&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">      &lt;/mx:itemRenderer&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    &lt;/mx:DataGridColumn&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  &lt;/mx:columns&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">&lt;/mx:DataGrid&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">&lt;/mx:Application&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"></pre>
<p>A função formataCorStatus que é responsável por pegar&nbsp; os dados da campo status e verificar se o mesmo é ativo ou inativo, ela retorna um uint que é o valor númerico referente a um cor para ser colocado no atributo color do objeto Label. Repare que a função formataCorStatus está dentro do VBox que fica dentro do Componet, isto é feito para que o objeto Label consiga enxergar a função.</p>
<p>Foi necessário usar um objeto Label para que a cor não fosse atribuida a todas as linhas da coluna, para se colocar um objeto Label em um DataGrid também foi preciso de um itemRenderer. Lembrando que está é somente uma das maneiras de se conseguir este resultado.</p>
<p>Ate++.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devfranca.com.br/2010/04/27/mudar-cor-do-datagridcolumn/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Express&#245;es regulares Flex</title>
		<link>http://www.devfranca.com.br/2010/03/27/expresses-regulares-flex/</link>
		<comments>http://www.devfranca.com.br/2010/03/27/expresses-regulares-flex/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 13:12:00 +0000</pubDate>
		<dc:creator>Cristian Klauss</dc:creator>
		
		<category><![CDATA[Dicas]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.devfranca.com.br/2010/03/27/expresses-regulares-flex/</guid>
		<description><![CDATA[Olá, hoje vou dar uma dica sobre expressões regulares no flex. É comum acontecer a necessidade de se executar uma substituição em um texto, no caso do flex usamos o replace para fazer isto ex:&#160; 
meuTexto.replace (“[“, “”);
O código acima acha o primeiro conchete do texto e substitui por vazio, esta é uma forma de [...]]]></description>
			<content:encoded><![CDATA[<p>Olá, hoje vou dar uma dica sobre expressões regulares no flex. É comum acontecer a necessidade de se executar uma substituição em um texto, no caso do flex usamos o replace para fazer isto ex:&#160; </p>
<h5>meuTexto.replace (<font color="#800000">“</font>[<font color="#800000">“</font>, <font color="#800000">“”</font>);</h5>
<p>O código acima acha o primeiro conchete do texto e substitui por vazio, esta é uma forma de retirar o conchete de um texto. Mas digamos que temos mais de um conchete no nosso texto, então teriamos que repetir o replace várias vezes ? É ai que entra a expressão regular para achar todos os conchetes do texto.</p>
<p>Para criar uma expressão regular usamos a classe RegExp ela recebe um valor ex: <strong></strong></p>
<h5><strong>var expressao:RegExp = /\<font color="#800000">[</font>/g;</strong>&#160;</h5>
<p><strong></strong>A primeira barra é o inicio da expressão, a barra invertida a seguir é para que a expressão reconheça o conchete como um texto, não como um carecter especial da expressão, logo depois temos o caracter que desejamos retirar no caso o [, e a /g diz a expressão para procurar por todo o texto.</p>
<p>Pronto agora vamos ao exemplo de como utilizar a expressão acima.</p>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">&lt;?xml version=&quot;<span style="color: #8b0000">1.0</span>&quot; encoding=&quot;<span style="color: #8b0000">utf-8</span>&quot;?&gt;</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">&lt;mx:Application xmlns:mx=&quot;<span style="color: #8b0000">http://www.adobe.com/2006/mxml</span>&quot; layout=&quot;<span style="color: #8b0000">absolute</span>&quot; </pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">  creationComplete=&quot;<span style="color: #8b0000">init();</span>&quot;&gt;</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">&lt;mx:Script&gt;</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">  &lt;![CDATA[</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">  </pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">    <span style="color: #0000ff">private</span> <span style="color: #0000ff">function</span> init():<span style="color: #0000ff">void</span>{</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      <span style="color: #0000ff">var</span> texto:<span style="color: #0000ff">String</span> = &quot;<span style="color: #8b0000">[teste] [de] [retirada] [de] [conchetes]</span>&quot;;</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      <span style="color: #008000">//Atenção para utilizar o trace rode o projeto em modo debug, </span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      <span style="color: #008000">//ao fim da execução olhe na janela console, lá estará a impressão do texto</span></pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      trace(retiraConchetes(texto));</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">    }</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">  </pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">    <span style="color: #0000ff">private</span> <span style="color: #0000ff">function</span> retiraConchetes(str:<span style="color: #0000ff">String</span>):<span style="color: #0000ff">String</span>{</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      <span style="color: #008000">//  retira o [  </span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      <span style="color: #0000ff">var</span> expressao:<span style="color: #0000ff">RegExp</span> = /\[/g;  </pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      str = str.replace(expressao, &quot;<span style="color: #8b0000"></span>&quot;);</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      </pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      <span style="color: #008000">//  retira o ]  </span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      expressao = /\]/g;  </pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      str = str.replace(expressao, &quot;<span style="color: #8b0000"></span>&quot;);</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      </pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">      <span style="color: #0000ff">return</span> str;</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">    }</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">  ]]&gt;</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">&lt;/mx:Script&gt;</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 11px">&lt;/mx:Application&gt;</pre>
<p>No exemplo acima usamos a expressão criada no replace para que ela encontre todos os conchetes.</p>
<p>Abraços e até à próxima</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devfranca.com.br/2010/03/27/expresses-regulares-flex/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Evento Realizado em Franca - Comunidade DevFranca e a Copa Microsoft</title>
		<link>http://www.devfranca.com.br/2010/03/24/evento-realizado-em-franca-comunidade-devfranca-e-a-copa-microsoft/</link>
		<comments>http://www.devfranca.com.br/2010/03/24/evento-realizado-em-franca-comunidade-devfranca-e-a-copa-microsoft/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 17:12:56 +0000</pubDate>
		<dc:creator>Danilo Zoneti</dc:creator>
		
		<category><![CDATA[Sem categoria]]></category>

		<guid isPermaLink="false">http://www.devfranca.com.br/?p=424</guid>
		<description><![CDATA[Agradecemos aos palestrantes Sr. Rodrigo Lopes e Sr.Fernando Andreazi, a equipe da DevFranca, Unifran e todas as 160 pessoas aproximadamente que passaram pelo evento de sábado 20/03/2010 na Universidade de Franca.
Onde foram apresentadadas as palestras de Windows Server 2008 R2 e o SCCM2007R2.
Como prometido os contados e fotos da palestra.
Fotos
http://fernandoandreazi.spaces.live.com/
http://rodrigollopes.spaces.live.com/
Abraços e até a próxima&#8230;&#8230;.
]]></description>
			<content:encoded><![CDATA[<p>Agradecemos aos palestrantes Sr. <a href="http://rodrigollopes.spaces.live.com/">Rodrigo Lopes</a><a></a> e Sr.<a href="http://fernandoandreazi.spaces.live.com/">Fernando Andreazi</a><a></a>, a equipe da <a href="www.devfranca.com.br">DevFranca</a>, <a href="www.unifran.br">Unifran</a> e todas as 160 pessoas aproximadamente que passaram pelo evento de sábado 20/03/2010 na Universidade de Franca.</p>
<p>Onde foram apresentadadas as palestras de Windows Server 2008 R2 e o SCCM2007R2.<br />
Como prometido os contados e fotos da palestra.<br />
<a href="http://cid-74853632486e753c.skydrive.live.com/browse.aspx/Community%20Launch%20-%20DevFranca%20-%20Windows%20Server%202008%20R2%20e%20SCCM2007%20-Unifran%20-%20Franca%20-%20SP">Fotos</a><a><br />
http://fernandoandreazi.spaces.live.com/<br />
http://rodrigollopes.spaces.live.com/</a></p>
<p>Abraços e até a próxima&#8230;&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devfranca.com.br/2010/03/24/evento-realizado-em-franca-comunidade-devfranca-e-a-copa-microsoft/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Migrar dados de tabelas usando cursor no SQL Server</title>
		<link>http://www.devfranca.com.br/2010/03/22/migrar-dados-de-tabelas-usando-cursor-no-sql-server-2/</link>
		<comments>http://www.devfranca.com.br/2010/03/22/migrar-dados-de-tabelas-usando-cursor-no-sql-server-2/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 00:14:00 +0000</pubDate>
		<dc:creator>Cristian Klauss</dc:creator>
		
		<category><![CDATA[Banco de Dados]]></category>

		<category><![CDATA[Dicas]]></category>

		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.devfranca.com.br/2010/03/22/migrar-dados-de-tabelas-usando-cursor-no-sql-server-2/</guid>
		<description><![CDATA[Olá! Hoje venho com um exemplo para aqueles que já precisaram migrar seus dados de uma tabela para outra. Uma das formas de se fazer isto e usando um cursor, a lógica é simples, ele irá rodar em um tabela e em cada loop do cursor serão inserido os dados em outra tabela. Vamos ao [...]]]></description>
			<content:encoded><![CDATA[<p>Olá! Hoje venho com um exemplo para aqueles que já precisaram migrar seus dados de uma tabela para outra. Uma das formas de se fazer isto e usando um cursor, a lógica é simples, ele irá rodar em um tabela e em cada loop do cursor serão inserido os dados em outra tabela. Vamos ao código:</p>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <span style="color: #008000">--declara variaveis para pegar valores dos campos  </span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=DECLARE&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">DECLARE</a> @V_Campo1 <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=bigint&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">bigint</a>;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=DECLARE&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">DECLARE</a> @V_Campo2 <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=nvarchar&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">nvarchar</a>(80);
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=DECLARE&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">DECLARE</a> @V_Campo3 <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=nvarchar&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">nvarchar</a>(256);
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <span style="color: #008000">--Declara o cursor, é já executa o select para preenche-lo</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=DECLARE&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">DECLARE</a> C_MeuCursor <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=CURSOR&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">CURSOR</a> <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=FOR&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">FOR</a>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=SELECT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">SELECT</a>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    Campo1,
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    Campo2,
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    Campo3
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=FROM&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">FROM</a>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    MinhaTabelaOrigem;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"></pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <span style="color: #008000">--Abre o cursor</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=OPEN&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">OPEN</a> C_MeuCursor;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <span style="color: #008000">--Pega os dados do select, note que os dados são pegos na mesma ordem do select.</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=FETCH&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">FETCH</a> <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NEXT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NEXT</a> <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=FROM&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">FROM</a> C_MeuCursor <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=INTO&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">INTO</a>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    @V_Campo1,
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    @V_Campo2,
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    @V_Campo3;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <span style="color: #008000">--Executa o loop enquanto houver registros</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=WHILE&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">WHILE</a> (@@fetch_status = 0)
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=BEGIN&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">BEGIN</a>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #008000">--em cada loop insere na tabela de destino as variaveis que foram carregadas pelo cursor.</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #008000">--Note que aqui deverá ser usado as variaveis que foram declaradas.</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=INSERT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">INSERT</a> <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=INTO&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">INTO</a> MinhaTabelaDestino(Codigo, Nome, Endereco)
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=VALUES&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">VALUES</a>(@V_Campo1, @V_Campo2, @V_Campo3);
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"></pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #008000">--Caso o campo selecionado permita nulos trate o mesmo com a função ISNULL(@V_Campo1, 0) </span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #008000">--para que o processo não pare no meio</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <span style="color: #008000">--Depois de executar a operação desejada, passa para o próximo registro.</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=FETCH&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">FETCH</a> <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=NEXT&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">NEXT</a> <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=FROM&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">FROM</a> C_MeuCursor <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=INTO&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">INTO</a>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">      @V_Campo1,
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">      @V_Campo2,
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">      @V_Campo3;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=END&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">END</a>;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <span style="color: #008000">--Fecha o cursor e retira ele da memória</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=CLOSE&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">CLOSE</a> C_MeuCursor;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  <a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;siteid=us%2Fdev&amp;p=1&amp;nq=NEW&amp;qu=DEALLOCATE&amp;IntlSearch=&amp;boolean=PHRASE&amp;ig=01&amp;i=09&amp;i=99">DEALLOCATE</a> C_MeuCursor;</pre>
<p>Logo no inicio eu declarado o cursor, o select poderá ser em mais de uma tabela so é preciso definir os campos que deseja selecionar, no nosso caso foi executado em uma tabela só. Em seguida temos o loop, dependendo de quantos registros foram encontrados temos quantas vezes o loop irá rodar.</p>
<p>Dentro do loop nos chamamos o insert que irá passar os dados para outra tabela. Usamos as variáveis que carregamos com o cursor. Do mais cada parte do código já está com os comentários. Por hoje e só.</p>
<p>Espero que tenha ajudado. Até++</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devfranca.com.br/2010/03/22/migrar-dados-de-tabelas-usando-cursor-no-sql-server-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Evento em Franca - Comunidade DevFranca e a Copa Microsoft</title>
		<link>http://www.devfranca.com.br/2010/03/18/418/</link>
		<comments>http://www.devfranca.com.br/2010/03/18/418/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 17:12:25 +0000</pubDate>
		<dc:creator>Nelson Borges</dc:creator>
		
		<category><![CDATA[Sem categoria]]></category>

		<guid isPermaLink="false">http://www.devfranca.com.br/?p=418</guid>
		<description><![CDATA[
No dia 20/03/2010 (NESTE SÁBAD !!!) teremos duas palestras na Universidade de Franca sobre o Windows Server 2008 e o  System Center, nesta serão apresentados os produtos e as suas features assim como algumas dicas para desenvolvimento utilizando ambos.
O evento será gratuito, abaixo um descritivo das palestras:
- Windows Server 2008 - Neste o palestrante irá [...]]]></description>
			<content:encoded><![CDATA[<div>
<div>No dia <strong>20/03/2010 (NESTE SÁBAD !!!)</strong> teremos duas palestras na <a href="http://www.unifran.br/" target="_blank"><span style="color: #00a3f0;">Universidade de Franca</span></a> sobre o Windows Server 2008 e o  System Center, nesta serão apresentados os produtos e as suas features assim como algumas dicas para desenvolvimento utilizando ambos.</div>
<p>O evento será gratuito, abaixo um descritivo das palestras:</p></div>
<div>- <strong>Windows Server 2008</strong> - Neste o palestrante irá falar sobre as features, dicas e algumas novidades do AD. Será ministrado pelo Sr. <a href="http://rodrigollopes.spaces.live.com/" target="_blank"><span style="color: #00a3f0;">Rodrigo Lopes</span></a> que é profissional de TI a 9 anos e atua na Administração de Servidores de empresas de grande porte. Atuou em conceituadas empresas de tecnologia do mercado como Microsoft, HP e Unisys. Possui certificações Microsoft - MCITP: Enterprise Administrator, MCITP: Server Administrator, MCTS em Active Directory, Network Infra, Exchange 2007, ISA Server 2006, Virtualização, MDOP, MCDST e MCP</div>
<p>- <strong>System Center</strong> - Apresentação do Produto, dicas e as novidades desta versão, esta palestra será ministrada pelo Sr.<a href="http://fernandoandreazi.spaces.live.com/" target="_blank"><span style="color: #00a3f0;">Fernando Andreazi</span></a> que é um profissional de TI há cinco anos, especialista em Tecnologias Microsoft em soluções de Infra Estrutura. Nomeado MSP (Microsoft Student Partners) palestrando sobre tecnologias Microsoft nas principais universidades de São Paulo e na Comunidade TechNet. Certificado em Windows XP, Windows Vista, MDOP, SCCM, Windows Server 2003 e Windows Server 2008 e Exchange Server 2007. MCP, MCSA, MCITP, MCTS e MCDST.</p>
<div> </div>
<div>Faça sua inscrição, <a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032445180&amp;culture=pt-BR">clicando aqui</a>. Essa é mais iniciativa da <a href="http://devfranca.ning.com/">comunidade DevFranca ( A primeira comunidade de desenvolvedores de Franca e Região)</a></div>
<div> </div>
<div>Conto com todos lá. (:</div>
]]></content:encoded>
			<wfw:commentRss>http://www.devfranca.com.br/2010/03/18/418/feed/</wfw:commentRss>
		</item>
		<item>
		<title>INSTALANDO PROGRAMAS PARA DESENVOLVIMENTO MOBILE</title>
		<link>http://www.devfranca.com.br/2010/03/17/instalando-programas-para-desenvolvimento-mobile/</link>
		<comments>http://www.devfranca.com.br/2010/03/17/instalando-programas-para-desenvolvimento-mobile/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 12:51:16 +0000</pubDate>
		<dc:creator>Danilo Zoneti</dc:creator>
		
		<category><![CDATA[Sem categoria]]></category>

		<guid isPermaLink="false">http://www.devfranca.com.br/?p=414</guid>
		<description><![CDATA[Este artigo vamos instalar os programas para poder começar a trabalhar com o desenvolvimento para mobile com o Visual Studio.
1-&#62; Instalar oSql Server.Utilizarei o Sql Server 2008.
2-&#62; Instalar o Visual Studio.Utilizarei o Visual Studio 2008 Professional.
3-&#62; Instalar o Windows Mobile 6 Professional SDk
4-&#62; Instalar o ActiveSync 4.5. 
Depois de tudo instalado, vamos fazer uma configuração [...]]]></description>
			<content:encoded><![CDATA[<p>Este artigo vamos instalar os programas para poder começar a trabalhar com o desenvolvimento para mobile com o Visual Studio.</p>
<p>1-&gt; Instalar o<a href="http://www.microsoft.com/sqlserver/2008/en/us/trial-software.aspx">Sql Server</a>.Utilizarei o Sql Server 2008.</p>
<p>2-&gt; Instalar o Visual Studio.Utilizarei o <a href="http://msdn.microsoft.com/en-us/vstudio/aa700831.aspx">Visual Studio 2008 Professional</a>.</p>
<p>3-&gt; Instalar o <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=06111A3A-A651-4745-88EF-3D48091A390B&amp;displaylang=en">Windows Mobile 6 Professional SDk</a></p>
<p>4-&gt; Instalar o <a href="http://www.microsoft.com/windowsmobile/pt-br/downloads/microsoft/activesync-download.mspx">ActiveSync 4.5. </a></p>
<p>Depois de tudo instalado, vamos fazer uma configuração no ActiveSync p<span style="font-family: Calibri; font-size: small;">ara utilizarmos o emulador do celular na ide. </span><span style="font-family: Calibri; font-size: small;">De dois cliques no atalho do ActiveSync.</span><span style="font-family: Calibri; font-size: small;"> </span></p>
<p><span style="font-family: Calibri; font-size: small;">Vá em Arquivos-&gt;Configurações de conexão.</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt;"><span style="font-family: Calibri; font-size: small;">Marque a opção-&gt; Permitir conexao com um dos seguintes itens: -&gt; escolha a opção DMA-&gt; click em ok.</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 10pt;"><span style="font-family: Calibri; font-size: small;">Está pronto para realizar já nosso primeiro exemplo (que será no próximo post)  um HelloWord para depois criar um pequeno sistema.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devfranca.com.br/2010/03/17/instalando-programas-para-desenvolvimento-mobile/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Passando um m&#233;todo como par&#226;metro no flex</title>
		<link>http://www.devfranca.com.br/2010/03/13/passando-um-mtodo-como-parmetro-no-flex/</link>
		<comments>http://www.devfranca.com.br/2010/03/13/passando-um-mtodo-como-parmetro-no-flex/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 14:07:00 +0000</pubDate>
		<dc:creator>Cristian Klauss</dc:creator>
		
		<category><![CDATA[Dicas]]></category>

		<category><![CDATA[Flex]]></category>

		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.devfranca.com.br/2010/03/13/passando-um-mtodo-como-parmetro-no-flex/</guid>
		<description><![CDATA[Olá a todos, novamente venho mostrar uma dica que poderá ser usada em ocasiões específicas. Quem está acostumado a programar sempre usa metódos ou funções com passagens de parâmetros, objetos, string, int, long e por ai vai. Mas além de parâmetros em alguns casos também seria interessante passar o método todo e não somente um [...]]]></description>
			<content:encoded><![CDATA[<p>Olá a todos, novamente venho mostrar uma dica que poderá ser usada em ocasiões específicas. Quem está acostumado a programar sempre usa metódos ou funções com passagens de parâmetros, objetos, string, int, long e por ai vai. Mas além de parâmetros em alguns casos também seria interessante passar o método todo e não somente um objeto, e isto é possivel no flex com as3.&nbsp; Abaixo segue o código de exemplo:</p>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">&lt;?xml version="<span style="color: #8b0000">1.0</span>" encoding="<span style="color: #8b0000">utf-8</span>"?&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">&lt;mx:Application xmlns:mx="<span style="color: #8b0000">http://www.adobe.com/2006/mxml</span>"
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"> layout="<span style="color: #8b0000">absolute</span>" creationComplete="<span style="color: #8b0000">init();</span>"&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  &lt;mx:Script&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    &lt;![CDATA[
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">      <span style="color: #0000ff">import</span> mx.controls.Alert;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">      <span style="color: #0000ff">private</span> <span style="color: #0000ff">function</span> init():<span style="color: #0000ff">void</span>{
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        <span style="color: #008000">//Passa um metodo como parametro</span>
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        recebeMetodo(meuMetodo);
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">      }
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">      <span style="color: #0000ff">private</span> <span style="color: #0000ff">function</span> meuMetodo():<span style="color: #0000ff">void</span>{
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        Alert.show("<span style="color: #8b0000">Executou meu metodo</span>");
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">      }
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">      <span style="color: #0000ff">private</span> <span style="color: #0000ff">function</span> recebeMetodo(fnc:<span style="color: #0000ff">Function</span>):<span style="color: #0000ff">void</span>{
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        <span style="color: #008000">//Nesta linha e como se estive sendo chamando meuMetodo();</span>
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">        fnc();
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">      }
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">    ]]&gt;
</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">  &lt;/mx:Script&gt;
</pre>
<pre style="background-color: #eeeeee; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px">&lt;/mx:Application&gt;
</pre>
<p>No exemplo à cima logo no inicio chamamos o método &#8220;recebeMetodo” ele recebe como parâmetro uma Function, no nosso caso foi passo “meuMetodo” que simplemente joga uma mensagem na tela, mais poderia realizar qualquer operação tal com atualizar toda a tela.</p>
<p>Para efeito prático, imagine duas telas onde uma telas precisa chamar o método que esta na outra.</p>
<p>Por hoje e só, até à próxima.
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px"></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.devfranca.com.br/2010/03/13/passando-um-mtodo-como-parmetro-no-flex/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Programador &#233; Programador, Hype &#233; Hype e Tradi&#231;&#227;o &#233; Tradi&#231;&#227;o.</title>
		<link>http://www.devfranca.com.br/2010/03/10/programador-programador-hype-hype-e-tradio-tradio/</link>
		<comments>http://www.devfranca.com.br/2010/03/10/programador-programador-hype-hype-e-tradio-tradio/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 01:30:45 +0000</pubDate>
		<dc:creator>Mateus Martins</dc:creator>
		
		<category><![CDATA[Artigos]]></category>

		<guid isPermaLink="false">http://www.devfranca.com.br/2010/03/10/programador-programador-hype-hype-e-tradio-tradio/</guid>
		<description><![CDATA[Qual é o ultimo grito da moda? o que aconteceu no &#34;SPFashionWeekDeTecnologia&#34; da semana passada que deixamos escapar? com qual tecnologia/produto novo fomos bombardeados e não percebemos? qual o último telefone lançado? o último tablet? a última linguagem que surgiu? Quantas perguntas, quantas respostas?     
Talvez o número de respostas para estas [...]]]></description>
			<content:encoded><![CDATA[<p>Qual é o ultimo grito da moda? o que aconteceu no <b>&quot;SPFashionWeekDeTecnologia&quot;</b> da semana passada que deixamos escapar? com qual tecnologia/produto novo fomos bombardeados e não percebemos? qual o último telefone lançado? o último tablet? a última linguagem que surgiu? Quantas perguntas, quantas respostas?     </p>
<p>Talvez o número de respostas para estas perguntas seja tão grande que não caiba neste post, e talvez amanhã precisemos de um post novo para respondê-las novamente. É isso que chamamos de &quot;hype&quot;, o último grito da moda, segundo o <a href="http://www.google.com.br/search?hl=pt-BR&amp;client=firefox-a&amp;hs=r5P&amp;rls=org.mozilla:en-US:official&amp;ei=9NOXS96kDIXYNfKWqHo&amp;sa=X&amp;oi=spell&amp;resnum=0&amp;ct=result&amp;cd=1&amp;ved=0CAUQBSgA&amp;q=Define+Hype&amp;spell=1">google</a>, e tecnologia é isso, moda, disputa pelo novo, o grande engolindo o pequeno, a todo momento surge uma nova comunidade de relacionamento, um novo tipo de tecnologia que vai mudar o planeta e salvar as baleias, e ser conservador neste mercado é praticamente um crime digno de pena de morte, queima de processador e esvaziamento de pilha!     </p>
<p>Ser conservador o suficiente para poder olhar para traz e prever o futuro.     <br />No final de 54 surgiu uma linguagem chamada FORTRAN e, a partir daí, uma infinidade de novas linguagens foram surgindo: ALGOL(1958), COBOL(1959), BASIC(1964), Simula(1964), PASCAL(1970), SmallTalk(1971), C(1971), PostScript(1982), Perl(1987), Python(1991), Ruby(1993), PHP(1995), Java(1995), JavaScript(1995), entre dezenas de outras que não citei aqui.     </p>
<p><strong>E o que isto nos diz?</strong>     </p>
<p>Uma das leituras que podemos fazer de nossa história é que a FORTRAN não trouxe grandes inovações, mas deixou o mundo mais simples de ser compreendido do que na época do ASSEMBLY. Depois, na década de 60, as linguagens mudaram, inovaram e trouxeram um novo conceito, o de linguagem estruturada, aos moldes de C, Pascal e Basic, e o mundo continuou a evoluir. Em 1967, foi apresentada a Simula67, primeira linguagem a implementar o novo conceito de orientação a objetos (OOP). Em 1980, foi lançada a versão SmallTalk80, inovando o conceito de OOP e dando força para esse novo paradigma. Já na década de 90, surgem as linguagens com suporte WEB. O mundo dá uma regredida, PHP/ASP nascem procedurais mas logo evoluem para o conceito OOP, assim como JAVA e outras. Hoje em dia, é altamente desaconselhável aprendermos uma linguagem que não seja OOP, a não ser por questões muito específicas, em casos muito raros.     </p>
<p>Eu vi surgirem varios Hypes, puxados por pessoas atrás de fama; linguagens mortas renascerem para morrerem sem o menor sentido de ser, e creio que um programador ou um futuro programador deva fazer algumas reflexões sobre em qual tecnologia investir:     </p>
<p>Qual é a história da linguagem que eu quero aprender?     </p>
<p>Com qual frequência ela é atualizada?     </p>
<p>Ela é OOP?     </p>
<p>Qual a produtividade?     </p>
<p>Existem Frameworks para ela?     </p>
<p>Existe uma comunidade ou há uma empresa&#160; mantendo essa linguagem?     </p>
<p>Como é a documentação dela?     </p>
<p>Como o mercado remunera os programadores?     </p>
<p>Quais softwares foram desenvolvidos usando essa linguagem?     </p>
<p>O que estou falando aqui neste artigo tem mais a ver com mercado e investimento do seu valioso tempo. Apenas algumas dicas para avaliar e definir qual caminho você quer que sua carreira percorra. Cuidado com as armadilhas do mercado! Os hypes que surgem simplesmente desaparecem em pouco tempo ou, quando vingam, demoram anos para ganhar força no mercado.&#160; </p>
<p>Um exemplo simples e específico de uma linguagem que está em transformação hoje é o HTML5. Ele não é um milagre, mas vai melhorar muito a maneira como programamos hoje. No entanto, não teremos suporte a ele da forma como gostaríamos até o final do ano e talvez nem no próximo, porque dependemos das novas versões de navegadores e também dos usuários, que precisam atualizar seus navegadores.&#160; Quem quer entrar no mercado agora, tem que dominar XHTML, sem tirar os olhos do HTML5, claro! Mas vejam o I6, quase imortal. A inovação é lenta e isso não é ser conservador; é ser realista e antenado ao futuro próximo.</p>
<p>Não existe milagre, não vai surgir uma nova linguagem, um framework, uma tecnologia mágica que fará o mercado gastar bilhões migrando os seus sistemas em um curto espaço de tempo. Olhe para o passado para prever o futuro e duvide dos milagres.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devfranca.com.br/2010/03/10/programador-programador-hype-hype-e-tradio-tradio/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
