Click to See Complete Forum and Search --> : Why .NET??


MrBeans
October 1st, 2005, 07:15 AM
Hi,
I see that everywhere in the software industry .NET is coming up fast :sick:
I find .NET to be totally vague when compared to the charming ;) MFC and similar to the powerless VB :D which always has to one way or the other come to VC++ or Windows API to get many of its work done.

People today compare VC.NET, C# with JAVA :eek:. I know being a VC++ programmer I may have to one fine day work on VC.NET. But if someone could explain me the benefits of .NET over MFC I would be happy :).

As of I know one advantage like VB is fast application development but if one knows good MFC say like me ;) why should I use .NET or be forced to use .NET.

cilu
October 1st, 2005, 08:17 AM
But if someone could explain me the benefits of .NET over MFC I would be happy
You're making a confusion here. MFC is a library written in C++ to wrapp the WinAPI (and I'm sure you know that pretty well ;) ). .NET is a technology. So I can't tell you what are the advantages of .NET over MFC. Is bigget that just that.

.NET offers a runtime enviroment (which includes a garbage collector). .NET platform enables cross-language development. You can write a class in VB.NET, specialize it in C# and use it in MC++. The only thing is that it must be CLS compliant (it must follow a set of rules and restrictions; for example in VB.NET there aren't any unsigned types - except for byte - so you can't use unsigned types in your public interface of that class). Programs written in .NET languages are not compiled into native code, but an intermediate code, called MSIL. This is interpreted at run time (is converted in native code by the JIT compiler). The nice thing is that similar code in different programming languages for CLR should/does produce identical MSIL code (Microsoft produced some C# / VB.NET examples that generate the same code, but I'm not sure to what extent this is true).

In .NET the basic unit of deployment and versioning are the assemblies (which contains metadata, the MSIL code and resources). Because they are self-describing deploying a manifest (EXE or DLL) is a very simple task, usually you only have to copy it to the target directory. This is a big step over COMs (think at the nightmare of Registry keys needed for them). There is no sush thing with assemblies. For shared assemblies (assemblies shared by two or more applications, which reside in a special folder called Global Assembly Cache) the versioning methoddology avoids all the problems that Win32 DLLs have (you know, overriding a DLL can cause an application to stop working, etc.).

Then comes security permissions, possibility of discovering information of types at runtime and manipulate them via metadata (reflection) or even creating new types or entirely new assemblies during run-time (which is called emitting). With C#, VB.NET and now with C++/CLI you can create verifyable code (which can be hosted as a SQL stored procedure). Moreover, .NET offers support for interoperability with native DLLs and COM.

And others I miss right now.

cilu
October 1st, 2005, 08:18 AM
[ moved thread ]

Siddhartha
October 1st, 2005, 08:41 AM
I see that everywhere in the software industry .NET is coming up fast :sick:I find .NET to be totally vague when compared to the charming ;) MFC and similar to the powerless VB :D ... .NET is a Framework, and not a programming language.

VB.NET, VC++.NET, C#, etc are Programming Languages that use this Framework, and the utilities that come with it. Being a common framework that serves the .NET languages, it presents a certain level of consistency to application developers across languages.
People today compare VC.NET, C# with JAVA :eek:. One cannot compare VC++.NET to Java. Its a bit crazy to do that.
But if someone could explain me the benefits of .NET over MFC I would be happy :).

As of I know one advantage like VB is fast application development but if one knows good MFC say like me ;) why should I use .NET or be forced to use .NET. For C++ developers .NET supplies features like Garbage Collection for instance. One doesn't have to worry too much about memory management, object deletion, etc. This is called Managed C++.

MFC is a framework for VC++ Based Application development - one that provides a set of utility classes most of which are UI centeric. It really can't be compared to .NET that is a Framework across languages and is a Framework that supports or intends supporting every aspect of Windows Programming - including UI.

MrBeans
October 1st, 2005, 08:51 AM
Firstly I would request all the Mods to kindly the OP know where the thread is bieng moved. :D

Secondly I believe answering in an Moved thread should not be possible but still I am able to reply. How is that? :p

and Finally I thought any thing in Chit-Chat was allowed, I wonder how come my thread was moved even from Chit-Chat :confused:.

Any way coming back to my topic I thought any thing is possible with MFC and VC++ (core that is) and all the advantages mentioned above according to me may be dwarfed by the above said fact.

In fact the above trend of high level abstraction seperates the programmer from the OS (hardware) to such an extent the one fine day people may not aware about an simple windows API as with the good old assembly language today which according to me all programmers must know but do not know.

Please note I just want to have a fair discussion and am not biased towads MFC or .NET ;).

Siddhartha
October 1st, 2005, 09:05 AM
Firstly I would request all the Mods to kindly the OP know where the thread is bieng moved. The thread was redirected. So, there is a link left in the original forum (in this case Chit-Chat), and is still visible under your "Subscribed Threads".
Secondly I believe answering in an Moved thread should not be possible but still I am able to reply. How is that? Are you not happy that your reply was not lost? ;)

It worked because you replied to a thread, and not to the Forum (fortunately, thats how the Design seems to be).
Hence, the thread being moved did not affect your reply.
Finally I thought any thing in Chit-Chat was allowed, I wonder how come my thread was moved even from Chit-Chat :confused:.'Coz it seems that you intend having a genuine serious discussion.

BTW, FYI - in case you did not know, there is also a .NET Frameworks Forum (http://www.codeguru.com/forum/forumdisplay.php?f=46) in CG where .NET related questions can be asked or answered.
Any way coming back to my topic I thought any thing is possible with MFC and VC++ (core that is) and all the advantages mentioned above according to me may be dwarfed by the above said fact.

In fact the above trend of high level abstraction seperates the programmer from the OS (hardware) to such an extent the one fine day people may not aware about an simple windows API as with the good old assembly language today which according to me all programmers must know but do not know.Actually, Win APIs can be invoked via VC++ (and perhaps other as well) .NET applications.

As far as assembly goes, neither MFC, nor VC++ need a programmer to know the same, and there are plenty who don't. For those who are interested in it, the VS.NET Debugger just like VC++ 6.0 gives the option to view Dissassembly.
Please note I just want to have a fair discussion and am not biased towads MFC or .NET ;).Of course, and this discussion is a good one - hence, for sake of quality you might not want to have it in Chit-Chat where few discussions have managed to stick to the topic!

MrBeans
October 1st, 2005, 09:21 AM
Thanks a lot dear Sid. I have rated you fortunately I can rate you here :D thanks to Cilu, also thanks to Cilu for moving my thread because of its importance :blush:.

BTW Cilu you seem to be the only member who seems to have lost more and what you got (yes I mean the reputation), too bad can't you do anything about like say bribe Brad Jones :D now that you are even a Mod.

Actually, Win APIs can be invoked via VC++ (and perhaps other as well) .NET applications.

This is exactly the reason why I hate .NET :sick:. There seems to be many things going on under the hood which a programmer doesn't even know. Don’t you think Microsoft should have given a option at least in VC.NET to view how the .NET classes interact to make the programming experience more complete.

Siddhartha
October 1st, 2005, 09:46 AM
Thanks a lot dear Sid. I have rated you fortunately I can rate you here :D thanks to Cilu, also thanks to Cilu for moving my thread because of its importanceYou are welcome, MrBeans, and thank you for the Rating... :)

Yes, that was made possible due to this thread being moved out of Chit-Chat!This is exactly the reason why I hate .NET :sick:. There seems to be many things going on under the hood which a programmer doesn't even know. Don’t you think Microsoft should have given a option at least in VC.NET to view how the .NET classes interact to make the programming experience more complete.One of the primary objectives of .NET was to present a consistent programming platform across languages in terms of utilities, etc.

So, should the .NET Framework expose its insides for C++.NET, first and foremost, it would have to expose C++ Classes, and it would hence do this exclusively for C++ -- breaking the consistency that was a requirement. More importantly, it would also enforce the Framework to implement its internals in C++. At this moment, the programmer is abstracted from the implementation of the Framework, and is still able to use the utilities it supplies him with to a level of consistency across platforms.

What do I mean when I say consistency?
I mean that one could use System.String class supplied by the .NET Framework in VC++.NET as one could in VB.NET or in C#. It is the same class supplying the programmer with the same set of utilities (string handling as in this case) across programming platforms.

So, on a greater scale one could develop an entire application suite programmed in many languages depending on the competenties available where knowledge gained on one programming platform say VC++.NET would be applicable on another like VB.NET

Isn't this something fantastic?

The advantage of the framework is also in the area of deployment where one only needs to copy files (no registration required), for the application to work subject to the presence of the re-distributable framework - one that will anyways be shipped with new versions of Windows, and one that can also be shipped with the application itself.

cilu
October 1st, 2005, 10:08 AM
and Finally I thought any thing in Chit-Chat was allowed, I wonder how come my thread was moved even from Chit-Chat
You should see Chit-chat as a cafeteria where you talk about various non-technical things. Technical question, nevertheless, should go to technical forums, and when there isn't a forum suitable for a question, then ask it in the Chit-chat or consider General Developer Topic forum instead.
BTW Cilu you seem to be the only member who seems to have lost more and what you got (yes I mean the reputation), too bad can't you do anything about like say bribe Brad Jones now that you are even a Mod.
Frankly, I have no idea what you mean. :confused: