The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

jameswiseman (13) [Avatar] Offline
#1
Some more stuff...

Chapter 3 isn’t as billed on the MEAP front page for this book. Might be better to adjust one or other accordingly.

I Really like the reference to NHIbernate and its use of DynamicProxy. It totally brings the topic to life.

Being in the context if its use, this as great a description of ‘using’ in conjunction with ‘IDisposable’ that I have seen.

Really like the sidebars on TransactionScope and InvokeRequired/Invoke. I would however have liked to see a short description of the latter. The sidebar purports to describe it, and then instead tells you that it might not be relevant for your particular requirement. (This is still great info, but would be even better alongside a quick sentence about it)

The Save/SaveRety/SaveFail – the code only appears to test the first scenario. It would be nice for even a suggestion on how we can see the second and third working as well.

I wonder if on page 93 we are just refactoring a little more to justify the ‘long and messy’ statement later.

On Page 96, surely the example partially defeats one of the points of AOP in that we are tightly coupling to a ‘Form’. Shouldn’t we hit some interface instead?

General typos/suggestions:

70 – PostsSharp -> PostSharp
71 – “We could check…” -> “We could validate…”
73 – [Serializeble] -> [Serializable]
73 – class’s -> class’
74 – succesfully -> successfully
75/76 – Does the code block and the subsequent image really need to be repeated? Could you not refer back the section where it was before
79 – In previous sections (2.3. for e.g.) you define the supporting classes for the examples. I can’t see ‘Invoice’ defined anywhere. Obviously we can infer it from the code on the next page where we create an instance, but it might be better for consistency.
80 – Worth including the full namespace for DataException (System.Data). When following the sample, I had to add this in as a reference to the project and then to the includes. (For the latter TransactionScope example you reference the namespace)
81 – Possibililities  Possibilities
81 – ‘--‘ -> ‘ –‘
82 – indicated -> indicate
82 – commited -> committed
82 – explicity -> explicitly
82 – populare -> popular
91 – ‘not in debug mode’ -> Isn’t this just ‘in release mode’?
94 – acheive -> achieve
matthew.groves (46) [Avatar] Offline
#2
Re: Thoughts and comments on Chapter 3
Yes, I apologize about chapter 3. There was some restructuring done: the end result is that chapter 3 is no more and there is a new chapter on unit testing (also not listed).

The console code to "test" SaveRetry and SaveFail is commented out: if you are following along, simply uncomment the scenario you want to test and comment the other 2.

My PDF only goes up to page 91. For page 93, are you referring to the threading example? That is how *I* would refactor it in reality, to make it as readable as possible in a world without AOP. I suppose one could write a more compact version, but I think the added clarity is worth it.

For the UIThread, you have a point, in that it's coupling to the Form class. But since this is a UIThread aspect for a WinForms project, that seems like a reasonable coupling. If you want less coupling, an interface could work, certainly, or some other method of indirection. Many people like to use a custom base class in all their Forms, perhaps such an interface could exist there.

Thanks,

Matt
matthew.groves (46) [Avatar] Offline
#3
Re: Thoughts and comments on Chapter 3
On your debug mode comment, it's not the "debug/release" configuration setting, but rather the difference between "Start" (F5) and "Start Without Debugging" (Ctrl+F5). That is, run without Visual Studio being attached to the process.