Archived

This topic is now archived and is closed to further replies.

uray

what is .NET

Recommended Posts

It's a whole bucketload of completely different stuff that they felt the need to put ".NET" after since they're numbnuts.

It's sorta like the "[productname] XP" bandwagon.

Basically, there's the .NET Framework (which is a bunch of stuff that can be used like the Win32 API), there's ASP.NET (web server stuff like ASP/PHP except geared to use .NET Framework stuff)

Then there's Visual Studio.NET which lets you write programs that use the .NET Framework (C# and VB.NET require the .NET Framework)

The .NET Framework also includes compilers for .NET -> Native Just-In-Time (JIT) compilation.

.NET assemblies are also COM compatible...

[edited by - Nypyren on July 25, 2003 2:42:22 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The .Net platforum is basically Microsoft answer to Java and J2EE.

On the simplest level, .Net has virtual machine call the common language runtime (CLR) that needs to be installed on the target machine. It works like the Java virutal machine (BTW, if you have WINXP chances are you have the CLR already).

As far as development, the .Net framework allows for programs to be developed on a variety of languages and run on any machine running the CLR. Just like java.

The prefered programming language that the Devil''s company would like you to use is C#. Suprisingly, the Devil made C# and ISO standard. As such there many other vendors that sell C# environmnets. There even a couple of open source projects.

This is an oversimpfied explanation, visit the devil''s web site for more information.

Share this post


Link to post
Share on other sites
I think its important to make the point that .NET programs do not run ontop of a virtual machine like java (usually) does. They are Just-In-Time compiled. Otherwise, the above desriptions are a good overview.

Share this post


Link to post
Share on other sites
quote:
Original post by uray
then what is different between C# and C/C++...
the different is just the devils company make some sensation?



C# is a new langauge. It has syntax similiar to java and was built with the .NET platform in mind (thats what MS says). I''ve been using it for about 6 months now and really like it. Give it a try if you got Visual Studio.

Share this post


Link to post
Share on other sites
so if it similiar to Java then it likely similiar to C++ right...?,then the different is?
what make C# different from Java?
and what make C# different from C/C++?

Share this post


Link to post
Share on other sites
Let''s answer the question and keep personal opinions about the maker of .NET out of it, eh?

.NET is Microsoft''s 4th-generation development platform. (DOS was 1st, Win16 2nd, Win32 3rd.)

.NET was designed to abstract away a lot of the complexity that had built up in Windows over the years and to get rid of lots of the security problems that have plagued not only Windows but Windows applications. Once the 64-bit version of .NET is released, it will also help mask the differences between 32- and 64-bit architectures. Finally, it also helps get rid of DLL Hell. Multiple versions of the .NET Framework can be installed side-by-side, and so can multiple versions of the same DLL.

.NET accomplishes this through a Just-In-Time compiler. The first time each method or function is called in your program, it is compiled into native code (x86, Intel IA-64, AMD x86-64) that is optimized to your processor (MMX, SSE, SSE2, 3D Now!, etc.) When you compile a .NET application, it is compiled into MSIL, an intermediate byte-code that is type-aware.

Type safety (making sure that the correct types are passed to functions and returned by functions) is enforced by the .NET Framework. Security is also handled by the .NET Framework. If your application does not have permission to write to the hard disk, trying to do so will throw an exception.

Unlike Java, .NET was designed so that multiple programming languages could target the Framework. Right now, Microsoft has VB.NET, C#, J# and Managed C++ that can target it. Borland is working on a version of Delphi for it. To date, there are over 30 languages which can target the Framework.

With .NET 1.1 and DirectX 9, .NET is finally becoming a decent gaming platform. While the speed is not quite up to native code yet, it is worth checking out for prototyping at least.

For more information, check out http://www.gotdotnet.com. It is a site run by Microsoft, but it does have a lot of information.

Share this post


Link to post
Share on other sites
".NET" is a marketing invention. From a technical point of view, it represents a number of technologies:


1. The .NET Framework.

This is primarily a replacement for Microsoft Foundation Classes ('MFC'), an early attempt at creating OOP wrapper classes for the Win32 API. MFC suffered from attempting too much too soon: C++ compilers at the time (late '80s) were still works-in-progress and this meant MFC ended up a horrific, nightmarish mess.

The .NET Framework is a complete replacement and a new way to build Windows apps. However, MS have taken the opportunity to do it properly by re-thinking the way apps are written for their platforms. (Note the plural: this isn't a typo.)


2. MSIL.

People have mentioned the bytecode system used by .NET compilers elsewhere, but unlike Java, .NET bytecode (called "Microsoft Intermediate Language", or MSIL) is NEVER executed directly. Instead, the bytecode is compiled into native code either during installation on the client machine, or when the executable is run. The advantage of this, particularly now that x86 CPU development has effectively been 'forked' by AMD and Intel, means that the final code can be optimised for the specific hardware it's running on.

This is a big change for MS. It signals a major change of direction for Windows, since the .NET Framework is fundamentally platform-neutral at its core. There are already ports being built for Linux, and .NET is also supported in the latest Windows for Pocket PC and Windows for Smartphones OSes. These versions of Windows run on different CPUs, such as Intel's XScale series and Texas Instruments' OMAP series.

By decoupling the final binary compilation and moving it to the installation / runtime point, the need to build multiple binaries is removed. In effect, .NET applications are always distributed as source code, although that source code looks more like a souped-up assembly language than C++.


3. Visual Studio .NET.

This is the first version of Visual Studio to include support for the .NET Framework. (It still supports normal compilers and you can build normal C++ apps if you want.)

In addition to the .NET Framework support, MS took the opportunity to redesign Visual Basic completely; it's very different to the old VB6.

And then there's C#...


4. C#.

This is a C-like language from the same guy who designed Delphi for Borland. It won't run your old C or C++ code. It looks like C++ for the most part, but then, so does Java. It is purely a .NET programming language and it is designed from the ground up to support things like events, properties and such like directly in the language. It's aimed at those who don't like Visual Basic, but do like C and C++ and who want to build .NET apps quickly. It's probably going to be MS' flagship programming language for the next few years.


5. Games & .NET.

Obviously, software targetting the .NET Framework will require a platform that has .NET Framework available for it. Currently, this means Windows NT/2K/XP platforms, Windows embedded platforms (PDAs and mobile phones), and even Linux to an extent. (www.mono.org). So you could write low-tech games that can run on all these platforms in theory, which could be a plus if you want to break into the mobile games market.

Consoles are unlikely to support .NET. (Well, XBox 2 might, but I doubt PS3 will.) For these platforms, use C or C++.


6. .NET vs. Java.

The two are not really in competition with each other. Java has already found a niche for itself, but it isn't the same niche MS are aiming at. As RomSteady points out, it's really aimed at the Windows developer crowd who want to develop Windows apps. The theoretical platform-neutrality is merely icing on the cake, but it's not the main selling point.


--
Sean Timarco Baggaley






[edited by - stimarco on July 25, 2003 3:56:44 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by stimarco

People have mentioned the bytecode system used by .NET compilers elsewhere, but unlike Java, .NET bytecode (called "Microsoft Intermediate Language", or MSIL) is NEVER executed directly. Instead, the bytecode is compiled into native code either during installation on the client machine, or when the executable is run. The advantage of this, particularly now that x86 CPU development has effectively been ''forked'' by AMD and Intel, means that the final code can be optimised for the specific hardware it''s running on.

This is a big change for MS. It signals a major change of direction for Windows, since the .NET Framework is fundamentally platform-neutral at its core. There are already ports being built for Linux, and .NET is also supported in the latest Windows for Pocket PC and Windows for Smartphones OSes. These versions of Windows run on different CPUs, such as Intel''s XScale series and Texas Instruments'' OMAP series.

[edited by - stimarco on July 25, 2003 3:56:44 PM]


is there any information that .Net support for Symbian 0/S on SmartPhone?

Share this post


Link to post
Share on other sites
Am from the JAVA band wagon

JAVA has just in time compilation... And there where also projects to have multiple languages running on the JAVA VM the idea just never flew...

Share this post


Link to post
Share on other sites
It''s funny how many people call .NET similar to Java. To me .NET is everything Java ever wanted to be but failed, plus much much more. Just is just my opinion though, don''t mean to impose it on anyone, work with both environments for some time and make your own decisions. I also think it''s necessary to point out that Java (J#, to be precise) is a subset of .NET.

Share this post


Link to post
Share on other sites
from RomSteady ".NET is Microsoft''s 4th-generation development platform. (DOS was 1st, Win16 2nd, Win32 3rd.)"

this is just silly ... there we''re DOSes, and then Windows (16 bit) ... but Win32 wasn''t a new platform, just an extension ... same concepts and paradigm (handles, windows, resources, etc), but your missing all the critical APIs added piece by piece, ie DirectX, IE, Telephony SDK, Speech SDK, etc ... they created OLE, and then COM/ActiveX/DCOM, and now .Net

.NET is microsoft''s replacement for COM ... it is a new system of packaging programs and program components (DLLs) in self-describing "assemblies" that can be used from any programming langauges. COM was also like this, but .Net is a different direction for doing the same stuff COM did ... instead of creating a system based on GUIDs and central registries, .NET is a system based on search paths and a central cache ... there is not a lot of difference here, but just enough to make it easier for developers to eliminate common mistakes in the registration and cleanup process ... and - since .NET uses a just-in-time compiler / virtual machine, then the compiler can actually catch run-time programming errors that used to silently blow up compiled programs.

People who think of .NET as a real platform by itself obviously don''t realize that at the moment, .NET cannot even play a sound (without using DirectX or the Win32 API) - but this is a good thing, if they''d just document it better, .NET uses COM/ActiveX components (including DirectX) through a built in interoperability layer - so anything you used to use in VB or VC 6, you can still use.

I really like the .NET library, because it is largely designed by the guy who designed the VCL for borland (the VCL was so much better than MFC it is almost a joke that microsoft won the C++ compiler war).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Some of the comparisons to Java are fair but it''s not even close to correct to say that Java == .NET. If you look at certain subsets of .NET, you might think "this is just like Java". If you look at other subsets, you might think "this is just like Delphi". If you look at other subsets, you might think "this must be a replacement for COM". You''ll find other sources of inspiration in other subsets. .NET borrows from a lot of different places to create a new platform.

Because .NET is inspired by a lot of other things and intended to accomplish a variety of tasks, it''s hard to easily define in a few words or sentences. It takes a lot of existing technologies (Java, Delphi, VB, ASP, COM, etc.) and tries to combine their best features into a new, consistently designed system. It''s a managed runtime system that allows for things like code security that aren''t possible with today''s common machine code (such as denying a .NET component running in a web page permission to write to a hard drive). It''s an enormous class library that provides developers with a unified, rich set of functionality -- collections, regular expressions, networking (from low level sockets to HTTP, SMTP, etc.), XML, database access, GUI, graphics, and so forth.

A big advantage of .NET is the interoperability between languages and traditionally separate systems that it provides. For example, you can create a class in C#, derive a new class from it in C++, and use that class in VB code in a Win32 GUI app or in an ASP.NET web page. Also, Microsoft put a good deal of work into interoperability between .NET and external (probably legacy) systems such as COM or straight Win32 DLLs.

By the way, Microsoft has been doing the byte code/VM thing for years. From a Microsoft article dated 1992 -- "P-code works by compiling an application into an intermediate code format that is much more compact than 80x86 machine code. At link time, a small engine is built into your application that processes the p-code into native machine code during run time." Gee, intermediate code that gets processed into machine code at run time, sounds familiar! Microsoft certainly didn''t invent this concept but they were using it in production code and made it available to developers long before Java (which was announced in 1995). Microsoft (and others) would be using this sort of technology today even if Java never existed.

Share this post


Link to post
Share on other sites
Just to clear up some things, my last post rambled ...

- .NET actually no longer used by MS to mean EVERYTHING ... it really is only used to mean 2 things now. 1) The .NET platform, including the intermediate language, the common language runtime, the common langauge specification, and the .NET framework. 2) Microsoft''s vision and technology for running and supporting application servers (as in, over a network remotely), to microsoft, the features for running an application inside of IIS and other server software is also part of .NET, even though some piece only loosely relate to the actual common runtime.

- C# is a great C like language, for .NET ... because just like Java, they designed a language around there virtual machine, so there is little that doesn''t make sense about it (well, only from the point of view that the .NET platform decisions make sense, there are a few weird issues). C# can, and due to MS''s desire, might actually become the second most important programming langauge in the world (second only to C++), non-hardware related, non real-time, non performance critical, non-system, and non-tiny embedded applications, it is really well suited (notice all those things it can''t due though ... which is why things like Java/C#/VB can just never be the only language to use ... whereas C and C++ can do anything there is to due, because they are modeled after the actual machine capabilities, not a fake "virtual" machine.

- no general purpose, procedural, object-oriented language, besides C++ supports template/generic programming (yet) ... so for now, there is no language but C++ (and strange niche academic langauges) which are suitable to all tasks.

- COM was a wonderfull, amazing idea, and when used only in part (the interface/component/factory model) then even on non-MS platforms, real design perfection can be achieved. .NET still includes most, but not all of the great things about COM ... especially since you can still use COM components from day one. .NET assemblies are much better than COM DLLs, because they add a USEFULL formal layer that must be supported, and removed the registry situation. COM however still has it''s place, and I hope people realize that .NET assemblies don''t address all of the issues (we still need the COM idea of interface support for example - for feature discovery).

- .NET uses namespace from the beginning, for EVERYTHING ... a real godsend for developers ... if only more C++ programmers would have really understood and used namespace correctly, our life as developer''s would be so much better.

- C++ is still my absolute favorite language of all time, primarily due to lack of false abstractions ... it supports exactly what makes sense to express nearly any design you want, and YOU choose what shape it takes ... plus I love templates. I have found that after 2 months, it is still quicker for me to implement a C++ solution and rewrite it in C#, than to work in C# directly.

- Java has a current advantage in the embedded space, because .NET defines the .NET compact framework for PocketPCs, but those are only POWERFULL PDAs and tablets, Java has more levels to it''s embedded model that scales nicely down to PDAs with 16MB or RAM, and even further down to tiny display mobile phones. Java is the ONLY way to go for writing phone apps, and tiny PDA apps ... .NET (even with the Compact Framework) is only suited to machines that are actually more powerfull than the Pentium 100 that I used to run Windows 95 on (the only real things that compact framework gives you that you need in embedded, is a good library for alternate, small, display form factors).

- The Borland VCL had multilangauge support (C++ and Delphi at least), and crossplatform support (Windows, and Linux via Kylix), and was a wonderfully designed and executed component library, but without the backing to become number one, it looks like it''s going to eventually go the way of the dodo. Which sucks, because Kylix was finally making cross-platform apps less painfull.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Xai
COM however still has it''s place, and I hope people realize that .NET assemblies don''t address all of the issues (we still need the COM idea of interface support for example - for feature discovery).
I agree with pretty much everything else you say but I''m curious what you mean by this. In .NET, you can dynamically load an assembly, create an instance of a type contained in it and then use the various type conversion operators to test it for implemented interfaces. What does COM get you that this doesn''t?

Share this post


Link to post
Share on other sites
It''s OT, but just to clear up two (common?) misconceptions

quote:
Ratman
I think its important to make the point that .NET programs do not run ontop of a virtual machine like java (usually) does. They are Just-In-Time compiled. Otherwise, the above desriptions are a good overview.


Java, Smalltalk, and many other languages in the past have been JIT compiled. It''s nothing new (just like Java didn''t invent the VM, even if though it seems they tried to make people think that)

quote:
Xai
no general purpose, procedural, object-oriented language, besides C++ supports template/generic programming (yet) ... so for now, there is no language but C++ (and strange niche academic langauges) which are suitable to all tasks.



Templates aren''t required for generic programming. Dynamic dispatch is required for generic programming. Objective-C (a different approach to C with classes) and Smalltalk are both procedural, OO languages that support generic programming without any extra syntax (i.e. no templates). I''m not sure what you classify as "strange niche academic languages", but Apple and Fortune 500''s are a pretty big niche to fill.

Share this post


Link to post
Share on other sites
Agreeing 100% with Way Walker about generic programming... C++ is far far far from the only language to support it, and it does so in a very hackish way.

Simply because C++ is such a widely used behemoth of a language doesn''t mean that everything else is a "niche academic language." Way Walker listed Objective-C and Smalltalk, and I''ll add Lisp to that list. Lisp is a general purpose language that supports far great generic programming and object oriented features than C++. And while you may classify it as functional instead of procedural, it''s really both (as are most languages described as functional).

Share this post


Link to post
Share on other sites
Way Walker, you are right ... at least mostly ... the problem is, I don''t know Objective-C, and therefore do not know it''s generic programming system ... I appologize for my ignorance ... but I do consider Objective-C a real world langauge ...

now smalltalk

A) I know and love ...
B) forgot about when writing my post
C) supports dynamic programming very well, but actual codified generics only partially (at least with the techniques I know) ... of course .. just like OO, generic programming means more than one thing ... and I''m biased to the aspects and ideals I personally use.
D) is really a niche langauge these days ... just try to find a good smalltalk comiler ... park places PC version are gone ... what''s left are really expensive special versions, squeak, and gnu smalltalk ... and the number of people who use smalltalk for their day-to-day programming, non-acedemically, is quite small.

to the other guy

I don''t know lisp very well, I used it for a semester in college, etc .. but I said PROCEDURAL, OBJECT-ORIENTED, GENERAL PURPOSE programming language ... because the average C, VB, C++, Pascal, Java, Delphi, C#, ASM, PERL, Python, Ruby, Batch file, Shell Script, etc programmers - which account for probably 98% of all programmers ... know only that one way of thinking ... and languages like ml, lisp, prolog, etc. can not be considered in that category of language paradigms ... (they are valid paradigms ... but too different to be comfortable to the old guard of today)

Share this post


Link to post
Share on other sites
as for my statement about COM ... and .NET

i want to clarify 2 things ... 1 - I am not a .NET expert yet, and so ignorance may be the cause of my incorrect understanding ... 2 - the part of COM that I was saying is not SPECIFIED / CODIFIED in .NET is the basic ideals .. the fundamental COM ideal of specifying things via unique identifiers, publishing things in a centrally accesable registry, and querying an object for specific interface support ... those are ALL codable and doable in .NET projects .. and even old school strait C projects for that matter ... but as ideals glorified in COM, they should not be forgotten when the time comes that such pieces are usefull ... I know all of .NET uses interfaces, and versioned components ... but most .NET stuff I''ve seen has kinda lost sight of the discovery of features aspect, and the benifits of the .NET assembly vs. COM registry entries ... is only an actual benifit in certain situations ... in others ... a central data / component / config repository would still prove to be the ideal solution ...

so .NET is not missing support for anything ... but it''s main tenets that branch away from COMs philosophy (mostly as improvements), may sometimes need be abandoned for the old ways ...

Share this post


Link to post
Share on other sites