Recommendations on web based database application lazarus / 16-Databases ---------------------------------------------------------------------- Robert.Thompson · 2018-11-18 19:12 Hello: I would like to create a simple front-end to a cloud-based database (MySQL/Maria ?) web application using Lazarus. There will not be many tables (20), nor will there be many records in each table. (1000 max) There will only be 7 users and only one user will have the ability to add or change data. My question is: Which Lazarus database components would be the easiest to use to accomplish this, or, would I be better off using some non- free components? If so, which ones do you recommend? Thanks, Rob. Lazarus:  1.8.4  2018-11-17 FPC:   3.0.4       x86_64-linux-gtk2 System:   Host: rob-R580-R590 Kernel: 4.15.0-39-generic x86_64 bits: 64 gcc: 7.3.0               Desktop: Cinnamon 3.8.9 (Gtk 2.24.32) dm: lightdm Distro: Linux Mint 19 Tara Machine:   Device: laptop System: SAMSUNG product: R580/R590  Chassis: type: 9                  BIOS: Phoenix v: 11JB.M044.20100622.hkk date: 06/22/2010 CPU:       Dual core Intel Core i5 M 460 (-MT-MCP-) arch: Nehalem rev.5 cache: 3072 KB Graphics Card: NVIDIA GT218M [GeForce 310M] bus-ID: 02:00.0 chip-ID: 10de:0a75 ---------------------------------------------------------------------- lucamar · 2018-11-18 22:32 Quote from: Robert.Thompson on November 18, 2018, 08:12:59 pmI would like to create a simple front-end to a cloud-based database (MySQL/Maria ?) web application using Lazarus. [. . .] My question is: Which Lazarus database components would be the easiest to use to accomplish this, or, would I be better off using some non- free components? If so, which ones do you recommend? That depends on whether you mean a database front-end, i.e. your application accesses directly a remote database; or a web-application front-end, i.e. your application accesses a web service which in turn acceses the database and returns the results to you. In the first case, you may start reading from the wiki portal: Databases or the article Databases, and following the links that may interest you (like p.e. MySQL and MariaDB Databases). In the second case the starting point can be the Web Development portal, which links to p.e. the Web Service Toolkit, among others. Whichever you meant, there are enough built-in and/or free source third-party solutions so as to render unnecessary to seek non-free ones. Good luck! ---------------------------------------------------------------------- Robert.Thompson · 2018-11-19 02:58 Thanks lucamar. It would be "a web-application front-end." I have a book that speaks about the "Brook Framework" and that is what I will try to install. Rob. ---------------------------------------------------------------------- asdf121 · 2018-11-19 07:17 I would recommend Synopse mORMot Framework. Very well documented and should fulfill all your needs. ---------------------------------------------------------------------- Renat.Su · 2018-11-19 10:31 For example, BrookFramework, Mormot, TNs_HTTPRestFramework. I used BrookFramework. There is a fast object persistence plugin (dopf) for database isolation (You can select MySQL, SQLite, postgreSQL etc). With so little data and that access to edit will be only one user I would recommend using SQLite as an DB engine ---------------------------------------------------------------------- Leledumbo · 2018-11-22 04:28 Quote from: Robert.Thompson on November 18, 2018, 08:12:59 pmMy question is: Which Lazarus database components would be the easiest to use to accomplish this, or, would I be better off using some non-free components? If so, which ones do you recommend? Handcoded SQLdb is enough. If you want to use proprietary ORM, EntityDAC looks good to me from browsing the documentation. It's quite unclear whether it supports Lazarus or not, but the whole devart's DAC page has Lazarus in the title. ---------------------------------------------------------------------- Robert.Thompson · 2018-11-23 17:30 Thanks, Leledumbo. Is there a tutorial available that will show me how to accomplish what I want to do by 'handcoding'? I would like to give that a try. Rob. ---------------------------------------------------------------------- Leledumbo · 2018-11-27 19:57 Quote from: Robert.Thompson on November 23, 2018, 06:30:37 pmThanks, Leledumbo. Is there a tutorial available that will show me how to accomplish what I want to do by 'handcoding'? I would like to give that a try. Rob. Assuming you have understood how the components connected to each other (mainly TSQLTransaction, TSQLQuery and a TSQLConnection of your choice) using drag n drop, just create the instances and assign the properties manually. I'm not aware of any tutorial, but here's a concise example: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses  db, sqldb, mysql56conn;var  Conn: TSQLConnector;  Query: TSQLQuery;  F: TField;begin  Conn := TSQLConnector.Create(nil);  with Conn do begin  ConnectorType := 'mysql 5.6';    HostName := 'localhost';    DatabaseName := 'information_schema';    UserName := '';    Password := '';    Transaction := TSQLTransaction.Create(Conn);  end;   Query := TSQLQuery.Create(nil);  Query.DataBase := Conn;   Query.SQL.Text := 'select * from tables';  Query.Open;  while not Query.EOF do begin    for F in Query.Fields do begin      Write(F.FieldName,' = ');      if F.IsNull then WriteLn('NULL') else WriteLn(F.Value);    end;    WriteLn;    Query.Next;  end;  Query.Close;  Query.Free;  Conn.Free;end. ---------------------------------------------------------------------- lucamar · 2018-11-27 22:11 Quote from: Robert.Thompson on November 23, 2018, 06:30:37 pmIs there a tutorial available that will show me how to accomplish what I want to do by 'handcoding'? I would like to give that a try. About SQLdb? In the wiki: SqlDB How toSQLdb TutorialSQLdb Programming Referenceamong others. ---------------------------------------------------------------------- Robert.Thompson · 2018-11-29 17:46 Thanks Leledumbo & lucamar. I'm off to give it a try. Rob. ---------------------------------------------------------------------- mangakissa · 2018-11-30 07:47 QuoteI would like to create a simple front-end to a cloud-based database (MySQL/Maria ?) web application using Lazarus.If it was simple, everyone is doing it. Using cloud-base database has two way's: - Building a server site application for connecting the database and his queries. - Building a client site that commucates with the serversite. That's why tools like mORMot and TIOPF are recommended. Brooks framework is a serverside tool that runs in a browser. You build and compile an application in lazarus and run it on your webserver.