#1 2019-07-10 18:15:58

macfly
Member
From: Brasil
Registered: 2016-08-20
Posts: 374

Infinity and beyond

We currently focus on TMS Web Core integration, which seems a newer - and more supported - alternative.

I saw this in the documentation and if I'm not mistaken it's new, right?

Anything in the plans for the pas2js?

Offline

#2 2019-07-11 09:39:23

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Infinity and beyond

We would like to use TMS Web Core with FPC/Lazarus, which is just out of beta.
Some time is needed for better integration. smile

Offline

#3 2019-07-12 14:01:28

macfly
Member
From: Brasil
Registered: 2016-08-20
Posts: 374

Re: Infinity and beyond

Thanks @ab.

By the - little - I saw of TMS Web Core I did not like the performance. but this is another subject ...

Pas2js (that is used by the TMS Web Core) seems quite promising.

Offline

#4 2020-11-05 09:13:52

damiand
Member
From: Greece
Registered: 2018-09-21
Posts: 94

Re: Infinity and beyond

I'm wandering if it would be possible to adapt the cross platform units (SynCrossPlatformSpecific, SynCrossPlatformREST, SynCrossPlatformCrypto) to be compatible also to pas2js. Ab do you have any hint / suggestion on what directive section to use as a basis, maybe the ISDWS? HASINLINE has to be included also?

Offline

#5 2020-11-05 10:12:02

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Infinity and beyond

I did not have time yet on WebCore/pas2js integration, sadly.
But I guess I could make it work with plain pas2js code, with no WebCore dependency.

It would for sure use some conditional, but specific since DWS has not the same syntax than pas2JS, e.g. for asm/javascript.
In mORMot2 cross-platform clients, I would like to have a mormot.cross.core.pas unit which may help having less $ifdef in the general code, as we do with regular code in mORMot 2.

Offline

#6 2020-11-05 17:14:32

emk
Member
Registered: 2013-10-24
Posts: 96

Re: Infinity and beyond

My opinion is that Elevate Web Builder is way better than TMS WebCore from a Delphi/FPC developer perspective: EWB has a very nice layout and very nice designed controls (no HTML, no CSS - the RAD way, but you can customize every bit), instead of TMS style where the page is usually designed by a designer and the developer access the controls by ID.

Offline

#7 2020-11-05 17:54:06

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Infinity and beyond

EWB seems great for desktop-like web apps, but for mobile and tablet apps, using regular HTML/CSS makes more sense: you need a progressive app. For desktop apps, we have Delphi or Lazarus.

But perhaps I am wrong, since I don't know EWB well.
Have you some more input?

Offline

#8 2020-11-05 21:49:45

macfly
Member
From: Brasil
Registered: 2016-08-20
Posts: 374

Re: Infinity and beyond

I may be mistaken, but I think I've seen something related to mormot + pas2js done by @warleyalex.

Offline

#9 2020-11-06 09:43:04

emk
Member
Registered: 2013-10-24
Posts: 96

Re: Infinity and beyond

The EWB layout system is an absolute game-changer. Additionally, combined with component creation and interfaces, you have the ability to create truly responsive, modern web apps, that look any way you wish.
You can create components by combining small elements, all in Pascal, no HTML, please see this video:

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

Regarding mobile apps, qoute from forum: "I also have to do this a lot. In my experience, the EWB Layout functionality is easily good enough for me to actually create a single app that is responsive based on device resolution. You should explore this functionality if you have not done so already, along with the Autosize functionality. The only area where I have had to "tweak" things is the removal of scrollbars on mobile devices."

These days EWB3 will be launched with many more features.

There a trial version and if you say is ok, I can contribute with a licence. I will send a private email.

Last edited by emk (2020-11-06 09:47:46)

Offline

#10 2020-11-06 11:58:47

pvn0
Member
From: Slovenia
Registered: 2018-02-12
Posts: 211

Re: Infinity and beyond

I went down the "pascal for web" hole years ago and the tooling is terrible. Learning modern HTML/CSS/JS  is easy , these technologies are also extremely volatile. Now if someone came out with pascal tooling 8-10 years ago that would have made it easier to avoid the shortcomings of web development, awesome, but today it's pointless because the modern web is so simple that you no longer need all this 3rd party tools. One example is the layout system, you no longer have to deal with the flow layout, it's now obsolete and has been superseded by grid and flex layout which anyone can master in about 15 minutes.

I guess the value proposition of this "pascal for web" tools would be the ability to take a complex desktop application written in pascal and seamlessly convert it to the web. AFAIK nothing like this exists but correct me if I'm wrong.

Last edited by pvn0 (2020-11-06 13:16:05)

Offline

#11 2020-11-06 15:54:55

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: Infinity and beyond

@pvn0, agreed, the scripting language has never been the issue for me to do web frontend, the lack of a RAD way of doing the UI is.

Nowadays I prefer htmx.org (successor of intercooler.js) to do the basic stuff and jquery does the rest.

Last edited by edwinsn (2020-11-06 15:55:26)


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#12 2020-11-16 23:38:57

igors233
Member
Registered: 2012-09-10
Posts: 241

Re: Infinity and beyond

> I guess the value proposition of this "pascal for web" tools would be the ability to take a complex desktop application written
> in pascal and seamlessly convert it to the web.

How do you handle client side development, each page/action has a different raw html file? Also hod do you actually write html files, in notepad or there's some WSIWYG editor?

Last edited by igors233 (2020-11-16 23:39:12)

Offline

#13 2020-11-17 07:20:37

pvn0
Member
From: Slovenia
Registered: 2018-02-12
Posts: 211

Re: Infinity and beyond

igors233 wrote:

> I guess the value proposition of this "pascal for web" tools would be the ability to take a complex desktop application written
> in pascal and seamlessly convert it to the web.

How do you handle client side development, each page/action has a different raw html file? Also hod do you actually write html files, in notepad or there's some WSIWYG editor?

I'm not sure what you mean, you don't need raw html files to do web development you just need a server that responds to requests with html standard compliant response.
If you're asking how I do the web portion of development myself, I use VS codium, which is a libre port of microsoft VS code, that way I get the code completion and extensions without the ms bs "telemetry" attached to it.

Offline

#14 2020-11-17 15:41:06

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,660
Website

Re: Infinity and beyond

pvn0 wrote:

you just need a server that responds to requests with html standard compliant response.

This is what mORMot MVC Web Server is very good at, using Mustache templates and Delphi code. smile

Offline

#15 2020-11-19 04:38:54

igors233
Member
Registered: 2012-09-10
Posts: 241

Re: Infinity and beyond

Thanks, so you create also html/mustache templates using VS codium? To clarify, I'm looking for a friendly web IDE development, like we can do forms in Delphi.

Offline

#16 2020-11-19 07:29:54

pvn0
Member
From: Slovenia
Registered: 2018-02-12
Posts: 211

Re: Infinity and beyond

Yes, I write templates with VS Codium. It has some nice things like html formatter, tag auto completion, color selection dialogs, tag description, js function description etc... But you may need to install some extensions to enable at least some of the above. I wouldn't compare it to forms in Delphi, there's no drag and drop if that's what you meant, it's just a good editor with lots of extensions that save you time.

Offline

#17 2020-11-19 07:38:13

pvn0
Member
From: Slovenia
Registered: 2018-02-12
Posts: 211

Re: Infinity and beyond

ab wrote:
pvn0 wrote:

you just need a server that responds to requests with html standard compliant response.

This is what mORMot MVC Web Server is very good at, using Mustache templates and Delphi code. smile

I like mustache indeed and your implementation is very good. I don't use the MVC Web Server, at the moment I use method based services which I find very flexible. Also FPC > Delphi tongue

Offline

#18 2020-11-19 13:19:57

macfly
Member
From: Brasil
Registered: 2016-08-20
Posts: 374

Re: Infinity and beyond

A pure html/javascript client reduces or even eliminates the need for an MVC server.

The mORMot server would be serving the API only.

Another option is to create a separate server, to serve HTML, which also consumes the API on mORMot server.

The Boilerplate HTTP Server based on mORMot is very interesting for this purpose.
https://synopse.info/forum/viewtopic.php?id=3365&p=1

Offline

#19 2020-11-19 13:48:21

macfly
Member
From: Brasil
Registered: 2016-08-20
Posts: 374

Re: Infinity and beyond

igors233 wrote:

Thanks, so you create also html/mustache templates using VS codium? To clarify, I'm looking for a friendly web IDE development, like we can do forms in Delphi.

I don't like visual editors. They usually create dirty HTML code.
In addition, they may not work in conjunction with widget frameworks.

But I believe there are extensions for vs code/vs codium that add WYSIWYG editor.


NOTE: When I created this topic, TMS was creating a WYSIWYG editor for TMS WebCore, which was an extension for vs code.
But I don't know how this project is doing at the moment.

Offline

Board footer

Powered by FluxBB