Short answer - Often the service layer proxies the gateway, but not always.
Also, there is no reason a archive layer couldn't communicate to multiple gateways and/or services. Mark Sent from my mobile doohickey. On Jan 4, 2012 11:46 AM, "Gavin Baumanis" <beauecli...@gmail.com> wrote: > Hi Everyone, > > I was recently chatting at work about how we might go about architecting a > new application. > I suggested that we have; > Objects, > Service Managers > and Gateways. > > Whereby the ServiceManager is the public API for the gateway. > > Then I got asked , "Why?" > > I explained that it was good practice to separate out the plublic API from > the gateway and gave the example of changing database providers. > Eg. Swapping from MS-SQL server to PostGreSQL. > > With my architecture proposal, you only need to change the gateway > (perhaps some minor tweaks to the ServiceManager CFCs. > > So far so goo... Until I got asked "Why" again. > "You still need to change the code somewhere for the new database flavour. > What is the ServiceManager doing for us, it seems like a redundant > duplication of code?" > > Subsequently, I have been thinking about it more - and can't come up with > a good reason. > > I could be doing it completely wrong... > But for the most part, my Service layer becomes a duplicate of the Gateway. > * Ensure we have the required arguments for the gateway, > * Call the gateway functions, using the supplied arguments > * Return exactly the gateway's return value(s) to the consumer. > > 99.9% of the time the arguments are exactly the same, > The data / structure (whatever) that is returned from the gateway, is > returned unaltered to the consumer, too. > For the very small number of times that I might do some data > transformation (in the ServiceManager) before it is returned... well I > could simply create "THAT" method in my gateway and have; > * Call the this.GETTER method > * Transform the data as required > * Return the transformed data > > So am I missing something? Or have I just talked myself out of the > requirement for (perhaps, excluding web-services) of ever needing to have a > separate service layer to a Gateway CFC? > > > Gavin. > > > -- > You received this message because you are subscribed to the Google Groups > "cfaussie" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/cfaussie/-/TMMO_W0Au4gJ. > To post to this group, send email to cfaussie@googlegroups.com. > To unsubscribe from this group, send email to > cfaussie+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/cfaussie?hl=en. > -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com. To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.