Understanding CSLA...

G

Guest

I'm trying to understand the concept of CSLA (and using it with n-tier), but
I'm having trouble with it (even after browsing Lhotka's book).
Let's say I have a webform (presentation) that will insert a product into
the products table. My webform instantiates my Products class (business
layer), and calls addProduct(a,b,c,d, ...). Products.addProduct creates and
configures the SQLCommand to run the SP (data layer) that inserts to
Products. Finally, the SP returns an error code (i.e. 0 or i) which another
method in Products will interpret as "An error occurred" or "The Insert was
successful". This string will then be sent to the webform.
How do I add CSLA to this architecture?

Thanks.
P.S. - I always thought that in 3-tier architecture the data layer was
another class that would make the actual call to the database and the
business layer would only make sure that the data being sent to the data
layer was correct and that the information sent to the windows/web form was
user-friendly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top