8/8/2019 Introduction to Dotnet and c# http://slidepdf.com/reader/full/introduction-to-dotnet-and-c 1/15 http://msdn.microsoft.com/en-us/library/zw4w595w.aspx NET Framework Developer's Guide .NET Framework Conceptual Overview The .NET Framework is an integral Windows component that supports building and running the next generation of applications and XML Web services. The .NET Framework is designed to fulfill the following objectives: y To provide a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely. y To provide a code-execution environment that minimizes software deployment and versioning conflicts. y To provide a code-execution environment that promotes safe execution of code, including code created by an unknown or semi-trusted third party. y To provide a code-execution environment that eliminates the performance problems of scripted or interpreted environments. y To make the developer experience consistent across widely varying types of applications, such as Windows-based applications and Web-based applications. y To build all communication on industry standards to ensure that code based on the .NET Framework can integrate with any other code. The .NET Framework has two main components: the common language runtime and the .NET Framework class library. The common language runtime is the foundation of the .NET Framework. You can think of the runtime as an agent that manages code at execution time, providing core services such as memory management, thread management, and remoting, while also enforcing strict type safety and other forms of code accuracy that promote security and robustness. In fact, the concept of code management is a fundamental principle of the runtime. Code that targets the runtime is known as managed code, while code that does not target the runtime is known as unmanaged code. The class library, the other main component of the .NET Framework, is a comprehensive, object- oriented collection of reusable types that you can use to develop applications ranging from traditional command- line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET, such as Web Forms and XML Web services. The .NET Framework can be hosted by unmanaged components that load the common language runtime into their processes and initiate the execution of managed code, thereby creating a software environment that can exploit both managed and unmanaged features. The .NET Framework not only provides several runtime hosts, but also supports the development of third-party runtime hosts. For example, ASP.NET hosts the runtime to provide a scalable, server-side environment for managed code. ASP.NET works directly with the runtime to enable ASP.NET applications and XML Web services, both of which are discussed later in this topic. Internet Explorer is an example of an unmanaged application that hosts the runtime (in the form of a MIME type extension). Using Internet Explorer to host the runtime enables you to embed managed components or Windows Forms controls in HTML documents. Hosting the runtime in this way makes managed mobile code (similar to Microsoft® ActiveX® controls) possible, but with significant improvements that only managed code can offer, such as semi-trusted execution and isolated file storage.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
The .NET Framework is an integral Windows component that supports building and running the next generation of applications and XML Web services. The .NET Framework is designed to fulfill the following objectives:
y To provide a consistent object-oriented programming environment whether object code is stored and
executed locally, executed locally but Internet-distributed, or executed remotely.
y To provide a code-execution environment that minimizes software deployment and versioning conflicts.
y To provide a code-execution environment that promotes safe execution of code, including code created by
an unknown or semi-trusted third party.
y To provide a code-execution environment that eliminates the performance problems of scripted or
interpreted environments.
y To make the developer experience consistent across widely varying types of applications, such as
Windows-based applications and Web-based applications.
y To build all communication on industry standards to ensure that code based on the .NET Framework can
integrate with any other code.
The .NET Framework has two main components: the common language runtime and the .NET Framework class
library. The common language runtime is the foundation of the .NET Framework. You can think of the runtime as
an agent that manages code at execution time, providing core services such as memory management, thread
management, and remoting, while also enforcing strict type safety and other forms of code accuracy that promote
security and robustness. In fact, the concept of code management is a fundamental principle of the runtime. Code
that targets the runtime is known as managed code, while code that does not target the runtime is known as
unmanaged code. The class library, the other main component of the .NET Framework, is a comprehensive, object-
oriented collection of reusable types that you can use to develop applications ranging from traditional command-
line or graphical user interface (GUI) applications to applications based on the latest innovations provided by
ASP.NET, such as Web Forms and XML Web services.
The .NET Framework can be hosted by unmanaged components that load the common language runtime into their
processes and initiate the execution of managed code, thereby creating a software environment that can exploit
both managed and unmanaged features. The .NET Framework not only provides several runtime hosts, but also
supports the development of third-party runtime hosts.
For example, ASP.NET hosts the runtime to provide a scalable, server-side environment for managed code.
ASP.NET works directly with the runtime to enable ASP.NET applications and XML Web services, both of which are
discussed later in this topic.
Internet Explorer is an example of an unmanaged application that hosts the runtime (in the form of a MIME type
extension). Using Internet Explorer to host the runtime enables you to embed managed components or Windows
Forms controls in HTML documents. Hosting the runtime in this way makes managed mobile code (similar to
Microsoft® ActiveX® controls) possible, but with significant improvements that only managed code can offer, such
as semi-trusted execution and isolated file storage.
Framework .NET adalah suatu komponen windows yang terintegrasi yang dibuat dengan tujuanuntuk mensupport pengembangan berbagai macam jenis aplikasi serta untuk dapat mejalankan
berbagai macam aplikasi generasi mendatang termasuk pengembangan aplikasi Web Services
XML.Framework .NET di design untuk dapat memenuhi beberapa tujuan berikut ini :
Untuk menyediakan environment kerja yang konsisten bagi bahasa pemrograman yang berorientasi objek (object-oriented programming - OOP ) baik kode objek itu di simpan
dan di eksekusi secara lokal, atau dieksekusi secara lokal tapi didistribusikan melaluiinternet atau di eksekusi secara remote.
Untuk menyediakan environment kerja di dalam mengeksekusi kode yang dapat
meminimaliasi proses software deployment dan menghindari konflik penggunaan versisoftware yang di buat.
Untuk menyediakan environment kerja yang aman dalam hal pengeksekusian kode,
termasuk kode yang dibuat oleh pihak ketiga (third party).
Untuk menyediakan environment kerja yang dapat mengurangi masalah pada persoalan performa dari kode atau dari lingkungan interpreter nya.
Membuat para developer lebih mudah mengembangkan berbagai macam jenis aplikasi
yang lebih bervariasi, seperti aplikasi berbasis windows dan aplikasi berbasis web.
Membangun semua komunikasi yang ada di dalam standar industri untuk memastikan bahwa semua kode aplikasi yang berbasis Framework .NET dapat berintegrasi dengan
Framework .NET terdiri dari dua buah komponen utama, yaitu C ommon Language Runtime
( C LR) dan .NET Framework C lass Library atau kadang juga sering disebut dengan Base C lass Library (BC L).
Common Language Runtime (CLR) adalah pondasi utama dari Framework .NET. CLR
merupakan komponen yang bertanggung jawab terhadap berbagai macam hal, seperti bertanggung jawab untuk melakukan managemen memory, melakukan eksekusi kode,
melakukan verifikasi terhadap keamanan kode, menentukan hak akses dari kode, melakukan
kompilasi kode, dan berbagai layanan system lainnya. Dengan adanya fungsi CLR ini, maka
aplikasi berbasis .NET biasa juga disebut dengan managed code, sedangkan aplikasi di luar itu
biasa disebut dengan un-managed code.
.NET Framework Class Library atau sering juga disebut Base Case Library (BCL) adalah
koleksi dari reusable types yang sangat terintegrasi secara melekat dengan CLR. Class library bersifat berorientasi terhadap objek yang akan menyediakan types dari fungsi-fungsi managed
code. Hal ini tidak hanya berpengaruh kepada kemudahan dalam hal penggunaan, tetapi jugadapat mengurangi waktu yang diperlukan pada saat eksekusi. Dengan sifat tersebut, maka
komponen pihak ketiga akan dengan mudah diaplikasikan ke dalam aplikasi yang dibuat.Dengan adanya BCL ini, maka kita bisa menggunakan Framework .NET untuk membuat
Pertanyaan di atas mungkin muncul di benak kita semua pada saat pertama kali mendengar tentang C#. Hal tersebut sangat beralasan, dengan melihat kenyataan bahwa sebelum C#muncul, telah banyak bahasa pemrograman yang ada, seperti C, C++, Java, Perl dan lain-lain.
Ada beberapa alasan kenapa memilih C#, yaitu :Sederhana (simple)C# menghilangkan beberapa hal yang bersifat kompleks yang terdapat dalam beberapa macambahasa pemrograman seperti Java dan C++, termasuk diantaranya mengilangkan macro,templates, multiple inheritance dan virtual base classes. Hal-hal tersebut yang dapatmenyebabkan kebingunan pada saat menggunakannya, dan juga berpotensial dapat menjadimasalah bagi para programmer C++. Jika anda pertama kali belajar bahasa C# sebagai bahasapemrograman, maka hal-hal tersebut di atas tidak akan membuat waktu anda terbuang terlalubanyak untuk mempelajarinya.C# bersifat sederhana, karena bahasa ini didasarkan kepada bahasa C dan C++. Jika andafamiliar dengan C dan C++ atau bahkan Java, anda akan menemukan aspek-aspek yang begitufamiliar, seperti statements, expression, operators, dan beberapa fungsi yang diadopsilangsung dari C dan C++, tetapi dengan berbagai perbaikan yang membuat bahasanya menjadilebih sederhana.Modern
Apa yang membuat C# menjadi suatu bahasa pemrograman yang modern? Jawabannyaadalah adanya beberapa fitur seperti exception handling , garbage collection, extensible datatypes, dan code security (keamanan kode/bahasa pemrograman). Dengan adanya fitur-fitur tersebut, menjadikan bahasa C# sebagai bahasa pemrograman yang modern.
Object-Oriented LanguageKunci dari bahasa pemrograman yang bersifat Object Oriented adalah encapsulation,inheritance, dan polymorphism. Secara sederhana, istilah-istilah tersebut bisa didefinisikansebagai berikut (definisi dan penjelasan lebih lanjut akan di uraikan pada bab-bab selanjutnya).encapsulation, dimana semua fungsi ditempatkan dalam satu paket (single package).inheritance, adalah suatu cara yang terstruktur dari suatu kode-kode pemrograman dan fungsi
untuk menjadi sebuat program baru dan berbentuk suatu paket. polymorphism, adalah kemampuan untuk mengadaptasi apa yang diperlukan untuk dikerjakan.Sifat-sifat tersebut di atas, telah di miliki oleh C# sehingga bahasa C# merupakan bahasa yangbersifat Object Oriented .Powerfull dan fleksibelC# bisa digunakan untuk membuat berbagai macam aplikasi, seperti aplikasi pengolah kata,grapik, spreadsheets, atau bahkan membuat kompiler untuk sebuah bahasa permrograman.EfisienC# adalah bahasa pemrograman yang menggunakan jumlah kata-kata yang tidak terlalu
banyak. C# hanya berisi kata-kata yang biasa disebut dengan keywords. Keywords ini
digunakan untuk menjelaskan berbagai macam informasi. Jika anda berpikiran bahwa bahasa
pemrograman yang menggunakan sangat banyak kata-kata (keywords) akan lebih powerfull,
maka jawabannya adalah ³pemikiran itu tidak selalu benar´, karena hal itu justru bisa
menambah kerumitan para developer pada saat membuat suatu aplikasi. Berikut daftar