Service Contract attribute define saying which application interface will be exposed as a service.
Operation Contract dictates which methods should be exposed to the external client using this service.
ServiceKnownType, Mark in Interface, Mark in implementation
Data Contract attributes defines which type of complex data will be exchanged between the client and the service. They determine which parameters to be serialized.
Windows Communication Foundation (WCF) applications handle error situations by mapping managed exception objects to SOAP fault objects and SOAP fault objects to managed exception objects.
TcmFaults, TcmLocalizableFault, RecordAlreadyBeenDeletedFault, RecordNumberLimitExceededFault
the service is not necessary to be running in advance. When any message is received by the service it then launches and fulfills the request. But in case of self hosting the service should always be running.
If IIS finds that a service is not healthy that means if it has memory leaks etc, IIS recycles the process.
to transfer all the searching criteria from client side to server side by calling some web service method, usually "List" method
IBusinessModelProvider<D, L>, D Create, D Fetch, L List, D Save, int ListCount
SqlManager, GetDynamicSql, GetDynamicSqlInternal, ListCountStrategy, IList<string> GetColumnAliasList(), SearchModelName, Howto, Manual
Introduction Let’s review some of its funcionalities before asking how we should manage the session: 1. The session manages the persistence of our entities then the session has information about the state of the objects at certain times (when the objects were loaded) 2. The session has a cache, it allows a single instance of each object that we load within it. When we try to get an object which has already been loaded, the session returns us a reference to the same instance of the class. 3. The lazy loading will use the session to get the objects only when they are requested. Then... If we accept the introduction is true then we may say: A. Each object should be loaded and saved in the same session (reason 1). B. The related objects should be loaded in the same session (reason 1 and 2). C. the objects with lazy loading should have the same session (opened) at the time to load the lazy information (reason 2 and 3) unless we use an eager fetching strategy. If we disregard it then we can have an Exception of type LazyLoadingException with the message "no session" or "session was closed" because we just did it, we closed the session ahead of time. D. When an object is modified, it is modified again on the session because it is the same! (reason 2) the changes aren't visible for other sessions until we do a Flush and Commit of the transaction. Only after that, the changes are visible to other sessions. This behavior is the key to know how many sessions are necessary. E. The session should be closed when we don't need the same instance of it (reason 1 and 2, considering A, B and C)
DAO interfaces make sense in more complex applications, when several persistence services are encapsulate in one persistence layer.
Generic DAO, TCMDAO, ISAMDAO
Build Sql with Sql Studio
Define Additional Entity Properties
Define & Config Search Model
Build service codes with corresponding manager