The .NET Framework

.NET Microsoft का 2-part platform है: CLR engine जो आपका code run करता है और class library जो parts ship करती है, कई languages को एक application बनाने देती है।

9 min read · 9 cards · 2 checks

Read in: English · हिन्दी · ગુજરાતી


Theory

Mehta Stores के लिए एक Billing App

एक small Surat storekeeper वह चाहता है जो हर shop चाहती है: item click कीजिए, quantity type कीजिए, bill print कीजिए, save कीजिए। एक Windows desktop app।

इस semester आप exactly यही build करते हैं: ShopKeeper, real buttons, grids और एक database वाला एक billing application।

आप इसे Visual Basic .NET में लिखेंगे। पर पहली line से पहले, नीचे की machine पर एक lesson: exactly यह ".NET Framework" क्या है जिसके अंदर आपका code रहेगा?

Theory

एक Engine और एक Parts Shop

.NET को एक car factory सोचिए जो आपको 2 चीज़ें देती है।

एक engine: CLR (Common Language Runtime), जो असल में जो कुछ भी आप बनाते हैं उसे run करता है, इसके memory और safety को manage करते हुए जब यह run होता है।

और एक parts shop: class library (FCL), हज़ारों pre-built components (buttons, file readers, database connectors) तो आप हर screw forge करने के बजाय assemble करते हैं।

हर .NET program shop के parts हैं, engine पर running।

Theory

.NET Framework, Formally

.NET Framework Windows पर applications build और run करने का Microsoft का platform है। इसके 2 pillars:

  • CLR (Common Language Runtime): execution engine। आपका compiled code इसकी supervision के तहत run होता है: memory, security, exceptions।
  • .NET Framework Class Library (FCL): UI, files, network, data के लिए ready-made classes का एक huge, organised collection।

Exam के लिए एक sentence: .NET = CLR + class library, एक managed environment जहाँ कई languages में लिखे programs shared components पर build होते हैं और एक runtime के तहत run होते हैं।

Theory

कई Languages, एक Runtime

यहाँ .NET की famous trick है: VB.NET, C#, F# और और सब same intermediate language में compile होते हैं और same CLR पर run होते हैं।

दो agreements इसे possible बनाते हैं:

  • CTS (Common Type System): सारी languages एक types के set share करती हैं; एक VB.NET Integer और एक C# int SAME underlying type है
  • CLS (Common Language Specification): वे rules जो एक language follow करती है ताकि इसका code किसी भी दूसरी .NET language से इस्तेमाल हो सके

तो एक C# team आपके VB.NET ShopKeeper द्वारा defined classes unchanged इस्तेमाल कर सकती है।

Quiz

.NET Framework के 2 main components क्या हैं?

  1. CLR और .NET Framework Class Library
  2. Visual Studio और Visual Basic
  3. MSIL और metadata
  4. Windows Forms और ADO.NET
Show the answer

CLR और .NET Framework Class Library

Engine plus parts shop: CLR managed code execute करता है, class library building blocks supply करती है; वह pair ही framework है। Visual Studio (option B) वह IDE है जिसमें आप काम करते हैं, एक tool, framework का हिस्सा नहीं। MSIL और metadata (option C) वह है जिसमें आपका code compile होता है, अगले lesson का subject। Windows Forms और ADO.NET (option D) class library के अंदर 2 sections हैं, parts, pillars नहीं।

Think first

आपने यह Movie पहले देखी है

पिछले semester का subject weeks पहले खत्म हुआ, पर सोचिए: आप पहले कहाँ pattern से मिले हैं "एक intermediate form में compile कीजिए, एक managing engine पर run कीजिए"? और वहाँ इसके names क्या थे?

Show the answer

BCA403 का Java: javac से bytecode में compiled source, JVM से executed। .NET Microsoft से same architecture है: MSIL में compiled source, CLR से executed। याद रखने के लिए एक honest difference: Java का promise एक language कई operating systems पर था; classic .NET का promise कई languages एक OS (Windows) पर था। इस पूरी unit में javac से vbc, bytecode से MSIL, JVM से CLR की mapping carry कीजिए और यह revision जैसा feel होगा।

Watch out

चीज़ों को Precisely Name कीजिए

इस unit में तीन mix-ups marks खोते हैं:

.NET एक language नहीं है: यह platform है; VB.NET और C# इस पर languages हैं।

Visual Studio .NET नहीं है: यह editor/IDE है; programs .NET पर उन machines पर भी run होते हैं जिन पर कोई Visual Studio installed नहीं है।

VB.NET old VB नहीं है: यह एक fully object-oriented .NET language है; VB6 style में लिखे answers (कोई classes नहीं, कोई CLR नहीं) आपके paper को badly date करते हैं।

Theory

ShopKeeper कहाँ Fit होता है

Semester को अब 2 pillars पर map कीजिए: Units 1 और 2 engine और इसके run करने वाली language के बारे में हैं; Unit 3 parts shop के UI shelf (Windows Forms controls) को raid करके ShopKeeper की actual billing screen बनाती है; Unit 4 आपके अपने parts बनाती है (Item और Bill classes); Unit 5 bills save करने के लिए data shelf (ADO.NET) इस्तेमाल करती है। हर unit या तो engine है या parts shop; बाकी कुछ exist नहीं करता।

Summary

Key takeaways

  • .NET Framework = CLR (execution engine) + .NET Framework Class Library (ready-made parts)।
  • कई languages (VB.NET, C#, F#) एक intermediate language में compile होती हैं और एक runtime share करती हैं।
  • CTS सारी .NET languages को एक common type system देता है; CLS interoperability rules देता है।
  • .NET एक platform है, language नहीं; Visual Studio IDE है, framework नहीं।
  • इस subject की language Visual Basic .NET है; semester project ShopKeeper billing app है।
  • Architecture Java को mirror करता है: source से intermediate code से managing runtime।
  • Memory hook: एक engine, एक parts shop, कई languages।

Study this properly

This page is the lesson to read. In Gri-Learn the same topic is a graded deck: the self-checks are scored and your weak topics are tracked. Free to start.

Start this topic

Already have an account? Sign in

More from Overview of Microsoft .NET Framework

Gri-Learn · syllabus-mapped B.C.A. lessons in English, Hindi and Gujarati

The .NET Framework · .NET Programming · Gri-Learn