• Tidak ada hasil yang ditemukan

PPT Bluetooth - UNIMAL

N/A
N/A
Protected

Academic year: 2023

Membagikan "PPT Bluetooth - UNIMAL"

Copied!
34
0
0

Teks penuh

(1)

Pengantar Teknologi Mobile 10

Antonius Rachmat C, S.Kom

.NET Compact Framework

(2)

Standard Library

Application Platforms Today

GUI Services

Transaction Services

Web Scripting

Data Access

More

Operating System Runtime Environment Browser

Apps

Web Services Apps

Other Apps Local

Apps

(3)

What is Microsoft .Net?

• Visi:

– The platform for the digital future

– ‘.NET is Microsoft’s platform for a new computing model built around XML Web Services’

Microsoft Corporation Annual Report, 2001

• Suatu brand name

– Applied to many things

• Diperkenalkan oleh Microsoft pada (Juni 2000)

– Sekarang sudah sampai .net framework 3.5

(4)

.NET FRAMEWORK

• Bersifat independen dalam hal bahasa

– Aplikasi dapat dikembangkan di beberapa bahasa yang didukung oleh .NET: Visual Basic .NET, Visual C++ .NET, C# dan J#

– Programmer dapat memilih salah satu bahasa yang paling dikuasainya.

• Mampu dijalankan di semua platform

(5)

Open Internet Protocols Open Internet Protocols XML, XSLT, XSD, SOAP, XML, XSLT, XSD, SOAP, DISCO, UDDI, XHTML, DISCO, UDDI, XHTML,

HTTP, SSL, WAP HTTP, SSL, WAP

Visual Visual Studio.

Studio.

NETNET Visual Visual Studio.

Studio.

NETNET

Simple Simple Browsers Browsers

Simple Simple Browsers Browsers Applications Applications Using Your Using Your

Service Service Applications Applications Using Your Using Your

Service Service

Your Internal Services Your Internal Services Your Internal Services Your Internal Services

.NET Enterprise .NET Enterprise

Servers Servers

.NET Enterprise .NET Enterprise

Servers Servers

33rdrd Party Web Services Party Web Services 33rdrd Party Web Services Party Web Services

Geographic Mapping Service Geographic Mapping Service Credit Card Statement Service Credit Card Statement Service

… [ActiveX Paradigm][ActiveX Paradigm]

Building Block Building Block

Services Services

Building Block Building Block

Services Services

Passport – Identity Service Passport – Identity Service Calendaring Service

Calendaring Service

… [myServices][myServices]

Windows Windows

SQL Server SQL Server BizTalk Server BizTalk Server

Application Center Application Center Commerce Server Commerce Server

Host Integration Server Host Integration Server

Internet Security and Acceleration Internet Security and Acceleration Exchange Server

Exchange Server Sales Data Service Sales Data Service

Corporate Fullfilment Service Corporate Fullfilment Service

Smart Smart Devices Devices Smart Smart Devices Devices

Smart Clients Smart Clients Smart Clients Smart Clients

.NET FW .NET FW Windows Windows

.NET FW .NET FW

Windows Windows

CE, XP, 2000, .NET CE, XP, 2000, .NET

Windows Windows

CE, XP, 2000, .NET CE, XP, 2000, .NET

.NET .NET

Framework Framework

.NET .NET

Framework

Framework .NET FW.NET FW

.NET Blueprint

Your Your applicati applicati on and on and

web web service service

Your Your applicati applicati on and on and

web web service service

(6)

.NET Framework (2)

(7)

.NET Framework (3)

System System System.Data

System.Data System.XmlSystem.Xml System.Web

System.Web

Globalization Globalization TextText

Security Security Collections Collections

Resources Resources Reflection Reflection NetNet

IOIO

Threading Threading Diagnostics Diagnostics ServiceProcess ServiceProcess Configuration Configuration Design

Design ADO.NET

ADO.NET SqlClientSqlClient

Xslt/XPath Xslt/XPath XmlDocument XmlDocument

Runtime Runtime

InteropServices InteropServices Remoting

Remoting Serialization Serialization

Serialization Serialization Configuration

Configuration SessionStateSessionState Caching

Caching SecuritySecurity Services

Services Description Description Discovery Discovery Protocols Protocols

UIUI

HtmlControls HtmlControls WebControls WebControls

System.Drawing System.Drawing

Imaging Imaging Drawing2D Drawing2D

TextText Printing Printing

System.WinForms System.WinForms

Design

Design ComponentModelComponentModel

Reader/Writers Reader/Writers OleDB, odbc, Oracle

OleDB, odbc, Oracle

(8)

Common Language Runtime

• Bagian utama dari framework yang akan mengkompilasi dan mengeksekusi program yang ditulis dengan bahasa yang mendukung .NET

• Compilation process

– Dua Langkah Kompilasi

• Pertama program di compile menjadi Microsoft Intermediate Language (MSIL) / Common Intermediate Language (CIL)

– Mendefinisikan instruksi untuk CLR

• Kemudian MSIL code diterjemahkan kedalam machine code

– Machine code untuk platform yang khusus

– Mengapa dua proses kompilasi ?

• Agar platformnya bersifat independence

– .NET Framework dapat diinstal di platform berbeda

– Mengeksekusi program .NET tanpa modifikasi kode-nya

• Language independence

– .NET program tidak terikat dengan bahasa tertentu – Komponen yang lama dan baru dapat terintegrasi

(9)

Common Language Runtime (2)

• Keuntungan lain dari CLR

– Execution-management features

• Manages memory, security

• Membebaskan programmer dari banyak tanggung jawab

• Programmer lebih berkonsentrasi pada program logic

• CLR menyediakan JIT compilation.

• JIT hanya akan mengkompilasi method-method yang memang digunakan dalam suatu bagian aplikasi pada saat tertentu, dan hasil kompilasi ini sendiri di cache di dalam mesin dan akan dikompile kembali jika memang ada perubahan pada kode aplikasi kita.

– Jadi tidak semua method diload ke-memori pada saat yang sama

(10)

Common Language Runtime (3)

Class Loader Class Loader IL to Native

IL to Native Compilers Compilers

CodeCode Manager Manager

Garbage Garbage Collector Collector Security Engine

Security Engine Debug EngineDebug Engine Type Checker

Type Checker Exception ManagerException Manager Thread Support

Thread Support COM MarshalerCOM Marshaler Base Class Library Support

Base Class Library Support

(11)

Deployment Deployment Development Development

CLR Execution Model

VBVB C#C# ScriptScript ......

Assembly:

Assembly:

MSIL + Metadata MSIL + Metadata Native

Native CodeCode

JITJIT Code Gen Code Gen

Native Native CodeCode

Install time Install time Code Gen Code Gen

Common Common Language Language

Runtime Runtime

(12)

Data Types in the CLR

• The CLR mendefinisikan Common Type System (CTS)

– All languages built on the CLR use the CTS (managed code)

• Ada 2 kategori:

– Value types:

• Relatively simple types

• Allocated on the stack

– Reference types:

• More complex types

• Allocated on the heap

• Destroyed through garbage collection

(13)

Compiling & Executing Managed Code

Source Code

Language Compiler

Microsoft Intermediate

Language (MSIL) Compilation

JIT Compiler Native

Code

The first time each method is called

Execution

(14)

.NET Class Library

• Sering disebut sebagai Base Class Library.

• Adalah koleksi dari reusable types yang sangat terintegrasi secara melekat dengan CLR.

Class library bersifat berorientasi objek yang akan menyediakan types dari fungsi-fungsi managed code.

• Dengan BCL kita dapat membuat:

– Aplikasi console

– Aplikasi berbasis windowd (Windows Form) – Aplikasi ASP.NET (berbasis web)

– Aplikasi Web Services XML

• Aplikasi berbasis Windows Services

(15)

A Brief History of Windows Mobile Development

• Embedded Tools for Visual Studio

– VS 6

– Tools for VB, C++

• eMBedded Tools

– Standalone and free – eVB

– eC++

• .NET Compact Framework (First Pass)

– Visual Studio.NET

– Smart Device Extensions

(16)

.NET Compact Framework Design Goals

Portable and small .NET CLR for devices

– Enable Visual Basic® and C#

Integrated in Visual Studio® .NET

– Run managed .EXEs and .DLLs directly – Debug with Visual Studio .NET

Target devices:

– Compaq, HP, Dell, Toshiba, … – PocketPC 2000, 2002

– Windows Mobile (alias PPC 2003)

.Net CF in ROM!

– Windows CE – SmartPhone

– No Palm/Handspring

(17)

The Framework – “Optimized”

• 20mb  1.5mb

• Same languages, same code, same MSIL

• Multiple target CPUs / Mobile device

(18)

.NET Compact Framework

System System System.Data

System.Data System.XmlSystem.Xml System.Web

System.Web

Globalization Globalization TextText

Security Security Collections Collections

Resources Resources Reflection Reflection NetNet

IOIO

Threading Threading Diagnostics Diagnostics ServiceProcess ServiceProcess Configuration Configuration Design

Design ADO.NET

ADO.NET SqlClientSqlClient

Xslt/XPath Xslt/XPath XmlDocument XmlDocument

Runtime Runtime

InteropServices InteropServices Remoting

Remoting Serialization Serialization

Serialization Serialization Configuration

Configuration SessionStateSessionState Caching

Caching SecuritySecurity Services

Services Description Description Discovery Discovery Protocols Protocols

UIUI

HtmlControls HtmlControls WebControls WebControls

System.Drawing System.Drawing

Imaging Imaging Drawing2D Drawing2D

TextText Printing Printing

System.WinForms System.WinForms

Design

Design ComponentModelComponentModel

Reader/Writers Reader/Writers

SqlServerCe SqlServerCe

(19)

.NET CF Architecture

Host Operating System Host Operating System Platform Adaptation Layer Platform Adaptation Layer

Execution Engine (“MSCOREE.DLL”) Execution Engine (“MSCOREE.DLL”)

Device Specific Class Libs Device Specific Class Libs

Base Class Libs Base Class Libs Applications

Applications

.NET Compact Framework CLR .NET Compact Framework CLR

App Domain HostApp Domain Host

LaunchLaunch

Managed Managed

Native Native

(20)

Platform Adaptation Layer

• Base Services

– Threads, sync, timers, memory, math

• Storage

– Open, close, read/write, directory – Direct addressing mode

• Networking

– Sockets

– Connection Control

• GUI

– Framebuffer, char and pointer I/O, Fonts

(21)

Execution Engine

• Basic services for managed execution

– Loader

• Meta-data engine/cache

• Representation of class hierarchy/layout

• Reflection

– JIT-Compiler/Verifier

– Execution Infrastructure

• Exceptions, Native Code InterOp, Security

– Garbage Collector – Debugging Support

– “Native” implementation of some managed APIs (class libraries)

(22)

Class Libs

• Base Types

– Type conversion, display formatting – String manipulation

– Array.Sort

• Threading & Sync (System.Threading)

• Storage (System.IO)

• Resources (System.Resources)

• Collections (System.Collections)

• Reflection (System.Reflection)

• XML

– DOM and Reader/Writer

• Networking, Forms, Data Access

(23)

Developing in a Compact World

• VS.Net 2003/2005 installation option

• Only C#, VB.Net

• True on-device debugging

– If you can get it connected…

• Emulator

• Deployment

(24)

Developing in a Compact World

VS.NET Integration

• Templates for devices in New Project dialog

– Template sets device and project type

• Template types

– Pocket PC Application – Pocket PC Class Library – Pocket PC Control Library

– Windows CE .NET Application – Mobile Phone Application

• Default set of references that are appropriate for your platform

(25)

Develop Symbian in VS 2005

• You can get it! You can download

AppForge plugin!

(26)

Developing in a Compact World

Deployment

• Same user experience as desktop

• Compiles application for device

• Output Window used for deployment messages

• Visual Studio deploys the framework to

device if needed

(27)

Packaging and Deployment

Windows + Visual Studio .NET Windows + Visual Studio .NET Source Code

Source Code (Hello.*) (Hello.*)

.NET.NET Compiler Compiler .NET CF .NET CF Class Libs Class Libs

Hello.exe Hello.exe Hello.dll(s)

Hello.dll(s) Hello.cabHello.cab CabWiz.exe

CabWiz.exe

Hello.cab Hello.cab

Device Device ActiveSync,

ActiveSync, SMS, Etc/.

SMS, Etc/.

Hello.exe Hello.exe Hello.dll(s) Hello.dll(s) WCELoad.exe

WCELoad.exe

.NET CF.cab .NET CF.cab

Per-Processor/OS and Per-Processor/OS and

Language Package Language Package

.NET CF.cab .NET CF.cab

.NET CF .NET CF

CLRCLR

(28)

More Deployment Options

Windows + Visual Studio .NET Windows + Visual Studio .NET

Device Device Hello.cab

Hello.cab

.NET CF.cab .NET CF.cab

Desktop Desktop Executables Executables

Windows Windows

Setup.exe Setup.exe

Setup.exe Setup.exe ActiveSync,

ActiveSync, Add/Remove Add/Remove Programs, Etc.

Programs, Etc.

Hello.cab Hello.cab

Desktop Desktop Executables Executables

++

.NET CF.cab .NET CF.cab

Hello.cab Hello.cab

Hello.exe Hello.exe Hello.dll(s) Hello.dll(s)

.NET CF.cab .NET CF.cab

.NET CF .NET CF

CLRCLR

(29)

Working with data: SQL Server CE

• Limited subset of SQL Server functionality

• Good for:

– Persistent storage locally

– Persistent storage for occasionally-connected applications and large sets of data

– Merge Replication

• Currently, SQL Server CE requires an

additional installation

(30)

Working with data: SQLite

• SQLite adalah database bukan client- server, dia bersifat stand-alone

• Hanya terdiri dari 1 file

– Berekstensi: .db3

• Perlu download file DLL tambahan agar bisa koneksi:

– System.Data.SQLite

• Secure, bisa menggunakan bahasa SQL

• Bersifat lokal

(31)

Working with data: XML

• Good for:

– Persistent storage of smaller sets of data

• Local storage

• Occasionally-connected computing

– Not as secure as SQL Server CE

(32)

How Compact ?

  File Size   Classes Methods

  NETCF Desktop % NETCF Desktop % NETCF Desktop %

“MSCorEE” 400K* 2.2 M 18% N/A N/A N/A N/A N/A N/A

MSCorLib 200K 2M 10% 364 1286 28% 3989 13817 29%

System 100K 1.2M 8% 140 765 18% 1090 6953 16%

System.Drawing 20K 458K 5% 41 254 16% 385 3509 11%

System.Web.Services 67K 503K 13% 54 274 20% 302 2083 14%

System.Windows.Forms 56+55K 2M 5% 43 823 5% 393 11337 3%

System.XML 138K 1.2M 12% 100 724 14% 927 7227 13%

* .NETCF file size of MSCorEE is for Win32/x86 version

* .NETCF file size of MSCorEE is for Win32/x86 version

(33)

Framework Size

• Framework size (RAM or ROM)

– ~1.5 MB

• Running RAM needs

– 1 MB+ (depends on app)

• Typical application sizes

– 5 - 100 KB

– Apps often smaller due to use of platform features in the framework

(34)

NEXT

• Symbian OS

Referensi

Dokumen terkait

KESIMPULAN DAN SARAN Kesimpulan Berdasarkan hasil penelitian yang telah dilaksanakan oleh peneliti, dapat disimpulkan bahwa hasil dari analisis data dalam penelitian dari 32 peserta

INDICATOR Unit Realistic BaU Optimistic Demography & Economy Population Growth average % 1 1 Economic growth average % 5 5 Demand Biodiesel Target 2030 % 30 30 Biogasoline Target