Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Pengantar Teknologi Mobile 10

Presentasi serupa


Presentasi berjudul: "Pengantar Teknologi Mobile 10"— Transcript presentasi:

1 Pengantar Teknologi Mobile 10
Antonius Rachmat C, S.Kom .NET Compact Framework

2 Application Platforms Today
Browser Apps Web Services Apps Local Apps Other Apps Standard Library GUI Services Transaction Services Web Scripting Data Access More Runtime Environment Operating System

3 What is Microsoft .Net? Visi: Suatu brand name
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 Your Internal Services Open Internet Protocols
.NET Blueprint Your Internal Services Open Internet Protocols XML, XSLT, XSD, SOAP, DISCO, UDDI, XHTML, HTTP, SSL, WAP Sales Data Service Visual Studio.NET Corporate Fullfilment Service .NET Framework Your application and web service .NET Enterprise Servers Applications Using Your Service Windows CE, XP, 2000, .NET SQL Server BizTalk Server Application Center Commerce Server Smart Clients .NET FW Host Integration Server Internet Security and Acceleration .NET FW Windows Windows Exchange Server Smart Devices Building Block Services Is this enough “focus” for you?  If it were at all possible to put all of .NET and Microsoft’s vision for the future of software development on one single slide … this is what it would look like. It’s all about “software as a service”. Let me explain. Let’s start in the middle. In this new model, our applications or web services (we’ll talk more about web services later) are executed and managed by the .NET Framework. We’ll give some serious discussion to the Framework later in this module. Beginning with Microsoft Windows .NET Server, which will be released Q1 2002, this .NET Framework will ship with the operating system. Until then, we can manually install it (as we’ve done here in this classroom) on Windows XP or Windows The CE reference here is referring to the .NET Compact Framework for palm-sized devices. All of this technology is wrapped in a big blanket of standards. Some of these standards are already existing, others are in working draft as we speak. We’ll talk more about these later, but just know now that all communication to & from our application will be able to utilize these protocols. On the left, Visual Studio.NET is the premier development environment to write applications for this new generation of software (please hold your applause until the end ) Through these standards we just mentioned, other applications (whether on the same machine, platform or not) will consume our application and the logic we’ve exposed from it. Unlike the first two generations of software development we spoke of, .NET is not targeted specifically to computers & browsers. Microsoft and a large part of the industry is envisioning the ability to access our applications from cell phones, PDA devices, our cars and any other capable device. Other components in this architecture that will make this goal a reality are the .NET Enterprise services. Don’t be confused by the name. .NET in this case does not mean these products rely on the .NET Framework or were developed using Visual Studio.NET. They actually define the first stage of Microsoft’s .NET strategy of “software as a service”. The .NET Framework and Visual Studio.NET are actually the second stage. These products will live on the server-side and provide services to the applications you and I will be writing. Some will be aiding in scalability, manageability, an integration or interop layer, or basic services like data storage. The Building Block Services were codenamed Hailstorm and now called the .NET myServices. These are services that will be provided by Microsoft to be consumed by you and your applications. The focus is to put the end-user in control of their data so we don’t have to. We’ll have greater levels of data correctness/completeness and we’ll have much less work to do to get there. As for 3rd party web services, I’ll resort to an analogy. Remember back in 1996 when ActiveX controls were the rage? You can create them once and use them all over the place. Or you can buy one and save yourself the time in creating one yourself (saving money in the long run). On the other hand, you can create them and resell them for a profit. COM is the technology holding it all together and everyone loved it. Well, you can think of web services exactly the same way. They afford you the same benefits as a consumer or producer except instead of being based on COM, they are based on standard industry protocols and standards … available from any platform or application. Almost makes you want to tear up, doesn’t it? Let’s talk more about these standards … .NET FW Passport – Identity Service Calendaring Service Simple Browsers … [myServices] 3rd Party Web Services Geographic Mapping Service Credit Card Statement Service … [ActiveX Paradigm]

6 .NET Framework (2)

7 .NET Framework (3) System System.Data System.Xml System.Web
Globalization Text Security Collections Resources Reflection Net IO Threading Diagnostics ServiceProcess Configuration Design ADO.NET SqlClient Xslt/XPath XmlDocument Runtime InteropServices Remoting Serialization SessionState Caching Services Description Discovery Protocols UI HtmlControls WebControls System.Drawing Imaging Drawing2D Printing System.WinForms ComponentModel Reader/Writers KEY MESSAGE: Quick overview of the functionality found in the full .NET Framework. SLIDE BUILDS: None SLIDE SCRIPT: The .NET Framework in it’s full form as used with Windows Forms, Web Forms, and Web Service application contains most of the functionality that a developer needs to build an application of those types. The framework contains classes that cover a range from mundane tasks such as file input and output to classes that support the use of strong industry standard encryption algorithms. The framework also contains wide support for application interaction over a variety of protocols as well as database interaction and other fundamental programming needs. SLIDE TRANSITION: The .NET Compact Framework by contrast is more streamlined ADDITIONAL INFORMATION FOR PRESENTER: 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)
Base Class Library Support Thread Support COM Marshaler Type Checker Exception Manager Security Engine Debug Engine Drill into CLR: Class Loader – manages loading/layout of classes and metadata ILtoNative – CPU independent Code Manager – manages code execution (fixing up and dispatching JITer, etc.) GC – lifetimes, coallescing COM Marshaller – to/from COM BCL – reflection, etc.. IL to Native Compilers Code Manager Garbage Collector Class Loader

11 CLR Execution Model Development Deployment Common Language Runtime ...
VB C# Script ... Assembly: MSIL + Metadata Install time Code Gen Native Code Deployment PreJIT not available to users in Beta 1 Common Language Runtime JIT Code Gen Native Code

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
Language Compiler Microsoft Intermediate Language (MSIL) Compilation Source Code 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 KEY MESSAGE: What were some of the key goals in the design and development of the .NET Compact Framework? SLIDE BUILDS: None SLIDE SCRIPT: The .NET CF was designed first and foremost to be a portable and smaller version of the more fully featured .NET Framework. Secondly it was designed to be able to be accessed equally from the perspective of C# and/or VB.NET developers. Next it was designed to allow development for devices to be fully integrated into the VS.NET shell. The ability to easily develop, run, and debug device projects as easily as someone does desktop development with VS.NET was a key goal. Another key goal of the .NET Compact Framework was to enable easy interaction with web services from devices that are running the .NET Compact Framework. And a final and important goal was to have the .NET CF peacefully co-exist with the existing PocketPC 2002 and 2000 OS’s. SLIDE TRANSITION: Next let’s look at some differences between SDE and MMIT ADDITIONAL INFORMATION FOR PRESENTER:

17 The Framework – “Optimized”
20mb  1.5mb Same languages, same code, same MSIL Multiple target CPUs / Mobile device

18 .NET Compact Framework System System.Data System.Xml System.Web
Globalization Text Security Collections Resources Reflection Net IO Threading Diagnostics ServiceProcess Configuration Design ADO.NET SqlClient Xslt/XPath XmlDocument Runtime InteropServices Remoting Serialization SessionState Caching Services Description Discovery Protocols UI HtmlControls WebControls System.Drawing Imaging Drawing2D Printing System.WinForms ComponentModel Reader/Writers KEY MESSAGE: Quick overview of the functionality found in the full .NET Framework. SLIDE BUILDS: None SLIDE SCRIPT: The .NET Framework in it’s full form as used with Windows Forms, Web Forms, and Web Service application contains most of the functionality that a developer needs to build an application of those types. The framework contains classes that cover a range from mundane tasks such as file input and output to classes that support the use of strong industry standard encryption algorithms. The framework also contains wide support for application interaction over a variety of protocols as well as database interaction and other fundamental programming needs. SLIDE TRANSITION: The .NET Compact Framework by contrast is more streamlined ADDITIONAL INFORMATION FOR PRESENTER: SqlServerCe

19 .NET Compact Framework CLR
.NET CF Architecture .NET Compact Framework CLR … Launch Applications Device Specific Class Libs Base Class Libs App Domain Host Managed Native Execution Engine (“MSCOREE.DLL”) Host Operating System Platform Adaptation Layer

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 Threading & Sync (System.Threading)
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 KEY MESSAGE: SDE Visual Studio.NET Integration SLIDE BUILDS: None SLIDE SCRIPT: When developing with SDE and VS.NET you have the same look and feel that you have when developing applications that target the web (Web Forms and Web Services) or desktop applications (Windows Forms). After the installation of SDE you have access to a variety of application templates that target Pocket PC devices such as full blown PocketPC applications, class libraries, control libraries, CE.NET applications, and mobile phone applications. Also when you choose an appropriate platform (PocketPC, or CE.NET) the appropriate references are added to your project for you. SLIDE TRANSITION: Customizing Emulator and Project Settings ADDITIONAL INFORMATION FOR PRESENTER:

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 KEY MESSAGE: The deployment experience is essential the same as desktop deployment. SLIDE BUILDS: None SLIDE SCRIPT: When debugging and testing your project the experience is essentially identical to that of desktop development. When using F5 or CTRL + F5 to run your project the appropriate files are copied to the emulator as well as the .NET Compact Framework if the emulator has been reset since the last time you built a project. You also have the ability to use the full suite of debugging tools such as the CallStack, Watch Windows, etc. SLIDE TRANSITION: Demonstration 1 ADDITIONAL INFORMATION FOR PRESENTER:

27 Packaging and Deployment
Source Code (Hello.*) .NET Compiler .NET CF Class Libs Hello.exe Hello.dll(s) Windows + Visual Studio .NET Hello.cab Device ActiveSync, SMS, Etc/. Hello.cab CabWiz.exe Hello.exe Hello.dll(s) WCELoad.exe .NET CF.cab Per-Processor/OS and Language Package .NET CF CLR

28 More Deployment Options
Windows + Visual Studio .NET Windows Device Setup.exe Setup.exe ActiveSync, Add/Remove Programs, Etc. Hello.cab .NET CF.cab Desktop Executables Hello.cab Hello.exe Hello.dll(s) .NET CF.cab .NET CF CLR Hello.cab Desktop Executables + .NET CF.cab

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 “MSCorEE” 400K* 2.2 M 18% N/A
File Size Classes Methods NETCF Desktop % “MSCorEE” 400K* 2.2 M 18% N/A MSCorLib 200K 2M 10% 364 1286 28% 3989 13817 29% System 100K 1.2M 8% 140 765 1090 6953 16% System.Drawing 20K 458K 5% 41 254 385 3509 11% System.Web.Services 67K 503K 13% 54 274 20% 302 2083 14% System.Windows.Forms 56+55K 43 823 393 11337 3% System.XML 138K 12% 100 724 927 7227 * .NETCF file size of MSCorEE is for Win32/x86 version

33 Framework Size Framework size (RAM or ROM) Running RAM needs
~1.5 MB Running RAM needs 1 MB+ (depends on app) Typical application sizes KB Apps often smaller due to use of platform features in the framework

34 NEXT Symbian OS


Download ppt "Pengantar Teknologi Mobile 10"

Presentasi serupa


Iklan oleh Google