Recent

Author Topic: use web browser component or not?  (Read 1665 times)

krolikbest

  • Full Member
  • ***
  • Posts: 247
use web browser component or not?
« on: April 09, 2021, 09:09:15 pm »
I am developing a project whose task is to read information from sensors. The application works on Raspberry Pi and should be made in two falvours:
1. works without screen/monitor, then one of the application threads is a simple httpserver whose task is to present the read data in the remote browser. There is (well, will be soon) also some admin panel that allows  remote control of the application
2. works with touch screen, then i would like to use form and some web browser component in order to avoid building a regular form with buttons, grids, edits etc.  In the web browser element I could display exactly the same pages as in soulution 1.
So, in the second solution I have perhaps such options:
- thtmlViewer
- fpCef3
- don't use any visual form; just start default browser in RPi with URI on startup.
It seems to me that last fits my needs but would like to ask if is it worth to use htmlViewer or fpCef3 or maybe is there something better regarding web browser component?

Regards,
« Last Edit: April 09, 2021, 09:11:48 pm by krolikbest »

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: use web browser component or not?
« Reply #1 on: April 09, 2021, 09:54:05 pm »
Hello,

If the web interface doesn't have to be too complicated (for example, if it doesn't have to handle a CRUD data-grid), then I would launch the browser registered and installed by default in the RasbPi (simple HTML pages creation with Lazarus, in fact). THtmlViewer supports HTML framesets: I've heard that it's "old-fashioned", but I like them. I don't know neither fpCef3, nor other browser solutions written in Lazarus like those.

Afterwards, if things get more complicated, it's possible to use:
- fpWeb (allows to emulate Php with Lazarus: web server side code)
- Pas2JS (allows to emulate Javascript with Lazarus: web client side code)
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

egsuh

  • Hero Member
  • *****
  • Posts: 1296
Re: use web browser component or not?
« Reply #2 on: April 10, 2021, 03:15:39 am »
Use general browsers. OpenURL will do everything. Htmlviewer does not support HTML5 fully.

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: use web browser component or not?
« Reply #3 on: April 24, 2021, 02:53:01 pm »
You can use CEF4Delphi with Lazarus in a Raspberry Pi to embed a Chromium based browser to your application.

See this post :
https://forum.lazarus.freepascal.org/index.php/topic,41272.msg389838.html#msg389838
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2023
  • Former Delphi 1-7, 10.2 user
Re: use web browser component or not?
« Reply #4 on: April 25, 2021, 01:52:35 am »
I always launch the user's preferred/default web browser with OpenURL() unless there's a good reason not to do so. It's more user-centric.

 

TinyPortal © 2005-2018