Recent

Author Topic: Free Pascal Database Server-Client Examples  (Read 7446 times)

DeBritto

  • Jr. Member
  • **
  • Posts: 68
Free Pascal Database Server-Client Examples
« on: June 08, 2016, 06:43:45 pm »
Hi Everyone,

I'm looking for a Free Pascal/Lazarus source code that could teach me how to deal with database transactions/commits/selects/inserts/updates/deletes in a client-server structure. I know that we have some samples included in Lazarus IDE but I need something more "real world"application.

Please, could anyone tell where I can find it?

I'm trying to figure it out how to do it but it's not easy to follow the explanations I've found at Lazarus Wiki.

Best regards


Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Free Pascal Database Server-Client Examples
« Reply #2 on: June 09, 2016, 01:00:31 am »
Take a look at the tiOPF (Object Persistence Framework) - I've used it for the last 15 years in production code, and allows for Client/Server or 3-tier development, without changing a single line of code [when switching between the two]. tiOPF also manages the Create/Read/Update/Delete with Transactions for you. It also includes an [option] Model-GUI-Mediator implementation (similar idea to MVC or MVP), which allows you to hook up your business objects with GUI widgets - it makes standard GUI widgets (eg: TEdit, TComboBox, TStringGrid etc) "object-aware" and does two-way synchronisation (change the Object and the UI gets updated automatically - and vice versa). It also supports multiple DB components (SqlDB, Zeos, DOA, ADO, IBX etc) and multiple databases (Firebird, NexusDB, MySQL, Oracle, MS SQL Server etc) and even text file storage (XML). Switching between these is simply a change in a compiler define, and a recompile of your project.

There are tons of documentation, years of knowledge and FAQs in the non-expiring NNTP support newsgroup and stacks of examples (demos and real-world apps). Over 1700+ unit tests are run ever 2 hours 24/7 to makes sure the framework is always in a stable state.

tiOPF:  http://www.tiopf.com
Lazarus+tiOPF wiki page:  http://wiki.freepascal.org/tiOPF
tiOPF SourceForge project:  https://sourceforge.net/projects/tiopf/

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

nullpointer

  • New Member
  • *
  • Posts: 40
  • impossible is nothing
    • tauhidslab
Re: Free Pascal Database Server-Client Examples
« Reply #3 on: June 15, 2025, 02:51:55 am »
Currently, most of the ways to create a communication process between client and server applications are via http requests. You just need to learn how to send and receive data from the protocol. Of course, Lazarus and Free Pascal have supported all of them.

However, if you need a ready-made component, you can study the Laz-N-Tier / DBNetAdapter / DBNetProcessor component developed by yangjixian (https://sourceforge.net/projects/laz-n-tier/). However, there are some lines of code that are outdated. I have adjusted it so that it can run well on Lazarus 4.0 + FPC 3.2.2

Please see: https://github.com/tauhidcp/dbnetadapter

or

Example GUI Based Lazarus Free Pascal Database Client Server Application (HTTP Request) :

https://github.com/tauhidcp/free-pascal-database-client-server-app

« Last Edit: June 30, 2025, 06:35:37 am by nullpointer »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8819
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Free Pascal Database Server-Client Examples
« Reply #4 on: June 16, 2025, 04:52:47 pm »
I'm looking for a Free Pascal/Lazarus source code that could teach me how to deal with database transactions/commits/selects/inserts/updates/deletes in a client-server structure. I know that we have some samples included in Lazarus IDE but I need something more "real world"application.
The examples are real world, desktop database apps really are coded that way. The desktop app is the client, the dbms is the server. It can even be leveraged to cross the internet using HTTP tunnels, but the safe methods these days require you to understand HTTP and make wrapper APIs instead. But that doesn't change the communication to database, it simply adds a HTTP layer to transmit the data.

 

TinyPortal © 2005-2018