Recent

Author Topic: Let's write a web browser  (Read 17890 times)

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: Let's write a web browser
« Reply #15 on: May 19, 2018, 12:17:59 am »
Of course, a personal project is always fun to do. I like that kind of projects.

1) that feature of paint application is already available in Photoshop and Corel. I used that feature when I had my first PC around 2001.

2) API, is something like that. Widely used.

3) that comes with Windows XP, if I remember correctly. Abandoned by Microsoft. Desktop widgets or gadgets.

4) VS Code does that

So your ideas are all good, but are not new. But that doesn't matter. Do them and have fun. Learn a lot of new stuff. Is the good part of programming.


lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: Let's write a web browser
« Reply #16 on: May 19, 2018, 12:20:24 am »
Quote
... you can use Electron and forget about making a web browser, instead make modules for Electron, that's tested and works fine.
I really don't know ELECTRON, but people say there are some serious security issues. Is that the case or is it as always a lot of marketing stuff or exaggerations?
Has anybody experiences with it?

I know electron. And yes. There are security issues as with any piece of software. Or an exe is less harmful to a script? What do you think?

sam707

  • Guest
Re: Let's write a web browser
« Reply #17 on: May 19, 2018, 02:07:52 am »

guest58172

  • Guest
Re: Let's write a web browser
« Reply #18 on: May 19, 2018, 04:15:22 am »
Will there be deps or everything will be statically linkable  (*.a / *.lib for webkit) ?
Currently I don't think it's feasible to use static linked a/lib files. The webkit engine itself takes many hours to build even on a high end pc.

Ah yeah i know what you mean. I tried to compile Skia (graphic engine used by chromium i believe) once. That was something lol.

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Let's write a web browser
« Reply #19 on: May 19, 2018, 08:45:25 am »
reinventing a wheel I guess

http://lazplanet.blogspot.hu/2015/09/create-web-browser-in-3-minutes-using.html

Maybe it is a better mousetrap. I will like to give it a try and compare it to the others before I can reach a conclusion.  :D :D
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: Let's write a web browser
« Reply #20 on: May 19, 2018, 09:16:40 am »
Nice work sysrpl !  8)

I can't wait to take a look at your code and try your web browser component.

Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Let's write a web browser
« Reply #21 on: May 19, 2018, 10:29:25 am »
Nice work sysrpl !  8)

I can't wait to take a look at your code and try your web browser component.
Thank you for the encouragement salvadordf. About your CEF project, can you tell me is it currently working on all platforms with Lazarus and as you've written the Pascal interface does it expose the Chrome V8 JavaScript engine as something that can be used by stand alone engine outside of the CEF browser? I'd very much appreciate a definitive answer from you, the maintainer of the CEF Delphi project, on that subject.

Thanks again.

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: Let's write a web browser
« Reply #22 on: May 19, 2018, 10:52:28 am »
Nice work sysrpl !  8)

I can't wait to take a look at your code and try your web browser component.
Thank you for the encouragement salvadordf. About your CEF project, can you tell me is it currently working on all platforms with Lazarus and as you've written the Pascal interface does it expose the Chrome V8 JavaScript engine as something that can be used by stand alone engine outside of the CEF browser? I'd very much appreciate a definitive answer from you, the maintainer of the CEF Delphi project, on that subject.

Thanks again.

Right now CEF4Delphi only works on Windows. I would love to add support for other platforms but I know nothing about programming in those operating systems/CPUs.  :(

If you don't want to show a web page you can use CEF4Delphi in "off-screen rendering" mode and execute custom JavaScript code.

There are several demos that show how execute code and pass information to/from JavaScript to/from pascal but if you want just the V8 engine then take a look at this project :
https://github.com/zolagiggszhou/v8delphiwrapper

If you are interested in other JavaScript engines, this is a FreePascal wrapper for the ChakraCore library used by Edge :
https://github.com/tondrej/chakracore-delphi
« Last Edit: May 19, 2018, 10:54:10 am by salvadordf »
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: Let's write a web browser
« Reply #23 on: May 19, 2018, 11:24:46 am »
Great. Thanks for that information.

Regarding my Pascal interface to a JavaScript engine, I believe the design I created is fairly straight forward and it  works independent of the browser. When it's published I'd really like to get your feedback. If you interested, the design is for the most part complete aside from defining JavaScript classes in Pascal. The page I posted earlier reflects the parts that will not change:

Getting started with the JavaScript Core package

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: Let's write a web browser
« Reply #24 on: May 19, 2018, 11:41:58 am »
It looks great!

In fact it's much easier to use and debug than CEF due to its multi-process architecture.
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

sam707

  • Guest
Re: Let's write a web browser
« Reply #25 on: May 19, 2018, 03:22:16 pm »
(special wonder around javacrapscript) does rebuilding a wheel make it square?
https://github.com/BeRo1985/besen
= js engine besen 5th complete edition exists for years
« Last Edit: May 19, 2018, 03:27:07 pm by sam707 »

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: Let's write a web browser
« Reply #26 on: May 19, 2018, 05:08:52 pm »
(special wonder around javacrapscript) does rebuilding a wheel make it square?
https://github.com/BeRo1985/besen
= js engine besen 5th complete edition exists for years

Looks good. But I feel bad that things get outdated too fast (that repo is 4 years old).

sam707

  • Guest
Re: Let's write a web browser
« Reply #27 on: May 19, 2018, 05:32:36 pm »
(special wonder around javacrapscript) does rebuilding a wheel make it square?
https://github.com/BeRo1985/besen
= js engine besen 5th complete edition exists for years

Looks good. But I feel bad that things get outdated too fast (that repo is 4 years old).

1) besen's last upd is 6months old
2) before creating a new project I look on the internet if it exists already
3) in case it exists and is "outdated" I grab the sources, update them and contact the author (he/she is not going to slap my face) instead of being stupid rewriting the whole things  ;-) likewise building square wheels LLOLLLL

repeat aftef me this new concept dude! "CONTRIBUTION" HAHAHAHAHAH
« Last Edit: May 19, 2018, 05:36:48 pm by sam707 »

sam707

  • Guest
Re: Let's write a web browser
« Reply #28 on: May 19, 2018, 05:39:08 pm »
no wonder why Pascal programmers' world is a niche! there are even niche projects into the niche hahahahahaha

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: Let's write a web browser
« Reply #29 on: May 19, 2018, 06:10:55 pm »
1) besen's last upd is 6months old
2) before creating a new project I look on the internet if it exists already
3) in case it exists and is "outdated" I grab the sources, update them and contact the author (he/she is not going to slap my face) instead of being stupid rewriting the whole things  ;-) likewise building square wheels LLOLLLL

repeat aftef me this new concept dude! "CONTRIBUTION" HAHAHAHAHAH

1) Yes, he updated only the readme file  ;)
2) Well, that's ok
3) Is a personal opinion, if you want and have time to rewrite, and feel good doing that, why not, even is the result is not as good as the original. (Edit: if not, there will be only a single browser, a single javascript engine, a single language, a single of anything you can imagine).

Is not a new concept for me, I already contribute to several projects.
« Last Edit: May 19, 2018, 06:19:20 pm by lainz »

 

TinyPortal © 2005-2018