NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jane

Pages: [1] 2 3 ... 22
1
I've implemented the old SQL disconnect stuff Rick described in the old 2020 CIDC conference and it works brilliantly.

Generally, Clarion apps share a single SQL connection across threads.  Rick creates a separate transitory connection as each new p_web thread needs it.
It does add some SQL overhead because of his approach to the frequency with which it disconnects, but that doesn't impact my apps negatively.

You could, of course, modify Rick's approach and just disconnect prophylactically at times you feel appropriate.


2
Depending on what version you're moving from, there was a need to repopulate the control template for the web server (Bruce illustrated in numerous webinars).  But I can't find a link in the docs at the moment. 

Those settings you're asking about are now variables and the actual values are entered in the web server while it's running, rather than compiled.

3
Web Server - Ask For Help / Re: Troubles with conditional hide filter.
« on: February 20, 2024, 06:00:02 PM »
Does it need to be a string?  (Are you thinking of filters, maybe?)

Are your variables in scope or do you need to get session values?

Check the bottom of page 182 of "Developing Web Applications with NetTalk - Fourth Edition."

4
Web Server - Ask For Help / Re: OT - Anyone working with NDJSON?
« on: December 28, 2023, 05:38:17 PM »
Thanks, Sean.

5
Web Server - Ask For Help / OT - Anyone working with NDJSON?
« on: December 26, 2023, 02:38:18 PM »
"Newline Delimited" JSON.

To be honest, I just came across this while looking through the specs for the FHIR data required for the US Federal Government's current UDS+ reporting requirements:
https://fhir.org/guides/hrsa/uds-plus/spec.html

A bunch of JSON stuff combined in a single file.
Can skip over/ignore any badly-formed JSON components.

https://github.com/ndjson/ndjson-spec

6
WinEvent has serial port support.

Things to be careful of (top of my head, I've not actually done it):

Decide what thread to use for your WinEvent process.  Definitely not the web server's thread.  Either use the thread of a web request (which will be blocking for that request  if you wait for a reply) or have the web request start a process on another thread.

Use session values for whatever goes in/out of the serial port.

Or if you're just monitoring occasional data, you could have a separate thread window with a timer that queries your com port every XXX and sticks anything it gets into a table (memory or persisted) that you can then view with a regular NetTalk browse.


7

Moving forward I'm sure it would be helpful, if I knew where the documentation for all this information is?


Documentation exists in many places, Richard.  There's the documentation.  The NetTalk books.  The NetTalk webinars.  The NetTalk training sessions from CIDC.

The more one knows about how things work, the easier it is to have a hint of what's wrong.

In this case, I know that one of the deployment options serves a mashed-up js file and a mashed-up css file.  The other option serves a bunch of individual files.  (You can see the difference by doing "view source" on a web page in development and deployment modes).  If you're only editing the individual js file but you're serving the mashed-up one, there's an issue.

When I'm hunting for things in the documentation, I often find the template reference highly useful.
For your problem, there's information on the specific setting you were changing here:
https://www.capesoft.com/docs/NetTalk14/NetTalkWebFunctionality.htm#WebserverPerformance

HTH

Cheers,

Jane

8
You edited the js and that fixed it when you're actually using THAT file.

But did you then rebuild the "all.js" files that are used when you're using "combined" files? 

Maybe see if running Gzipall.bat helps?

9
Web Server - Ask For Help / Re: Calling Source procedure from Menu
« on: October 06, 2023, 04:49:31 PM »
Well, your menu and javascript are in the browser.  Your ClearFile procedure is in the server.  Your menu item is trying to make an AJAX call to the server.  The server is confused.

Attached may give you some ideas.  Not saying it's the best way, but it's an approach.

changed the action on your menu item.
added 5 lines of code to the PageHeaderTag procedure
added your ClearFile procedure to the Calls list for PageHeaderTag

and I changed ClearFile to use regular Open and Close statements, rather than file manager.  Emptying a file requires exclusive access.  In a real-world multi-user environment you'd need to do something more robust to make sure that any other people who had that file open were dealt with.

HTH,

Jane

10
Web Server - Ask For Help / Re: Generate GUID in SQL - Part 2
« on: September 27, 2023, 10:49:05 AM »
I think that at least part of the reason Bruce recommends against using SQL Uniqueidentifier GUIDs is so one is not tied to a specific backend.
And another is that if you need to generate a unique identifier in a disconnected mobile app, it's much easier to generate a 16-character random string using javascript than to generate a SQL GUID with javascript.

Also, it's advantageous to have the client generate the row's unique identifier.  That way, for example, you can create invoice items before you've saved an invoice header (because you have the invoice GUID as a variable).  So you generate the GUID *before* saving any rows, rather than having SQL create a NEWID on insert which you then need to try to get.

If you don't care about simplicity of creating the GUID with javascript and want to use the MS SQL uniqueidentifier you could use prop:sql to have SQL make one for you, or use String Theory, or use one of the various Windows API methods.  Some recent discussion on Clarion Hub: https://clarionhub.com/t/function-to-create-a-guid/6580/5


11
Jeff,
I've only experimented briefly with multi-site host, so just speculation here. 

Have you made sure to compile all the NetTalk sites with the same version of NetTalk that you're using for the host?
Will the host run by itself?
Will the host run with just a static site (such as with the multi-site example app)?

Is yours like Richard's situation - his runs in debug mode but crashes in deployment mode?  If so, another thing to try would be one-by-one enabling the different items that get set by switching to "deployment" and seeing if you can isolate the crash down to one switch.

13
Web Server - Ask For Help / Re: Mobile App that is NOT Disconnected
« on: September 11, 2023, 12:53:39 PM »
Hi, Ron,

If it only runs when connected, one option would be a plain web-app with CSS focused on usability on a mobile screen.  Use big buttons, only needed functionality, etc.  By definition, that would only work when connected.

As for a PWA, you might find it valuable to spend an hour or two working through some of the MDN tutorials.
This is Creating your first PWA

And this page is the basic everything-you-ever-wanted-to-know page: https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps

Cheers,

Jane

*edited to fix link

14
Thanks!  :)

15
Web Server - Ask For Help / IP V6 bit me
« on: September 08, 2023, 03:23:42 PM »
This is, admittedly, an edge case that most people will probably not encounter.  But worth awareness...

Aside - Bruce, the NetWebClient in NetDemo has an IPV6 checkbox but it doesn't do anything.  For my testing I replaced it with radio buttons for Net:IPvAuto, Net:IPv4, Net:IPv6
I would suggest you modify the NetDemo app that way... it's useful for testing.
/Aside

I have various apps running on a Windows 2019 server in an Active Directory domain that is set up with only IPv4 DNS. 

The two apps involved in this problem are both ones I'm in the process of converting from NT12 to NT14.  One is an API server, the other has an API client.

After rebuilding, I set the server to serve IPv4.
I did not change the client. 
Its default behavior (Net:IPvAuto) did not work for me.

I guess that whatever is happening  takes place inside the NetTalk DLL, so I'm not sure how you're doing the auto. 
Your docs say: "By default, and if Family is set to Net:IPvAuto or Net:IPv4 then an IPv4 DNS Lookup will happen on this name first".

But what shot me in the foot (I did not shoot MYSELF in the foot!!) is apparently how Windows handles a lookup when it "knows" that the server in question is itself.
As you can see from the first pic, doing an NSLOOKUP (which uses the DNS server) resolves to an IPv4 address (which is all that our DNS handles).
But doing a PING of the same FULLY-QUALIFIED DNS ADDRESS returns a loopback IPv6 address.

I don't know if that is the cause...  but the net client compiled without specifying IP family refuses to connect to my API server.  If you were actually doing a DNS lookup I would have thought that "auto" would have figured out to use IPv4.  If you're doing a PING internally, it would have found the IPv6.

If I force the client to use IPv4, all is well in the world.  So at least in my edge case, "auto" is not bullet-proof.

More grey hairs...  sigh... 

Cheers,

Jane






Pages: [1] 2 3 ... 22