You are on page 1of 36

KI091326

Pengenalan
Framework .NET

Pertemuan ke-1 | 11 Februari 2012

Agenda
Pengenalan Framework .NET
Pengenalan Visual Studio
Managing Project Structure
Debugging

PENGENALAN
FRAMEWORK .NET

Platform .NET

Arsitektur Windows 8

Platform .NET
Interoperability
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

Common Language
Infrastructure (CLI)

Platform .NET
Language Independence
Support 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 management
Non-deterministic
Compacting memory
Using generational
Generation 0 frequently collected
Generation 1 less frequently collected
Generation 2 least frequently collected

Alternatif .NET Framework


Microsoft .NET Micro Framework
Tambahan library untuk embedded application

Mono
Portable.NET
Microsofts 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 Studio


WPF 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

MANAJEMEN PROJECT
STRUCTURE

PROJECT and SOLUTIONS


PROJECT

Container yang
mengatur source code,
data connections, dan
references

SOLUTION
Container yang
mengatur banyak
project yang
interdependent menjadi
satu

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

Catatan
Namespace
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

Syntax
Error
Logic Error
Runtime
Error

Salah penulisan syntax


IDE modern secara otomatis mendeteksi

Kesalahan pada proses logika program


Output tidak sesuai dengan yang
diharapkan
Terjadi ketika program berjalan
Terkait masalah referensi variabel (index,
object, pointer, dsb.)

Mekanisme Debugging pada


Visual Studio
Breakpoi
nts

Data Tip

Watch
Window

Immediat
e Window

Call Stack

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

Tugas
Instalasi Visual Studio 2010/2012 Express
Mencoba mekanisme Debugging pada Visual
Studio

You might also like