Recent

Author Topic: Chasing the latest web craze - debate  (Read 1833 times)

cappe

  • Full Member
  • ***
  • Posts: 142
Re: Chasing the latest web craze - debate
« Reply #30 on: April 07, 2021, 05:25:38 pm »
Thanks for the reply, I intended to have DB-Aware checks. Like the LCL, otherwise I think, it would not make PAS2JS_WIDGET, it was born to simplify and speed up. But I will also take a look https://github.com/c600g/fpc-lambda-runtime. However I managed to do what I was doing with the other web application with some written code. She's very beautiful.

cappe

  • Full Member
  • ***
  • Posts: 142
Re: Chasing the latest web craze - debate
« Reply #31 on: April 07, 2021, 05:28:20 pm »
Excuse me pascaldragon if I take advantage of your presence. To insert html code in a TWForm, what is the best method?

Gustavo 'Gus' Carreno

  • Sr. Member
  • ****
  • Posts: 448
  • Professional amateur ;-P
Re: Chasing the latest web craze
« Reply #32 on: April 07, 2021, 07:11:29 pm »
Hey MarcoV,

Suggesting that is as leading as what you accuse PascalDragon of.

When a physicist is asked about physics he knows what he's talking about.
When a physicist is asked about medicine, the right thing to do is to say that that it's outside his expertize and humbly refer to someone that has invested his time and passion on that specific medicine question.

I, myself, during my career have had to hand-over some clients to someone else with better grasp of a solution that better fit said client needs.
I did that because I didn't want to participate in the behaviour of a know it all smarty pants. And no I'm not calling anyone here that. I just didn't wanna be one.

So now that you know my intended context to the quote you mentioned, could you please elaborate on your remark that I'm as leading as what I accuse PascalDragon of?

Cheers,
Gus
Lazarus 2.1.0(trunk) FPC 3.3.1(trunk) Ubuntu 20.10 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.0(stable) Ubuntu 20.10 64b Dark Theme
http://github.com/gcarreno

Gustavo 'Gus' Carreno

  • Sr. Member
  • ****
  • Posts: 448
  • Professional amateur ;-P
Re: Chasing the latest web craze - debate
« Reply #33 on: April 07, 2021, 07:19:05 pm »
Hey All,

Like I said earlier, this was a doomed and hopeless social warrior campaign since it's obvious that there is a profound lack of diversity in this forum.
Sure, yes, we have multicultural diversity, but it's still very much a sausage fest of testosterone.
And even if we have female participants, they most likely welcome the anonymity that the forum provides in order to not be perceived as a woman.

I said my peace and it's quite clear where I stand. I won't be re-surfacing this subject any more, I'll keep to the technical parts.

Cheers,
Gus
Lazarus 2.1.0(trunk) FPC 3.3.1(trunk) Ubuntu 20.10 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.0(stable) Ubuntu 20.10 64b Dark Theme
http://github.com/gcarreno

lainz

  • Hero Member
  • *****
  • Posts: 4005
  • Leandro Diaz
Re: Chasing the latest web craze - debate
« Reply #34 on: April 07, 2021, 07:48:09 pm »
Long live to FPC and the Web. Until something else replaces them.

Anyone choose the tool what he knows better or what works for him or the customer.

Both are great tools.

EOF
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

Handoko

  • Hero Member
  • *****
  • Posts: 4158
  • My goal: build my own game engine using Lazarus
Re: Chasing the latest web craze - debate
« Reply #35 on: April 07, 2021, 08:06:40 pm »
... doomed and hopeless social warrior campaign ...

May I have some words?

Life will be easier if you try to see things simpler.

This is just a simple forum for people who have problem using FPC/Lazarus. They post their problems, get answers and advises. Sometimes, the answers are not fully correct and advises are not good enough. That's okay, someone who has better experience will respond and improve it.

I am the less skilled member here. Often, I realized some of my answers were wrong, I felt bad. There were times I believed my advises were good but being ignored, some ideas were awesome but rejected. That's okay. Life is not perfect. Being wrong, ignored, rejected are not very important. What most important to me is, I do participate.

Gustavo 'Gus' Carreno

  • Sr. Member
  • ****
  • Posts: 448
  • Professional amateur ;-P
Re: Chasing the latest web craze - debate
« Reply #36 on: April 07, 2021, 08:10:15 pm »
Hey Handoko,

May I have some words?

Thank you so much for the kind words of encouragement!! I really appreciate them.

But unfortunately, and with my deepest apologies, I must say that you missed the point. Sorry.

Cheers,
Gus
Lazarus 2.1.0(trunk) FPC 3.3.1(trunk) Ubuntu 20.10 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.0(stable) Ubuntu 20.10 64b Dark Theme
http://github.com/gcarreno

Gustavo 'Gus' Carreno

  • Sr. Member
  • ****
  • Posts: 448
  • Professional amateur ;-P
Re: Chasing the latest web craze - debate
« Reply #37 on: April 07, 2021, 09:14:35 pm »
Hey PascalDragon,

Sorry, so sorry, I completely forgot to answer you.

In a post directed at @trev, I admitted that I probably overreacted to your post, but still maintaining that we need to sin on the over not the under in terms of pointing toxicity.

Nonetheless, if there is the smallest chance that I did overreact, it's only fair and decent that I apologise to you. After all I kinda picked up the righteous flag and stomped all over the place, so I should listen to my own advice, right?

So, PascalDragon, you deserve my deepest apologies if I did take it a bit too much and overreacted. Really sorry about that!!

Not to take away from that, I still am of the opinion that we should cut toxicity by the root. But we are humans and we do mistakes.
My mind tells me that I probably did a mistake and I should apologise, which I did, very sincerely.
My heart is of another opinion but that's really on me to reconcile with myself.

Cheers,
Gus
Lazarus 2.1.0(trunk) FPC 3.3.1(trunk) Ubuntu 20.10 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.0(stable) Ubuntu 20.10 64b Dark Theme
http://github.com/gcarreno

PascalDragon

  • Hero Member
  • *****
  • Posts: 2895
  • Compiler Developer
Re: Chasing the latest web craze - debate
« Reply #38 on: April 08, 2021, 09:29:51 am »
Nonetheless, if there is the smallest chance that I did overreact, it's only fair and decent that I apologise to you. After all I kinda picked up the righteous flag and stomped all over the place, so I should listen to my own advice, right?

So, PascalDragon, you deserve my deepest apologies if I did take it a bit too much and overreacted. Really sorry about that!!

Not to take away from that, I still am of the opinion that we should cut toxicity by the root. But we are humans and we do mistakes.
My mind tells me that I probably did a mistake and I should apologise, which I did, very sincerely.
My heart is of another opinion but that's really on me to reconcile with myself.

Thank you for the apology. To be honest I had felt quite... let's say hurt by your reply then as I'm no fan of toxicity either and with me being queer I have to face such potentially in the offline world as well.

Gustavo 'Gus' Carreno

  • Sr. Member
  • ****
  • Posts: 448
  • Professional amateur ;-P
Re: Chasing the latest web craze - debate
« Reply #39 on: April 08, 2021, 11:51:33 pm »
Hey PascalDragon,

Thank you for the apology. To be honest I had felt quite... let's say hurt by your reply then as I'm no fan of toxicity either and with me being queer I have to face such potentially in the offline world as well.

Well, then, please accept my doubling in apologies. "I didn't know" is never an excuse, but now that I know, I feel even worse.

And many thanks for sharing such a private detail of your life. I certainly don't deserve it, but I'm quite thankful that you shared it.

Cheers,
Gus
Lazarus 2.1.0(trunk) FPC 3.3.1(trunk) Ubuntu 20.10 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.0(stable) Ubuntu 20.10 64b Dark Theme
http://github.com/gcarreno

PascalDragon

  • Hero Member
  • *****
  • Posts: 2895
  • Compiler Developer
Re: Chasing the latest web craze - debate
« Reply #40 on: April 09, 2021, 01:59:37 pm »
And many thanks for sharing such a private detail of your life. I certainly don't deserve it, but I'm quite thankful that you shared it.

I don't make a secret of it, it's simply due to habit that most people here don't know it. The other core devs know for example and it's also visible on various social media platforms.

Warfley

  • Sr. Member
  • ****
  • Posts: 426
Re: Chasing the latest web craze - debate
« Reply #41 on: April 09, 2021, 03:55:26 pm »
First of all, this is an answer to the original post, I skimmed through the other answers, but I don't want to take part in that mud fight, but if there already where some answers to what I am going to write, I might have missed them.

One thing before I start, I don't think that this phenomenon is so new. Big electron desktop apps like VSCode exist for like 6 now.

So let's first consider the web technology itself. As many languages have a webasm or javascript transpiler, this is completely independent of language.
The first point is of course the most important one, cross compatibility. Your code needs to be developed for a browser, not a platform. No matter if it is running on an android smartphone, a Samsung SmartTV or a Windows Desktop, it will always work the same. This is something you can not say about native solutions like Lazarus. If you consider developing an app that should work on iPads, PCs, Macs and Mobile, web technology is a great choice.
If I for example would write a chat application, I would definetly use web technology because if a chat does not work on mobile it is basically useless in a Smartphone world. And just between Android and iOS are so many differences when developing native that mobile alone is a reason to use webdev.

Then you can also provide portability through the browser itself. Apps like slack are basically just a bottled up version of the browser code, with a few extensions to make use of the native API (like notifications). But in general, if you want to provide a service via browser and natively, like many chat services such as slack, using web technology halfs the amount of work you have to do.

A big point is also the graphic features of the Browser. Browsers are optimized for very fast rendering of complex graphics. From the HTML DOM styled with CSS to the "handrawn" functionality of the Canvas using Javascript, the browser is really really fast. Things for which with Lazarus you would need to fall back onto using OpenGL or something comparable.
Many applications using web technology have a custom design. Slack, Riot or VSCode make no use of any "standard" components like the default system style buttons, but are completely customized. And users like pretty applications. Every time I see Java users switch from IntelliJ to Eclipse, you can see how much they dislike the Eclipse design, even though it is much more classical then the fully customized IntelliJ. It has a reason why Microsoft has introduced WPF to .Net. Maybe it is just a trend (I remember back to like Windows 2000-xp times there was also a trend to custom designed applications that died out a few year later when Win 7 rolled around), but at least right now, it seems to be something users like if an app has a unique style, as long as it is pretty and well structured.
Not only graphics, but more generally speaking browsers heaviely support Multimedia functionality. To implement a cross platform video player in a native GUI app is pretty complicated and often requires additional dependencies like VLC or so.

Then there is of course the tooling and support. It is vast, well tested and most importantly free. There are other frameworks that try to replicate these advantages for other platforms like Xamarin for C# with .Net core or Firemonkey for Delphi, but here you are paying for things that are free with web technology and have a bigger community, better support, more libraries than these payed alternatives

Also it is just very easy. Native system APIs like the Windows API are, due to having to be very generally applicable, very complicated. Web APIs are usually much more straight forward. I had to go and read something up in the POSIX standard more than once to build a native Linux app, I never had to read any standard for web stuff like IndexedDB or something similar.

Lastly, web platforms are designed for event based development, which perfectly aligns with how GUIs operate. Most APIs in the web are designed around asynchronous single threaded callbacks. This avoids mangling with multi threading problems, deadlocks and so on, while still allowing for a fluent GUI design.
There are the buildingblocks for this available in most other platforms, for example Lazarus GUIs use the Synchronize function to schedule function calls within the event queue of the main thread. This is used by some libraries (I think indy uses this method to schedule event calls), but this is just a "patch" to make an inherently synchronous system asynchronous, and only works if it is specifically implemented. All the system apis, etc. are inherently synchronous.
The in browser on the other hand everything revolves around the asynchronous event queue. All APIs are designed to make use of that, which matches very well with the way GUI applications operate. This btw also to a very frustrating degree (e.g. you have old style callback functions mixed up with new style promises, which can be really confusing) but from a design perspective for GUI apps its fantastic.

This is where you can't spearate that well anymore between the platform and the language design, because the browser is made for Javascript and Javascript is made for the browser. And while there are a lot of issues with JavaScript (as it is grown historically it has some really annoying things about it, e.g. iterating through an array via for ... of because for ... in was already taken), it clearly shows that this language was designed for event based GUI development, especially with the DOM.
For example the event based structure of the APIs synergises really well with Javascripts heavy reliance on lambda functions, a feature that came really late to many other languages.

And of course not to forget, to start developing with Javascript, all you need is a browser and a text editor. No toolchain is needed, which is why prototyping in Javascript works really well.


So to summarize, why to use Javascript for desktop apps?
  • Cross compatibility to all platforms
  • Great for complex graphical interfaces
  • Publishability through websites allows for inherent portability
  • Large community, many libraries and a lot of support
  • Inherently designed for GUI development
  • Easy

A development environment is only as good as it fits the use case. Let me give you two examples, one where webtechnology is very useful and one where it isn't.
Let's say you want to build a chat, that should run on all platforms as app, be accessible via a website if you can't install the app, e.g. to check in from a foreign pc, and this chat requires a lot of multimedia functionality, like playing voice messages, or viewing videos sent via the chat. I would definitely choose web technology, no questions asked.
If I had a program that needed to load and parse binary data, e.g. file compression or something similar, which probably can be parallelized in multiple threads and is very IO heavy then I would defenetly not use web technology.

Gustavo 'Gus' Carreno

  • Sr. Member
  • ****
  • Posts: 448
  • Professional amateur ;-P
Re: Chasing the latest web craze - debate
« Reply #42 on: April 10, 2021, 05:03:16 am »
Hey Warfley,

  • Cross compatibility to all platforms
  • Great for complex graphical interfaces
  • Publishability through websites allows for inherent portability
  • Large community, many libraries and a lot of support
  • Inherently designed for GUI development
  • Easy

  • Cross compatibility to all platforms
    If and only if there's a full/headless browser present. So same inherent issues as the Java Runtime and the .NET runtime without adding any value.
  • Great for complex graphical interfaces
    HTML was not created with this in mind. With the craze of browser stuff, it's been mangled to accommodate it, with no real sense of future proof or even standardization.
  • Publishability through websites allows for inherent portability
    About the only thing that web has over compiled: Easy distribution
  • Large community, many libraries and a lot of support
    I still think its a craze/fad but I'm not futurist to see it's cycle end. But granted, there is a crowd that as chosen to board that train.
  • Inherently designed for GUI development
    You're repeating yourself and still I say, HTML has been mangled to do what it does now, in a willy nilly way
  • Easy
    This is always a matter for discussion. Easy for you is hard/nonsensical to others

And then you reply: But you know there is this, and this, and that etc... that make compiled stuff so cringy.
Yeap, I'll agree to all of those, and I'll probably pile on some more you've forgotten.
But in the end, native only depends on the OS. It does not depend on the interpreting platform(JavaScript/Python/PERL/PHP).
If for some wacky reason the interpreting platform goes away, so will all the effort put on it.
If the OS goes away, errrmmm, well, then the computer doesn't work and the argument is moot.
Adding another layer of complexity and resource hogging software is not something I'm very interested in, even if all your bullet list points where true.
Is it harder going the compiled way? Well, it's bloody easier from the assembly days and the IDE's help a bunch.
But like I said, easy is very subjective and should not be on the table to discuss.

Yeap, that rando on the internet that disagrees... Sorry!!

Cheers,
Gus
Lazarus 2.1.0(trunk) FPC 3.3.1(trunk) Ubuntu 20.10 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.0(stable) Ubuntu 20.10 64b Dark Theme
http://github.com/gcarreno

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9225
  • FPC developer.
Re: Chasing the latest web craze - debate
« Reply #43 on: April 10, 2021, 12:15:26 pm »
Reason for web applications: deployment,  deployment, and, not to forget, deployment.

Deployment "portability" on the handful of targets that have a full, up to date browser, and keep that so for your apps lifecycle. No hope whatsoever on others.

Moreover, javascript is an excellent Laptop fan exerciser
« Last Edit: April 10, 2021, 12:17:43 pm by marcov »

Gustavo 'Gus' Carreno

  • Sr. Member
  • ****
  • Posts: 448
  • Professional amateur ;-P
Re: Chasing the latest web craze - debate
« Reply #44 on: April 10, 2021, 01:08:49 pm »
Hey Marco,

Deployment "portability" on the handful of targets that have a full, up to date browser, and keep that so for your apps lifecycle. No hope whatsoever on others.

Wow, thanks for reminding me that I didn't rant about that!!!

@Warfley: A compiled 32b app made in the Windows XP era, can still run in all it's glory on a Windows 10 64b machine of today.
If you try to run your power hungry, memory hogging HTML5+CSS+JS web app on an Internet Explorer of the time, you're shit out of luck aren't you?
This whole Web craze really looks like the way Microsoft kept pumping out new versions of Windows, just to make people upgrade their hardware...
Like Marco says, if you have state-of-the-art gaming rig, then you can run, PROBABLY, 2 Electron apps at once.
If you still have Windows 8 and don't update hardware, it's 1 Electron app and the computer turn into a heat exchanger!!!

Moreover, javascript is an excellent Laptop fan exerciser

Yeah, forgot about that LOL!!!!

Cheers,
Gus
Lazarus 2.1.0(trunk) FPC 3.3.1(trunk) Ubuntu 20.10 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.0(stable) Ubuntu 20.10 64b Dark Theme
http://github.com/gcarreno

 

TinyPortal © 2005-2018