I'd like to get this discussion list going my posting the first manuscript chapter we have ready. It is the first chapter because it had the most reusable content from the 1st edition book. The example was converted from using XML mapping files to FluentNHibernate code-based mappings.
The chapter uses Inversion of Control and constructor injection, but it does not use a container library. It implements dependency injection and abstract factories through code. Please reply to this group and tell us what you think.
It might be useful if in summary towards the end of the chapter, you relate the various classes you've discussed to where they live in physical packages and/or relate them to where they live inside the Onion architecture; just to finally hammer home the point about how the inner layers should not depend on outer ones.
I realise that you show this to some extent in the use of namespaces and screen shots from Solution Explorer but in the code snippet from the DataConfig class the namespace is omitted. I think that when we read code samples we often skim the nameaspace and don't read it or at least miss the subtleties of the inter-dependencies unless we have a compiler or IDE to show us. Something visual that explicitly shows the package layout or the classes super-imposed on the onion might be a useful addition to the summary?
On Jan 5, 6:49 am, Jeffrey Palermo <Jeff...@Palermo.cc> wrote:
> I'd like to get this discussion list going my posting the first manuscript > chapter we have ready. It is the first chapter because it had the most > reusable content from the 1st edition book. The example was converted from > using XML mapping files to FluentNHibernate code-based mappings.
> The chapter uses Inversion of Control and constructor injection, but it does > not use a container library. It implements dependency injection and > abstract factories through code. > Please reply to this group and tell us what you think.
> It might be useful if in summary towards the end of the chapter, you > relate the various classes you've discussed to where they live in > physical packages and/or relate them to where they live inside the > Onion architecture; just to finally hammer home the point about how > the inner layers should not depend on outer ones.
> I realise that you show this to some extent in the use of namespaces > and screen shots from Solution Explorer but in the code snippet from > the DataConfig class the namespace is omitted. I think that when we > read code samples we often skim the nameaspace and don't read it or at > least miss the subtleties of the inter-dependencies unless we have a > compiler or IDE to show us. Something visual that explicitly shows the > package layout or the classes super-imposed on the onion might be a > useful addition to the summary?
> On Jan 5, 6:49 am, Jeffrey Palermo <Jeff...@Palermo.cc> wrote:
> > I'd like to get this discussion list going my posting the first manuscript > > chapter we have ready. It is the first chapter because it had the most > > reusable content from the 1st edition book. The example was converted from > > using XML mapping files to FluentNHibernate code-based mappings.
> > The chapter uses Inversion of Control and constructor injection, but it does > > not use a container library. It implements dependency injection and > > abstract factories through code. > > Please reply to this group and tell us what you think.
> I'd like to get this discussion list going my posting the first manuscript > chapter we have ready. It is the first chapter because it had the most > reusable content from the 1st edition book. The example was converted from > using XML mapping files to FluentNHibernate code-based mappings.
> The chapter uses Inversion of Control and constructor injection, but it does > not use a container library. It implements dependency injection and > abstract factories through code. > Please reply to this group and tell us what you think.
Yes. The title of the book is "ASP.NET MVC 2 in Action". It is a second edition to "ASP.NET MVC in Action" by Manning Publications: http://manning.com/palermo
On Tue, Jan 5, 2010 at 12:24 PM, Rong <ron.gr...@gmail.com> wrote: > Is this for a second Edition?
> On Jan 5, 12:49 am, Jeffrey Palermo <Jeff...@Palermo.cc> wrote: > > I'd like to get this discussion list going my posting the first > manuscript > > chapter we have ready. It is the first chapter because it had the most > > reusable content from the 1st edition book. The example was converted > from > > using XML mapping files to FluentNHibernate code-based mappings.
> > The chapter uses Inversion of Control and constructor injection, but it > does > > not use a container library. It implements dependency injection and > > abstract factories through code. > > Please reply to this group and tell us what you think.
> > Best regards, > > Jeffrey Palermo
> > MVC2iA_CH_23.docx > > 727KViewDownload
> -- > -------------------- > Please feel free to comment on the progress of the book, the content, and > the code samples. All code and text is available on the book's GitHub site > at http://github.com/jeffreypalermo/mvc2inaction. We hope developing this > book out in the open and with your feedback makes it a great book for the > community.
> Yes. The title of the book is "ASP.NET MVC 2 in Action". It is a second > edition to "ASP.NET MVC in Action" by Manning Publications:http://manning.com/palermo
> Best regards, > Jeffrey Palermo
> On Tue, Jan 5, 2010 at 12:24 PM, Rong <ron.gr...@gmail.com> wrote: > > Is this for a second Edition?
> > On Jan 5, 12:49 am, Jeffrey Palermo <Jeff...@Palermo.cc> wrote: > > > I'd like to get this discussion list going my posting the first > > manuscript > > > chapter we have ready. It is the first chapter because it had the most > > > reusable content from the 1st edition book. The example was converted > > from > > > using XML mapping files to FluentNHibernate code-based mappings.
> > > The chapter uses Inversion of Control and constructor injection, but it > > does > > > not use a container library. It implements dependency injection and > > > abstract factories through code. > > > Please reply to this group and tell us what you think.
> > > Best regards, > > > Jeffrey Palermo
> > > MVC2iA_CH_23.docx > > > 727KViewDownload
> > -- > > -------------------- > > Please feel free to comment on the progress of the book, the content, and > > the code samples. All code and text is available on the book's GitHub site > > athttp://github.com/jeffreypalermo/mvc2inaction. We hope developing this > > book out in the open and with your feedback makes it a great book for the > > community.- Masquer le texte des messages précédents -
> On 5 jan, 20:19, Jeffrey Palermo <Jeff...@Palermo.cc> wrote:
> > Yes. The title of the book is "ASP.NET MVC 2 in Action". It is a second > > edition to "ASP.NET MVC in Action" by Manning Publications:http://manning.com/palermo
> > Best regards, > > Jeffrey Palermo
> > On Tue, Jan 5, 2010 at 12:24 PM, Rong <ron.gr...@gmail.com> wrote: > > > Is this for a second Edition?
> > > On Jan 5, 12:49 am, Jeffrey Palermo <Jeff...@Palermo.cc> wrote: > > > > I'd like to get this discussion list going my posting the first > > > manuscript > > > > chapter we have ready. It is the first chapter because it had the most > > > > reusable content from the 1st edition book. The example was converted > > > from > > > > using XML mapping files to FluentNHibernate code-based mappings.
> > > > The chapter uses Inversion of Control and constructor injection, but it > > > does > > > > not use a container library. It implements dependency injection and > > > > abstract factories through code. > > > > Please reply to this group and tell us what you think.
> > > -- > > > -------------------- > > > Please feel free to comment on the progress of the book, the content, and > > > the code samples. All code and text is available on the book's GitHub site > > > athttp://github.com/jeffreypalermo/mvc2inaction. We hope developing this > > > book out in the open and with your feedback makes it a great book for the > > > community.- Masquer le texte des messages précédents -
> > - Afficher le texte des messages précédents -- Masquer le texte des messages précédents -
I reviewed this during my plane trip to Austin for MVC bootcamp and learned a lot! Sorry I don't have more substantial feedback... this chapter looks great to me. Here are some minor corrections:
Page 1: Intro paragraph, last sentence: should be "applicable" not "application"
Page 7: "To even the inexperienced eye" --> should it be "To even the experienced eye"?
Page 11: "The two files" should be "The two XSD files"
> I reviewed this during my plane trip to Austin for MVC bootcamp and > learned a lot! Sorry I don't have more substantial feedback... this > chapter looks great to me. Here are some minor corrections:
> Page 1: Intro paragraph, last sentence: should be "applicable" not > "application"
> Page 7: "To even the inexperienced eye" --> should it be "To even the > experienced eye"?
> Page 11: "The two files" should be "The two XSD files"
> -- > -------------------- > Please feel free to comment on the progress of the book, the content, and > the code samples. All code and text is available on the book's GitHub site > at http://github.com/jeffreypalermo/mvc2inaction. We hope developing this > book out in the open and with your feedback makes it a great book for the > community.
This was quite an eye opener, since I've never used NHibernate and I'm still wrapping my head around your Onion Architecture.
With that said, I offer the following suggestions for correction. Also, here is a link to the docx which I marked up under review mode. If you open the docx file, be sure to turn on the mode where it shows the comments and tracked changes.
1) Page 8: RepositoryBuilder appears to be a field, not a property as stated. 2) Page 11: As another reviewer stated, I added XSD in between "two files" to make "two XSD files". 3) Page 11: Listing 23.6: Table("Visitor") should be Table("Visitors") as it appears everywhere else including the XML in the same code listing. 4) Page 12: "The equivalent XML mapping is included in commented for for reference." Remove duplicate "for" and replace "commented" with "comments". 5) Page 13: Listing 23.7: In the "Return Fluently.Configure(...", "Return" should have a lowercase "r" (in C#). 6) Page 17: Listing 23.11: In the When_saving_should_write_to_database method, you create a Visitor object manually, but you have a CreateVisitor(DateTime) method you use several other times in the same TextFixture that does the exact same thing. Consider using that method there instead of the manual creation, in observance of the DRY principle. 7) Page 17: Listing 23.11: In the lines in that same Test, you do comparisons like: Assert.That(loadedVisitor.Browser, Is.EqualTo ("1"));. However, it may more clear to do: Assert.That (loadedVisitor.Browser, Is.EqualTo(visitor.Browser));. Again, you did this in the other Tests in the same TextFixture.
Aside from those few things, I learned a lot! Like I said, I've never used NHibernate, and it's neat to see how to hook it up, especially as I'm beginning to understand and use the Onion Architecture.
I look forward to reviewing more chapters!
Thanks, Chris Benard
On Jan 5, 12:49 am, Jeffrey Palermo <Jeff...@Palermo.cc> wrote:
> I'd like to get this discussion list going my posting the first manuscript > chapter we have ready. It is the first chapter because it had the most > reusable content from the 1st edition book. The example was converted from > using XML mapping files to FluentNHibernate code-based mappings.
> The chapter uses Inversion of Control and constructor injection, but it does > not use a container library. It implements dependency injection and > abstract factories through code. > Please reply to this group and tell us what you think.
On Sat, Jan 30, 2010 at 1:33 PM, Chris Benard <ch...@chrisbenard.net> wrote: > Hey Jeffrey,
> This was quite an eye opener, since I've never used NHibernate and I'm > still wrapping my head around your Onion Architecture.
> With that said, I offer the following suggestions for correction. > Also, here is a link to the docx which I marked up under review mode. > If you open the docx file, be sure to turn on the mode where it shows > the comments and tracked changes.
> 1) Page 8: RepositoryBuilder appears to be a field, not a property as > stated. > 2) Page 11: As another reviewer stated, I added XSD in between "two > files" to make "two XSD files". > 3) Page 11: Listing 23.6: Table("Visitor") should be Table("Visitors") > as it appears everywhere else including the XML in the same code > listing. > 4) Page 12: "The equivalent XML mapping is included in commented for > for reference." Remove duplicate "for" and replace "commented" with > "comments". > 5) Page 13: Listing 23.7: In the "Return Fluently.Configure(...", > "Return" should have a lowercase "r" (in C#). > 6) Page 17: Listing 23.11: In the When_saving_should_write_to_database > method, you create a Visitor object manually, but you have a > CreateVisitor(DateTime) method you use several other times in the same > TextFixture that does the exact same thing. Consider using that method > there instead of the manual creation, in observance of the DRY > principle. > 7) Page 17: Listing 23.11: In the lines in that same Test, you do > comparisons like: Assert.That(loadedVisitor.Browser, Is.EqualTo > ("1"));. However, it may more clear to do: Assert.That > (loadedVisitor.Browser, Is.EqualTo(visitor.Browser));. Again, you did > this in the other Tests in the same TextFixture.
> Aside from those few things, I learned a lot! Like I said, I've never > used NHibernate, and it's neat to see how to hook it up, especially as > I'm beginning to understand and use the Onion Architecture.
> I look forward to reviewing more chapters!
> Thanks, > Chris Benard
> On Jan 5, 12:49 am, Jeffrey Palermo <Jeff...@Palermo.cc> wrote: > > I'd like to get this discussion list going my posting the first > manuscript > > chapter we have ready. It is the first chapter because it had the most > > reusable content from the 1st edition book. The example was converted > from > > using XML mapping files to FluentNHibernate code-based mappings.
> > The chapter uses Inversion of Control and constructor injection, but it > does > > not use a container library. It implements dependency injection and > > abstract factories through code. > > Please reply to this group and tell us what you think.
> > Best regards, > > Jeffrey Palermo
> > MVC2iA_CH_23.docx > > 727KViewDownload
> -- > -------------------- > Please feel free to comment on the progress of the book, the content, and > the code samples. All code and text is available on the book's GitHub site > at http://github.com/jeffreypalermo/mvc2inaction. We hope developing this > book out in the open and with your feedback makes it a great book for the > community.