Sign in to follow this  

[.net] Staying Current

This topic is 4762 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

It was quite a few years ago when I started out learning C++, and I still use all the old products and conventions. With the anticipated release of Visual Studio 2005 around the corner, it's time for an upgrade. I still use VC++ 6.0. I never got 7.0, and by now, it's too late. With that said, I guess I missed a lot. Now, more and more frequently, I heard about the .NET framework. In one sentence, what is this? Should I use it? Any (dis)advantages? Also, I've heard talk about "managed" code. Can anyone explain that? I'd also like a heads up on the new conventions. I've seen some differences by looking at the code. Perhaps, there's already an article on the matter of "porting" between 6.0 to 7.0. If there is, I failed to find one. If you know of any good articles explaining the differences (but not reteaching c++), please post them. Thanks in advance.

Share this post


Link to post
Share on other sites
Actually, if you want to get a more up-to-date compiler without having to pay for it there's both a public beta of Visual C++ 2005 and the optimizing compiler from visual C++ 7.1 (2003) available for download from Microsoft's website for free. Both of support .NET/managed code.

Basically, .NET takes care of things for you, things which you might not want to concern yourself with. It includes a crapload of utilities, the most useful one is probably Windows Forms (a GUI system) and the ability to use garbage collection in C++.
Managed code is code which compiles into an intermediate language (much like Java), which is then compiled into machine code and executed on the user's machine. The most obvious drawback is that the user has to have the .NET framework installed and that programs take longer time to start because the code has to be translated into native code before executing.
I'm no expert on these things, so I don't dare to go anymore in-depth, but I think you should get the general idea.

Share this post


Link to post
Share on other sites
Quote:
Original post by v0dKA
It was quite a few years ago when I started out learning C++, and I still use all the old products and conventions. With the anticipated release of Visual Studio 2005 around the corner, it's time for an upgrade.

I still use VC++ 6.0. I never got 7.0, and by now, it's too late. With that said, I guess I missed a lot.

Now, more and more frequently, I heard about the .NET framework. In one sentence, what is this? Should I use it? Any (dis)advantages?

Also, I've heard talk about "managed" code. Can anyone explain that?

I'd also like a heads up on the new conventions. I've seen some differences by looking at the code.

Perhaps, there's already an article on the matter of "porting" between 6.0 to 7.0. If there is, I failed to find one. If you know of any good articles explaining the differences (but not reteaching c++), please post them.

Thanks in advance.


Well I have to say that it is not too late to go to VS7 from VS6. I used to always use 6 until maybe 3-4 months ago when I got VS7. I still have not touched the managed part of it - but I use it for the most part to make my VS6 code more optimized and smaller. I cannot give you any advice on managed code yet - for I have no experience - but I do plan to learn C# soon.

I have heard a lot of the VS2k5 coming out soon - but you should consider the fact that it will be the newest thing on the market - so it will probabally have bugs and such that might hinder your projects. I would say go ahead, if you can afford to - get 7 and become familure with it. Then, after 2k5 has been out and is more used and stable so to say, then you should upgrade to it. VS7 is a lot different from 6 and I've seen the beta of 2k5 - it resembles VS7.

As for porting from 6 to 7, you should have no problems. Simply open the .dsw files and they are converted into 7's format. All code that I have made with 6 has worked on 7 flawlessly, not to mention it is smaller and faster. The minimum file size I used to be able to get with a .dll with VC6 was 20kb - for a simple project - with 7 it is around 4kb! This trend follows for almost everything.

As long as you are not porting from 7 to 6 (and I do not see why anyone would need to - besides static linking libraries) then you will be fine. Since VS6 does not contain the standardize template instructions, some neat thing you can do on 7 you cannot do on 6.

Just a few thoughts, I hope they help!

- Drew

Share this post


Link to post
Share on other sites
I can say from experience that moving to managed code will make you want to stay. I programmed in C++ for 6 years or so before making the move to C#. Since then, any new project I start uses C#. There are some nice advantages you get from using managed .NET code:

1) Garbage collection - this is the most obvious benefit. No more forgetting that delete statement.

2) Access to the .NET libraries - Microsoft has provided a huge set of pre-built classes to make your life easier. Hashtables, lists, etc. And if you have to write your own class, you can use some of the built in interfaces (IList, ICollection, etc.) to easily integrate your class with the rest of .NET.

3) Language independence - There are .NET versions of many popular languages out there. You won't have to worry anymore if something is written in C#, VB.NET, Managed C++, or any of the other .NET languages (last count I heard was 27).

4) Code access security - calls to things like file system methods are checked for the proper access. A user can restrict a program or a class of programs with specific permission sets. This is important for game developers wanting to use .NET for scripting.

5) Easy scripting - you have access to the C# and VB.NET compilers from inside .NET for easy on-the-fly code compliation and execution. Plus, you can control the security permissions that the code will execute under.

6) Easy Windows programming - Tired of Win32 or the nuances of MFC? Windows Forms is the easiest GUI programming I've ever done, especially when using VS.NET 2003/2005.

I hope you'll give VS.NET 2003/2005 a chance and try out C# or VB.NET as well!

Share this post


Link to post
Share on other sites

This topic is 4762 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this