Month: April 2011

Updates for April/May 2011

Note: Starting from the 15th of April 2011 until the 6th of
May 2011 I will be off-island. During this period I will not have access to the
internet so I will not able to approve you comments or either to read and answer
them. You can try to send me an e-mail using the contact form but I can’t
guarantee you that I will be able to read it.

I have received many queries about my first book on LOB applications so in this
post I will try to answer to most of them. Please forgive me in advance if I
can’t answer to all your queries.

  • Source code
    Many of you are wondering why the source code of the demo
    application for the MVVM book is “skinny” and why I didn’t provide a full
    working application.
    The book has been released and the work behind it is
    huge. This book is supposed to be a guideline for a senior developer on how to
    architect a LOB application so in my opinion it was not necessary to provide all
    the code required to make a fully working application. I mean the application
    works but I left the “finishing touch” to the reader. Anyway, due to the high
    demand, I will work on this and during the summer I will post new versions of
    the app probably on CodePlex so that I can be an Open Source project where each
    dev interested can put some effort on it.
  • APRESS WPF Book vs MS MVVM book
    Why Raf wrote two books and not one? First
    let me say that Microsoft and APRESS are two separated
    companies; my “MVVM” book has been published by Oreilly for Microsoft Press
    while my APRESS book will be published by APRESS … The first one talks about
    “Architecting a LOB application and the MVVM pattern” while the second one
    “teach you from scratch a layered WPF application”. If you want a reference to
    layer an application you have to buy the first book,
    especially if you are new to the topic (layering)
    , if you want to learn: WPF,
    MVVM, Entity Framework, threading on WPF and more you have to buy the second
    one, event if you are a middle expert WPF developer.

I do not like to blown my own trumpet and who has worked with me can confirm
that, but, if you are interested in learning WPF and learning how to architect a
LOB application you have to buy both books as just one will not cover all the
topics you need to master this technology. I would personally buy the MS PRESS
book, read it once, then buy the APRESS WPF book, read it and build the sample
application, then read again the MS PRESS one.

 The final note is about the comments. The book is on and
and as an author I would kindly appreciate if you can post a comment that
explains what you liked and what you didn’t like about the books. Posting a
comment with 2 stars saying “the source code is not available” while it is on, it is just silly and doesn’t help anybody … If you have a problem
with the source code, feel to contact me, even if you disagree with some of my
ideas exposed in my books. I have a wide open mentality and I love to have
“constructive discussions” with my readers.

Updates for my Microsoft Book

After one week that my book about LOB applications has been published I started to receive some additional questions that I am trying to address in this post.

First of all I want to thank all the guys and girls that are buying the book and all the people that are providing feedbacks for the book. I really appreciate. I want also to specify that the Microsoft book has not been released as a “Book about MVVM” but more as a “book to discover LOB and layered applications”. I believe that part of the misunderstanding as been caused by the book’s title but we wanted to specify the MVVM keyword in the title because the book spent two chapters on it.

The source code has been published and you can find in the book the correct address that will point you to the download. I want to thanks Ted Anderson that on has notified me about the error done by OReilly in the publishing address. The source code is available here:­ Please do not download the code and pretend to get explanations from my if you didn’t buy the book yet … Winking smile

The T-SQL to generate the database is not necessary. When you will open the Visual Studio 2010 solution, you need to run the Test show here:

TDD for generate the SQL Datab
  1. [TestFixtureSetUp]
  2. public void CanCreateDatabaseSchema()
  3. {
  4.     try
  5.     {
  6.         var cfg = new Configuration();
  7.         cfg.Configure();
  8.         cfg.AddAssembly(Assembly.Load(“CRM.Dal.Nhibernate”));
  9.         new SchemaExport(cfg).Execute(true, true, false);
  10.     }
  11.     catch (Exception exception)
  12.     {
  13.         Assert.Fail(exception.ToString());
  14.     }
  15. }
  17. [Test]
  18. public void CanGetAUnitOfWork()
  19. {
  20.     try
  21.     {
  22.         ISessionFactory factory = new SessionFactory();
  23.         IUnitOfWork unitOfWork = factory.CurrentUoW;
  24.         Assert.That(unitOfWork, Is.Not.Null);
  25.         Assert.That(unitOfWork.Orm, Is.Not.Null);
  26.     }
  27.     catch (Exception exception)
  28.     {
  29.         Assert.Fail(exception.ToString());
  30.     }
  31. }



Also remember that the source code has been created only to show you some practical examples of how to layer a LOB application, how to use NHibernate or Entity Framework with the same data layer and how to architect the MVVM pattern. If you want to use the application in a production environment, you have to spent additional time on it in order to get a final product.

For any other additional information I am here.

Please if you find errors or mistakes in the book, I would really appreciate if you can post an errata corrigge in the corresponding section of the OReilly web site:

Next month I will publish my second book “Applied WPF in Context” with APRESS; in that book you will find whatever you need to learn WPF and the MVVM pattern.

Stay tuned!