Rabu, 09 Desember 2015

The Libraries


The libraries
The libraries component also share its space with runtime component. The libraries component acts as a translation layer between the kernel and the application framework. The libraries are written in C/C++ but are exposed to developers through a Java API. Developers can use the Java application framework to access the underlying core C/C++ libraries. Some of the core libraries include the following:
            LibWebCore               : Allows access to the web browtheser
Media Libraries           :Allow access to popular audio – and video- recording and playback functions
            Graphic libraries          : Allows access to 2D and 3D graphics drawing engines
The runtime component consist of the Dalkviik virtual machines that will interact and run applications. The virtual machines is an important part of the android operating system and executes system third-party applications.

The  Dalvik Virtual Machine
Dan Bornstein originally wrote the Dalvik virtual machine. He named it after a small fishing village  in Iceland where he believed one  of his ancestors once originated. The dalvik VM was  written primarily to allow application execution on devices with very limited resources. Typically, mobile phones will fall into this category because they are limited by processing power, the amount of memory availabl, and a short battery life.

WHAT IS A VIRTUAL MACHINE?

A virtual machine is an isolated, guest operating  system running whitin another host operating system. A virtual machine will execute applications as if they were  running on a physical machine.  One of the main advantages of a virtual machine is portability. Regardless of the underlying hardware, the  code that you write will work on the VM. T o you as a developer, this means that you write your code only once and can execute it on any hardware platform that runs a compatible VM.
The Dalvik  VM executes. dex files. A. dex file made by taking the compiled Java.class or.jar files and consolidating all the constants and data within each.class file into a shared constant pool (see Figure 1-3). The dx tool, included in the Android SDK, performs this conversion.

Figure 1-3. Conversion of a.jar file to a.dex file



Table 1-1. A File Size Comparison (in Bytes) of .jar and .dex Files
Application
Uncompressed .jar
Compresses .jar

Uncompressed .dex

Common system
21445320 = 100 %
10662048 = 50 %
10311972 = 48 %
Libraries



Web browser app
470312 = 100 %
232065 = 49 %
209248 = 44 %
Alarm clock app
119200 = 100 %
61658 = 52 %
53020 = 44 %

The Application Framework
The application framework is one of the building blocks for the final system or end-user applicantions. Theframework provides a suite of services or systems that  a developer will find useful when writing applications. Commonly referred to as the API (application programming interface) component, this framework will provide a developer with access to user interface components such as buttons and text boxes, common content providers so that apps may share data between them, a notification manager so that device owners can be alerted of events, and an activity manager for managing the lifecycle of applications.
As a developer, you will write code and use the APIs in Java programming language. Listing 1-1, taken from Google’s sample API demos(http://developer.android.com/resources/samples/ApiDemos/index.html) , demonstates how to use the application framework to play a video file. The import statements in bold allow acces to the core C/C++ libraries through a Java API.

Listing 1-1. A Video Player Demo (Courtesy Google, Inc.)

/*
*Copyright © 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the “License”);
* You may not use this file except in compliance with the license.
* You may obtain a copy of the License at
*
* htttp://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licences is distributed on an “AS IS” BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Package com.example.android.apis.media;

importcom.example.android.apis.R;
importandroid.app.Activity;
importandroid.os.Bundle;
importandroid.widget.MediaController;
importandroid.widget.Toast;
importandroid.widget.VideoView;

public class VideoViewDemo Activity {

            /**
            * TODO: Set the path variable to a streamin video URL or a local media
            * file path.
            */
private String ath=””;
privateVideoViewmVideoView;

@override
public void onCreate(Bundle icicle){
            super.onCreate(icile);
            setContentView(R.layout.videoview);
            mVideoView = (VideoView) findViewById(R.id.surface_view);

if (path == “ “){
            //Tell the user to provide a media file URL/path.
Toast.makeText(
            VideoViewDemo.this,
            “Please edit VideoViewDemoAcivity, and set path”
                        + ” variable to your media file URL/path “,
                        Toast.LENGTH_LONG).show();
}else{


Perpustakaan

Komponen perpustakaan juga berbagi ruang dengan komponen runtime. Perpustakaan komponen bertindak sebagai lapisan terjemahan antara kernel dan kerangka aplikasi. Perpustakaan yang ditulis dalam C / C ++  namun dikembangkan melalui API Java. Pengembang dapat menggunakan kerangka aplikasi Java untuk mengakses dasar inti C / C ++ perpustakaan. Beberapa perpustakaan inti meliputi:
LibWebCore: Memungkinkan akses ke web browser
Perpustakaan Media: Memungkinkan akses ke audio populer - dan perekaman video-dan fungsi media pemutar
Perpustakaan grafis: Memungkinkan akses ke 2D dan 3D mesin gambar grafis
Komponen runtime terdiri dari mesin virtual Dalkviik yang akan berinteraksi dan menjalankan aplikasi. Mesin virtual adalah bagian penting dari sistem operasi android dan mengeksekusi sistem aplikasi pihak ketiga.

Dalvik Virtual Machine
Dan Bornstein awalnya menulis mesin virtual Dalvik. Dia memberi nama itu setelah sebuah desa nelayan kecil di Islandia di mana ia percaya salah satu nenek moyangnya berasal. The Dalvik VM ditulis terutama untuk memungkinkan eksekusi aplikasi pada perangkat dengan sumber daya sangat terbatas. Biasanya, ponsel akan jatuh ke dalam kategori ini karena mereka dibatasi oleh kekuatan pemrosesan, jumlah memori yang tersedia, dan baterai pendek.

APAKAH MESIN VIRTUAL ITU?

Sebuah mesin virtual terisolasi, pengguna sistem operasi berjalan dalam sistem operasi host lain. Sebuah mesin virtual akan mengeksekusi aplikasi seolah-olah mereka berjalan pada mesin fisik. Salah satu keuntungan utama dari mesin virtual adalah portabilitas. Terlepas dari perangkat keras yang mendasari, kode yang Anda tulis akan bekerja pada VM. Untuk Anda sebagai pengembang, ini berarti bahwa Anda menulis kode Anda hanya sekali dan dapat melaksanakannya pada perangkat keras platform yang menjalankan VM kompatibel.
Dalvik VM mengeksekusi. file dex. File dex A. dibuat dengan mengambil Java.class atau .jar file dikompilasi dan mengkonsolidasikan semua konstanta dan data dalam setiap .class file ke kolam konstan bersama (lihat Gambar 1-3). Perangkat dx , termasuk dalam SDK Android, melakukan konversi ini. Setelah konversi, .dex file – file mempunyai ukuran file yang lebih kecil yang sangat signifikan,
seperti yang ditunjukkan pada tabel 1 – 1.
 
Tabel 1-1. Sebuah Ukuran File Perbandingan (dalam Bytes) File .jar dan Dex
Aplikasi terkompresi .jar Kompres .jarDex terkompresi

Sistem umum 21445320 = 100% 10662048 = 50% 10311972 = 48%
Perpustakaan
Web aplikasi browser 470.312 = 100% 232.065 = 49% 209.248 = 44%
Jam alarm app 119.200 = 100% 61.658 = 52% 53020 = 44%

Aplikasi Kerangka
Kerangka aplikasi adalah salah satu blok – blok bangunan untuk sistem akhir atau pengguna aplikasi - aplikasi akhir. Kerangka ini menyediakan paket layanan atau sistem di mana pengembang akan menemukan kegunaan saat menulis aplikasi. Biasanya disebut sebagai komponen API (application programming interface), kerangka kerja ini akan menyediakan pengembang dengan akses ke pengguna komponen antarmuka seperti tombol dan kotak teks, penyedia konten umum sehingga aplikasi dapat berbagi data di antara mereka, manajer pemberitahuan sehingga pemilik perangkat dapat memberitahu peristiwa, dan manajer kegiatan untuk mengelola siklus hidup aplikasi.
Sebagai pengembang, Anda akan menulis kode dan menggunakan API dalam bahasa pemrograman Java. Listing 1-1, diambil dari demo sampel API Google (http://developer.android.com/resources/samples/ApiDemos/index.html), demonstates bagaimana menggunakan kerangka aplikasi untuk memutar file video. Laporan impor dalam huruf tebal memungkinkan akses ke inti C / C ++ perpustakaan melalui API Java.

Listing 1-1. Sebuah Video Player Demo (Courtesy Google, Inc.)

/ *
 * Copyright © 2009 Android Open Source Project
 *
 * Izin bawah Lisensi Apache, Versi 2.0 ("Lisensi");
 * Anda tidak dapat menggunakan file ini kecuali sesuai dengan lisensi.
 * Anda dapat memperoleh salinan Lisensi di
 *
 * Htttp: //www.apache.org/licenses/LICENSE-2.0
 *
 * Kecuali dibutuhkan oleh hukum yang berlaku atau disetujui secara tertulis, perangkat lunak
 * Didistribusikan di bawah Lisensi didistribusikan pada "APA ADANYA",
 * TANPA JAMINAN ATAU KONDISI APAPUN, baik tersurat maupun tersirat.
* Lihat Lisensi untuk bahasa tertentu yang mengatur izin dan
* Keterbatasan di bawah Lisensi.
* /
Com.example.android.apis.media paket;

impor com.example.android.apis.R;
impor android.app.Activity;
impor android.os.Bundle;
impor android.widget.MediaController;
impor android.widget.Toast;
impor android.widget.VideoView;

public class VideoViewDemo Kegiatan {

/ **
* TODO: Set variabel path ke URL video streamin atau media lokal
* Path file.
* /
swasta String ath = "";
swasta VideoView mVideoView;

@ Override
public void OnCreate (Bundle es) {
super.onCreate (icile);
setContentView (R.layout.videoview);
mVideoView = (VideoView) findViewById (R.id.surface_view);

jika (path == "") {
// Katakan pengguna untuk memberikan file media URL / path.
Toast.makeText (
VideoViewDemo.this,
"Silakan mengedit VideoViewDemo Acivity, dan set path"
+ "Variabel untuk Anda file media URL / path",
Toast.LENGTH_LONG) .show ();
} else {

Kamis, 22 Oktober 2015

Seven OSI Layer Model


Nama   : Heni Novita Sari
NPM   : 1515061019
Prodi   : Teknik Informatika
Tugas   : Bahasa Inggris

Dalam Bahasa Indonesia

1.      Lapisan fisik
Lapisan fisik merupakan lapisan paling rendah dari model referensi OSI. Lapisan ini mengatur hubungan secara fisik antara satu titik ke titik lainnya pada jaringan. Lapisan fisik berfungsi dalam pengiriman raw bit ke channel komunikasi.
2.      Lapisan data link
Lapisan data link bertugas sebagai fasilitas tranmisi raw data dan mentranformasi data tersebut ke saluran yang bebas dari kesalahan tranmisi. Lapisan ini menjamin data yang dikirimkan ke lapisan jaringan sampai ketujuan dalam keadaan baik. Data yang akan dikirimkan dibentuk dalam frame. Mekanisme yang dipakai dalam pengaturan struktur frame disebut HDLC ( high level data link control ). Lapisan ini juga menangani fungsi-fungsi seperti mendeteksi kesalahan tranmisi dan melakukan pengiriman ulang data-data tersebut.
3.      Lapisan jaringan
Lapisan jaringan merupakan lapisan ketiga dari bawah referensi jaringan OSI. Fungsi lapisan ini adalah bertanggungjawab untuk membuat paket data yang akan dikirimkan, memberikan fasilitas seperti pengamatan jaringan disebbut Routing dan melakukan pengontrolan aliran data pada komputer ke interface jaringan.
4.      Lapisan tranport
Fungsi dasar lapisan transport menerima data dari lapisan session, memisahkan menjadi bagian atau unit yang kecil, meneruskan data ke lapisan jaringan, dan menjamin unit-unit data tersebut sampai dengan benar. Dalam keadaan normal lapisan transport membuat koneksi jaringan yang berbeda bagi setiap koneksi transport yang diperlukan oleh setiap session.
5.      Lapisan sesi
Lapisan yang menyediakan fasilitas bagi user/pemakai jaringan untuk melakukan percakapan atau komunikasi dari satu mesin ke mesin yang lain. Sebuah layanan session layer untuk melaksanakan pengendalian dialog.
6.      Lapisan presentasi
Lapisan yang digunakan  untuk menyeleksi syntax data yang berbeda dalam jaringan. Lapsan presentasi memiliki standar encoding (penyandian) yang digunkan dalam pemrosesan aplikasi data. Lapisan presentasi melakukan fungsi-fungsi tertentu menjamin penemu sebuah penyelesaian umum bagi masalah tertentu. Lapisan presentasi tidak mengizinkan pengguna menyelesaikan masalah sendiri.

7.      Lapisan aplikasi
Lapisan aplikasi adalah lapisan yang menyediakan interface antara aplikasi lain yang digunakan untuk berkomunikasi dan jaringan yang mendasarinya dimana pesan akan dikirim. Lapisan aplikasi merupakan lapisan tertinggi pada model referensi ISO. Protokol lapisan aplikasi digunakan untuk pertukaran data antara program yang berjalan pada source dan host tujuan.





Dalam Bahasa Inggris
   1. physical layer
The physical layer is the lowest layer of the OSI reference model. This coating physically governs the relationship between one point to another on the network. Physical layer functions in the delivery  of raw bits to the communications channel.
               2. Data link layer
The data link layer transmission facilities serve as raw data and transform that data into an error-free channel transmission . This layer guarantees the data that is sent to the network layer to the destination in good condition . Data to be transmitted is formed in the frame . Mechanisms used in setting the frame structure called a HDLC (high -level data link control) . This layer also handles functions such as detecting transmission errors and attempt to retransmit the data .

            
               3. Network layer
The network layer is the third layer of the OSI under the reference network . The function of this layer is responsible for making the data packets to be transmitted , providing facilities such as observation disebut network routing and controlling the flow of data on a computer to a network interface .

               4. Layer tranport
The basic functions of the transport layer receives data from the session layer , separating into smaller parts or units , forwards the data to the network layer , and ensure that data units up correctly . Under normal circumstances the transport layer makes a different network connection for each transport connection required by each session.

               5. Layer session
The coating has been used to provide those users network to review a conversation or communication from one machine to another . service a review of the dialogue session layer for implementing control .

               6. Presentation layer
Layers are used to select different data syntax in the network . Layer presentations have a standard encoding ( encoding ) that is used mainly in the processing of application data. The presentation layer perform certain functions guarantee the inventor a general solution for a particular problem . The presentation layer does not allow users solve problems on their own.

               7. Application Layer
The application layer is a thick layer of skin that provides the interface between lying The application is used to review the underlying communication and networks where the message will be sent. The application layer is a thick layer of skin highest ISO reference model on . Application skin thick layer protocol used to review data exchange program runs in between the source host and destination .

Vocab :
·         Transmitted :ditranmisikan
·         Providing :memberikan
·         Routing:menghancurkan
·         Flow:arus
·         Interface:antarmuka
·         Circumstances :keadaan
·         Separating:memisahkan
·         Provide:memberikan
·         Inventor:penemu
·         Guarantee:jaminan