2016/03/07

證照的最大功能:快速得到一位專業的伯樂

我還在唸書時,被當時的職人證照化風氣影響,我也跟著跑去考了好多款證照。有資料庫的、程式語言的、作業系統的……還很驕傲的向家裡炫耀。

畢業後不久的某一天晚上,老媽問我一個簡單的Office問題,我竟然答不出來,不免老媽海念一頓,其中有句話是這麼說的:

2016/03/04

敏捷開發,你他媽雜碎


敏捷開發(scrum),在這名詞發明前,老早就已經被玩爛了,套一句電影的名言,他是這麼說的:



敏捷開發,你他媽雜碎!

在應用程式的開發過程中,常常遇到五花八門的問題,但歸究起來,顯示介面(User Interface UI)的呈現大概不會脫離以下幾種:

2016/02/29

Delphi ORM Generator

Can Delphi do it?  Photo source


What is your code pattern? Like below:

MyDataSet.FieldByName(‘MYFIELD’).AsString := something…;
MyDataSet.Fields[n].AsString := something…;


Why can not used ORM(Object-relational mapping) code in Delphi?
Ex:
Employee.EmpNo := 1;
Employee.Name := 'Eden';


Because TDataSet! It's always only one mapping method: FieldByName. You are always only to use:

  1. IDE design mode, drop down TDataSet...
  2. Open TFields box, append all fields...
  3. Type innumerable "FieldByName" and "Fields" in Editor...

That is not your best solution, ever!

You need "Strong Type"! It is like String, Integer, Double etc!

  Strong Type is...   Photo Source


So "Delphi ORM generator" application is born! as shown below:
Main page

The demo is used MyBase


How to connect?
“Delphi ORM generator” that uses ODBC, it can connection any database.

“With Table”
It can select multi items to build source unit in right memo. (Select only one Table in current version)

“With SQL” and “By MyBase”
It provides analysis SQL statement / MyBase data to build source unit (Only one table).

Why use “Delphi ORM generator”?

  • Elegant: You can call Code Insight when editor, this fast input and code is clear!
  • Correct: “Delphi ORM generator” out the code is hard-coded, so you can aware be wrong if typing a spelling errors in Design mode.
  • Efficient: Besides quickly type, your program can increase the performance of more than 53.73%

Delphi ORM generator have 3 Field mode selector:
  • TField
  • T*Field
  • Native Type

TField:

The mode is easy mapping about property to field, it's simple code like below:
  type T: class (T)
    Fid: TField;
   public
    property id: TField read Fid;

T*Field:

The mode is "Strong Field", like TStringField, TIntegerField, TFloatField etc. It's simple code like below:
  type T: class (T)
    Fid: TIntegerField;  
  public
    property id: TIntegerField read Fid;
Use be like:
  Emp: TEmpRow;
  Emp.Id.Value := 1; // The Value is Integer type, it's Strong Type! 

Native Type:

The mode is "Strong Type" and support "NULL" value, if field IS_NULLABLE is True in database table. It's simple code like below:
  type T: class (T)
    Fid: Integer; //Primary Key, IS_NULLABLE = False
     FName: TNullableString; // IS_NULLABLE = True
  public
    property id: Integer read getId write setId;
    property Name: TNullableString read getName write setName;


The mode, you could write code, like below:
var
  LEmpRow: TEmpRow;
  n: Integer;
  n_str: string;
begin
  ...
  LEmpRow := TEmpRow.Create(YourDataSet);
  // Control original DataSet methods.
   if LEmpRow.DataSet.Locate(EMP_ID, 100, []) then Break;
   LEmpRow.DataSet.RecNo := n;
  LEmpRow.DataSet.Append;

  // Control row field method.
  LEmpRow.Id := n; // Right
  LEmpRow.Id := n_str; // Compiler Error: The property is Integer!

  LEmpRow.Name := nil; // Can input nil!
  if LEmpRow.Name.HasValue then // Output need check NULL
    n_str := LEmpRow.Name.Value; // Get Value method.
  ...


You can download preview version: 7z Version!

or

Windows 10 Store: Delphi ORM Generator

Enjoy it!!!
====================================================

Delphi ORM Generator Windows Store App - 隱私權宣告

我們在何時收集什麼樣的信息?
當您使用應用程序時,我們並不會向您收集任何信息,如您的所在位置或IP資訊等。

我們為什麼要使用你的信息呢?
當您使用應用程序時,我們並不會向您收集任何信息,故並不會有出售、交換、轉移、或未經您的同意的行為。

我們如何保護您的信息?
當您進入或使用本軟體時,我們實行的各種保安措施,會維護您的個人信息安全。

我們使用cookies?
我們不使用cookies。

我們向外界透露任何信息嗎?
我們不會出售與交易或以其他方式轉讓您的個人身份信息。

您的同意
通過使用我們的應用程式,您同意我們應用程式的隱私政策。

我們的隱私政策的更改
如果我們決定改變我們的隱私政策,我們將在此頁面上更新這些變化。

聯繫我們
如果對本隱私政策有任何疑問,您可以使用文末的留言與我們連繫。

2016/02/25

Eden Wu

歡迎!

歡迎你來到我的部落格,我是【大匠之風】的作者:吳祐賓。

我是一名資料庫應用程式開發者(軟體工程師),有超過十年的程式開發經驗。

使用各式開發工具,為服務的公司打造出符合其需求的商業應用程式。


我喜歡在研究資料的同時也記錄並分享自己的研究成果,若我的文章能因此幫助到你,我會覺得非常地開心。

謝謝你來到我的部落格,也期待你能享受我的文章。

2016/02/23

Field common unit generator by Delphi

What is your code pattern? Like below:

MyDataSet.FieldByName(‘MyField’).AsString := something…;
MyDataSet.FieldByName(‘MYFIELD’).AsString := something…;
MyDataSet.FieldByName(‘myfield’).AsString := something…;

Like these codes in the maintenance often have lost a string or sensitive issues, so "Field common unit generator" application is born! as shown below:
Field common unit generator


How to connection?
“Field common unit generator” that uses ODBC, it cans connection any database.

“With Table”
It can select multi items to build source unit in right memo.

“With SQL” and “By MyBase”
It provides analysis SQL statement / MyBase data to build source unit (Only one table).

Why use “Field common unit generator”?

  • Elegant: You can call Code Insight when editor, this fast input and code is clear!
  • Correct: “Field common unit generator” out the code is hard-coded, so you can aware be wrong if typing a spelling errors in Design mode.
  • Efficient: Besides quickly type, if use DataSet.Fields in design, the program can increase the performance of more than 50%

Now, you could write code, like below:

ADataSet.FieldByName(TORDERColumns.EmpNo).AsString := something....;
or
ADataSet.Fields[TORDERIndex.EmpNo].AsString := something...;



You can download preview version: here!

2016/02/21

FireMonkey 學習日記05 -- 實現 Login 功能(下)

繼上回所做出來的結果:

結果輸入畫面會被虛擬鍵盤摭住,所以接下來就是參考【FireMonkey -- 實現 Login 功能(中) 】所提到的「KeyboardDemoForm」專案來解決這個問題


比較有意思的是,為了能方便在 Windows 下的 Debug,可以設定全域變數:

2016/02/20

FireMonkey 學習日記04 -- 實現 Login 功能(中)

原來官方的 Demo 裡有解決虛擬鍵盤擋住輸入元件的辦法

範例專案名是:KeyboardDemoForm

看了看原始碼,我認為是利用拉霸(Scroll Bar)來操作輸入欄位的處理