Telegram_2023-05-25T08

<< Click to Display Table of Contents >>

Navigation:  Telegram > 2023 > 05 > 25 >

Telegram_2023-05-25T08

Telegram link

 

2023-05-25T08:01:21

 

Yes. The demo works fine. I just tried to copy the PrintReport function into my app (on a button async click event) exactly as in the demo except I changed CGIReport.exe with my own program name (gptprimer.exe)

 


 

Telegram link

 

2023-05-25T08:01:40

 

That's why I think its trying to invoke my server again.

 


 

Telegram link

 

2023-05-25T08:02:00

 

im looking at the cgirunner now

 


 

Telegram link

 

2023-05-25T08:02:09

 

Cheers!

 


 

Telegram link

 

2023-05-25T08:02:13

 

it looks super simple... it just calls a module ( that is not a dll, but a 'bat' file )

 


 

Telegram link

 

2023-05-25T08:02:25

 

i would think that your print statement would be inside the external bat file

 


 

Telegram link

 

2023-05-25T08:02:49

 

so instead of a bat file, you're using 'gptprimer.exe' ?

 


 

Telegram link

 

2023-05-25T08:02:50

 

I'm actually looking at the cgirunnerreport demo

 


 

Telegram link

 

2023-05-25T08:03:22

 

It doesn't call a bat file in the same way. The procedure starts with the line CGIModuleName := TIWAppInfo.GetAppPath + 'CGIReport.exe';

 


 

Telegram link

 

2023-05-25T08:03:24

 

oh right, it's 3 projects in one.

 


 

Telegram link

 

2023-05-25T08:03:58

 

yeah, CGIReport.exe is one of the bpl's in the overall project. i didn't notice it had 3 projects in one group

 


 

Telegram link

 

2023-05-25T08:04:10

 

But there is no such executable in the demo distro

 


 

Telegram link

 

2023-05-25T08:04:32

 

it's using a datamodule \dm.DoPrintReport( aFilename );

 


 

Telegram link

 

2023-05-25T08:04:51

 

and they're building a pdf by hand.

 


 

Telegram link

 

2023-05-25T08:04:55

 

TJPFpdf

 


 

Telegram link

 

2023-05-25T08:05:12

 

never done it that way myself,... because it's long and arduous to write a pdf by hand like that.

 


 

Telegram link

 

2023-05-25T08:05:24

 

normally i do something like Fastreport - and then call a function to save it as a pdf.

 


 

Telegram link

 

2023-05-25T08:05:32

 

I guess its just to get some PDF file out there

 


 

Telegram link

 

2023-05-25T08:06:04

 

That's where I hope to get to.

 


 

Telegram link

 

2023-05-25T08:06:26

 

But none of the 3 demos actually use fast reports.

 


 

Telegram link

 

2023-05-25T08:06:39

 

its interesting. not sure why they have two IW apps inside the project group.

 


 

Telegram link

 

2023-05-25T08:06:55

 

Haven't used the cgirunner yet so just baby steps while i learn :)

 


 

Telegram link

 

2023-05-25T08:06:56

 

but basically one app calls the other, and the other calls an exe that calls a print function.

 


 

Telegram link

 

2023-05-25T08:07:32

 

seems strange to me. not sure i would do it that way, but the purpose of httpsys ( normally ) is to run multiple apps on the same port, separated by a url base.

 


 

Telegram link

 

2023-05-25T08:07:44

 

so you dont have to do a bunch of port forwarding for each app.

 


 

Telegram link

 

2023-05-25T08:08:36

 

so all apps could theoretically run on port 80 ( http tunnelling ) but have a different url base.

 

somelocation\\MyApp1\\...

 

somelocation\\MyApp2\\...

 

somelocation\\MyApp3\\...

 

All using port 80 ( or secure ports and such )

 


 

Telegram link

 

2023-05-25T08:08:49

 

The main reason I'm using it is its more stable than the old indy server that is used for test/demo. But I may have that capability in mind also down the track

 


 

Telegram link

 

2023-05-25T08:09:15

 

what versions are you using ? delphi, IW etc

 


 

Telegram link

 

2023-05-25T08:09:33

 

not sure i would use this app to study printing though.

 


 

Telegram link

 

2023-05-25T08:09:48

 

Delphi 11.3 and IW 15.3.6 ultimate

 


 

Telegram link

 

2023-05-25T08:10:14

 

the general premise is... study one app ( not a project group ) to start with. i think this example looks a bit confusing to me at first.

 


 

Telegram link

 

2023-05-25T08:10:41

 

Sure.

 


 

Telegram link

 

2023-05-25T08:11:37

 

Really appreciate your assistance. I'll keep experimenting and maybe find an easier way ??

 


 

Telegram link

 

2023-05-25T08:13:41

 

it's a good idea to learn stuff like contenthandlers too. Those come into play when you want to make a call that gets you into a different form than your main form, for example.

 

You might have the main form be some type of login screen,... but what do you do when you want the user to get IMMEDIATELY to a different form like a \change-password\ screen because they forgot their password ? you see. They can't login yet. So a simple concept would be something like...

 

Main form is login form.

 

2nd form is change the password form.

 

3rd form is I-forgot-my-password ( or password reset ), where they enter their email address, you search for it, and if okay, then send out an email to that email address with some kind of url that when they click on it, uses a contenthandler to get them directly to the change-my-password form ( instead of a login form ).

 

But that's just one example.

 


 

Telegram link

 

2023-05-25T08:14:33

 

i think the more complicated stuff, is when you start to use html templates, and connect external javascript/css into your IW app - which can be VERY pretty.... but complicated when you attempt to use things like javascript dataTables - which looks way better than IW embedded stuff.

 


 

Telegram link

 

2023-05-25T08:15:25

 

I used a contenthandler to handle the authorisation OAuth flow to a 3rd party API, another good use case although I think the new update has made that easier ??

 


 

Telegram link

 

2023-05-25T08:15:29

 

Yes. I have used content handlers for the sign-up lifecycle in my app

 


 

Telegram link

 

2023-05-25T08:15:57

 

You should study the youtube videos ( like Jackson Gomes ) does one on how to do html templates with delphi and it's pretty good. But he shows you how you can write an IW app that 'looks' more like a web application. And then, in that case, ... you ( or a web developer ) can adjust the external html stuff and make the look and feel totally change without having to adjust the IW App later on.

 


 

Telegram link

 

2023-05-25T08:16:25

 

i haven't used the OAuth stuff yet ( i hear they fixed a lot ), but yeah, i will have to need to do that soon too

 


 

Telegram link

 

2023-05-25T08:16:49

 

have you looked at the httpsysdemo yet ?

 


 

Telegram link

 

2023-05-25T08:17:24

 

also, it seems like jQuery is being replaced with pure js stuff now. Like jquery is on the way out. Just a thought that came to my mind recently.

 


 

Telegram link

 

2023-05-25T08:18:05

 

Yes. And my app has been running well until I wanted to add reporting capabilities to it, But I do use templates and bootstrap for presentation.

 


 

Telegram link

 

2023-05-25T08:19:01

 

nice.

 


 

Telegram link

 

2023-05-25T08:19:32

 

well, make sure you're reporting stuff is thread safe. I'm using FastReport and it has a setting to turn threadsafe on.

 


 

Telegram link

 

2023-05-25T08:20:36

 

the only thing i had to deal with is ripping out \IWBS\ components and go back to using regular \IW\ components cause there's an issue mixing certain components with bootstrap based ones etc.

 


 

Telegram link

 

2023-05-25T08:20:46

 

I think with jquery its just its age. There have been a lot of competing frameworks released since it came out. But I'm not too concerned about it because this is, in the end, a Delphi application after all and its strength is building apps that are very data and logic rich. If you wanted the most modern and fab UI you would probably choose a different toolset. But IW have done a lot to make the apps look decent enough now.

 


 

Telegram link

 

2023-05-25T08:21:46

 

I think the biggest issue is if you try to mix the bootstrap 3 and bootstrap 4 components. I mix the bootstrap 4 and traditional IW components and haven't had any significant issues

 


 

Telegram link

 

2023-05-25T08:23:41

 

I use the bootstrap library but just reference regular IW components in a template file and add classes. The only irritating element is the IWGrid where I have to manually add styling to the container div via the renderelement event of the grid.

 


 

Telegram link

 

2023-05-25T08:24:09

 

I like the new jqgrid component

 


 

Telegram link

 

2023-05-25T08:24:53

 

I do all the cell getting and setting manually (i.e. not data aware) but it seems pretty robust and looks \competitive\ visually

 


 

Telegram link

 

2023-05-25T08:25:38

 

100%

 


 

Telegram link

 

2023-05-25T08:31:30

 

That's the downside of web. \State-less\ versus state-full. I miss the old days of state full applications. So much power. I mean, just the other day I wrote an app with all kinds of features - and shook my head that most of that stuff can't be done on the web, or done easily.

 


 

Telegram link

 

2023-05-25T08:32:37

 

but i guess the plus side is,... IW makes apps that can run on most ( if not all ) browsers. Beats having to have windows coders, and android coders, and iOS coders.... all trying to make one app for the web.

 


 

Telegram link

 

2023-05-25T08:34:25

 

Yes. And with responsive templates it can port across multiple form factors (to some extent). I wouldn't use IW (or any Delphi tool) to build a website, but it's great for a serious business web application that is used via a web browser.

 


 

Telegram link

 

2023-05-25T08:35:09

 

And these days every PC / laptop / tablet / phone has a web browser

 


 

Telegram link

 

2023-05-25T08:42:16

 

starting to use CDATA components for stuff and that's pretty cool. However, I don't know yet if cdata requires that ms office be installed on the machine... meaning, does anyone know a way to open an excel file without requiring that the machine have ms excel installed ?

 


 

Telegram link

 

2023-05-25T08:44:44

 

TMS have some good components for that I think. And there are various others all 3rd party. There are some VCL components that are installed but not enabled for native automation but not sure how well they work with modern versions of Office - particularly 365

 


 

Telegram link

 

2023-05-25T08:44:46

 

What are the largest apps you guys know on the web that have been written with intraweb?

 


 

Telegram link

 

2023-05-25T08:46:36

 

I don't know about any others, but I have written a magazine subscription application (B2C), a friendly society investment platform, and am currently working on a GPT based learning & assessment resource generator. All 3 apps are proper commercial apps that have mutliple simultaneous users and diverse functionality.