Study Android Chapter 1 Reading

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.

 

 

 

转载于:https://www.cnblogs.com/NewWork/archive/2013/05/04/3260602.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值