Upgrading CSLA 2.x to 4.x

Upgrading CSLA 2.x to 4.x

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


Borc posted on Wednesday, March 13, 2013

Hello.

Several years ago, I inherited a web application that uses CSLA 2.1.0.22. Since then I have upgraded the application to 3.5 then to 4.0 with no issues. This whole time we kept CSLA at its version as we didn't realize it was being kept up to date.   I am looking at upgrading the web application to 4.5 soon and I see there is a corresponding CSLA version.  What are the suggested steps to upgrading an existing application that uses CSLA 2.x to 4.x?  Is it advisable? Is it necessary?  Any information would be appreciated.

JonnyBee replied on Wednesday, March 13, 2013

Hi,

There is a lot of breaking changes - so I highly recommend the Using CSLA 4 ebooks from Rocky and that you go through all the ReleaseNotes and look at the samples. 

And there is several threads here about upgrading as well:

http://forums.lhotka.net/forums/p/10810/50414.aspx#50414  

http://forums.lhotka.net/forums/p/11408/52956.aspx#52956

http://forums.lhotka.net/forums/p/4083/19986.aspx#19986  

skagen00 replied on Wednesday, March 13, 2013

If you're on 2.x, I would really take a hard look as to whether what you gain is worth the effort.  It's not trivial and if it was built w/ CSLA 2.1 you're probably looking at a relatively stable application.

If you don't have a lot of unit/integration tests to back you up with all your refactoring, you could easily just be giving yourself a headache.

Are there any plans to leverage other UIs now? (not potentially in the future, but now).

 

Borc replied on Friday, March 15, 2013

We may go with MVC or WEB API, but I don't see that as an issue.  I see that 4.x may be quite an undertaking.  However, I have read that it is highly suggested to go from 2.x to 3.x due to some bug fixes.  Is the upgrade from 2.x to 3.x less painful?

RockfordLhotka replied on Friday, March 15, 2013

You should read this for sure:

http://www.lhotka.net/cslanet/faq/CslaVersions.ashx

Moving from 2.1 to 3.0.5 is pretty straightforward unless you are using Windows Forms.

Even then, the things you'll need to fix in Windows Forms are bugs that CSLA 3.0.5 will reveal for you (bugs that you've always had, but might not have understood you had).

Getting to 3.8 or higher is more work. Actually 3.8 might not be that bad because we still support a lot of the old-style property implementation concepts in 3.8.

But by the time you get to CSLA 4 I started deprecating some of the "worst" old-style property implementation techniques, and CSLA 4 has an entirely reworked rules engine.

tarekahf replied on Sunday, November 17, 2013

I am posting a reply because we have the same problem. We are actually looking for professinal service to provide technical support (remotely) for the onsite consultant who will carryout the migration of the ASP.NET Solution from CSLA 2.x .NET 2.x VS 2005 ---> to ---> .NET 4.x and VS 2013. Then decided the latest compatible CSLA Version with minimum re-work and re-coding.

Tarek.

Sander replied on Tuesday, August 12, 2014

Thank you for all the tips in this thread regarding upgrade. I have 1 follow-up question:

My job is to update a Company Framework using CSLA 2.1.4 to CSLA 4.5
It is used with Codesmith templates for code generation and contains a lot of customization, so simply using new templates is not an option :(

Advised upgrade path:
2.x -> 3.0.5
3.0.5 -> 3.8(.3)
3.8 -> 4.x

Should I go straight from 3.8 to 4.5 or is it better to step into 4.0 first and then move to 4.5?
I know from the change log and reading other topics there are several breaking changes (especially rules) which all should be checked manually, but I'm in doubt :

Sander replied on Monday, October 20, 2014

I followed this path successfully:
3.8 -> 4.5

tarekahf replied on Tuesday, October 21, 2014

Sander

I followed this path successfully:
3.8 -> 4.5

Thank you Sander for the update. Might need to come back to you for help, or probably consultation Wink .

Did you work with CSLA 2.X?

Tarek

Sander replied on Friday, October 24, 2014

Hi Tarek,

Nope, I did not work with 2.1 sorry. I only followed the upgrade path as described above to update our company Framework to use CSLA 4.5...

Sander

Copyright (c) Marimer LLC