Intrductin t.net framewrk.net is a general-purpse sftware develpment platfrm, similar t Java. Micrsft intrduced.net with purpse f bridging gap between different applicatins..net framewrk aims at cmbining varius prgramming languages and services..net framewrk is platfrm independent..net supprts nearly 42 languages..net is designed fr cde reuse, Multilanguage develpment, security, deplyment..net runs n Windws Server 2003, Windws XP, Windws 2000, and Windws ME/98. Windws 95 is nt supprted. Sme parts f the.net framewrk d nt wrk n all platfrms - Example, ASP.NET is nly supprted n XP and Windws 2000/2003. Windws 98/ME cannt be used fr develpment f asp.net. - IIS is nt supprted n Windws XP Hme Editin, s cannt be used t hst ASP.NET. Windws Applicatin Cnsle Applicatin Web Applicatin Web Services VB.NET VC++ C# JScript 3 rd Party MSIL JIT CLS CTS Cmmn Language Runtime Assembly Language
Basic cmpnent f.net platfrm CLR(Cmmn Language Runtime) MSIL(MircSft Intermediate Language) JIT cmpiler Framewrk class library CLS (Cmmn language specificatin) CTS (Cmmn type system) Garbage cllectr CLR (Cmmn Language Runtime) CLR is envirnment where all.net prgrams are executed. It prvides services such as cde cmpilatin, memry allcatin, exceptin handling and garbage cllectin. CLR allws executin f cde acrss different platfrms by translating cde int intermediate language. MSIL (MircSft Intermediate Language) MSIL is Micrsft Intermediate Language r Cmmn Intermediate Language. It is a lw level language that CLR understands. MSIL is cnvert cde int machine language during executin by just-in-time cmpiler. JIT (Just-In-Time) Cmpiler JIT cmpiles cde. Cnvert the IL int machine cde It als checks cde fr type safety. Framewrk Class Library Framewrk Class Library wrks with any.net languages, such as VB.NET, C#, VC++ Framewrk Class Library prvides cmmn prgramming tasks, such as string manipulatin, data cllectin, database cnnectivity. We can use same set f classes fr perfrming a specific task in C# as well as in VC++
CTS (Cmmn Type System) It defines hw data types are declared, used and managed in cde at run time. It ensures that data types written in varius languages are able t interact with each ther. Example in VB yu have Integer and in C++ yu have int these data types are nt cmpatible s the interfacing between them is very cmplicated. In rder t able that tw different languages can cmmunicate Micrsft intrduced Cmmn Type System. S Integer data type in VB6 and int data type in C++ will cnvert it t System.int32 which is data type f CTS. CLS (Cmmn Language Specificatin) A set f cmmn rules fllwed by all language f.net framewrk is called CLS. CLS enables an bject r applicatin t interact with the bjects r applicatin f ther languages. Garbage Cllectin When bjects are nt referred r used then Garbage Cllectin autmatically releases r clears thse memries. Garbage Cllectin prviding efficient memry management. Different Types f Applicatin Cnsle Applicatin It is light weight prgrams run inside cmmand prmpt. It is cmmnly used fr test applicatin Windws Applicatin It is frm based standard desktp applicatin. It is cmmnly used fr day t day tasks. Web Applicatin It is a prgram that is used t run inside web server t fulfill user requests ver HTTP. Web Services It is web applicatin that prvides services t ther applicatin ver internet. Mbile Applicatin It is mbile applicatin that prvides services t mbile devices.
Characteristics f POP Large prgram is divided int smaller prgrams knw as functins. Data mve penly arund system frm functin t functin. Tp dwn apprach. In a large prgram it is very difficult t identify what data is used by which functin. It des nt mdel real wrld prblems. Ex: C, COBOL, FORTRAN OOPS Ops is a sftware develpment methdlgy that is based n real wrld system. OOPS cncentrate n data rather than prcedure. Data is hidden and cannt be accessed by external functins. Objects cmmunicate with each ther thrugh functins. New data and functins can be easily added whenever necessary. Bttm up apprach Ex: C++, Small talk, Java, C# C++ is nt pure bject riented language Cncept f Ops Objects Class Data abstractin Encapsulatin Plymrphism and inheritance Objects Object is a real wrld entity. It can be place, persn r activity. It can identify by its unique name. Object is a cmbinatin f message and data. Object can be send and receive message t interact with each ther. Ex: If custmer and accunt are tw bjects in a Prgram, then custmer bject may send a message t accunt bject requesting fr bank balance.
Object has fllwing characteristics It has state It may have behavir It has unique identity Ex: Yu can take car as an bject. It can have state as mving and statinary. It can accelerate, turn right r turn left which is behavir. The car als has an identity, such as a unique registratin number. Class We can say Class as a blue print, prttype r template frm which we can create an bject. It is a user defined data type based n which bjects are created. We can create any number f bjects belnging t ne class with similar prperties and methds. N memry is allcated when class is created. Memry is allcated when bject is created. Characteristics f an bject are represented in a class as Prperties. The actins that can be perfrmed by bjects becme functins f the class and are referred t as Methds. Ex: cnsider we have a Class f Cars under which Santr Xing, Alt and WaganR represents individual Objects. In this cntext each Car Object will have its wn, Mdel, Year f Manufacture, Clr, Tp Speed, Engine Pwer etc., which frm Prperties f the Car class and the assciated actins i.e., bject functins like Start, Mve, and Stp frm the Methds f Car Class. Data abstractin Abstractin invlves extracting nly relevant infrmatin. Abstractin des nt mean that infrmatin is unavailable. Abstractin means that all infrmatin exists but nly relevant infrmatin is prvided. Abstractin increase pwer f prgramming language by creating user defined data type Ex: An autmbile sales persn is aware f all details f car. Sme custmer interested in speed, price r style f car. The sales persn knws all details f car. But he presents nly relevant infrmatin t custmer.
Encapsulatin Wrapping up f data and functin int single unit. It means prcess f enclsing data and functin items within package. It invlves preventing access t nt essential details. It enables yu t package infrmatin t implement desired level f abstractin. Ex: When yu switch n vacuum cleaner yu d nt see cmplex prcess needed t actually cnvert electricity pwer int suctin pwer. Plymrphism It means ability t take mre than ne frm. Plymrphism refers t single functin r multi-functin peratr perfrms in different ways. Reduce cmplexity f functin in a class Plymrphism allws ne interface fr multi functins. Plymrphism has tw types. They are... Static Plymrphism Respnse t a functin is decided at Cmpile time. Functin Overlading Operatr Overlading Dynamic Plymrphism Respnse t a functin is decided at Run time. Abstract classes Virtual functins Ex: Cnsider peratin f additin Ex1: Fr 2 n s the peratin will generate a sum. If perands are strings, then peratin will prduce third string by cncatenatin. Ex2: When yu need a functin that cnvert distance in km t miles, and km can either be an integer r flat. S ne apprach can have tw functins.
Inheritance Creating a new class frm existing class is called as inheritance. When a new class needs same members f existing class then, instead f creating thse members again in new class. We can create new class frm existing class. It reduces cde size in prgram. It makes cde less repetitive. By prviding idea f reusability f cde. Class that is inherited is called as base class r parent class r super class Class that des inheritance is called as derived class r child class r sub class. Types f Inheritance Single inheritance Single base class that is inherited by derived class A SHAPE B SQUARE Multilevel Inheritance Single base class that is inheritated by derived class that derived class act as base class fr anther classes. A Grand Father B Father C Sn
Multiple Inheritance A derived class which has mre than ne base class is called multiple inheritances A B Grand Father Father C Sn Hierarchical inheritance A single base class can be inherited by mre than ne derived class A Students Arts Engg Medical B C D Hybrid inheritance Mech Elect Civil It s a cmbinatin f multiple and multilevel inheritance A Students B C Exam Sprts D Result