Recent

Author Topic: Modern UI in Lazarus  (Read 191786 times)

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Modern UI in Lazarus
« Reply #75 on: April 24, 2017, 11:44:58 am »
I would like to see a UI framework which can be used in web apps and native desktop apps.
Yes, it existed since 1995.... Java Applets! The true "compile once, run everywhere" solution. Also Java applications can be written to run as a desktop application and as a Applet - without difficulty.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: Modern UI in Lazarus
« Reply #76 on: April 24, 2017, 01:08:10 pm »
Yes, it existed since 1995.... Java Applets! The true "compile once, run everywhere" solution. Also Java applications can be written to run as a desktop application and as a Applet - without difficulty.

Graeme  %),

that's not what i wanted to hear.   >:(
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Modern UI in Lazarus
« Reply #77 on: April 24, 2017, 02:58:07 pm »
At least with HTML you can simulate any skin you want. Then code "native" at the server of your choice. Run anywhere. For desktops apps pack the html in Electron and run Win, Mac, Linux.

Metro UI (Windows 10)
https://metroui.org.ua/inputs.html

Material Design (Android)
https://getmdl.io/components/#textfields-section

Mac OS X Lion (This is really awesome)
http://www.alessioatzeni.com/mac-osx-lion-css3/

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Modern UI in Lazarus
« Reply #78 on: April 24, 2017, 05:27:13 pm »
that's not what i wanted to hear.   >:(
:)  The more I use Java the more I get impressed. Just the other day I reused *.class files (I didn't have the source) in a new program. Those class files dated back to  2005. I didn't think they were going to work with my new code from 2017 - yet they worked without problems. Talk about backwards compatibility!! Plus the debugging is brilliant, IDE's are fantastic, just about anything you can think of that you want to write (libraries and such) - more than likely somebody has already done that in Java. The Java ecosystem is massive. Slowly but surely Java is becoming my new favourite development environment. Saying that, I'll definitely not say goodbye to Object Pascal any time soon - I have too many existing applications implemented in it and that I use and maintain daily.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Modern UI in Lazarus
« Reply #79 on: April 24, 2017, 06:58:15 pm »
The core problem with such reasoning is that to become popular you have to do more than getting on par with other offerings at a later time. Even then, the other offerings will be still be from more popular parties, there will be more stuff to find etc etc.

That is of course assuming you will get on par the first time (we are still working on Delphi compatibility, 20 years after it was decided to pursue it)

I think any big effort should be focussed on people who actually use Lazarus, rather than gunning for big external hordes that never come.

+1

Maybe time has arrived to FPC and Lazarus stop pursuing Delphi compatibility and start making its own path.

Other open source projects have done that before and succeeded, such as Firebird from Interbase, MariaDB from MySQL, LibreOffice from OpenOffice, etc.

I have nothing against implementing in FPC and Lazarus good features from other programming languages and IDEs, including Delphi. Almost all programming languages and IDEs do that.

FPC and Lazarus are already a better solution than Delphi. I know many people and companies here in Brazil that are migrating from old and new versions of Delphi, Clipper, Visual Basic and Visual Fox Pro to Lazarus. In the same way, I hardly hear about people leaving Lazarus in favor of Idera Embarcadero Delphi or Microsoft Visual Studio.

There is no silver bullet, but Lazarus sure is an excellent solution for many needs of many people and many companies.

I still miss FPC and Lazarus being more taught in technical schools, colleges and universities. Mostly, IT students here in Brazil learn Java, C/C++/C# and PHP, not Pascal.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Modern UI in Lazarus
« Reply #80 on: April 24, 2017, 07:06:23 pm »
I personally will not do nothing since:
- For complex UI I use HTML.
- For any 'old looking' software native look is almost right.

At least with HTML you can simulate any skin you want. Then code "native" at the server of your choice. Run anywhere. For desktops apps pack the html in Electron and run Win, Mac, Linux.

Did you mean solutions such as AVG Anti Virus 2017 using chromiumembedded, AngularJS and jQuery?

I have attached an image showing that information.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11446
  • FPC developer.
Re: Modern UI in Lazarus
« Reply #81 on: April 24, 2017, 07:16:20 pm »
I think that real cross platform solutions are difficult to achieve with native controls, especially for complex desktop applications.
+1
Just see all the inconsistencies in LCL, and also the reason why there is a "Restricted" tab in the Object Inspector of Lazarus IDE. MSEgui and fpGUI don't have such restrictions or inconsistencies across platforms.

Similarly, most owner drawn efforts are only a weak copy of the native look and feel of native widgets. Sometimes they manage to keep up for a short while, but in the mid-long term, atrophy sets in.

wp

  • Hero Member
  • *****
  • Posts: 11912
Re: Modern UI in Lazarus
« Reply #82 on: April 24, 2017, 07:26:22 pm »
Sometimes they manage to keep up for a short while, but in the mid-long term, atrophy sets in.
+1

And sometimes I think if all the efforts put into the latest glitter of user interfaces would be put into the quality of the programs we would be amazed how fast, reliable and secure software can be.

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Modern UI in Lazarus
« Reply #83 on: April 24, 2017, 07:37:02 pm »
Similarly, most owner drawn efforts are only a weak copy of the native look and feel of native widgets. Sometimes they manage to keep up for a short while, but in the mid-long term, atrophy sets in.
You are living in some dream world it seems. Lets agree to disagree. Lazarus can't keep up either. Always behind VCL or FMX. Lazarus can't even keep up with its own lcl-xxx widgetsets (my comment about inconsistencies).

As for custom controls (as seen for VCL, LCL, fpGUI, MSEgui, .NET etc).... There is a reason companies like TMS, Raize and the hunderds or thousands of other ISV's are still in business - developing better controls than what Microsoft, Embarcadero and the like could come up with. Even Delphi/CodeGear/Embarcadero conceded that fact by opting to use Virtual Treeview in the IDE instead of the default TTreeview or TListView. Hell, closer to home (Lazarus IDE) also uses custom controls to overcome the limitations of the native controls.

I believe you are (or were) actively working with Delphi in your day job. How many commercial Delphi programs do you know that use the standard TDBGrid component - instead of what TMS and others have to offer. In my 10+ of working with Delphi (I don't any more), every Delphi project I worked on used 3rd party custom controls for Grids, Listviews, Treeviews etc. More often than not.
« Last Edit: April 24, 2017, 07:38:56 pm by Graeme »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11446
  • FPC developer.
Re: Modern UI in Lazarus
« Reply #84 on: April 24, 2017, 07:47:50 pm »
Similarly, most owner drawn efforts are only a weak copy of the native look and feel of native widgets. Sometimes they manage to keep up for a short while, but in the mid-long term, atrophy sets in.
You are living in some dream world it seems. Lets agree to disagree. Lazarus can't keep up either. Always behind VCL or FMX. Lazarus can't even keep up with its own lcl-xxx widgetsets (my comment about inconsistencies).

True, but that is not due LCL's choices. Are MSIDE and fpgui really that much better? IMHO not, not even close.

So it is not a question of direction, but rather manpower

« Last Edit: April 24, 2017, 09:56:44 pm by marcov »

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: Modern UI in Lazarus
« Reply #85 on: April 24, 2017, 08:26:01 pm »
And sometimes I think if all the efforts put into the latest glitter of user interfaces would be put into the quality of the programs we would be amazed how fast, reliable and secure software can be.

You are right and that's why we need a modern UI framework which helps to make the data/business model more independant from the UI. While the UI still is very customizable (by user and developer) and looks the same on every system.
I often spend more time on UI parts to realize the look and feel i want to have. I do not want to make compromises on the way my program looks and behaves.
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Modern UI in Lazarus
« Reply #86 on: April 24, 2017, 11:04:19 pm »
You are right and that's why we need a modern UI framework which helps to make the data/business model more independent from the UI. While the UI still is very customizable (by user and developer) and looks the same on every system.
And I've implemented both of those solutions already. Here are the short answers for both the above statements. Then I'll follow on with the detailed answers.

  • Use tiOPF (Techinsite Object Persistence Framework) with MGM (Model-GUI-Mediator).
  • fpGUI was designed to be better that VCL and LCL in many aspects. It was designed to be cross-platform and it was design to be customisable & themeable, and look and work identical on all platforms.

Both have been used in multiple commercial applications over the years, so they have more than proved themselves worthy.

Now the longer answer... This is in fact a copy-and-paste of a similar reply I gave to somebody else 3 days ago in the fpgui.support newsgroup.
Quote
> Why doesn't fpGUI have DB-aware components?

fpGUI has had brilliant database support for many years - it is
accomplished via the tiOPF framework. If you haven't heard of tiOPF
(Techinsite Object Persistence Framework), it became open source since
1999 and supports both Delphi and Free Pascal compilers. It has been
used in commercial environments before then, and still used today.

tiOPF abstracts away the technicals of database work and frees up the
dependency on a specific set of database components (eg: SqlDB, ZEOS,
IBX etc). tiOPF gives an OOP interface into data persistence.

  http://www.tiopf.com

The support newsgroup is also hosted by me on this server.

Adding to that, tiOPF had from the very early days its own set of
advanced GUI controls to allow the end-user to interact with the data. I
got tried of porting that code between VCL, CLX (Kylix) and LCL, and at the
time LCL's compatibility with VCL was not very good. So I came up with a
new solution - using yet more Design Patterns (tiOPF has a fantastic array
of design patterns usage). The Mediator and Observer
design patterns to be specific.

I implemented what I called Model-GUI-Mediator (MGM for short). It's an
interface that allows any no-DB components to become "object aware" and
allows for bi-directional updates. All without needing to create yet
more descendant components. Because most of the MGM implementation is
actually non-GUI code, it is also very well unit tested - like the rest
of the tiOPF framework (1800+ unit tests run every 3 hours, 24/7).
Anyway, I also implemented VCL, LCL and fpGUI support for
Model-GUI-Mediator - a very thin layer, so very easy to add new
components or other toolkit support.

So simple component like Edit, ComboBox or even TreeView, StringGrid etc
can now observe data and do bi-directional updates.

As I mentioned, tiOPF also hides the details of specific database
components. So once you wrote your application with tiOPF, if you wanted
to switch between SqlDB components to ZEOS components, simply change one
compiler define and recompile your project. There is NO other code
changes necessary.

And there is ever more. tiOPF also supports 3-tier database access.
Again, simply change one compiler define and recompile your project, and
then suddenly your program changes from a Client/Server design to a
3-tier design. tiOPF includes is own generic Application Server
application, which uses Indy for HTTP support. Data and queries get
wrapped in XML and compressed before it is sent over the wire.
Encryption can be enabled too. I've tested and used this between
continents, and the remote persistence performance is very impressive.

I've been using tiOPF in many commercial environments for 15 years now,
and it works brilliantly.

If you want to find out more about tiOPF, have a look at the website,
and post any questions in the tiopf.support newsgroup. Myself and others
will be happy to answer any questions.

Anyway, this is the reason why you don't see any DB-aware components in
tiOPF. It simply isn't needed, and a much better solution exists - in
the form of tiOPF and MGM.


Now as I mentioned, I've been using tiOPF and MGM together for many years in commercial applications. tiOPF perfectly guides the developer into having clear separation between the UI layer, Business layer and the Storage/Persistence layer. RAD style development on the other hand guides developers in totally the opposite direction - near 100% of the time mixing UI layer and Business layer and hard-coding to a specific set of database components and database table structure. RAD is great for prototyping, but definitely not good for long term support and development of ever growing applications.

For a more in-depth description of RAD vs OPF, take a look at this page from the tiOPF website:

   http://tiopf.sourceforge.net/Doc/Concepts/1_WhatIsAnOPF.shtml

I hope this information helps you.
« Last Edit: April 24, 2017, 11:06:54 pm by Graeme »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Modern UI in Lazarus
« Reply #87 on: April 24, 2017, 11:24:09 pm »
Did you mean solutions such as AVG Anti Virus 2017 using chromiumembedded, AngularJS and jQuery?

I have attached an image showing that information.

Exactly that. Is not Electron but it uses the same core: Chromium. AngularJS and JQuery are both compatible software. Maybe they use JQuery to run already made components that can be acquired from the web. Then AngularJS (1.x) to do for example the same you can do with lazarus: connecting the code and the UI, that's possible with pure JS but AngularJS helps a lot and reduces a lot the lines of code.
« Last Edit: April 25, 2017, 12:32:47 am by lainz »

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Modern UI in Lazarus
« Reply #88 on: April 25, 2017, 12:57:02 am »
Mac OS X Lion (This is really awesome)
http://www.alessioatzeni.com/mac-osx-lion-css3/

I'm still planning to try out Electron when I have some time, to see how it works on Mac, try to add a dynamic library to it, and try it out as a server Web app.

The "Lion" stuff looks okay...  for Lion. That is OS X from 5 versions back if I'm counting correctly. Couldn't find anything up-to-date on that site though.

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Modern UI in Lazarus
« Reply #89 on: April 25, 2017, 03:12:13 am »
Mac OS X Lion (This is really awesome)
http://www.alessioatzeni.com/mac-osx-lion-css3/

I'm still planning to try out Electron when I have some time, to see how it works on Mac, try to add a dynamic library to it, and try it out as a server Web app.

The "Lion" stuff looks okay...  for Lion. That is OS X from 5 versions back if I'm counting correctly. Couldn't find anything up-to-date on that site though.

About my own plans of using a command line application: for some reason the Windows 10 antivirus deletes my executable compiled with FPC. That exe only does some writeln()... with a json inside... strange. I need to try again maybe, but if being deleted because executed several times to quick shows that is not a good idea..

Yes, some of these menu items says 2012.. BTW I've seen only few of these sites, another is this:
https://kexanie.github.io/csswin10/

and this (but seems that it uses "only" bitmaps):
http://desktop.trovster.com/desktop/#

stuff  :o
http://codepen.io/ozer/pen/ckwyd
http://codepen.io/pedox/pen/ehgld
https://codepen.io/znak/pen/ntsdy
http://codepen.io/paddykontschak/pen/JALeB
« Last Edit: April 25, 2017, 03:37:40 am by lainz »

 

TinyPortal © 2005-2018