MarimerLLC / cslaforum

Discussion forum for CSLA .NET
https://cslanet.com
Other
31 stars 6 forks source link

Upgrade from 3.0.4 or use .Net Remoting? #278

Open honusbam opened 7 years ago

honusbam commented 7 years ago

I have recently taken over a large project that references CSLA 3.0.4 in its class library; it obviously hasn't been maintained for quite some time. There are two client applications: a WinForms app and a DNN site. Everything has been running fine, although recent events have caused me to pursue a .Net Remoting implementation to take our database and class library to the cloud. I have successfully configured a working test and performance is great.

However, in my research I have read that .Net Remoting has been deprecated, and this page mentions that Microsoft recommends any .Net Remoting projects be migrated to WCF.

My question is two-fold: 1- should I steer clear of .Net Remoting or can it be secured sufficiently? 2- If I should avoid .Net Remoting, I assume this means I should upgrade CSLA to lay the groundwork to do something else. Any issues with upgrading from 3.0.4 to the latest version?

Thoughts?

ajj7060 commented 7 years ago

I'd recommend using the WCF channel over remoting. Newer versions of Csla don't even include remoting as an option IIRC, so if at some point you want to update to a newer Csla you won't have issues if you're using WCF. And as MS says, remoting is deprecated.

As far as upgrading Csla goes, IIRC in Csla 4 a new rules engine was introduced where instead of static methods being called, rules are now classes. There are many benefits to the new system, but unfortunately it can be a lot of work to convert the static business rule methods to classes and I don't know of any great way to automate that.

There are other likely breaking changes too; you should review the release notes here: http://cslanet.com/Download.html and of course at GitHub for the later versions.

jonnybee commented 7 years ago

As you say - the app/library hasn't been maintained for quite some time and it is probably a large task to Upgrade this library to the latest Version (depending on the number of BusinessObjects and Rules). There is quite a lot of breaking changes and the new RuleEngine in CSLA 4 is just one of them. There is just too much to list in an answer here and you should read through the release notes for each release as these highlight the breaking changes.

The main challenge of any distributed system is to maintain compatibility. When you deploy a new version in the cloud that also means that all clients must use the same version (or you must still support x count of previous versions). Remember the DataPortal uses binary serialization and that means that the same version must be use by bith client and server.

If you decide to do an upgrade I would first look at upgrading to Csla 3.6/3.8. And if you decide to move on further to Csla 4.x then read my post here: https://jonnybekkum.wordpress.com/2013/10/07/csla-validationthe-new-nuget-package-in-csla-net-4-5-40/ that may help you move to Csla 4.x with a lot less pain.