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.

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. [Android] 收录几个比较火的安卓网
  2. android DexClassLoader动态加载技术详解
  3. android 中.9图片的用法 详解
  4. [置顶] 了解Android微信里的WebView是如
  5. Android蓝牙开发中电话音频(HSP,HFP)和媒体
  6. Android平板份额紧逼苹果 有望超越iPad
  7. 【转】UML建模與Android應用程式開發(上)
  8. 【Android归纳决】阿里笔试题之Android网
  9. 2019 BAT大厂 Android社招最全面试题(面试
  10. android 代码设置、打开wifi热点及热点的