Study Android Chapter 1 Reading

來源:互聯網
上載者:User

Chapter 1 Reading

Web Apps versus Native Apps

First Web Apps

 

The defining characteristics of a web app are that the user interface (UI) is built with web standard technologies, it is available at a
URL (public, private, or perhaps behind a log in), and it is optimized for the characteristics of a mobile device.

 

Second
Native Apps

 

In contrast, native appsare installed on the Android phone, they have access to the hardware (speakers,accelerometer, camera, etc.), and
they are written with Java.

 

Here are the pros of native app development:

• Millions of registeredcredit card owners are one click away

• You can access all thecool hardware features of the device

 

Here are the cons of native app development:

• You have to pay tobecome an Android developer

• Your app will run onlyon Android phones

• You have to developusing Java

• The development cycleis slow (develop, compile, deploy, repeat)

 

Here are the pros of web app development:

• Web developers can usetheir current authoring tools

• You can use yourcurrent web design and development skills

• Your app will run onany device that has a web browser

• You can fix bugs inreal time

• The development cycle is fast

 

Here are the cons of web app development:

• You cannot access theall cool hardware features of the phone

• You have to roll yourown payment system if you want to charge for the app

• It can be difficult toachieve sophisticated UI effects

 

Web Programming CrashCourse

The three maintechnologies we will use to build web apps are HTML, CSS, and Java-

Script.

 

Introductionto HTML:

 

Different HTML tagsallow different attributes. You can add multiple attributes to an open tag byseparating them with spaces. You never add
attributes to a closing tag. Thereare hundreds of possible combinations of attributes and tags

 

An HTML document is madeup of two sections: the head and the body.

The body is where youput all the content that you want users to see. The head contains informationabout the page, most of which is invisible
to the user.

 

 

Ps: I use Notepad++ as my always editor

 

Introduction to CSS:

 

To go beyond this simplestructure-based rendering, you use Cascading Style Sheets

(CSS). CSS is astylesheet language that you use to define the visual presentation of an

HTML document. You canuse CSS to define simple things like the text color, size, and style (bold,italic, etc.), or complex things like page
layout, gradients, opacity, and muchmore.

 

There are differencesbetween class and id. Use class attributes when you have more than one item onthe page with the same class value. Conversely,
id values have to be unique toa page.

 

The time to use IDrather than class:

Selecting elements by IDis much faster than by class, so you can hurt your performance by overusingclass selectors.

 

The way to apply a stylesheet:

It’s worth pointing out that you can link to stylesheets that are hosted on domains other than the one hosting the HTML document. However,
it’s considered very rude to link to someone else’s stylesheets without permission, so please only link to your own.

 

Introductionto JavaScript:

 

JavaScript is ascripting language that you can add to an HTML page to make it more interactiveand convenient for the user.

 

Here are some pointsabout JavaScript’s syntax that are worth noting:

• Statements areterminated with semicolons (;)

• Code blocks areenclosed in curly braces ({})

• Variables are declaredusing the
var keyword

• Array elements can beaccessed with square bracket notation ([])

• Array keys areassigned beginning at 0

• The single equals sign(=) is the assignment operator (assigns a value to a variable)

• The double equals sign(==) is the equivalence logical operator (compares two values and evaluates totrue if they are equivalent)

• The plus sign (+) isthe string concatenation operator (combines two strings together)

 

For our purposes, the most important feature of JavaScript is that it can interact with the elements of an HTML page (the cool kids call
this “manipulating the DOM”).

 

DOM stands for DocumentObject Model and in this context it represents the browser’s understanding ofan HTML page.

 

jQuery:

 

JQuery is a relatively small JavaScript library that allows you to write your JavaScript code in a way that will work the same in a wide
variety of browsers. What’s more, it greatly simplifies a number of common web development tasks.

 

 

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.