Re: [Lazarus] Lazarus applications as webpaged

2015-08-30 Thread Aradeonas
Very good.So  what library do you use for making JSON API? tiPOF or
fpweb?

Regards,
Ara


-- 
http://www.fastmail.com - The professional email service


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus applications as webpaged

2015-08-30 Thread Michael Van Canneyt



On Sun, 30 Aug 2015, Aradeonas wrote:


Very good.So  what library do you use for making JSON API? tiPOF or
fpweb?


Both.

I read business objects with tiOPF using the tiSQLdb visitors, and 
stream using fpweb.


I have almost finishing writing a unit - which I will commit to FPC very 
soon - that takes a *sample* json file and creates an object from it.
The object does not depend on anything, and contains code to stream it 
from/to json in the format that was used to create it.


It should make consuming/producing REST services (using JSON, obviously) very easy. 
I will integrate it in the jsonviewer application distributed with Lazarus.


Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus applications as webpaged

2015-08-30 Thread Michael Van Canneyt



On Sun, 30 Aug 2015, Aradeonas wrote:


Easy,You!
You know the way and me and Larry are asking from you.
Beside you should used to it until now that I always have a question
from you ;)
But I try to specific whom the next time.


Just quote part of the original mail, that is usually sufficient to determine 
context.

To answer your question:
- I use Firebird as a database, which I access using SQLDB. A
- Data is exposed to webpages using a simple REST layer.
  There are even Lazarus GUI programs that act as a client to the REST layer.
- There is also an RPC mechanism.
  For this I use ExtJS' ExtDirect protocol, which is a specific version of 
json-rpc.
  (this is available in FPC)
- Client (browser) is programmed independently in ExtJS and AngularJS by a team 
of webdesigners.
   (but you could use fpweb and templates for this as well)

It's all very simple, really. In architecture, it resembles the google-apis recently 
committed in fpc. Also, for example tiOPF provides a lot of the building blocks you 
may need. Transforming tiOPF objects to JSON for example is really easy and can be 
done using the rttiutils unit. I even ported that unit to Delphi using the superobject 
library (by henri gourvest).


I've used the same techniques in many different projects now for several years, and 
I consider it a succesful recipe.


Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus applications as webpaged

2015-08-30 Thread DougC
Michael-

Thanks for doing this work. I am also very interested in it!




 On Sun, 30 Aug 2015 16:21:18 -0400 Michael Van Canneyt 
lt;mich...@freepascal.orggt; wrote  

I have almost finishing writing a unit - which I will commit to FPC very 
soon - that takes a *sample* json file and creates an object from it. 
The object does not depend on anything, and contains code to stream it 
from/to json in the format that was used to create it. 
 
It should make consuming/producing REST services (using JSON, obviously) very 
easy. 
I will integrate it in the jsonviewer application distributed with Lazarus. 


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus applications as webpaged

2015-08-30 Thread Michael Van Canneyt


To whom are you asking this question ? 
Without any context or quoted text whatsoever, this is hard to determine ?


Michael.

On Sun, 30 Aug 2015, Aradeonas wrote:


What libraries and tolls do you use for implementing API, DB and
webpages?

Regards,
Ara


--
http://www.fastmail.com - mmm... Fastmail...


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus applications as webpaged

2015-08-30 Thread Aradeonas
What libraries and tolls do you use for implementing API, DB and
webpages?

Regards,
Ara


-- 
http://www.fastmail.com - mmm... Fastmail...


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Lazarus applications as webpaged

2015-08-30 Thread Larry Dalton
Can Lazarus apps be set up on servers and executed through Apache or other web 
servers?

Sent from my iPhone
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus applications as webpaged

2015-08-30 Thread Michael Van Canneyt



On Sun, 30 Aug 2015, Larry Dalton wrote:


Can Lazarus apps be set up on servers and executed through Apache or other web 
servers?


fpweb based apps, yes. Gui apps not. I have a whole ecosystem of such apps 
running.

Michael;

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus applications as webpaged

2015-08-30 Thread Larry Dalton
I have a very large application with at least 20 forms. What would be the first 
step in rewriting it as a web app?

Sent from my iPhone

 On Aug 30, 2015, at 08:50, Michael Van Canneyt mich...@freepascal.org wrote:
 
 
 
 On Sun, 30 Aug 2015, Larry Dalton wrote:
 
 Can Lazarus apps be set up on servers and executed through Apache or other 
 web servers?
 
 fpweb based apps, yes. Gui apps not. I have a whole ecosystem of such apps 
 running.
 
 Michael;
 
 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus applications as webpaged

2015-08-30 Thread Michael Van Canneyt



On Sun, 30 Aug 2015, Larry Dalton wrote:


I have a very large application with at least 20 forms. What would be the first 
step in rewriting it as a web app?


- Completely split all GUI logic from business logic.
- Create an API that encapsulates the business logic.
- In essence you'll then have to rewrite all GUI handling.
  So, depending on the application:
  Decide whether you want to write a RIA or a simple series of webpages ?


Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus applications as webpaged

2015-08-30 Thread Aradeonas
Easy,You!
You know the way and me and Larry are asking from you.
Beside you should used to it until now that I always have a question
from you ;)
But I try to specific whom the next time.

Regards,
Ara


-- 
http://www.fastmail.com - Access your email from home and the web


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus applications as webpaged

2015-08-30 Thread Michael Van Canneyt


Stay tuned for more ;)

Michael.

On Sun, 30 Aug 2015, DougC wrote:


Michael-

Thanks for doing this work. I am also very interested in it!




 On Sun, 30 Aug 2015 16:21:18 -0400 Michael Van Canneyt 
lt;mich...@freepascal.orggt; wrote 

I have almost finishing writing a unit - which I will commit to FPC very
soon - that takes a *sample* json file and creates an object from it.
The object does not depend on anything, and contains code to stream it
from/to json in the format that was used to create it.

It should make consuming/producing REST services (using JSON, obviously) very 
easy.
I will integrate it in the jsonviewer application distributed with Lazarus.





--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus