Recent

Author Topic: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?  (Read 28923 times)

tan

  • New Member
  • *
  • Posts: 33
The Subject might seem like I'm trolling or unnecessarily conflating two unrelated topics.
I'm not.

https://www.tiobe.com/tiobe-index/

Per the respected  TIOBE June 2018 index of programming language popularity, "DELPHI/OBJECT PASCAL” HAS PLUMMETED since 2017 from 13th to 19th position; that is a stunning fall.  Even allowing that Delphi has lost momentum, shouldn't FP/Lazarus have picked it up?  Concomitantly, SQL popularity has SOARED to 9th position.  Since SQL is bedrock to pretty much everything in real world programming and is putatively one of Lazarus's strengths, shouldn't that, also, highlight how great Lazarus is?

Take a moment to digest the report -- and think deeply about the implications.  Pascal is about to fall out of the top twenty ranking it has held for literally decades.  In case you aren't clear what losing top twenty ranking means, let me be stark: top 20 languages are considered serious development platforms and get a lot of individual press.  They tend to hold their popularity for a long time, as serious investment in time and dollars is at stake.  It will be dark news for FP to lose top twenty; Languages not in the top twenty are roughly lumped with COBOL, not often reported on in the press, and not taken very seriously by most companies.  And to fall from top twenty status -- hell, Delphi was top five I believe, not that far back.  Well, that is catastrophic.

How can that be and what, if anything, can be done about it?

Let me be clear and constructive:

First of all, I don't blame Lazarus; I think it is really Delphi that has lost momentum.  LAZARUS/FP IS A PHENOMENAL LANGUAGE/DEVELOPMENT ENVIRONMENT. REALLY, WITHOUT PEER -- AND WE OUGHT TO BE LEADING THE PARADE IN OUR STRONG AREA OF ENTERPRISE/DESKTOP APPLICATIONS.  We all know Lazarus's "unique selling proposition" and we know that with the possible exception of C#, there is no other candidate for RAD business / desktop application development where both GUI and SQL come together. We know the Laz programming team is awesome; that Laz is written is Laz says it all -- or should.

And when you talk cross-platform, C# doesn't make the cut, either; FP – Lazarus – stands alone.  Yes, there is always “Java”, but Java doesn't integrate GUI and has some other problems right now.
 
This should be – could be – the opportunity for Lazarus to really shine.

Why isn't that happening...yet?

Well, there is the issue of big corporate money.  I don't want to ignore that, but many of the top languages are now open source and they got to the top on merits and market alone.

I'm going to suggest we attempt to seize the day here.    And start by acknowledging a problem:

LAZARUS IS STILL MORE COMPLICATED THAN IT HAS TO BE FOR NEW USERS -- PARTICULARLY IN THE AREA OF BASIC DATABASE CONNECTIVITY.  The IDE can be overwhelming (I am still trying to make sense of all the ways I open a “new” program; I think this could be better organized and documented).

But I think, most of all, we are missing a huge opportunity with not showcasing and strengthening Lazarus's SQL connectivity.  Yeah, we have all those buttons in the IDE.  But have you ever tried to use them .. AS A NEW USER? There is no automatic connection and documentation on how to bridge that gap is poor to non-existent.

Here's how simple it is to get SQLite3 – THE #1 MOST USED DATABASE IN THE WORLD, by a wide margin -- working with Python:

>>> import sqlite3

Yeah, that's it.   Compare that to the hours and hours and hours a new user can waste trying to get ANYWHERE with Laz database programming. Our documentation could use a check up from the neck up, in general, but in the area of database connectivity, well ... let's be honest, Lazarus SUCKS big time.  For those of you who might disagree I suggest you find a smart newbie, but one who has limited or no experience with the “priesthood” of programming nonsense, and ask them to bring up Lazarus … and then SQL.  Under Windows, at least, Laz installs like magic.  But database connectivity is a serious embarrassment versus our prime competitor for new programmers: python.

Is this REALLY the best we can do? If so I suggest we give up and let Pascal die.  But if not – and I rather suspect not (actually, I'm 100% sure we can do much better) – let's make 2018 the year we finally fix Lazarus's non-competitive data-base connectivity issue and make headway on better documentation in general.  And then re-launch with our best foot forward.  Maybe develop an EdX course? 

Also, going after both MacOS and – especially-- Linux are other areas where we ought to step it up.  We aren't likely to catch up with Microsoft C# on Windows, but they are AWOL on both Mac and Linux.  That is where the future lies and we ought to step up our game: Linux, SQLite3, Lazarus...that would be a winning combination!

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #1 on: July 04, 2018, 03:00:12 am »
really? that is your major insite please make lazarus easier for sql databases? You compare a full blown visual designer that helps you visually place eachand every field in the expected position to what?
Code: Pascal  [Select][+][-]
  1. uses sqlite3;
  2.  
that's it? that is everything you need to do to use sqlite in fpc too. Well, you still need to know the internals of sqlite to use it and you need some short of cache for the data and a way to access them individually and some way to show them to the end user well all that is only around 60% of the process and..., I know! why don't you (who knows better) propose a better way of doing things and prove it is better with a prototype library that works with an actual sql database and not a toy base well lets keep it simple lets go with postrgresql it has enterprise power and its not very heavy on resource requirements.

Please go ahead I'm burning with anticipation for a brad new easier library that is both light on resources and as easy to change sql databases as the current is.
« Last Edit: July 04, 2018, 03:01:55 am by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

guest48180

  • Guest
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #2 on: July 04, 2018, 04:44:03 am »
I have to agree with tan regarding ease of use, good documentation to be able to use Lazarus to its fullest extent. I struggle here. Big time too! The docs are poor and hard as hell to follow.

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #3 on: July 04, 2018, 04:47:42 am »
LAZARUS IS STILL MORE COMPLICATED THAN IT HAS TO BE FOR NEW USERS -- PARTICULARLY IN THE AREA OF BASIC DATABASE CONNECTIVITY.

I'm not good in database programming. But SQL database connection in Lazarus isn't that hard.

https://www.youtube.com/watch?v=pq2oCiJePHo

I'm going to suggest we attempt to seize the day here.

I appreciate your attempt to make Lazarus/FPC better. But what we need now is not suggestions because lots of suggestions have been voiced. You can search the old posts and find a long lists of suggestions. What we are lacking now is manpower.

One of the serious problems for newbies is the documentation. The information is there but they're not well organized. If you're good in English please help us improve the wiki and documentation. My English is not good so I participate in this forum helping newbies.
« Last Edit: July 04, 2018, 04:50:02 am by Handoko »

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #4 on: July 04, 2018, 04:54:57 am »
I've not used sqlite outside Lazarus and Delphi.

The thing maybe is that in Delphi I just drop 2 components. Connection and Query.

In Lazarus I need to drop one more. But that's it! Once you remember the order of connecting them it just works.

Maybe adding something like a single multi purpose component for newbies will be good.  :). Something like sqlite connquery  :P

GAN

  • Sr. Member
  • ****
  • Posts: 370
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #5 on: July 04, 2018, 05:34:40 am »
A sqlite3 database can be connected only by a few clicks without writing a single line of code. Is that hard?

You have to study, read and practice.

For a couple of months I read too many "suggestions " and comparisons with other languages by new users.

The developers of Lazarus, Free Pascal and many components, do a great job and many of them even participate in this forum. Too much.

Bye.
Lazarus 2.0.8 FPC 3.0.4 Linux Mint Mate 19.3
Zeos 7̶.̶2̶.̶6̶ 7.1.3a-stable - Sqlite 3.32.3 - LazReport

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #6 on: July 04, 2018, 05:49:43 am »
if there are specific problems we can address fill free to post them here if there are specific irritation you would like to see enhanced please do post them as well.
If there are features you'd like to see implemented also post them here.

Saying that accessing sql data is too complicated shows 2 things 1) you are not whiling to learn and 2) you are not experienced enough on the subject to make any kind of suggestion.
Even if I posted a detailed answer providing complete information the OP would simple discard it as not python compatible or in line with his experience or what ever rule of thumb used to make the above statement.

Finally if you can not be bothered to find out which parts of the library/design are hard for you to understand and ask for help why should I bother to rewrite the existing information in any way? It is more probable to ignore or not understand any new documents as well, after all the new document will probably fail to address your points of friction that need to be smoothed out too.

Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #7 on: July 04, 2018, 06:07:00 am »
Per the respected  TIOBE June 2018 index of programming language popularity, "DELPHI/OBJECT PASCAL” HAS PLUMMETED since 2017 from 13th to 19th position; that is a stunning fall.  Even allowing that Delphi has lost momentum, shouldn't FP/Lazarus have picked it up?
If TIOBE is your source of truth for popularity, then as I said in another thread, spam its sources (typically generic programming forum like stackoverflow) with (Object) Pascal/Lazarus/Delphi/Free Pascal questions. Understanding their method is the way to get on top of their list. Delphi Tokyo 10.2 introduced numerous features so people were talking about it and that boosted its popularity for a couple of months. No news since then, hence the position drop because people are no longer talking about it.
Concomitantly, SQL popularity has SOARED to 9th position.  Since SQL is bedrock to pretty much everything in real world programming and is putatively one of Lazarus's strengths, shouldn't that, also, highlight how great Lazarus is?
Did you read:
"IMPORTANT NOTE. SQL has been added again to the TIOBE index since February 2018. The reason for this is that SQL appears to be Turing complete. As a consequence, there is no recent history for the language and thus it might seem the SQL language is rising very fast. This is not the case."
Previously, SQL was out of the list and their engine searches only specific procedural extension to SQL that's turing complete, such as Transact SQL. Given the availability of SQL implementations, how do you think a plain query "SQL" would return when searching globally across the net?

Windsurfer

  • Sr. Member
  • ****
  • Posts: 368
    • Windsurfer
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #8 on: July 04, 2018, 07:52:06 am »
I used to love Delphi for any kind of DB. Not having used a DB for about 15 years, I have been trying for several days to make SQLite3 work.

On a clean fixes install, the IDE can't compile the SQLite3 package without crashing. I run linux Mint 18.3 64 bit, with all the libs that I can find installed. I have read all sorts of threads saying compile the package separately, drop the files in your project folder, place code in your form.create event, etc, etc.

I am inclined to believe SQLite works, but if a current expert could write a wiki tutorial that works, or tell me how to make it work, I would gladly document it.

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #9 on: July 04, 2018, 08:21:12 am »
There is a reported bug: sqlite3 must be installed *before* you install the component or build lazarus with the component. The package tries to load sqlite3 at design time and that breaks everything when sqlite3 is not installed. I am still wondering why that is not fixed. If you use sqldb instead (with sqlite3 back-end) that problem does not exist, because that behaves properly.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #10 on: July 04, 2018, 08:24:26 am »
I used to love Delphi for any kind of DB. Not having used a DB for about 15 years, I have been trying for several days to make SQLite3 work.

On a clean fixes install, the IDE can't compile the SQLite3 package without crashing. I run linux Mint 18.3 64 bit, with all the libs that I can find installed. I have read all sorts of threads saying compile the package separately, drop the files in your project folder, place code in your form.create event, etc, etc.

I am inclined to believe SQLite works, but if a current expert could write a wiki tutorial that works, or tell me how to make it work, I would gladly document it.
You are on linux you should be able to identify and ignore non linux advice like drop library files in folders, it does not work on linux by design, focus on linux specific advice. For starters post a complete description  of
1) what is installed on your system and where/how it got installed. This must be separated in to two main groups, system libraries and lazarus packages.
2) what are the steps that produce the problem and what is the error code and message you get.
Please be as detailed as possible and keep in mind that there are at least 2 packages for sqlite (as far as I remember I never used them outside a lab setup/test on windows) if nothing works then you might setup a private remote desktop connection with any one that could take a closer look on your installation.

Keep in mind that linux needs attention in order to support 32bit and 64bit application on the same installation it might be that something is not setup correctly on that front also.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Windsurfer

  • Sr. Member
  • ****
  • Posts: 368
    • Windsurfer
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #11 on: July 04, 2018, 09:02:52 am »
Thanks Thaddy,

I use fpcupdeluxe for my installations. All was perfect until I started trying to use SQLite, SQLite3 and Zeos. I solved the missing zcomponent problem with Zeos. That is now OK.

Unfortunately I lack your insight and knowledge.

After much trial and error, SQLite3 loads and compiles, but the IDE then crashes as per the attachment.


bee

  • Sr. Member
  • ****
  • Posts: 393
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #12 on: July 04, 2018, 09:52:59 am »
Working with Lazarus, like any other open source projects as well, is not easy but it's not hard either. You just need to know where to get the correct and updated informations, to make sure you know what you're about going to do. And those valuable informations are scattered all over the internet (wikis, blogs, forums, mailing list archives, stackoverflow, etc).

I've been using Lazarus to make DB apps for years, both desktop and web apps, mainly using sqlDB (FPC database general connector). I use it to connect to various kinds of databases, such as sqlite, mySQL, Firebird, even Oracle. And it went mostly fine. Well, of course there are some glitches and rough edges around the corners, but eventually it can be solved or worked-around. Once you know how to do it, it's actually not that hard.

I have never used fpcupdeluxe. My installation procedure is quite simple actually. Just download all of the required packages from SourceForge. Then I install fpc-source, fpc-binary, then lazarus-binary, in that order. If the installer is complaining that it requires something else to be installed too, then simply install whatever it needs. Repeat them until all packages are installed correctly.

Sometimes the struggle isn't really about how to do it, but how to get the correct informations of how to do it correctly. If you somehow are unable to find that information, then you need to do your own experiment to find the way yourself. That's the fun of programming and open source. In my local language, we call it "ngoprek".

You should consider the last resort before you decide to give up… try CodeTyphon (CT). Personally, I disagree with the way the author of CT build CT. That's why I refuse to use it. But I heard it helps newbies installing FPC and Lazarus without too much of struggle and burden. So, it might help you, too.

Good luck and happy coding! :)
-Bee-

A long time pascal lover.

MichaelBM

  • New Member
  • *
  • Posts: 38
Development Tool: Lazarus 2.0.6 + FPC 3.0.4
Database: Firebird 2.5.7
Operating System: Windows 10 Pro 64-bit

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Is Lazarus Dying, in part, for Lack of Easy SQL Connectivity?
« Reply #14 on: July 04, 2018, 10:10:54 am »
After much trial and error, SQLite3 loads and compiles, but the IDE then crashes as per the attachment.
The attachement doesn't seem to reflect your explanation. It doesn't crash, but failed when linking. Without you copying the entire error message, I can only guess that you miss -dev package for SQLite3 (Debian derivatives legacy sin, but may be good to save some space). Or any other library, just find out what the compiler (or linker) says about cannot find blablabla.

 

TinyPortal © 2005-2018