快樂很偉大

2013年8月6日 星期二

[自學進度] 2013/8/6

Android

  • 出處:Saving Data in SQL Databases
  • 官方demo code:Searchable Dictionary  (需要Android關於Thread的知識:Processes and Threads
  • 稍微研究了一下官方的demo code,在Android裡Thread的概念滿重要的,更改目標先學習Thread


Thread
  • new Runnable 所做的事與 class implement Runnable 是一樣的

-----------------------------------------------------------------------------------------------------------------------------
The APIs you'll need to use a database on Android are available in the
android.database.sqlite package.

Define a Schema and Contract
  • The schema is reflected in the SQL statements that you use to create your database. 
  • You may find it helpful to create a companion class, known as a contract class, which explicitly specifies the layout of your schema in a systematic and self-documenting way.
  • A contract class 
    • is a container for constants that define names for URIs, tables, and columns.
    • allows you to use the same constants across all the other classes in the same package.
      •  This lets you change a column name in one place and have it propagate throughout your code.


沒有留言:

張貼留言