2013年3月11日 星期一

Andriod Database應用系統發展

MemDB多年專注在資料庫應用系統開發, 主要平台是Windows的Client-Server應用系統, 現在想發展多平台, 主要是在現有的系統流程上, 讓用戶可以用HTML5, Andriod和I-Phone等Device執行個別的功能, 所以近來忙著研究整合方法, 和尋找人才加入開發. 以下是這幾天的研究分享.


產品列表大家會發現MemDB在多個行業都發展了應用軟件, 今次找了套連鎖零售系統來研究, 開發了以下HTML的DEMO:

http://vps.memdb.com:8302/

以上會以HTML列出此系統的產品列表, Click入[檢視]可看到貨品資料, 這頁可讓大家Upload一個圖案和修改貨品摘要一, 大家可以用Internet Exploror試試看.

但Browser一個問題是不同Browser的相容問題, 例如如用Chrome就不能POST到個圖案, 這個要再研究.

有夥伴成功用Andriod開發了一個影相, 在相Freehand畫個圈, 然後UPLOAD上去個系統的App, 但最大問題是有些Andriod機無法使用這個App, 要研究不同的andriod機的相容性, 這個是發展Andriod要解決的問題.

另一個研究是如何和這些HTML5, Andriod和I-PHONE夥伴配合, 寫了以下web service, 如:

Input: http://vps.memdb.com:8302/?page=categoryList
Output: 3;101;4;雜項;3;102;4;藥油;3;103;6;日用品;3;104;4;西藥;3;105;6;中 成藥;3;106;6;保健 品;3;107;6;化妝品;3;108;8;嬰兒用品;3;109;8;醫療用 品;3;110;4;寄沽;3;111;6;外購 藥;3;112;3;OPD;3;113;4;西散;3;114;6;寵物藥;
Explain:
First record is: 3;101;4;雜項;
3;  The length of Category ID 101
101; The Category  ID
4; The length of Category Name
雜項; The Category Name

Input: http://vps.memdb.com:8302/?page=productList&category=101&len=20&index=1
Explain: category is the category which gets from the above query, e.g. 101, 102 ...
len: the number of record to return, you can set to any number
index: the index value, for example, total is 25 records, index=1 will list 1-20, when index=21, will list  21-25

Output: 25;22301;4;雜項;16;無字藥袋 7CM*9CM;200;21901;4;雜項;27;EXTRA 益 達(蜜瓜)曬駱駝 20'S;10;21921;4;雜項;29;EXTRA 益達草本(草本精華) 20'S;14;
Explain:
First number is the total number of record, the above example is 25
First record is: 22301;4;雜項;16;無字藥袋 7CM*9CM;200;
22301;  The product ID, you can use http://vps.memdb.com:8302/?page=selectProduct&oid=22301 to view the product 
4; the length of cateogry name "雜項"
雜項; The category name
16; the length of product name
無字藥袋 7CM*9CM; product name, this example length is 16 (one chinese counts 2 length)
200; The quantity of the above product

用以上兩個設計好的Function Call, 可讓有興趣的夥伴寫些DEMO APP, 列出所有類別, 和很容易查看到產品有多少庫存, 如大家有興趣, 一起研究, 寫個APP來展示你的能力, 日後大家可以一起去接工程, 根據客戶要求開發不同的App應用系統吧!

2 則留言:

  1. 輸出的資料格式可以考慮用json包裝

    回覆刪除
  2. anjeng :
    輸出的資料格式可以考慮用json包裝

    可行... 但開始時用以上簡單的嘗試.

    回覆刪除