Help getting started

Topics: Developer Forum, User Forum
Oct 17, 2011 at 7:53 PM

Hello and thanks for creating this project.

I have read "Architecting Applications for the Enterprise" and will likely give it a second read to make sure I have digested it all.

I have downloaded the latest build of NSK (nsk-93269).  I have gotten over some of the first "humps" (EL 5.0, Code Contract Extensions, etc., installing Northwind sample, MVC 2.0)

I am getting some persistent behaviour and am wondering if there is something I'm doing wrong.  I've listed 3 examples below, but what I'm really looking for is this:

Which version(s) of all the Presentation Layers are the most complete?
Which DAL is the most complete?

1. I set "ManagedDesigns.Nsk.Windows.UI as the startup project.  I then built the project and ran it.

• I opened the "Customers" and clicked on "Add".
• I filled out the fields with example data and pressed "Apply"
• I get a NullReferenceException in CustomerDetailPresenter.cs.

 When the following line is executed, newCustomer.MainPostalAddress is null: 

newCustomer.MainPostalAddress.Address = this.view.Address

Should there be a line like newCustomer.MainPostalAddress = new PostalAddress() ?

2. Also using ManagedDesigns.Nsk.Windows.UI:

• On the Customers form, I selected the first customer in the left listbox (Alfreds Futterkiste on my system).
• I clicked the "Edit" button.  On the Customer form I changed the name to Alfreds Futterkisted.
• I clicked "Apply".
• I get a dialog stating

A problem occurred while updating "Maria Anders".
item
Parameter name: The specified customer does not exist.

It looks like the underlying repository (ManagedDesigns.Nsk.Data.EF.Poco.Repositories) is hard-coded to return false in "public bool Contains(T item)".

Should I be using a different repository?  How might I do that?

3. When I click on "Run all tests in solution", 61 tests pass, 21 tests fail.  I assume they are all meant to pass.   One example:

• "CompanyName_Cannot_Be_Null_For_Registration"  Error Message:  Assert.IsFalse failed.
• I took a quick look at the code for this 

Customer c = Customer.CreateNewCustomer("41", "Managed Designs", "Andrea Saltarello");
c.Name = null;
Assert.IsFalse(c.IsValidForRegistration);

I looked in the App.Config of "ManagedDesigns.NSK.Domain.Tests".  Under the Rule Set "IsValidForRegistration", I did not see a Validation Target for Property "Name".

I tried adding one, perhaps I didn't do it right.  This test still fails.

Again, I understand that this is a work in progress.  I just want to make sure I understand what's going on in this solution as it is quite a bit for me to digest all at once.

Thanks,

Rick

Coordinator
Nov 22, 2011 at 6:40 AM

Hi Rick, that project is no longer supported: we are working instead on a backoffice based on "MVVM on WPF", but it's still only an early preview, so I do not recommend to bother with it at the time. As of today, we are concentrating on the MVC powered UIs, with with you could start having a look at the solution.

Nov 22, 2011 at 5:23 PM
Edited Nov 22, 2011 at 6:00 PM
Andrea,
 
 
Thanks for your reply. I just read your book over the summer and love how you and Dino bring together all of the concepts and technologies to give an overall picture of where things fit in.
  
 
I am mostly self-taught and work as a team of 1, but I'm eager to make my solutions more layered, maintainable and extensible. So far, most of what I have made has been Windows Forms applications. Are the concepts captured in the MVP UI's still applicable and considered best practices today for Windows Forms? Are they usable for WPF or is MVVM going to be the way to go?
 
 
Thanks again for your wonderful book and especially for this project which really helps bring the concepts of layered solutions and patterns to life.
 
Rick