Jump to content

What exactly is .NET?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1
mbridges

mbridges

    Learning Programmer

  • Members
  • PipPipPip
  • 33 posts
I know that basically what C, C#, and C++ run on kind of, but what exactly is it in layman's terms. Thanks!

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
Here is a direct quote from Microsoft's front page for the .Net framework:
Microsoft .NET Framework
--------------------------------------------------------------------------------------
The .NET Framework allows you to:

  • Apply common skills across a variety of devices, application types, and programming tasks
  • Integrate with other tools and technologies to build the right solution with less work
  • Build compelling applications faster


The .NET Framework is:

  • Common Language Runtime – provides an abstraction layer over the operating system
  • Base Class Libraries – pre-built code for common low-level programming tasks
  • Development frameworks and technologies – reusable, customizable solutions for larger programming tasks
-----------------------------------------------------------------------------------------------

Of course you need to decide upon what features of it you wish to implement, remember, the framework will be a dependency in your application.

#3
Davide

Davide

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 506 posts
.NET is a framework. Framework means that there are a lot of stuff already made for you, and all you have to do is use them. For example, the Windows Form is already made as a class in the .NET framework, you just create a class based on it.
public class Form1 : Form //Form is System.Windows.Form from the .NET framework
Without the framework, you would have to write 50 lines of code to show an empty window. Normally, to display an interface (form & stuff) you have to make calls to the Windows API:
#include <windows.h>
const char g_szClassName[] = "myWindowClass";
// Step 4: the Window Procedure
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    switch(msg)
    {
        case WM_CLOSE:
            DestroyWindow(hwnd);
        break;
        case WM_DESTROY:
            PostQuitMessage(0);
        break;
        default:
            return DefWindowProc(hwnd, msg, wParam, lParam);
    }
    return 0;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow)
{
    WNDCLASSEX wc;
    HWND hwnd;
    MSG Msg;
    //Step 1: Registering the Window Class
    wc.cbSize        = sizeof(WNDCLASSEX);
file:///C|/dona/forgers-win32-tutorial/tutorial/simple_window.html (1 of 8) [7/8/2003 4:34:44 PM]Tutorial: A Simple Window
    wc.style         = 0;
    wc.lpfnWndProc   = WndProc;
    wc.cbClsExtra    = 0;
    wc.cbWndExtra    = 0;
    wc.hInstance     = hInstance;
    wc.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
    wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
    wc.lpszMenuName  = NULL;
    wc.lpszClassName = g_szClassName;
    wc.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);
    if(!RegisterClassEx(&wc))
    {
        MessageBox(NULL, "Window Registration Failed!", "Error!",
            MB_ICONEXCLAMATION | MB_OK);
        return 0;
    }
    // Step 2: Creating the Window
    hwnd = CreateWindowEx(
        WS_EX_CLIENTEDGE,
        g_szClassName,
        "The title of my window",
        WS_OVERLAPPEDWINDOW,
        CW_USEDEFAULT, CW_USEDEFAULT, 240, 120,
        NULL, NULL, hInstance, NULL);
    if(hwnd == NULL)
    {
        MessageBox(NULL, "Window Creation Failed!", "Error!",
            MB_ICONEXCLAMATION | MB_OK);
        return 0;
    }
    ShowWindow(hwnd, nCmdShow);
    UpdateWindow(hwnd);
    // Step 3: The Message Loop
    while(GetMessage(&Msg, NULL, 0, 0) > 0)
    {
        TranslateMessage(&Msg);
        DispatchMessage(&Msg);
    }
      return Msg.wParam;
}
That was C++ wihout .NET. In .NET would would just have to create a new class based on Windows Forms and you have your interface.
If you have questions, feel free to ask.
Are you a newbie programmer trying to learn C#? Check out my small tutorial: Visual C# Programming Basics

#4
mbridges

mbridges

    Learning Programmer

  • Members
  • PipPipPip
  • 33 posts
Thanks! Very helpful!

#5
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
in layman terms, they are bunch of Friends of Yours who will do anything you ask them to do ,if it is within their bounds.They might speak different languages,Different modes of communication but they all belong to category called Friends!!:)

#6
ksrao

ksrao

    Newbie

  • Members
  • Pip
  • 1 posts
Hi,
.NET frame work launched by by microsoft provides a runtime and integration environment for different languages like c#,Jscript,C and C++ along with web servises plat form.
It has four components
1. .NET frame work and Visual Studio net
2. Server Infrastructure
3. Smart devices
4. .Net experiences

For further .NET and C# Tests

#7
While(!EOF)

While(!EOF)

    Newbie

  • Members
  • PipPip
  • 21 posts
one word - Microsoft. .Net is a subset. C/C++ is not a microsoft technology. However C# is and it uses the .NET framework:)

#8
Chris Weimer

Chris Weimer

    Learning Programmer

  • Members
  • PipPipPip
  • 37 posts

Davide said:

Without the framework, you would have to write 50 lines of code to show an empty window. Normally, to display an interface (form & stuff) you have to make calls to the Windows API:
I can recognize WinProg anywhere. That was my first Win32 API tutorial. I am not sad I learned it before moving into easier ways around it. I still think it's necessary for everyone to at least know what the API is first before moving on to MFC and .NET.

#9
James.H

James.H

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 866 posts
I like all the definitions here, helpful for a noob .net developer like me lol

#10
Davide

Davide

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 506 posts

James.H said:

I like all the definitions here, helpful for a noob .net developer like me lol
Good to see you again James.
Are you a newbie programmer trying to learn C#? Check out my small tutorial: Visual C# Programming Basics

#11
tossy

tossy

    Programmer

  • Members
  • PipPipPipPipPip
  • 202 posts
Here is a great web site for .net and any other computer language you would like to learn
http://www.w3schools...ws_intro&#8230;
Microsoft: "You've got questions. We've got dancing paperclips