I made an ASP.NET estimating website for a client who needs several other sites to access estimates internally from the estimating site. I decided (not sure if this was smart either) to make the core components of the estimating site into a WCF web service thereby giving easy access to the other sites. The estimating engine depends on lots of externalized parameters which reside in sql tables. Additionally, every step in the estimating process is recorded in other sql tables. Is it okay to do this type of read/write access from the web service? If not, what are my other options?
Share
Is it ok is very subjective. Sure it is ok, it could work, and even could be preferred assuming you architect it correctly.
As for my .02, I’d expose the business logic via the WCF service, but I would make sure I decouple the actual business logic from the service code and would also decouple the database code from the business logic. This would be more of you 3 tier architecture and giving you the ability to just plug the business logic into other applications rather than calling the WCF services if you so cared.
All of this said, there could and often are limitations on connections from web servers in a DMZ to the database and you will always want to be concerned with timeouts on long calculations and the like