PDC 2008 in some way

PDC 2008 is coming, I can’t get in, but this time I will send something to represent me and to speak for me: One piece of software made with WPF, LINQ and LiveMesh.

That App will show in one of the conferences and with some lucky, it will be publish in CodePlex as a Reference Sample.

It has been a lot of work, day with 22 hours, but finally is ready. After NDA period I will comment about the application.

Thanks everybody at studiocom, we hope to exceed any expectation you had about this app.

Applications Architecture
WCF Serialized Class Library
Content Publisher. WCF Consuming RSS
Many Clients developed with WCF.
LiveMesh Service as main container, and also as a router between clients and Publisher.

In a couple of days i will publish more info about the development process, what problems we faced, what problems we solved and how and also how we work in distributed time zones with all the studiocom people in Atlanta, MS in Redmond, the developer (me) in Bogota, Col. and the designer (TF) in other places.

Juan Pelaez

Software Architect

Keywords: PDC2008, PDC 2008, LiveMesh, Live Services, WCF, WPF, Distributed Applications.

Technorati Tags: Juan Pelaez,3Metas,WCF,WPF,LiveMesh

SplendidCRM with Silverlight 2.0 and hosting tricks

I’m using SplendidCRM version 2.1.3074.33397. Is a great tool for CRM, based on SugarCRM but ported to .Net, Even Miguel Icaza has mentioned it.

However, when I start running the application I got an error :

Silverlight error message
ErrorCode: 2024
ErrorType: ParserError
Message: 2024 An error has occurred.
XamlFile:
Line: 245
Position: 200

In Home page and in Dashboard, it seems like the property TextWrapping in some XAML files now only accepts Wrap, instead of WrapWithOverflow.

The correction is really easy. Here you can download the XAML’s files corrected. Copy them to opportunities/XAML folder.

Other Tricks: if you need to install it on hosted server and the host don’t allow you to run installer, port the solution to Web Application Project, and publish it. Copy the results files to your hosted server. Then run the installer on your machine but in the step related with SQL Server, write the connection info from your Hosted SQL Server. That way I installed the company CRM.

Juan Pelaez
Software Architect.
We are Exceeding Your Expectations.

Keywords: SplendidCRM, CRM, 3Metas.

Two new sites

This year (2008) I joined studiocom team delivering 2 sites for McCormick. It is really awesome when you finally see those things go-Live.

If you want to take a look:

McCormick Web Site.

McCormick Corporate Web Site.

we use SiteCore CMS 5.3, and 6.0., build on .Net Framework 3.0 and Visual Studio 2008 , but even better I meet an amazing team in the process:

Alejandro Cadavid

Alexis Ilnicki

Andres Ardila

Alpesh Dhameliya

Ashley Sprowl

Camilo Cortes

Carlos Pelaez

David McAlister

David Preiss

Dev Kumar

Devra Jones

Diego Pineda

Eddy Milfort

Emily Rickerson Bove

Henri Bui

Jackie Dane

Jairo Celis

Joe Ayotte

Juan Carlos Pelaez (ME)

Juan Fernando Santos

Julian Orjuela

Keith Oh

Kelly Burk

Kim Colter

Kris Cargile

Kristie Stoeckel

Lara Becker

Mauricio Talero

Matt Roth

Mehmet Uzer

Mike Creati

Mohammed N. Mohammed

Nancy Edge

Nicholas Mutis

The Whole OSG McCormick team

Olga Cardenas

Rajit Gulati

Renso Vargas

Richard Wells

Ruchi Agarwal

Ryan Fuquea

Sandra Merino

Ted Duncan

Tito Milla

Timothy Kohler

Virgil Olteanu

Vivian Lowe

Juan Pelaez.

Software Architect.

Keywords: SiteCore, studiocom, Juan Pelaez Resume

Technorati Tags: ,,

San Agustine, USA 2011

En Febrero y Marzo de 2011 con mi hermano y su familia fuimos a esta pintoresca ciudad del estado de la Florida en Estados Unidos, con un rico pasado historico español, frances e ingles y su castillo amurallado que recuerda a las fortificaciones del caribe como Cartagena y Puerto Rico esta ciudad puede ser la menos americana de las que visitado en temas arqutectonicos aunque en el orden y otros conceptos de entretenimiento y de protección del patrimonio ambiental e historico es tan norteaméricana como cualquiera.

Multicast con WCF 3.5

Para escenarios de Arquitecturas Distribuidas con Multicast usando WCF 3.5 una opción posible es la siguiente:

[ServiceContract(Namespace = "http://servicios.cliente/2009/06", Name = "IRouter")]
public interface IServiceRouter
{
   [OperationContract(ReplyAction = "*", Action = "*")]
   Message ForwardMessage(Message message);
}

[ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)]
class ServiceRouter : IServiceRouter
{

        #region IRouter Members

        public Message ForwardMessage(Message message)
        {
            Message BogotaServer;
            Message localServer;

            MessageBuffer messageBuffer = message.CreateBufferedCopy(int.MaxValue);
            Message messageCopy = messageBuffer.CreateMessage();
            Message messageCopy2 = messageBuffer.CreateMessage();

            //Almacenamiento en servidor local finca   
            int headerLocalIndex = message.Headers.FindHeader("Key", "http://serviciosproduccionCP");
            if (headerLocalIndex != -1)
            {
                string localHost = message.Headers.GetHeader<string>(headerLocalIndex);
                ChannelFactory<IServiceRouter> client = new ChannelFactory<IServiceRouter>(localHost);
                localServer = (client.CreateChannel()).ForwardMessage(messageCopy);
            }
            else
            {
                throw new InvalidOperationException("No se puede encontrar la cabecera 'local'");
            }

            //Almacenamiento en servidor de Bogotá.  
            int headerBogotaIndex = message.Headers.FindHeader("Key", "http://serviciosproduccionBogota");
            if (headerBogotaIndex != -1)
            {
                string bogotaHost = message.Headers.GetHeader<string>(headerBogotaIndex);
                ChannelFactory<IServiceRouter> client = new ChannelFactory<IServiceRouter>(bogotaHost);
                BogotaServer = (client.CreateChannel()).ForwardMessage(messageCopy2);
            }
            else
            {
                throw new InvalidOperationException("No se puede encontrar la cabecera 'bogota'");
            }

            return BogotaServer; 

        }

        #endregion
    }


Este código analiza la información enviada por el cliente y crea una copia del mensaje que es distribuido posteriormente a los servidores que estén registrados en el encabezado del mensaje. Esta técnica de enrutamiento se basa en Contenido, el contenido del header del mensaje SOAP.

 

Juan Peláez

3Metas Corp.

Multicast with WCF 3.5

Para escenarios de Arquitecturas Distribuidas con Multicast usando WCF 3.5 una opción posible es la siguiente:

[ServiceContract(Namespace = "http://servicios.cliente/2009/06", Name = "IRouter")]
public interface IServiceRouter
{
   [OperationContract(ReplyAction = "*", Action = "*")]
   Message ForwardMessage(Message message);
}

[ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)]
class ServiceRouter : IServiceRouter
{

        #region IRouter Members

        public Message ForwardMessage(Message message)
        {
            Message BogotaServer;
            Message localServer;

            MessageBuffer messageBuffer = message.CreateBufferedCopy(int.MaxValue);
            Message messageCopy = messageBuffer.CreateMessage();
            Message messageCopy2 = messageBuffer.CreateMessage();

            //Almacenamiento en servidor local finca   
            int headerLocalIndex = message.Headers.FindHeader("Key", "http://serviciosproduccionCP");
            if (headerLocalIndex != -1)
            {
                string localHost = message.Headers.GetHeader<string>(headerLocalIndex);
                ChannelFactory<IServiceRouter> client = new ChannelFactory<IServiceRouter>(localHost);
                localServer = (client.CreateChannel()).ForwardMessage(messageCopy);
            }
            else
            {
                throw new InvalidOperationException("No se puede encontrar la cabecera 'local'");
            }

            //Almacenamiento en servidor de Bogotá.  
            int headerBogotaIndex = message.Headers.FindHeader("Key", "http://serviciosproduccionBogota");
            if (headerBogotaIndex != -1)
            {
                string bogotaHost = message.Headers.GetHeader<string>(headerBogotaIndex);
                ChannelFactory<IServiceRouter> client = new ChannelFactory<IServiceRouter>(bogotaHost);
                BogotaServer = (client.CreateChannel()).ForwardMessage(messageCopy2);
            }
            else
            {
                throw new InvalidOperationException("No se puede encontrar la cabecera 'bogota'");
            }

            return BogotaServer; 

        }

        #endregion
    }


Este código analiza la información enviada por el cliente y crea una copia del mensaje que es distribuido posteriormente a los servidores que estén registrados en el encabezado del mensaje. Esta técnica de enrutamiento se basa en Contenido, el contenido del header del mensaje SOAP.

 

Juan Peláez

3Metas Corp.

Adicionar Headers en Mensajes SOAP

Para diferentes efectos (enrutamiento por ejemplo) es necesario agregar a los mensajes SOAP gestionados por servicios de WCF un encabezado (header) personalizado con información, de esta forma se puede enviar información entre los clientes y los servicios sin que sea necesario modificar el contenido del servicio (datos). Un recordatorio rápido de cómo hacerlo usando código en WCF 3.5.

ServicioFuncionario.ServicioFuncionarioClient sv = new ServicioFuncionario.ServicioFuncionarioClient();
using (new OperationContextScope(sv.InnerChannel))
{
     MessageHeader headerLocal = MessageHeader.CreateHeader("Key", "http://serviciosproduccionCP", "HostCP");
     OperationContext.Current.OutgoingMessageHeaders.Add(headerLocal);

     MessageHeader headerBogota = MessageHeader.CreateHeader("Key", "http://serviciosproduccionBogota", "HostBogota");
     OperationContext.Current.OutgoingMessageHeaders.Add(headerBogota);

     resultado = sv.FuncionarioLogin(login, passWord);
}

sv.Close();

Este código agrega dos encabezados a la petición funcionarioLogin, el valor HostCP y HostBogota es el que nos interesa agregar a los mensajes, con esa información el servicio podría realizar diferentes procesos como enrutamiento, registro, gestión de errores, respaldo entre otros.

Nota1: en WCF 4.0 se puede utilizar el tag header en el archivo de configuración del servicio.

Nota2: El protocolo usado en la comunicación debe tener soporte para la gestión de encabezados en el mensaje SOAP.

Juan Peláez

3Metas Corp