简体   繁体   中英

What are the benefits of upgrading from .NET 2.0 to .NET 3.5?

I need some help. My supervisor who is not a programmer asked me to prepare a document describing how our company would benefit from switching to .NET 3.5 from .NET 2.0. We're a small company and our IT department consists of only 6 programmers. We write mainly Windows Forms, sometimes ASP.NET and Compact Framework apps. I would like to hear about pros and cons of this decision.

Edit:

I personally know .NET 3.5 I'm just not sure how to convince my supervisor that we need it.

Edit2:

Please note that my supervisor is NOT a programmer (which is a really stupid situation but it's another story) so simply telling him that .NET 3.5 has LINQ and other stuff tells him nothing.

I know it's hard to quantify in business terms, but... LINQ/lambda expressions!

Also: you can take advantage of higher-level APIs like Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), Windows Workflow Foundation (I think you get the idea on the acronyms). VS2008 is a lot nicer to use for the ASP.Net stuff, as well (sell that as higher productivity. I haven't done enough windows forms work in vs2008 to give any advice there).

It is worth breaking this down.

the 'move from 2.0 to 3.5' is in fact several things (some optional some not)

  1. The version of the BCL libraries goes from 2.0 to 3.5
    • This actually is largely an addition of some more libraries like those responsible for LINQ. The libraries from 2.0 you are familar with have only had (minor) bug fixes.
  2. Compiler changes
    1. The move from c# 2.0 to c# 3.0
      • Lamda expressions
      • var type inference
      • much improved designer support via partial classes
      • LINQ (to objects, to xml, to sql
      • anonymous types
      • automatic properties
      • Extension Methods
      • and more...
    2. The move from VB.Net 8.0 to VB.Net 9.0
      • much the same as c# in regards to lamdas/LINQ/var
      • XML literals
  3. VS 2008 instead of 2005
    • Improved intellisense (faster, more tolerant of failures in it without bringing down the entire app)
    • unit testing integration in VS 2008 Professional rather than team system
    • many more changes than I can list here

You will realistically need to move to VS 2008 to achieve the c# compiler upgrade.
You can upgrade the compiler but NOT move to 3.5 library, this means you lose out on certain aspects of Linq unless you use a plug in replacement like LinqBridge.

Each of these upgrades bring their own pros (and a few cons).

For your needs I would imagine access to the new MVC ASP.Net may prove useful. I have no personal experience with it but it appears to be widely viewed as a good framework for this sort of use.

The integrated test functionality means you can use this for free (I find being able to debug into my unit tests easily was worth the price of tools like TestDriven.Net so so getting (some) of this for free is useful.

The improved stability (and start up time) on VS 2008 has been very useful for me. I also find "Go To Definition" an incredibly useful command that speeds up my workflow a surprising amount.

I second those saying that the new LINQ related language enhancements are useful. I find the extension methods on IEnumerable<T> make certain tasks that used to require many lines of boiler plate and needless variables take only one (very descriptive) line. This reduces the need to separate out functionality into more methods and enhances readability.

Did you have a look at Microsoft's “What's new” document? IMHO, the benefits are gigantic because .NET 3.5 offers the Linq framework. I can't speak for ASP.NET but in general, Linq to Object is extremely powerful and increases productivity.

The costs, on the other hand are relatively small (again IMHO) since Microsoft offers an effordless installation of the new .NET framework via the auto update function of Windows.

If you write CF, I know first hand that CF 3.5 is significantly improved from CF 2.0; some of the knottier permissions issues are fixed, and you simply have a lot more framework to choose from. Simple things like Delegate.CreateDelegate can be used to vastly optimise things.

On the winform from, WPF offers an alternative. For ASP.NET, MVC becomes an option.

Oh, and LINQ for all your query needs;-p (although that is also available with the C# 3.0 compiler with .NET 2.0 + LINQBridge).

This may be obvious, but you want to tell him why the additional features in 3.5 will help achieve high-level goals like:

  1. Saving time, thus saving money!
  2. Improving quality
  3. Improving interoperability (iecompatibility with browsers)
  4. Improving manageability

Don't confuse him the lots of jargon about what the features are called, tell him what these new features will help you achieve. Throwing jargon at him will only confuse the situation.

Give him an estimate of the effort involved in upgrading and then show how long the additional benefits of 3.5 will be greater then the estimated effort of upgrading! this is the ROI (Return on Investment)

Then again, if all of this is a stretch then try honesty: all the developers want to play with the new .net 3.5 toys and get skilled up on the latest & greatest so we can put it on our resumes. This will be great experience and help us get jobs elsewhere;-)

I might be too late for replying to the question and presuming on your more recent questions that maybe you had actually migrated to 3.5.

Your question is relevant, because in many cases that question arise and in many cases also our superiors doesn't have any technical background or look more to the cost of development and eventually upgrading server or user machines and if they have their famous ROI (Return On Investment).

In my opinion, the most important benefit for migrating to 3.5 and eventually 4.0 soon is productivity . Productivity is achieved by having the latest technologies which will save precious minutes, workaround and some headaches for a developer. But mostly, and specially for me, working with the latest technologies give me motivation that will push me to the limit of my capacity to learn and solve new problem with clean solution. This specific point usually get ignored by superiors but in my cases is a hidden to success projects.

Many of these features came in with.Net 3.0. Not all but many of them.

To stress Joel's point, LINQ/Lambda's decrease the bug count in the UI layer enormously. LINQ isn't best suited for code where you need to squeeze out every cycle, but for something where.02 extra seconds doesn't matter, it is great. Microsoft has made it so that you can write loops in naturalish language, the way one's mind actually works. This frees you from worrying about loop indices, place holder arrays, edge cases, etc. I haven't had a single bug in my (admittedly small) UI since I made the switch.

Additionally, WCF makes both web communication, RESTful servers, and interprocess communication very, very easy. I can roll a RESTful webserver with a fairly rich feature set in about 10 minutes. Granted, I'm using a library we whipped up that takes care of some of the repetition of WCF, but it would maybe be 20 minutes otherwise.

If you do multithreading, the ReaderWriterLockSlim provides an enormous speed improvement over the ReaderWriterLock in 2.0, and an even larger improvement over lock().

Another thing is that you can use the new Microsoft Chart Controls , which are basically a clone of Dundas Chart but they are free. If you need charting features, that would save you hundreds Dollars for each server (assuming you work with ASP.NET).

LINQ to SQL, never write 4 store procedure for 1 object again.

You will write some, but only to improve speed and efficiency.

I think most of the other answers have gotten most of the key concepts. I would say that coming from a winforms world though, that WPf and the client subset of the framework are huge ones.

I just wanted to add that since 3.5 is really just extra dlls on top of 2.0, it seems like the question is, why not switch. Your entire code base should immediately run in 3.5 once you convert the project files to VS2008. As long as upgrading to the new VS isn't a problem, there really shouldn't be any drawback to upgrading. You can then dabble in the new features and apply then when you see fit.

I've said this in another conversations but despite how cool LINQ i'd add caution to focusing on this. Us programmers like to measure and provide indisputable results yet we all seem to claim that using LINQ "increases productivity" without question. Where are the research results that back up these claims? How can you promote that in business without resorting to fuzzy, unmeasurable data?

I'd suggest easing off that aspect as the lack of concrete evidence is only going to generate suspicion in a sharp mind.

Focus on the CF 3.5 improvements and improvements to ASP.NET. Hell they even fixed a bug in String.IsNullOrEmpty(). There are plenty of good reasons to upgrade. If you're not on VS2008 then that is well worth updating to, faster build times, targettable frameworks etc. It's a decent upgrade.

Another point is that you might start finding problems that are solved in 3.5 or 2008 or use code or components that are only available in the latest edition. Imagine getting stuck by a crappy problem finding a solution online but then being unable to use that fix cause you're on the older version. Frustrating.

For any tech company you should be upgrading. The point isn't about justifying the upgrade but more planning where and when it is going to be sensible to do the update especially in a .NET version upgrade where backwards compatability is mostly fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM