Tag Archive for wpf

WiX and setup dialogs like Microsoft Expression Suite

I’ve been playing a few days with WiX, a very handy toolset to create Microsoft Installer Packages from scratch, very handy and easy to use for complex scenarios (and overkill for simple installers). WiX is an open source project supported by Microsoft and available in its Codeplex site.

You can do a lot of things with Wix, check conditions in the machine, create your own dialogs with a declarative xml, and (as many other Microsoft projects) extend the installer with your own actions or extensions or whatever you want to create.

Googling the internet about some scenarios around Wix, I found a common question:

how could I extend the Wix dialogs so instead of using a Windows form set of dialogs use WPF screens or pages so my installer will look like the awesome and beauty Microsoft Expression Suite installer”

Yeah, if you install Microsoft Expression Suite you will find a very beautiful installation UI made in WPF:

Microsoft-Expression-Studio-3-Setup-3

Yeah, people in the forums and mailing list scratch their head about this scenario, if you think about it’s kind of complex because:

  • You need to bootstrap your installation so .Net is installed
  • You need to bootstrap your installation so an specific .Net version is installed
  • If everything is installed, then, you launch your installation dialogs.

In the installation process if you don’t have any of those dependencies then you need to install them or offer the user the option to download and install, not so simple if you see the installer as a single unit of work.

Well, I didn’t want to keep the secret, so I started a new Expression Suite installation and I found the answer.

To install Expression Suite you launch an exe file, Setup.exe, if you look carefully this is an unmanaged application, let’s say this is kind of bootstrapper for the installation process. It will detect if you have the correct .Net framework installed and if everything looks good would launch Setup\XSetup.exe, a managed WPF application (maybe you can take a look at the assembly Setup\XSetupUI.dll), this is the real installer software. If you peek inside this managed application using a tool like ILSpy or RedGate’s Reflector you will find that it uses .Net interop to call the Windows Installer API and launching the installation of correct packages in the process.

You can take a look at the Setup folder and found the real MSI packages for Expression Suite, they are normal and boring MSI installers:

CropperCapture[27]

Mystery resolved, there is no easy way to create an immersive WPF experience for your installers using WiX, at least you sacrifice some time to create your own custom installation boot strappers, something that someday I will put my eye on.

Book Review – WPF and the MVVM Pattern

The complete name of the book is Building Enterprise Applications with Windows Presentation Foundation and the Model View ViewModel Pattern by Raffaele Garofalo and published by Microsoft Press (2011). This is really short book (225 pages) and has a very promising title, I got it in the OReilly stand in the MIX11 Conference a few weeks ago and took me just a few hours for reading (long trip from LAX to MEL!).

As I said before the title looks promising and has the “Enterprise Application” slogan as a very important thing (whatever enterprise application means in those days). The book promises some very ambitious points like:

  • Dive deep into MVVM
  • Build a simple Customer Relationship Management application
  • Create a Domain Model
  • Write dynamic code for data access with the Entity Framework
  • Enforce complex data and validation scenarios with Workflow Foundation 4
  • Implement MVVM using Prism

The book started tyring to explain what is the MVVM pattern and its relation with Line of Business Applications (LOBs) and how MVVM and Composite Application patterns relate themselves to solve LOB’s problems… For some reason in this chapter the author starts telling you now about separation of concerns and three tiering and layering… (you know I don’t like how people uses the term “layered application”). For some reason in this chapter also introduce Expression Blend and how a LOB is composed (in things like Menu, Toolbar, Ribbon, etc…) weird… I know…

In the chapter two we read about what is a pattern, mention common patterns and try to explain the different Presentation Patterns (MVC, MVVM, MVP). In this chapter the author introduce concepts like IoC using Unity and differences between Unity and MEF (well, good to know). After this is never late to talk about Fluent Interfaces and DSLs and how to do unit testing… Yeah…

After all of this the author start talking about Domain Modeling, and Domain Driven Design… yeah, but wait a minute… why he started talking about the relation between DDD Domains and Layering? what? if you are a DDD fan like me beware of this chapter, the author is just confused about DDD/Layering (damn, I don’t like that word!) and how to represent an object in a pure domain approach.

Later chapters are about Data Access Layer (and how the author relate it with DDD and the domain logic), the Business Layer (and how to represent domain validation rules in Workflow Foundation 4) and the book end with a chapter about creating an UI layer with all those concepts toghether. Something really bothered me was the sample code for the UI Layer with MVVM chapter, you just learn about the existence for the WPF Ribbon Control from Codeplex, that’s all…

Personally the only chapter I liked was the last chapter about MVVM frameworks and toolkits, he just mention those frameworks but some of them were totally new to my knowledge.

I must say the true, I will give only one start to this book, if you like code, this is not a book for you, if you like a good set of samples and the reason behind the facts, this book is not for you, if you want to learn how to use Prism and MVVM, this book is not for you either (it only mentions Prism and how it relates to MVVM), if you want to learn how to implement your applications using MVVM pattern, this book is not for you… really…

If you want to know what is MVVM and in some way how it relates with some other concepts (sometimes not really related at all but well, what do I know?) maybe this book is for you (but anyway you can get those concepts for free in the internet too) or if you have some hours to spare and someone give you that book for free maybe this book would be a choice.

I know talk about MVVM in just 200 pages must be a hard work, so nice trying…

Lanzamiento de la Comunidad y Visual Studio 2010

Como ustedes habrán notado la comunidad ha estado en un estado de "pausa" por los últimos meses. Para aprovechar el momentum hemos estado organizando un evento de lanzamiento para Visual Studio 2010 a nivel comunitario. Los dejo con la información :)

Lugar: Oficinas de Microsoft, Edificio Torre Citibank (Intercontinental) [3a Avenida 13-78 Zona 10, Of 1101, Guatemala]

Fechas: Miércoles 23, Jueves 24, Viernes 25 de Julio

Horas: de 6pm a 9pm

Expositores y temas

Silverlight/WPF 4.0 Development

Expositor: Carlos Lone, Microsoft MVP Client Application Development, http://weblogs.asp.net/carloslone/

Fecha: Miércoles 23 de Junio

La nueva era de websites en el internet cada vez más demandan la inclusión de una mejor experiencia de usuario (UX) en donde la interactividad, contenido multimedia y uso del sitio sea más sencillo y amigable para los usuarios.

Se ha dicho de que las versiones anteriores de Silverlight estaban muy orientadas a relizar animaciones y a presentar imagenes  y videos con mejor definición. Sin embargo desde la versión 3.0 y ahora en la versión 4.0 la capacidad de poder utilizar esta herramienta para hacer aplicaciones de linea de negocio es cada vez más sencillo.

Acompañanos a descubrir todas las novedades de Silverlight y WPF en VS2010

- Demistificando Silverlight y WPF 4.0

- Novedades

- Construcción de aplicaciones de linea de negocio.

- Construiremos una aplicación 0 a 100.

Sharepoint 2010 Development

Expositor: Manolo Herrera, Microsoft MVP Sharepoint, http://jmhogua.blogspot.com/

Fecha: Jueves 24 de Junio

El desarrollo en SharePoint nunca antes ha sido tan fácil y práctico

- Desarrollando en Web Part Visual para SharePoint en 15 minutos

- Depurando e instalando tu código en SharePoint desde Visual Studio con presionar una sola tecla.

- Descubriendo el nuevo Developer Dashboard de SharePoint

- Conociendo el Client Object Model de SharePoint desde un aplicación Windows.

- Creando una Sandbox Solution para que nos sirve y ayuda.

Web development con ASP.NET 4.0

Expositor: Cristian Prieto, Microsoft MVP ASP.NET, http://www.cprieto.com

Fecha: Viernes 25 de Junio

ASP.NET ha evolucionado muchísimo en los últimos años con la adición de ASP.NET MVC y Dynamic Data, además de las mejoras continuas a la plataforma de WebForms y ASP.NET AJAX. Hablaremos de como aumentar la productividad y al mismo tiempo construir aplicaciones web que manejen de una manera transparente CSS, controles finos sobre el renderizado y markup al mismo tiempo que podemos mejorar SEO y muchas otras características nuevas en ASP.NET 4.0

 

El cupo es limitado, así que sugiero que corran al link de registro y aparten su lugar http://bit.ly/launchgt

¡Espero verlos en el lanzamiento!

NOTA: Recuerden imprimir y llevar al evento el ticket de inscripción que se genera en el momento del registro

Saludos,