Implementation Design Changes

Implementation Design Changes

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


DeHaynes posted on Monday, August 28, 2006

I am basically just getting started and wanted to know if anyone has done any of the following things or knows where I can go research it.  I am planning on implementing a CSLA implementation, except I have some additional needs.

1.  I need the ability to mark a record as inactive so that I can still use it for reporting, but I don't delete it.

2.  I have to interface this with DotNetNuke modules somehow.

 

In response to item one, I plan on:

1.  Adding a 'Active' bit field in all my Sql tables.
2.  Adding DataPortal_Activate and DataPortal_Deactivate methods for BusinessBase and BusinessListBase.
3.  Add CanDeactivate() and CanReactivate() methods for checking user rights.
4.  Instead of Fetch, I plan on using FetchActive and FetchAll to retrieve records for the object and make SQL Server stored procedures for those as well.

 

I haven't researched how to interface DotNetNuke with CSLA yet.  If anyone has done this, I would appreciate some help.

 

Tim Hays

figuerres replied on Monday, August 28, 2006

I used CodeSmith to gen my procs for SQL and what I did was take the sql template and hack it up so that in my system Active is a bool and the standard BO's filter on Active.

I use this for my "deletion" logic so that when a user deletes an item it gets marked as Active=false and then is not shown.

I am working thru my first project with CSLA so I am not all the way thru the life cycle but I see no problems with this or other tweaks.

as for the DNN stuff there is in CSLA an "ObjectAdapter" thing that I recall as reading that it can output datasets and other custom objects .... so you may want to look that up as one way to go.

also CSLA can go with WebServcies and DNN uses WebServices, will CSLA and DNN be on one server or different servers ?

DeHaynes replied on Tuesday, August 29, 2006

Sorry I haven't gotten online to respond lately.  I was sidelined by another project. 

To answer your question, DNN and CSLA are on seperate servers.  I am actually thinking of installing the CSLA application server on the SQL Server where the actual data is stored.  I know you probably think that is a mistake, but my company has a max of 75 employees and we are keeping records for 1700 entities.   (700 stores and 1000 owners)  And most of the the financial data exists in a seperate Great Plains SQL server.  I am building the system from scratch because my company doesn't currently have a centralized data repository.  The overall goal is to build a company Intranet and Extranet.

About the Active/InActive ability, did you provide an interface/functionality to reactivate an object?  My thoughts where that if I programmed the Active status into the framework, then I would subsequently enable the UI the ability to work with Active and InActive objects.

Another reason I was thinking about putting the code in the framework is because essentially EVERY table and record in the database will have the ability to be Active or Inactive.  By putting this in the framework, I reduce my code. 

It has the by-product of getting me very familiar with the CSLA framework.  My hope is that I can take the knowledge and make a Report-Business Object framework.  I have a couple of specialized applications that I have created for my company that do intense calculations.  I hope to automate the number crunching of the reports into Data Objects and expose it via the same process that CSLA exposes it's data, along with using a security model.

Copyright (c) Marimer LLC