Pengenalan Framework .NET

Post on 29-Jun-2015

266 views 0 download

Tags:

Transcript of Pengenalan Framework .NET

Pengenalan Framework .NET

KI091326

Pertemuan ke-1 | 13 Februari 2012

AgendaPengenalan Framework .NET

Pengenalan Visual Studio

Managing Project Structure

Debugging

PENGENALAN FRAMEWORK .NET

Platform .NET

Arsitektur Windows 8

Platform .NETInteroperability

Dapat mengakses fungsionalitas program/library lain yang dijalankan di luar .NET environment

Common Language Runtime Engine (CLR)Execution engine pada .NET framework

Menjamin keseragaman dalam hal memory management, security dan exception handling

Common Language Infrastructure (CLI)

Platform .NET

Language IndependenceSupport Common Type System (CTS)

Common Language Infrastructure (CLI)

Platform .NET Base Class Library (BCL)

Berisi kelas-kelas untuk fungsi umum (I/O file, graphic rendering, database interaction, XML manipulation, dll.)

Simplified Deployment

Checking previous installation & security requirements

Security

Common security model (e.g. buffer overflows avoidance)

Portability

Open standard

Class Library System

System. CodeDom

System. Collections

System. Diagnostics

System. Globalization

System. IO

System. Resources

System. Text

System. Text.RegularExpressions

Memory managementNon-deterministic

Compacting memory

Using generational Generation 0 frequently collected Generation 1 less frequently collected Generation 2 least frequently collected

Alternatif .NET FrameworkMicrosoft .NET Micro Framework : embedded device

Mono : Windows, iOS, Android, Linux OS, PS3, Wii, Xbox, dll

Portable.NET : Windows, Linux, Mac OS, dll

Rotor : Mac OS

Microsoft’s Shared Source CLI tidak update sejak 2006

CrossNet tidak aktif sejak 2007

Alternatif IDE untuk C#MonoDevelop

SharpDevelop

Notepad++ (???)

PENGENALAN VISUAL STUDIO IDE

Fitur-fitur Visual StudioWPF UI

Improved Intellisense powerful autocomplete

Improved searching

Improved debugger pinned datatips

Managed Extensibility Framework supports add-in, contoh: http://nuget.org/

Support Windows Azure development

PROJECT STRUCTURE MANAGEMENT

PROJECT and SOLUTION

Container yang mengatur source code, data connections, dan references

Container yang mengatur banyak project yang interdependent menjadi satu

PROJECT SOLUTION

1. Creating a new Project (& Solutions)

2. Examine Project Structure

3. Looking for main code

4. Running Main Program

5. Adding New Project to A Solution

New solution structure

6. Adding References

Select Projects Reference

7. Using the project reference

CatatanNamespace

Sebuah container untuk mengatur source code dalam sebuah project

Analoginya sama dengan folder di dalam komputer

Jika ada bagian source code yang membutuhkan referensi dari source code di namespace lain, dapat menggunakan keyword “using” untuk menyertakannya.

8. Setting Startup Project

9. Running main project

DEBUGGING

Mengapa harus melakukan debugging?Mengurangi bug atau cacat pada program

• Salah penulisan syntax• IDE modern secara otomatis mendeteksi

Syntax Error

• Kesalahan pada proses logika program• Output tidak sesuai dengan yang

diharapkanLogic Error

• Terjadi ketika program berjalan• Terkait masalah referensi variabel (index,

object, pointer, dsb.)

Runtime Error

Mekanisme Debugging pada Visual StudioBreakpoints

Data Tip

Watch Window

Immediate Window

Call Stack

http://www.codeproject.com/Articles/79508/Mastering-Debugging-in-Visual-Studio-2010-A-Beginn

Tugas Instalasi Visual Studio 2010/2012 Express

Mencoba mekanisme Debugging pada Visual Studio