Sign in Join
Wiki copytemporary

tiOPF: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11### About
22
33The [TechInsite Object Persistence Framework](http://tiopf.sourceforge.net) (tiOPF) is an Open Source framework of Delphi/Object Pascal code that simplifies the mapping of an object oriented business model into a relational database. The framework is mature and robust. It has been in use on production sites since 1999. It is free, open source, and available for immediate download with full source code.
44
55Some of the key features of the tiOPF include:
66
77- Lets you build an object oriented application that can swap databases with the flick of a switch like a command line parameter or a change of a compiler directive. Currently there are persistence layers for:
88 - Interbase via IBX
99 - Oracle via DOA
1010 - MySQL via [[Zeos tutorial|Zeos]]
1111 - MySQL via [[SQLdb Package|SqlDB]]
1212 - XML via MSDOM
1313 - XML via XMLLite
1414 - Paradox via BDE
1515 - MS Access via ADO
1616 - MS SQL Server via ADO
1717 - MS SQL Server via SqlDB
1818 - Firebird via FBLib
1919 - Firebird via SqlDB
2020 - Firebird via Zeos
2121 - PostgreSQL via SqlDB
2222 - HTTP Remote Persistence (for n-tier applications with built-in generic application server)
2323 - Text files (CSV and TAB files)
2424- Family of abstract base classes for building a complex object model
2525- 27 Persistent Object-aware components for building complex GUIs (Delphi only).
2626- Model-GUI-Mediators implementation for enabling any standard GUI component to become Object-aware. MGM currently has mediators defined for: VCL, LCL and [[fpGUI|fpGUI Toolkit]].
2727- 1600+ DUnit2/[[FPTest]] tests to guarantee stability
2828- 160+ pages of documentation to get you started
2929- News groups for support
3030- Automated, daily builds and unit testing. This is done under Linux and Windows and uses FPC & Delphi compilers.
3131- Lots of demos focusing on specific parts of the framework for easy learning.
3232- Cross platform. Currently tested on Windows, Linux and FreeBSD (32 & 64-bit).
3333
3434### Authors
3535
3636Peter Hinrichsen - Original Developer.\
3737Graeme Geldenhuys - Ported to Free Pascal and current maintainer.
3838
3939### License
4040
4141tiOPF uses a dual license. Developers can use the [Mozilla Public License 1.1](http://opensource.org/licenses/mozilla1.1.php) or the Modified LGPL license (as used by libraries of FPC and Lazarus).
4242
4343### Support
4444
4545The best way to get support is by signing up to tiopf.support news group — see here: <http://tiopf.sourceforge.net/Support.shtml>
4646
4747### Download
4848
4949For some years now, the tiOPF project does not make official release downloads. The tiOPF projects works on a similar principal to a "rolling release". Thus if you want the latest version with the latest features and fixes, you must get the source code from the Git code repository.
5050
5151You can use the following commands to check out the source:
5252
53-`git clone git://tiopf.git.sourceforge.net/gitroot/tiopf/tiopf`
53+```text
54+git clone git://tiopf.git.sourceforge.net/gitroot/tiopf/tiopf
55+```
5456
5557You will now have a 'tiopf' directory containing the tiOPF repository. By default Git will also have checked out the 'master' branch for you. The tiOPF project doesn't use the 'master' branch for development, so switch to the 'tiopf2' branch as follows:
5658
57-` git branch tiopf2 origin/tiopf2                (1)`\
58-` git checkout tiopf2                            (2)`
59+```text
60+ git branch tiopf2 origin/tiopf2 (1)
61+ git checkout tiopf2 (2)
62+```
5963
60641. Creates a local branch named 'tiopf2', which points to the remote tiopf2 branch.
61652. Switch to your local 'tiopf2' branch.
6266
6367Another simpler way of doing this is:
6468
65-`git clone --branch=tiopf2 git://tiopf.git.sourceforge.net/gitroot/tiopf/tiopf`
69+```text
70+git clone --branch=tiopf2 git://tiopf.git.sourceforge.net/gitroot/tiopf/tiopf
71+```
6672
6773You will now have a 'tiopf' directory containing the tiOPF repository.
6874
6975> **Note:** When working with Free Pascal and tiOPF, the only supported compiler is the latest released FPC (and the related fixes branch), and the 'tiopf2' branch of tiOPF.
7076
7177For a short introduction to using Git, you can refer to a message posted in the tiopf.development newsgroup. [tiopf.development;article=3272](http://geldenhuys.co.uk/webnews/webnews.cgi?user=anonymous;group=tiopf.development;article=3272). For very good and detailed documentation on Git, we highly recommend you browse through the official Git documentation as well, located here: [<http://git-scm.com/documentation>](http://git-scm.com/documentation)
7278
7379### Dependencies / System Requirements
7480
7581- Compiler: FPC 2.6.4. The latest released FPC version.
7682- Components for your required persistence layer, if it is not included with the compiler.
7783
7884**Status**: Stable (tested on Windows, Linux and FreeBSD)
7985
8086**Issues**: None
8187
8288### Installation
8389
8490#### The Packages
8591
8692Inside the \<tiopf\>\Compilers\FPC directory there are four packages.
8793
8894tiOPF.lpk
8995Core units (run-time only package)
9096
9197tiOPFGUI.lpk
9298GUI related units and tiOPF+LCL custom components \[**deprecated**\] (run-time only package).
9399
94100tiOPFGUIDsgn.lpk
95101Registers/Installs the tiOPF+LCL custom components into the Lazarus component palette (design-time only package). The tiOPF+LCL custom GUI components used under Lazarus are unmaintained and **deprecated**. It is preferred to use the Model-GUI-Mediator components instead. See tiOPFLCL.lpk package instead.
96102
97103tiOPFLCL.lpk
98104GUI related units which replaces tiOPFGUI.lpk and does not contain any of the tiOPF custom GUI components. This packages uses the Mediators which makes standard LCL components "object-aware" and is the preferred way of hooking up your UI to you business objects. (run-time only package)
99105
100106tiOPFHelpIntegration.lpk
101107Integrates the fpdoc generated help files into Lazarus's help system (design-time only package)
102108
103109#### The Setup
104110
105111- Open Lazarus IDE
106112- Open the package *tiOPF.lpk* with 'Package -\> Open Package File (.lpk)' located in the \<tiopf\>\Compilers\FPC\\ directory.
107113- Click on Compile
108114- Open the *tiOPFLCL.lpk* package and click Compile
109115
110116Optional
111117
112118- Open the *tiOPFHelpIntegration.lpk* package and click Compile and the Install (Lazarus should rebuild and restart).
113119
114120NOTE \#1\
115121The SqlDB+Firebird database components are set as the default persistence layer for Free Pascal in the tiOPF.lpk package. This was simply done because SqlDB in included with the Free Pascal Compiler, and Firebird is a popular database option. If you don't need this persistence layer you can simply disable it as described below.
116122
117123Persistence layers are controlled by a Compiler Directive under *Compiler Options* -\> *Other* -\> *Custom Options*. eg: The LINK_FBL directive relates to the FBLib components. The LINK_SQLDB_IB directive relates to the SqlDB (Interbase/Firebird) components. For all the available options see the end of the *tiOPFManager.pas* unit.
118124
119125NOTE \#2\
120126For the Integrated Help to work, Lazarus needs to know how to find the html help files. Please read the *tiOPFHelpIntegration.txt* file located in \<tiopf\>\Compilers\FPC\\ for further instructions.
121127
122128### Usage
123129
124130In Lazarus, open your project and add tiOPF as a Required Package *(Project -\> Project Inspector -\> Add)*. Include *tiObject* in your uses clause. You are now ready to create objects descending from TtiObject or TtiObjectList.
125131
126132See the example projects in the Demos directory for additional examples.
127133
128134### Links
129135
130136tiOPF home page: <http://tiopf.sourceforge.net/>
131137
132138#### Basics about tiOPF and Design Patterns
133139
134140For people who are searching basics about tiOPF or Design Patterns, there are a couple of published articles at (http://geldenhuys.co.uk/articles/)
135141
136142Written by Graeme Geldenhuys
137143
1381442008-08
139145Simple Factory Pattern (download pdf) \[150KB\]
140146
1411472008-09
142148Model-GUI-Mediator (download pdf - 251KB) & (source code - 9KB)
143149
1441502008-11
145151Iterator Pattern (download pdf - 147KB) & (source code - 4KB)
146152
1471532009-01
148154The Adapter Pattern (download pdf) \[237KB\]
149155
1501562009-02
151157Intro to Git - source code management (download pdf) \[257KB\]
152158
1531592009-03
154160The State Pattern (download pdf) \[217KB\]
155161
1561622009-07
157163Relationship Manager (download pdf) \[375KB\]
158164
1591652009-09
160166Hierarchies in SQL - Nested Sets (download pdf) \[163KB\]
161167
1621682011-12
163169The Facade Design Pattern (download pdf) \[297KB\]
164170
165171---
166172*From the Free Pascal wiki, page "tiOPF", as it stood on 2017-10-23 after a change by Zoran, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
167173Category: Databases
168174Category: Framework

Back to history