Академический Документы
Профессиональный Документы
Культура Документы
The framework enables developers to leverage the power of object-oriented design as the basis for creating powerful applications. Business objects based on CSLA automatically gain many advanced features that simplify the creation of Windows, web, service, and mobile interfaces. CSLA .NET allows great flexibility in object persistence, so business objects can use virtually any data sources available. The framework supports 1-, 2- and n-tier models through the concept of mobile objects. This provides the flexibility to optimize performance, scalability, security and fault tolerance with no changes to code in the UI or business objects. The ApplicationContext object must be managed differently in ASP.NET than other environments. In CSLA 4, Csla.dll doesn't (can't) reference System.Web.dll, so correct management of ApplicationContext for ASP.NET is in Csla.Web.dll. All ASP.NET hosted code must reference Csla.Web.dll to function correctly in CSLA 4. More info... Edit
.NET: How do I use compression for the WCF data portal channel?
There are third party WCF bindings that implement compression. I recommend using one of those bindings. This thread discusses one option. Edit
.NET: How do I use compression for the Remoting data portal channel?
This thread has information about one solution. Edit
SL: Can I (should I) use binary XML with the Silverlight data portal?
CSLA .NET 3.8 uses binary XML on your behalf. You should probably still use compression on the data (the previous topic in this FAQ), and you should probably configure your WCF endpoint and client to use binary XML as well. This thread has more information, along with performance data around the use of binary XML, compression and both combined. Edit
Edit
Server
<system.serviceModel> ...... <basicHttpBinding> <binding name="basicHttpBinding_IWcfPortal" maxReceivedMessageSize="2147483647" <readerQuotas maxBytesPerRead="2147483647" maxArrayLength="2147483647" maxStringContentLength="2147483647" maxNameTableCharCount="2147483647" maxDepth="2147483647"/> </binding> </basicHttpBinding> ...... </system.serviceModel> <system.web> ...... <httpRuntime maxRequestLength="2147483647"/> ...... </system.web>
Client
<basicHttpBinding> <binding name="basicHttpBinding_IWcfPortal" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647> </binding> </basicHttpBinding>
Edit
Does the object graph get serialized when using the local data portal?
In version 3.5 and higher, by default the object graph is serialized when you invoke the data portal on a root object. Even in local mode the object graph is serialized once, to handle the case where the database throws an error in the middle of updating a set of objects. In that case, your object graph would be broken because some objects would have new (but now invalid) primary key values and timestamp values. That scenario has never been a problem with a remote data portal, because the original object graph was still on the client, and the broken graph on the server is essentially discarded. But for a long time (everything up to 3.5 basically) the local data portal would leave you with a broken object graph. In some of my older books I recommended writing UI code to clone the object graph and to have a try..catch block to solve this issue - but that's really not good, because it isn't a UI concern, and because most people didn't do this extra work. So in 3.0 I added the option for the data portal to make the problem go away, but you had to turn it on (with the AutoCloneOnUpdate setting). And in 3.5 I changed the AutoCloneOnUpdate default to true, so the data portal does the right thing (cloning the object graph) by default, and you need to turn it off if you want the older (arguably broken) behavior.