p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Patterns, Principles and Practices of Domain-Driven Design (http://p2p.wrox.com/forumdisplay.php?f=789)
-   -   Chapter 26 Event Projections (http://p2p.wrox.com/showthread.php?t=94919)

skupena September 2nd, 2015 07:29 PM

Chapter 26 Event Projections
In the Chapter 26 code samples where you are querying EventStore projections, you have lines similar to this:

// don't hard-code this URL. Access via entry point resource
var projectionStateUrl = "http://localhost:211/projection/MonthsCounts/state";

The code then creates a WebClient and downloads the response from this URL. I don't understand what you mean by 'Access via entry point resource'. Are you saying a whole new web service should be created for the purpose of querying the EventStore?

nick_t September 3rd, 2015 02:03 PM

Hi Skupena,

The advice to follow the entry point resource is based on the hypermedia guidelines presented in Chapter 13. Essentially, by going via the entry point resource, the internal URL structure is free to change, loosening the coupling between client and server.

There are always trade-offs though. In this case that means an extra HTTP request to the entry point resource.

Is that comprehensible?


All times are GMT -4. The time now is 01:51 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.