Understanding how WCF works

I use the WCF service between the client user interface (Silverlight 3.0) and the data layer. We use NHibernate to access the database. So please tell me if my understanding is correct below or not:

  • The user interface calls WCF for the save method (for example,).
  • WCF has a Save method that actually encapsulates the Save method from the Data Access object.
  • The Data Access Object method for Save in turn encapsulates the default save method NHibernate, which actually saves some business objects to the database.

Also, can someone tell me how we transfer objects from WCF to the user interface level (Silverlight 3.0) and vice versa. I read that for this we use DTO. But how does the DTO work? Do they match Data Contracts in WCF? If not, is the DTO advertised on the WCF (server) side and on the client side?

+3
source share
2 answers

No, not at all....

  • The user interface calls the proxy client method Save
  • The WCF runtime takes this call and all the parameters passed and converts them into a message (usually a serialized XML message).
  • WCF runtime sends a serialized message through some kind of transport medium (whatever that is)
  • server-side, WCF runtime accepts incoming message
  • ,
  • :
  • WCF ,

  • - -

: ( ) > - " " -

+5

marc_s - , Silverlight. - Silverlight; .

- ( ?) factory. . .

+1

Source: https://habr.com/ru/post/1795494/


All Articles