* * *

Author Topic: Web API or REST service for Desktop APPlication  (Read 3316 times)

kamaunyrroh

  • New member
  • *
  • Posts: 8
  • I am a slow learner programmer in VB.NET, & Pascal
Web API or REST service for Desktop APPlication
« on: October 17, 2016, 01:14:30 pm »
I would like to know how to host a file on a web service that is accessed through Database Authentication in Pascal... I want my GUI application in VB.NET to make calls to the web service program, and the web service to Authenticate if the user is in the database before allowing the user to access the dictionary contents. This file is for grammar, but I don't want to spill everything here because its my secret! How would I create such a service in pascal? You know if the document being checked is 10 pages long, and there are 100 users using the system, there would be alot of delays, and hanging of the webservice because of many users making the calls per second! How do you handle these kind of issues in pascal? If an email is the right way to go, I will gladly put it on my profile! But I have been stack for 2 years unable to create such an application in ASP MVC, or HTTPClient. Windows documentation on GUI clients making calls to web services is very tedious, and not well documented!
My email incase anyone wants to reach me: nqioweryuadfge@yandex.com

Phil

  • Hero Member
  • *****
  • Posts: 2316
Re: Web API or REST service for Desktop APPlication
« Reply #1 on: October 17, 2016, 05:04:52 pm »
Windows documentation on GUI clients making calls to web services is very tedious, and not well documented!

Calling a Web service is unrelated to whether the client is a GUI or not.

If you're already familiar with VB.NET, you might find it easier just to create an ASP.NET HTTP handler. See the .ashx example here:

http://johnnycode.com/2012/07/16/getting-json-from-asp-net-beautiful-good-bad-ugly/

Very simple to code.

-Phil

kamaunyrroh

  • New member
  • *
  • Posts: 8
  • I am a slow learner programmer in VB.NET, & Pascal
Re: Web API or REST service for Desktop APPlication
« Reply #2 on: October 19, 2016, 10:54:20 am »
But is there a way to do this in pascal? I want Pascal because it is more secure.
My email incase anyone wants to reach me: nqioweryuadfge@yandex.com

Leledumbo

  • Hero Member
  • *****
  • Posts: 7721
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Web API or REST service for Desktop APPlication
« Reply #3 on: October 19, 2016, 11:12:05 am »
But is there a way to do this in pascal? I want Pascal because it is more secure.
How knowledgeable and skillful are you in web programming with Pascal? And have you used the search functionality of this forum? You're not the first person to ask for sure. The shipped fpWeb framework, okay the underlying fcl-web infrastructure, already provides multithreaded capable web server for handling multiple requests in embedded HTTP server application. Otherwise, if you create Fast(CGI), your chosen web server can autospawn (Well, not always. At least nginx cannot do this, you must manage the process pool manually. Only apache is capable of autospawning FastCGI processes) as many instances as required. Similar case with Apache module, I guess.

Thaddy

  • Hero Member
  • *****
  • Posts: 4641
Re: Web API or REST service for Desktop APPlication
« Reply #4 on: October 19, 2016, 11:22:46 am »
But is there a way to do this in pascal? I want Pascal because it is more secure.
No it is not! (Yes it is, but that would take a lecture in computer science or three) It helps, but ultimately it is the programmer that is more or less secure.
If anyone gave you the impression that it is otherwise, plz hit him, no injuries plz, but firmly.
<grumpy mode is on> >:D

If it happens to be a she... don't hit her. Just ignore her for two hours. Also does the trick.
« Last Edit: October 19, 2016, 11:25:46 am by Thaddy »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

shobits1

  • Sr. Member
  • ****
  • Posts: 278
  • .
Re: Web API or REST service for Desktop APPlication
« Reply #5 on: October 19, 2016, 07:35:27 pm »
If it happens to be a she... don't hit her. Just ignore her for two hours. Also does the trick.
:D :D :D

RegNatarajan

  • New member
  • *
  • Posts: 28
Re: Web API or REST service for Desktop APPlication
« Reply #6 on: June 14, 2017, 12:22:59 pm »
I'm pretty sure that response was a hate crime but it made me chuckle.  lol.

JD

  • Hero Member
  • *****
  • Posts: 1607
Re: Web API or REST service for Desktop APPlication
« Reply #7 on: June 14, 2017, 02:06:00 pm »
If it happens to be a she... don't hit her. Just ignore her for two hours. Also does the trick.

Good thing you cleared that up!  :D :D :D
Windows (10, 7) - Lazarus 1.8RC5/FPC 3.0.4 (also Delphi occasionally), NewPascal
Linux Mint Cinnamon  - Lazarus 1.8RC5/FPC 3.0.4
Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB

turrican

  • Jr. Member
  • **
  • Posts: 51
  • Pascal is my life.
    • Homepage
Re: Web API or REST service for Desktop APPlication
« Reply #8 on: June 14, 2017, 03:00:08 pm »
I would like to know how to host a file on a web service that is accessed through Database Authentication in Pascal... I want my GUI application in VB.NET to make calls to the web service program, and the web service to Authenticate if the user is in the database before allowing the user to access the dictionary contents. This file is for grammar, but I don't want to spill everything here because its my secret! How would I create such a service in pascal? You know if the document being checked is 10 pages long, and there are 100 users using the system, there would be alot of delays, and hanging of the webservice because of many users making the calls per second! How do you handle these kind of issues in pascal? If an email is the right way to go, I will gladly put it on my profile! But I have been stack for 2 years unable to create such an application in ASP MVC, or HTTPClient. Windows documentation on GUI clients making calls to web services is very tedious, and not well documented!

Of course, you can do it. Independet to GUI.
You can code an optimized REST HTTP Server Backend with Object Pascal.
 
Take a look here : https://synopse.info/fossil/wiki/Synopse+OpenSource
« Last Edit: June 14, 2017, 03:04:08 pm by turrican »

Almir.Bispo

  • Jr. Member
  • **
  • Posts: 57
  • CSV Comp DB is the Best NoSQL
    • CSV Comp DB (NoSQL)
Re: Web API or REST service for Desktop APPlication
« Reply #9 on: July 01, 2017, 02:35:22 pm »
But is there a way to do this in pascal? I want Pascal because it is more secure.
Yes. A Desktop application can manipulate a server remotely.
In the example of video 1 we have an application created with Lazarus (Desktop) manipulating a Server with CSV Comp DB installed. We can create and manage tables (csv), updates and much more ...
Video 1 https://www.youtube.com/watch?v=7DSTotVI1_I
(*Web pages are created by the database itself .CSV Comp DB is the only database that creates its own pages)

In video 2 we have a practical example of manipulating a database server with CSV Comp DB under Windows Server using a TCP connection via sending CQL script. The client application was created with Lazarus
(NoSQL CSV Comp DB was also created with Lazarus)
Video 2 https://www.youtube.com/watch?v=KGlGnWaNN0o

Want to know more? http://adltecnologia.blogspot.com.br
CSV Comp DB Developer {Pascal Lover}

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus