顯示具有 自製小軟體 標籤的文章。 顯示所有文章
顯示具有 自製小軟體 標籤的文章。 顯示所有文章

2016/05/31

Delphi ORM 產生器 1.0.0.0 已在 Windows Store 上架!

Delphi 現在也可以做到 ORM 了! Photo source


您還在跟單引號與括弧對打嗎?

您的Pas裡早已充斥著這樣的程式碼:
DataSet.FieldByName('fieldname').AsString
DataSet.FindField('fieldname').AsString


又臭又長又噁心,又常常寫出在執行時期跳出「數值轉換失敗」的程式碼,您的開發效率就這樣打了折扣嗎?

老闆付您薪水卻產出這樣品質低劣的程式碼,不管是老闆或是您,在內心一定是充滿著悔恨吧!


還好,這並不是您的錯,千錯萬錯都是 Delphi 沒有滿足您的願望惹的禍!



更幸運的是,您現在看到了這篇。

為了讓您薪水領得安心,在這個星期,集合了傳說中 Delphi 社群的力量,終於將【Delphi ORM 產生器】完成!


千呼萬喚始出來,【Delphi ORM 產生器】終於完成!


它結合了【TField】,【T*Field】,【Native Type】三種模式,絕對可以滿足您多樣化的開發方式,而且,保留了最貼近 Delphi 原生 TDataSet 的程式寫法,又可以解決在編譯時期找出【型別錯誤】的長期 Delphi 之痛


【Delphi ORM 產生器】是彈性和實用兼具的好物,據統計,它至少可以節省 Delphi 開發人員 53% 以上的開發時間更可以提高程式正確率 92% 以上


更更更重要的,目前開放免費體驗中

【Delphi ORM 產生器】終於完成!

再寫下去就囉嗦了,想提高您在使用者心目中的地位嗎?那就快去下載使用吧!


2016/12/03 更新:

現在,Delphi ORM 產生器已在 Windows 商城上架!

軟體安全性更上一層樓,還沒體驗的 Delphier,趕快來體驗極速開發吧!


See also:

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/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!

2011/07/28

[自製小軟體]SQL Server Description Editor

English content:
[SSDE Privacy]
  1. The "Description" comment on Table or Field in SQL Server. 
  2. Can be exported into Excel file for easy editing, and import after the updated the Excel file.
  3. Native mode app. Performance is high. 

=============================

使用IDE: Delphi XE
本專案包含的範圍:
dbExpress, ODBC Open Source DBX Driver, DataSnap ( DataSetProvider + ClientDataSet )

功能特色:兩可一沒有
  • 可編輯欄位中的「描述」欄位
  • 可匯出成Excel檔,方便編輯,編輯完後亦可匯入更新
  • 不需額外安裝 .Net 即可使用,非常輕薄

系統需求:
  • MS SQL Server 7, 2000, 2005, 2008 或以上
  • Office 2000 以上版本
  
比較特別的地方:
Connection Mode:
有 OleDB 和 SQL Client 兩種連結方法,只是先後順序的差別,沒有 SQL Client 時仍會切回 OleDB 連結

Demo PIC:




Download Exe version
2012/11/17補充:
在進行改版的時候發現了底下幾篇 -

下次來用這些工具試試

===========================================

SQL Server Description Editor Windows Store App - 隱私權宣告

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

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

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

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

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

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

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

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

[自製小軟體]XLS to MS SQL Server

使用IDE: Delphi 7
本專案包含的範圍:
ADO ExpressMicrosoft Office XP Sample Automation Server Wrapper Components

功能特色:
1. 簡易的 Data Pump 功能,將 Excel file 匯入到 SQL Server 內
2. 不需額外安裝 .Net 即可使用,非常輕薄

系統需求:
MS SQL Server 7 以上
Office 2000 以上

Demo PIC:















Download