There are those time when users need to log into a particular application to gain access to it functions and corporate repositories. Each application is unique and has requirements which must be fulfilled before access can be granted.
On solution is to write a login procedure for every application you write. With this approach you will spend countless hours counter productively.
A universal user login is the answer to the problem. The following lists the requirements for the data model followed by the requirements for the user interface.
[codesyntax lang=”delphi”]
BCSUniLoginCmp1.RDBName := 'jei'; BCSUniLoginCmp1.RDBPwd := '********'; BCSUniLoginCmp1.RDBPort := '3306'; BCSUniLoginCmp1.RDBProvider := 'MySQL'; BCSUniLoginCmp1.RDBServer := 'localhost'; BCSUniLoginCmp1.RDBUserName := 'bcs'; BCSUniLoginCmp1.RDBTableName := 'ei_comp';
[/codesyntax]
[codesyntax lang=”php”]
BCSUniLoginCmp1.RPassword := 'pwd'; BCSUniLoginCmp1.Rbcs := 'uid';
[/codesyntax]
The data module elements are self explanatory. The user interface properties names the fields used to locate the user in the database.
This approach makes our component flexible enough to accommodate almost any user login requirement without coding another user login procedure.
The source code for this project is at Code Central http://cc.embarcadero.com/Item/29686.
Component documentation can be viewed by clicking the following link http://archbrooks.com//compdoc/BCSUniLogin/html/BCS%20Universal%20User%20Login.htm.
From the design of the component through the documentation and fielding of the component was three hours and thirty seconds.
Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.