Jump to content

docjones

uniGUI Subscriber
  • Posts

    117
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by docjones

  1. Barcode scanner devices generally can work like a usb keyboard, o like a serial com device.

    Working barcode scanner as usb keyboard is the simpliest  way, reading the codebar is like if your keyboard write the code in the focused control.

     

    it's not necessary develope a keyboard hook, just put a unieditcontrol, focus on him, and read the codebar with the scanner..

    or you can do a form that capture the onkeyevent, show this form , and capture the reading keys.

  2. Hola

    Yo lo estoy utilizando desde sus inicios, y también compré la licencia pro

    En realidad solo lo he utilizado en un par proyectos serios, y en algunas pequeñas cosas,  pero espero utilizarlo en algunos proyectos más

     

    En realidad, creo que en España somos muy pocos lo que seguimos utilizando delphi solo unos pocos raritos como yo y mucho menos unigui,   Me consta que en latinoamérica / portugal tiene algo más de aceptación y uso.

  3. Me pregunto cuantos españoles estamos utilizando unigui en nuestros proyectos y cuantos habéis comprado una licencia para un uso profesional o cuantos pensáis comprarla

    ¿Alguien tiene en producción algún aplicativo unigui ? ¿ usuarios concurrentes ?, ¿ experiencias?

  4. Many Thanks  Stiaan for sharing your experience and your advices. i see NBL or NBL + ARR is a very good solution.

     

    post-454-0-89585600-1435924937_thumb.jpg

     

    To avoid database bottleneck, cluster database , and/or database midleware tier like mormot  it's a must have.

    Report server like reporting services is a good solution

    may be if intensive reporting requiered, balancing some server's reports will be necesary.

  5. Thanks Farshad

     

    Seems that load balacing / scalability is the most complicated theme

    I found several articles about load balancing using IIS + tomcat, http://blogs.mulesoft.com/load-balancing-tomcat-7-using-iis-7-5/  , but this don't seems very resource optimal. In example, if you need 10.000 instances,  and 250sessions x process , you need 40 tomcat instances.  Or Perhaps best method is using ARR

     

    how are you planning add load balacing to unigui? , using any  unigui software proxie/redirector or through IIS?

     

    For database, i'm thinking in a postgresql / mysql cluster, and mormot as database tier.

  6. I'm thinking if it's possible have a unigui application (typical database application, inserts, querys, google maps,  etc) with many users at time 50.000.

    what do you think ? , what kind of server or farm servers (CPD) will be necesary? . what about unigui scalability? any experiencies?

    it will be necesary using a midleware like datasnap ?, or mormot ? 

    unigui is enough mature to make a project of this nature? , or better i forget....

     

    all comments will be welcome.

  7. you can not call to showreport().

     

    Export your report to pdf or html, and load it in uniurlframe.

     

    There are several examples in the forum.

    • Upvote 1
  8. don't use a tcpserver in unigui , becouse each user that open new web session, need tcp a server diferent port.

    with tcpclient you cant send and recive data.

     

    and yes, tcpserver.onexecute, is multithreaded, you can not  access unigui components in the execute method, or in a thread

    when you recive data, add data to temporaly buffer, and check and read the buffer content it in unitimer.

    Procedure  TmainForm.Oncreate(....)
    Begin
     Buffer:=TmemoryStream.create;
    End;
    
    procedure TMainForm.idServerExecute(AContext: TIdContext);
    var
      i: integer;
    begin
      with AContext.Connection.Socket do
        try
          ReadStream(buffer,-1);
        except
        end;
    end;
    
    Procedure on unitimer(.....)
    Begin
        Buffer.Position:=0;
        i:=buffer.readint;   
        buffer.clear;
        UniLabel2.Caption := inttostr(i);
    End;
    
  9. you must think, that each unigui session, is like a one vcl running application.

    Each unigui session , ( main module or your unigui main form ), can have her custom tcp client, and you can comunicate it like a vcl application, with your custom server.

  10. I want share the project sample

     

    The project show how do a basic shopping cart, and do payments with paypal (direct credit cards payment only allowed in US).

     

    Paypal, and credit card payment integrated (REST API) , only basic functions, please do not ask me about other  paypal functionalities, there are a lot of information in paypal home page.

    The same unigui application catch the paypal response and update in database the status payment of the order (transactions table).

     

    Proyect Requierements

     

    - Paypal account / sandbox.

    - Firebird 2.5 Server

    - ZeosLib (http://ZeosLib.Sourceforge.net)

    - Rest - API Libraries (https://github.com/fabriciocolombo/delphi-rest-client-api)

    - OpenSSL Dlls (libeay32.dll and ssleay32.dll)

    - XE2  and UP.

     

    Open database (\files\pub.fdb), open table 'config' and change the fields with your own config

    PAYPAL_CLIENTID

    PAYPAL_SECRET

    DOMAIN_NAME

     

    Can test on.

    http://docjones.ddns.net:8077

     

    can pay using next paypal sandbox account

    testpaysandbox@gmail.com

    password chocolate

    post-454-0-28297200-1433975434_thumb.jpg

    post-454-0-15611300-1433975442_thumb.jpg

    post-454-0-74355300-1433975447_thumb.jpg

    PAYPALSAMPLE.zip

    • Upvote 5
  11. Hi

    I'm doing a demo project that support paypal payment

    now only pay with valid paypal account allowed.  but i'm figthing with credit card payment. (paypal api have too many options).

     

    perhaps it's not the best arquitecture, but the same unigui application is used to catch paypal response, and confirm the payment . (As example its perfect)

     

    The idea of this project is using it as an example and a base for future projects, perhaps will share the code.

     

    sorry, server no 24hours active, but you can test it on

     

    http://docjones.ddns.net:8079

     

    To test, first register with valid mail, activate your account, login and and test payment using the next paypal sandbox account

     

    testpaysandbox@gmail.com

    password chocolate.

     

    post-454-0-82591700-1433632458_thumb.jpg

     

    post-454-0-75468500-1433632481_thumb.jpg

     

    post-454-0-31515900-1433632491_thumb.jpg

     

    post-454-0-84802600-1433632498_thumb.jpg

     

     

     

     

     

    • Upvote 1
  12. you must restart session to apply theme becouse theme must be apply when session start

     

    Save theme in cookie, and when user start session, get  user cookie and set the theme.

  13. http://stackoverflow.com/questions/27093429/paypal-with-delphi-using-rest-api-return-payment-empy
    
    http://stackoverflow.com/questions/26395669/using-paypal-rest-client-with-delphi-xe2/26436321#26436321
    
    

    You can develop your own REST wrapper. or use TMS paypal component.

  14. HTMLFRAME CODE.
    
    <!DOCTYPE html>
    <html>
    <head>
    	<title>Leaflet unigui example</title>
    
    	<style>		
       	body {
           padding: 0;
           margin: 0;
                }
          html, body, #map {
           height: 100%;
          }
    
    	</style>
    </head>
    <body>
    	<div id="map"></div> 	
    </body>
    </html>
    
    HTMLFRAME AfterScript
    {
    // create a map in the "map" div, set the view to a given place and zoom
    var map = L.map('map').setView([51.505, -0.09], 13);
    
    L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
        attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
    }).addTo(map);
    
    }
    

    Hi

    I'm trying using  leaflet map with unigui, but it seems that do not work fine.

    leaflet custom .css and custom file .js added to servermodule

    The map loaded ok, but show cutted

    htmlframe afterscript and HTML added to show map

     

    what i'm doing bad?

     

    test case added

    Unigui 0.99.xxx pro

    codegear xe2

     

    LEAFLET.rar

    post-454-0-02642700-1430299219_thumb.jpg

    • Upvote 1
  15. //firebird event. when insert data, start unitimer and refresh data.
    procedure TMainForm.IBEvents1EventAlert(Sender: TObject; EventName: string;
      EventCount: Integer; var CancelAlerts: Boolean);
    begin
      if EventName='new_data' then begin
          LocalFlag:=true
      end;
    end;
    
    procedure TMainForm.UniTimer1Timer(Sender: TObject);
    begin
    
      if LocalFlag then begin
          LocalFlag:=False;
          IBQuery1.Close;
          IBQuery1.Open;
      end;
    
    end;
    

    Thanks Farshad, i see... Then to solve this problem, the  easy way is using a local flag, testing it in unitimer.

  16. procedure TMainForm.UniFormCreate(Sender: TObject);
    begin
      IBDatabase1.DatabaseName:=UniServerModule.FilesFolderPath+'TEST.FDB';
      IBDatabase1.LoginPrompt:=FALSE;
      IBDatabase1.Params.CLEAR;
      IBDatabase1.Params.Add('user_name=SYSDBA');
      IBDatabase1.Params.Add('password=masterkey');
      IBDatabase1.Params.Add('lc_ctype=ISO8859_1'); //CHARSET.
      IBDatabase1.Open;
      IBQuery1.open;
      IBEvents1.Registered:=true;
    end;
    
    
    
    procedure TMainForm.btn_insertClick(Sender: TObject);
    var q:TIBQuery;
    begin
      //insert a record, then event new_data fired
      try
        q:=TIBQuery.Create(self);
        q.Database:=IBDatabase1;
        q.SQL.add('insert into data (name,author,street) values (:name,:author,:street)');
        q.ParamByName('name').Value:='record '+FormatDateTime('dd/mm/yy hh:nn:ss:zzzz',now);
        q.ParamByName('author').Value:='unigui';
        q.ParamByName('street').Value:='';
        try
          q.ExecSQL;
          q.Transaction.CommitRetaining;
        except
          on e:exception do begin
            ShowMessage('Error '+e.Message);
          end;
        end;
    
      finally
          q.Free;
      end;
    
    end;
    
    
    
    //firebird event. when insert data, start unitimer and refresh data.
    procedure TMainForm.IBEvents1EventAlert(Sender: TObject; EventName: string;
      EventCount: Integer; var CancelAlerts: Boolean);
    begin
      if EventName='new_data' then begin
          UniTimer1.Enabled:=true;
    
      end;
    end;
    
    
    
    procedure TMainForm.UniTimer1Timer(Sender: TObject);
    begin
      UniTimer1.Enabled:=falsE;
      //new record inserted, refresh data
      IBQuery1.Close;
      IBQuery1.Open;
    end;
    

    Hi

    I'm traying refresh query when firebird event is fired. (the firebird event is fired when a record is inserted to table).

     

    when firebird event fired,  i call unitimer1.enabled:=true,  to refresh query, but an error ocurrs, see attached error.

     

    Unigui pro 0.99.0.1169

    ibx components to connect firebird database and manage firebird event. (tested with ibdac and same problem).

    firebird 2.5.2 versión.

    codegear xe2.

     

    i attach a simple example, press button to insert a record, then firebird event is fired.

     

     

    post-454-0-74931000-1430204332_thumb.jpg

    UNIFBEVENTS.rar

×
×
  • Create New...