Upgrading from CSLA 2.1 to CSLA 4.x / development path moving forward.

Upgrading from CSLA 2.1 to CSLA 4.x / development path moving forward.

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


gajit posted on Wednesday, December 14, 2011

Hello all,

I know there are a number of discussions relating to various upgrades from one version or another, but I do have some specific questions with regards to my development path and I didn;t want to hijack those other threads.

I have developed/been developing a CRM-type application for a client for the last 10 years, with it's foundations being set on CSLA 1.x and currently sitting at 2.1.

The application is very comprehensive - and very stable. My gratitude to the CSLA community, and Rocky in particular, cannot be over-stated - without them I wouldn't be paying my bills Smile

The application is currently being developed using ,Net 2.0, with VS 2005, it is a desktop client sever application using Windows Forms, and has a MS-SQL backend - some 200+ users.

But I now find myself at somewhat of a crossroads.

There are two main considerations: -

  1. The BO's/.Net framework are obviously older technology and I need to sit down with my client to explain the options available to him. Having read some of the other threads, I'm pretty certain that our choices are limited - namely a "re-write" - if we want to go to the latest .Net/CSLA frameworks. Is that a fair assessment? My "sell" to latest technology may by harder considering their backoffice application is developed (by another vendor) in VisualFoxPro... and still remains current. Are there any considerations regarding end-of-life that I should highlight?
  2. I would also like to develop some new applications using the most current technology. My VS.Net 2010 is on it's way and my assumption is that I should be using the latest CSLA releases (4.2?) Can TWO CSLA frameworks co-exist on the same machine? Will developing new applications using the latest .Net / CSLA version impact my ability to maintain my legacy .Net 2.0 / Csla 2.1 application? Or do I need to bite the bullet and buy a new development box?

Any advice on where to (re)start, would be appreciated. Having neglected you guys for some time I'm not even sure if the current framework uses the same concepts as it's descendants, so if you can point me in the direction of the latest documentation, I can head off to Amazon and purchase the necessary literature.

I look forward to your comments and suggestions.

Thanks,

Graham Blandford

 

RockfordLhotka replied on Wednesday, December 14, 2011

There is some good information here:

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

To get from 2.x to 3.6+ is somewhat of a rewrite, that's true. The property declaration syntax is different, and the old/verbose syntax is going away over time.

In a lot of cases though, that's just property declarations, and replacing the old/verbose syntax is quite mechanical - and reasonably quick given the use of snippets for the new syntax.

The harder part is the reworking of business rules from the delegate syntax to the CSLA 4 rule class syntax. That is generally worth it, because the new model is substantially more powerful, but it is a bit less mechanical than swapping out the property declaration syntax.

The data portal has changed too, but those changes are usually mechanical, unless you switch to using the async model - but that's really a separate choice that is independent of a CSLA upgrade.

gajit replied on Wednesday, December 14, 2011

Thanks Rocky.

IF, my client was reluctant to invest in the work that comes with the upgrade, what would you suggest?  Would taking them to say 3.0.5 and providing support for .Net 3.0 at least be an option or not worth it in your opinion?

In these tough economic times, the "sell" to upgrade will be harder than it has been in the past.

Either way, is it possible to develop under the CSLA4.x umbrella with .Net4, etc on the same box as an earlier version of CSLA?

I was going to purchase the CSLA 4. eBook to understand the new version, is that the preferred method? (I think in the past I purchased the Apress version from my boostore).

 

Thanks once again,

Graham.

 

RockfordLhotka replied on Wednesday, December 14, 2011

It depends.

3.0.5 contains numerous bug fixes over 2.1.x. If those bug fixes are beneficial, it is worth that update even for .NET 2.0.

There's no value to .NET 3.0 itself, unless you plan to use WPF or WCF. .NET 3.0 is just 2.0 plus those new technologies.

The Using CSLA 4 ebook is the best way to understand the new version. The Apress book was from 2008, and covered version 3.6, so from the perspective of really understanding the current framework it is a bit outdated.

Finally, yes, you can use two versions of CSLA in the same app. The FAQ link I provided has links to threads that discuss how this can be done.

gajit replied on Thursday, December 15, 2011

Thanks again Rocky.

The application has remained stable over the years, so I probably won't upset the apple cart for the sake of the bug fixes.

If I am able to use 4.x for new development on the same machine, I'll go ahead and do that. If I manage to incorporate some new technologies such as Windows Phone UI into those new products, even better - more ammunition to make that upgrade a "must have". 

Off to poke around in thr FAQ's....

Thanks again!

 

JonnyBee replied on Thursday, December 15, 2011

Hi Graham,

When you move to VS2008 or VS2010 and still need to support a .NET 2.0 application then take a look at LinqBridge, http://www.albahari.com/nutshell/linqbridge.aspx that is a reimplementation of Linq to objects and also provide Func and Action delegates for use in .Net 2.0 SP1.

Essentially - you can write C# 3.0 syntax with lamdas, linq queries over objects and anonymous lambdas while targeting .NET 2.0.

This is also required/indluded in CSLA 3.6 N2 - essentially a downport of CSLA 3.6 for use in .NET 2.0 http://www.lhotka.net/cslanet/N2.aspx

You can have VS 2005, VS2008 and VS2010 installed side-by-side on the same machine. I now prefer to use VS2010 even for my .NET 2.0 projects (better profiling tools, R# 6, better refactorings and more) and the only problem I've had so far  is no support for Report Viewer 8 file format (for NET 2.0) plus it requires .NET 2.0 with SP1 when targeting .NET 2.0 runtime.

 

 

 

gajit replied on Wednesday, January 25, 2012

Thanks Jonny for your response - I didn't get a notification for some reason or I would have thanked you earlier.

I have invested in VS2010 and currently reviewing CSLA4. A little frustrating at the moment to be honest, but tomorrow's a new day - I'm sure I'll get there in the end!

Graham

 

ajj3085 replied on Saturday, December 17, 2011

I'll just chime in from my experience moving to Csla 4.  Its been well worth it, the ability to directly test your business rules is valuable, so the benefit to the client is that you'll have reduced maintence in the future.  Also, you'll be mucking with Csla based objects... but its not a full rewrite.  Property delcarations and delegate to object rules are the main changes.  This next point is where Csla really shines; you can do all this work without affecting your UI OR data code.  Well, I guess the cavet is that nobody heavily modifed Csla itself and followed all its rules.

Given that you can use two versions of Csla in one application, you also dont' need to do it all at once.  You can upgrade classes as features would require you to modify them anyway.  That's an option your client may be more willing to swallow.

gajit replied on Wednesday, January 25, 2012

Thanks Andy for your response - I didn't get a notification for some reason or I would have thanked you earlier.

It's early days right now. I'm reviewing what's needed for CSLA4, but frankly I'm a little disappointed with the documentation at this stage. It appears the approach that was taken in earlier versions to tale the user step-by-step through the build of the framework has gone - as have the sample project tracker examples - unless I'm missing a huge chunk somehwere.

Hopefully I'll get there in the end, but right now it's looking very daunting indeed.

Thanks,

Graham

 

RockfordLhotka replied on Wednesday, January 25, 2012

gajit

... frankly I'm a little disappointed with the documentation at this stage. It appears the approach that was taken in earlier versions to tale the user step-by-step through the build of the framework has gone - as have the sample project tracker examples - unless I'm missing a huge chunk somehwere.

I am hoping you haven't yet looked at the Using CSLA 4 ebook series, because those books provide over 900 pages of content, including step-by-step walk throughs of building ProjectTracker for ASP.NET MVC, WPF, Silverlight, and Windows Phone.

The books also provide the most extensive documentation of the framework features I've ever created. The Expert Business Objects books never went as deep into the ways you could use business rules, the data portal, implement data access, and other important topics that are covered in the new Using CSLA 4 books.

gajit replied on Wednesday, January 25, 2012

My disappointment Rocky, is as I replied in a more directly related post the lack of direction on how to physically compile the CSLA 4 assemblies from the Source contents provided. I will continue to scour the documentation - and it may very well be my unfamilairity with VS 2010, but in previous implementations of CSLA, the process was either more simplified (because we only had to deal with Windows Forms) or detailed instruction was provided.

Although less of an issue, none of the ProjectTracker builds consider the Windows Form developer - unless I am mistaken - I haven't scoured that far ahead.

Thanks,

Graham

 

RockfordLhotka replied on Thursday, January 26, 2012

This is because Windows Forms hasn't changed since 2005, so all the content from the Expert 2005 Business Objects book, and perhaps more importantly the Using CSLA .NET 3.0 book remain relevant.

I find it hard to get excited about writing a Using CSLA 4: Windows Forms book at this point, when I'd be talking about a UI technology that hasn't changed, and against which Microsoft isn't investing anything beyond bug fixes...

Perhaps I'm wrong, and there's value in creating such a book. I'll have to give that some thought.

gajit replied on Thursday, January 26, 2012

If the early poll results continue, I may have opened a can of worms that you may not have wished to open ;)

To be honest Rocky, once I've loaded the aseemblies, it's possible I may not even require the Windows Forms book - but IU would purchase it nonetheless. I've had cause in recent times to get some additional help with some of my projects, and I found one of the quickest ways to get those programmers up to speed with the structures I implement is to read what their foundations are.

I do appreciate all of the effort you put into this project - not to mention your staggering response time when a scrub like myself raises issues.

Thanks again,

Graham

 

 

RockfordLhotka replied on Thursday, January 26, 2012

gajit

If the early poll results continue, I may have opened a can of worms that you may not have wished to open ;)

Maybe :)

To be honest, I'll need a high "yes" vote count to make it worthwhile - maybe 50 or 100 yes votes. Otherwise my time will be better spent on SL5 and WinRT support, and a Using CSLA 4 video series.

Copyright (c) Marimer LLC