Re: Newbie questions relating to 3-tier/remote design

Re: Newbie questions relating to 3-tier/remote design

Old forum URL: forums.lhotka.net/forums/t/5557.aspx


tkd posted on Thursday, October 09, 2008

3. Possible to collect the Product.Save from the previous example and bundle them as one call back to the server? If you had 100 purchase orders being created together by an end of day process, it would be nice to be able to do a collection save on all of them to reduce the network calls. But I don't think this one could work, given that the code to handlign the remoting would be in the data portal in the CSLA object itself?

4. Is there any functionality to generate an XSD from your business object and then be able to receive an XML from a third party, validate against the XSD and then load that XML into a CSLA object? To me would provide an SOA type interface to external clients.

5. With the WPF components there is a CSLA notification event that can be used to determine whether a field is readonly, enabled, etc. Can this be used to actually hide the component? For example, users of certain levels should not even know some fields exist.

6. Can these notifications be used on any WPF component or only a subset prescribed by CSLA?

7. I saw some sample CSLA code like this.

                       ' We create the order
            Dim objOrder As Order = Order.NewOrder
            objOrder.CustomerID = "CHOPS"
            objOrder.EmployeeID = 1
            objOrder.ShipVia = 1

            ' We create the Order Detail
            Dim objDetail As OrderDetail = OrderDetail.NewOrderDetail
            objDetail.Product = objProduct
            objDetail.Quantity = 100

            ' Add the OrderDetail to the order
            objOrder.Orderdetails.Add(objDetail)

            ' Save the Order
            objOrder.Save()

The objDetail isn't added until the end. I can think of a case where I would want the object added first and then set the product ID. For example, I need to ensure the item on the detail line is for the supplier on the order. If I did add the objDetail to OrderDetails first, does the child know its parent? So in the validation code could I do something like?:

  if item.supplier <>  parent.supplier 
     error 

 

 

That will do for now. None of these are deal breakers for me. Well 1 might be. Using a dataset/datatable method I would expect to only get the deltas come back. Its a lot more efficient when doing just a few updates on a lot of records.

I'm mainly just interested to know what support there is for them. I've been doing a lot of reading around on the NET there are some people who really like CSLA and then there are a number who seem vehmently opposed, espieclaly the DDD guys. Thing is for all their 'this can be done better with DDD, n-hibernate,e tc', I still haven't seen examples of frameworks that handle the connect of the object to the user interface through databinding as well as this, that does proper tracking of the updates especially deletes on child lists, that handles n-tier well as transparently as this. Its somewhat similar to the dataset type approach we currently have and if I was wanting to write a framework from scratch is probably the way I would go about it. I guess its all trade-offs, but I think I'd be getting a lot of power with CSLA to quickly build LOB applications.

 

Copyright (c) Marimer LLC