Clipper On Line • Ver Tópico - Mais uma opção, dothrb.

Mais uma opção, dothrb.

Projeto Harbour - Compilador de código aberto compatível com o Clipper.

Moderador: Moderadores

 

Mais uma opção, dothrb.

Mensagempor Itamar M. Lins Jr. » 30 Ago 2017 18:58

Mais uma ferramenta feita com Harbour.
http://www.dothrb.com
Sorry if I use the list, but after my reply to a question here, many
are asking info about dothrb. We have created the Google Group dothrb.
You're invited to join it if you want to discuss about dothrb.

We created dothrb (dothrb.com) for our internal use and to allow our
customers to easily create in-house extensions to our applications.
We have never advertised it as a standalone product since a market
research showed that it would have been hard to repay the costs of
documentation, support and administration so it was always part of our
ERP suite.

Just a quick summary of what actually dothrb is ( and is not ) so you
can decide if it can be of your interest:

- IS a set of binaries and templates available for Linux/OSX/Win
- IS NOT a library
- DOESN'T NEED a C compiler
- DOESN'T NEED hbmk2
- CAN work WITHOUT Harbour or nodejs ( but with them it can do more )
- IS an HTTP multi threading server ( can serve html/css/js directory
without any configuration )
- CAN use the harbour binary ( as an external command ) to compile
prgs into hrbs
- CAN load and execute hrbs
- CAN do CRUD to DBFs without any code
- CAN use nodejs/express proxy to serve https
- CAN be chained to node express/graphql to server DBfs data to graphql clients
- CAN access Postgresql and/or SQLite data
- CAN create PDFs/XLSX/DOCX/XML
- ....

- BUT IT CAN'T AUTOMAGICALLY convert text/GUI code to modern
web/iOS/Android apps.

other tools of the set are:

- dotcmd = the development tool ( init, clean, build, dist, ... )
- dotdbf = dbf manager ( create, index, zap, select, append )
- dotsql = sql manager ( import dbf, execute sql, ... tested with
Postgresql and SQlite )
- dotcln = http client ( get, post, delete, ... )

dothrb has been developed and tested in the last 7 years and has been
designed and tested for 24x7x365 reliability ( in a Linux box with
50-200 concurrent users )

Just few use cases:

- serve DBF from a prg

// server.prg
#include "dothrb.ch"

class server

var cName
method init

endclass

method init()

_Server:clearRoutes()
_Server:setRoute( "get", "/myfunc", { || myfunc() } )

return this

static function myfunc()

local aTest := {}
local cDbfFile := hb_cwd() + "data" + hb_ps() + "test.dbf"
rddSetDefault( "DBFCDX" )
dbusearea( true,, cDbfFile, "test", true, true )

if neterr()
console.log( "Error opening file")
endif

test->( dbeval( { || aadd( atest, alltrim(field->first) )}) )

use

return _Ok( "application/json", hb_jsonencode( aTest ) )

- simple CRUD on single DBF without code

GET: http://<ip>:<port>/dbf/test?seek='Doe'&order='1'&fields=last,first,street
returns a json like { last="Doe", first="John", street="1st avenue" }

POST: for dbappend
DELETE for dbdelete
PUT/PATCH dbeval/fieldput

- can be called from node/express using f.e. axios

- can be use node/express as proxy for https

- it can "automatically" creates html forms and tables using BootStrap:

a form:
...
cHtml := rows2HtmlForm( { "form-file" => "shared/show.html", ;
"rows" => ::oModel:read( hFind ), ;
"properties" => ::oModel:getDataProps() ;
} )
...

a table:
...
cHtml := rows2HtmlTable( { "rows" => ::oModel:read( hFind ), ;
"properties" => ::oModel:getDataProps(), ;
"checkboxes" => "id", ;
"usefooter" => "no", ;
"idfield" => "id", ;
"actions" => _stdRow_Actions(), ;
"msgtexts" => { "empty-table" => "Empty table", ;
"check-column" => "Select", ;
"action-column" => "Actions", ;
"idfield-not-found" => "idfield not found" } ;
} )
...

where dataProps is a json like:

{
"fields": {
"id": {
"field": "id",
"label": "Id",
"type": "+",
"len": 4,
"dec": 0,
"picture": "@X",
"attributes": "type=\"text\" readonly"
},
"title": {
"field": "title",
"label": "Title",
"type": "C",
"len": 30,
"dec": 0,
"picture": "@X",
"attributes": "type=\"text\""
},
...

created by dotdbf

and many other things for example:

- we create IOS/Android apps using React Native to run our prg code
and access our DBFs

- using dotsql we import our DBFs into Postgresql servers to and use
dothrb to show charts using google-charts, create dashboards for
sales, inventory and so on.

best regards,
Lorenzo Fiorini


Saudações,
Itamar M. Lins Jr.
Avatar de usuário

Itamar M. Lins Jr.
Colaborador

Colaborador
 
Mensagens: 6949
Data de registro: 30 Mai 2007 11:31
Cidade/Estado: Ilheus Bahia
Curtiu: 312 vezes
Mens.Curtidas: 506 vezes

Mais uma opção, dothrb.

Mensagempor JoséQuintas » 31 Ago 2017 09:38

Pelo que entendi, pronto pra criar aplicativos web.

O único ponto curioso:
No site não menciona download nem nada, apenas mostra características.
A única informação é email pra contato.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg, multithread, dbfcdx, ADO+MySql, PNotepad
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar de usuário

JoséQuintas
Membro Master

Membro Master
 
Mensagens: 18150
Data de registro: 26 Fev 2007 11:59
Cidade/Estado: São Paulo-SP
Curtiu: 15 vezes
Mens.Curtidas: 1215 vezes

Mais uma opção, dothrb.

Mensagempor Toledo » 31 Ago 2017 11:56

Não encontrei também nenhum exemplo/demo para testar.

Abraços
Toledo - Clipper On Line
toledo@pctoledo.com.br
Harbour 3.2/MiniGui/HwGui
Faça uma doação para o fórum, clique neste link: http://www.pctoledo.com.br/doacao
Avatar de usuário

Toledo
Administrador

Administrador
 
Mensagens: 3038
Data de registro: 22 Jul 2003 18:39
Cidade/Estado: Araçatuba - SP
Curtiu: 263 vezes
Mens.Curtidas: 258 vezes

Mais uma opção, dothrb.

Mensagempor JoséQuintas » 31 Ago 2017 12:12

Apenas uma continuação da conversa sobre o assunto, que vém rolando no harbour-users

dothrb IS MAINLY an HTTP http server written in Harbour.

NODEJS is COMPLETELY OPTIONAL.

What nodejs does is provide more than 500.000 packages ready to be used.

I doubt that Harbour will ever have a graphql module from Facebook or
a MongoDb driver
or an XML/XSD validation module.

Imagine to use NODEJS as the biggest repository of libs that you don't
need to link.
You only need to have a way to exchange the data and this way is JSON.
dothrb accepts JSON as input and write JSON as output and this is the
key to communicate with
the rest of the world.

But I repeat this is completely optional and I simply mentioned it
because was the question that has started
all this thing.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg, multithread, dbfcdx, ADO+MySql, PNotepad
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar de usuário

JoséQuintas
Membro Master

Membro Master
 
Mensagens: 18150
Data de registro: 26 Fev 2007 11:59
Cidade/Estado: São Paulo-SP
Curtiu: 15 vezes
Mens.Curtidas: 1215 vezes




Retornar para Harbour

Quem está online

Usuários vendo este fórum: Nenhum usuário registrado online e 4 visitantes


Ola Amigo, espero que meu site e forum tem lhe beneficiado, com exemplos e dicas de programacao.
Entao divulgue o link da Doacao abaixo para seus amigos e redes sociais ou faça uma doacao para o site forum...
MUITO OBRIGADO PELA SUA DOACAO!
Faça uma doação para o forum
cron
v
Olá visitante, seja bem-vindo ao Fórum Clipper On Line!
Efetue o seu login ou faça o seu Registro