Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 20 of 24 total
Thread Raul's comment Re: Frustrated
Sat, Jul 21 2012 12:39 PMPermanent Link

Gerald J. Clancy, Jr.

Thank you, Uli. Will definitely look these over.

The forum doesn't show up in Outlook Express in the Subscribe list for
news.elevate.com.

Jerry

"Uli Becker" <johnmuller54@googlemail.com> wrote in message
news:0A72B7FB-3BCC-42A4-B430-963E482CBD09@news.elevatesoft.com...
> Jerry,
>
>> Uli, I don't see any demos newsgroup.
>
> http://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_demos
>
> Uli
>
Sat, Jul 21 2012 1:15 PMPermanent Link

Raul

Team Elevate Team Elevate

Jerry,

This works just fine - i'm using it today.

It's very important to understand that the TDataSet in EWB has nothing
to do with the back-end database. It's simply a EWB construct to make
dealing with table data easy and it handles the to/from JSON conversions
for you and otherwise provides navigation etc.
In fact EDB, DBISAM, MS-SQL, etc will look identical on the EWB side.

All Tim will do is to provide the EDB-to-JSON on the server side.

However as i said before it's fairly trivial - i wrote a generic DBISAM
to JSON module in about 2 hours and now my web server can serve ANY
DBISAM table to EWB apps.


On EWB side you would do something like this :
- (optional) if you have blank TDataSet you can do a web request and use
LoadRows to get the column definitions into it. Your back end has to
send back the JSON as per EWB spec for column definitions.

- if you already have the table structure defined then you can just load
data us by setting base URL and using the "load" function
(your back end will need to basically return the rows JSON).

One your dataset is populated you can use as you want :
- "MyDataSet.Columns['MyColumn'].AsString" lets you access the value of
"MyColumn" field in the current row and you can assign it anyways you want:
Edit1.text := MyDataSet.Columns['MyColumn'].AsString;
or
Grid1.Cells[1,1] := MyDataSet.Columns['MyColumn'].AsString;

or use it in data-bound mode which makes things even easier for basic
display etc.

The EWB install comes with couple of examples : cdcollector and
masterdetail (in examples folder of installed EWB).

> Which component, BTW, would I use to return pure HTML?

Sorry - not sure what you're asking here. Your back-end web service can
return whatever you want and you can access it from web request as pure
text in EWB if all you want is to display or parse it.


Raul



On 7/20/2012 8:52 PM, Jerry Clancy wrote:
> Thanks to all for your posts. I just want to be clear regarding what I
> would like to see.
>
> I rarely, if ever, expose databases at the client side, preferring
> instead to populate non-data-aware controls, paging if necessary. My
> concern with EWB is how on the backend/server side to access a DBISAM
> database so that I can use the records to populate those non-data-aware
> controls, such as combo boxes, grids or whatnot, e.g., the equivalent of
> something like this:
>
>   Grid1.Cells[0,Grid1.RowCount-1] :=
> MyTable.FieldByName('SomeField').AsString;
>
> Presumably, Tim will provide table components for his own products,
> namely DBISAM and EDB, allowing statements similar to tha above. In the
> interim, does anyone have a code snippet on how you would currently to
> this with WWB?
>
> Such an example would go a long way towards making me a bit comfortable
> here.
>
> For the most part our ISAPI apps go to a "parameters" form from a menu.
> The user fills out the parameters and clicks a Report button which will
> result in a pdf, rtf or html report returned.
>
> Which component, BTW, would I use to return pure HTML?
>
> Jerry
>
>
> "Bob Devine" <bobd@nospam.com> wrote in message
> news:699EEAE8-0C44-4AF2-B1F9-240A69295AF6@news.elevatesoft.com...
>> Hi Jerry
>>
>> Remember EWB is for web application development - i.e. all data will
>> be served up by a web server, not by direct connections into a
>> database. I doubt very much there will ever be a DBISAM driver - it
>> wouldn't make sense. JSON is not "interim" - it's the standard format
>> used to serve data to Javascript apps in a browser - not just in EWB.
>>
>> I've been using EWB for several months now (actually since last
>> December) developing a pretty large scale app - although it's
>> pre-release it's been solid during that time.
>>
>> As Raul and Matthew suggested try building a server app with an
>> in-built web server. This is where your DBISAM drivers will be,
>> getting data and serving it up in JSON format.
>>
>> Cheers, Bob
>
Sat, Jul 21 2012 9:43 PMPermanent Link

Gerald J. Clancy, Jr.

Raul,

I really appreciate your response. I'd love to see that DBISAM-to-JSON
module if you are of a mind to share it. That piece is the only large
concern I have left. I just don't have the kind of time to do a lot of new
backend work. All we use is DBISAM and our apps generally use 20-30 tables.

I've been spending some time on this today. Downloaded the cdcollector app
and, while I can run it from browsers, I am having some minor problems
getting it to compile and run. I think it is pathing issues, but let me post
separately on that. Having reviewed some of the code, however, I do
understand your comment below on TDataSet.

If I understand this correctly (and using cdcollector as an example), I
would develop our own "LoadDataSet" function, probably in some generic data
unit, which would send a ServerRequest (an HTTP GET/POST?) to the "real" web
server (we run one in-house) access the real database and return
JSON-formatted data. This implies functions/programs need to be written (I
guess Delphi programs as .exes or ISAPIs) to handle the server requests at
our server. This is where at the moment things get fuzzy. I suspect that
this is also where something like SuperObject that Walter had mentioned in a
long-ago post comes in.

It's late. I'll pick this up again tomorrow afternoon.

As for the last part of my earlier post, what I meant to ask is which EWB
component would I use to populate with pure HTML for display to the user.
TIWText is a comparable IntraWeb component where, if you set a "Raw"
property, the HTML is converted to a proper display. Our primary app output
is reports.

Thanks, again.

Jerry

"Raul" <raul@removethis.raul.ca> wrote in message
news:1B6B366B-9379-4F8E-8C2E-72D65111D391@news.elevatesoft.com...
> Jerry,
>
> This works just fine - i'm using it today.
>
> It's very important to understand that the TDataSet in EWB has nothing to
> do with the back-end database. It's simply a EWB construct to make dealing
> with table data easy and it handles the to/from JSON conversions for you
> and otherwise provides navigation etc.
> In fact EDB, DBISAM, MS-SQL, etc will look identical on the EWB side.
>
> All Tim will do is to provide the EDB-to-JSON on the server side.
>
> However as i said before it's fairly trivial - i wrote a generic DBISAM to
> JSON module in about 2 hours and now my web server can serve ANY DBISAM
> table to EWB apps.
>
>
> On EWB side you would do something like this :
> - (optional) if you have blank TDataSet you can do a web request and use
> LoadRows to get the column definitions into it. Your back end has to send
> back the JSON as per EWB spec for column definitions.
>
> - if you already have the table structure defined then you can just load
> data us by setting base URL and using the "load" function
> (your back end will need to basically return the rows JSON).
>
> One your dataset is populated you can use as you want :
> - "MyDataSet.Columns['MyColumn'].AsString" lets you access the value of
> "MyColumn" field in the current row and you can assign it anyways you
> want:
> Edit1.text := MyDataSet.Columns['MyColumn'].AsString;
> or
> Grid1.Cells[1,1] := MyDataSet.Columns['MyColumn'].AsString;
>
> or use it in data-bound mode which makes things even easier for basic
> display etc.
>
> The EWB install comes with couple of examples : cdcollector and
> masterdetail (in examples folder of installed EWB).
>
> > Which component, BTW, would I use to return pure HTML?
>
> Sorry - not sure what you're asking here. Your back-end web service can
> return whatever you want and you can access it from web request as pure
> text in EWB if all you want is to display or parse it.
>
>
> Raul
Sat, Jul 21 2012 11:42 PMPermanent Link

Rick

"Jerry Clancy" <jclancy@billtrak.com> wrote in message
news:3CE9EE09-BBF5-4CAB-9E18-B125305058BA@news.elevatesoft.com...
>
> The forum doesn't show up in Outlook Express in the Subscribe list for
> news.elevate.com.
>
>


Jerry, I use news.eleveatesoft.com in Outlook Express and I can see group
elevatesoft.public.webbuilder.demos in the list.

Make sure you are using the correct server address and click the Reset list
button.

--
Rick

Sun, Jul 22 2012 8:25 AMPermanent Link

MalcolmC

Avatar

Uli

Thanks for the link

I was not aware of it even though I had recently reset my OE.

--

Malcolm
Townsville, Australia



"Uli Becker" <johnmuller54@googlemail.com> wrote in message
news:0A72B7FB-3BCC-42A4-B430-963E482CBD09@news.elevatesoft.com...
> Jerry,
>
>> Uli, I don't see any demos newsgroup.
>
> http://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_demos
>
> Uli
>

Sun, Jul 22 2012 10:58 AMPermanent Link

Gerald J. Clancy, Jr.

Bingo! Reset did the trick. Thanks.

"Rick" <NOSPAMradwal@NOSPAMncable.net.au> wrote in message
news:F4F767D3-4E68-404F-80F7-D15D190A7D2C@news.elevatesoft.com...
> "Jerry Clancy" <jclancy@billtrak.com> wrote in message
> news:3CE9EE09-BBF5-4CAB-9E18-B125305058BA@news.elevatesoft.com...
>>
>> The forum doesn't show up in Outlook Express in the Subscribe list for
>> news.elevate.com.
>>
>>
>
>
> Jerry, I use news.eleveatesoft.com in Outlook Express and I can see group
> elevatesoft.public.webbuilder.demos in the list.
>
> Make sure you are using the correct server address and click the Reset
> list button.
>
> --
> Rick
>
Sun, Jul 22 2012 1:09 PMPermanent Link

Uli Becker

Malcolm,

> Thanks for the link
> I was not aware of it even though I had recently reset my OE.

You are welcome.
I switched to Mozilla Thunderbird as newsreader. Less problems Smile

There are some interesting posts in the demos ng, especially the
testserver project. It can easily be adapted to EDB.

Regards Uli

Sun, Jul 22 2012 1:16 PMPermanent Link

Raul

Team Elevate Team Elevate

Jerry,

Sorry for long post but you started it Smile

I posted a small proof of concept sample here in case you're interested:

http://rauls1.s3.amazonaws.com/DBIsamWebDemo.zip

It's a stand-alone app that has a web server built in (that talks EWB
JSON) as well as sample EWB table viewer app in poctblview folder

to run
- run the dbisamwebserver and allow it to listen on port if windows prompts
- you need to take it back offline and change the "database folder" to
somewhere you have some sample DBISAM4 tables (or just copy some tables
into the same folder exe is in)

- fire up browser and goto http://localhost/poctblview/tblview.html
(assumes port 80 - otherwise do
http://localhost:<port>/poctblview/tblview.html)

- enter table name (without dat extension) )click Get Columns and if all
is well the grid is filled with columns and data = served from your tables

I can provide a source for the EWB side (exe is using lot of our
internal classes so i can list some JSON related code but otherwise i
can't give source for that.).

EWB code is fairly straightforward (and in this case i've stripped most
of error handign to make it simpler):

- one TDataSet called "TableContent"
- and one grid called "Grid1" which is data-bound to  TableContent

since we don't know the table schema we must do following :
- first get the columns from web service (by doing a new server request
and adding the "method=columns" to params list so server knows to give
back column data)

procedure TForm1.btnGetColumnsClick(Sender: TObject);
var
 req:TServerRequest;
begin
  req := srQueue.GetNewRequest;
  req.URL := 'http://'+window.location.host+'/table/' + EditTablename.Text;
  req.Params.Add('method=columns');
  req.Data := TableContent;
  req.OnComplete := ColumnRequestComplete;
  srQueue.AddRequest(req);
end;


- once that completes i just load it into TDataSet using LoadColumns and
then populate the grid with columns as well (not sure if there is an
easier way there - for now i just loop over them in TDataSet and insert
into grid column defs.). Once columns are in i do the data request by
callign LoadTableData):

procedure TForm1.ColumnRequestComplete(Request: TServerRequest);
var  i:integer;
     tmpGCol:TGridColumn;
begin
  if (Request.StatusCode=200) then
    begin
      if (Request.Data <> nil) then
      begin
        TDataSet(Request.Data).Close;
        Grid1.Dataset := nil;
TDataSet(Request.Data).LoadColumns(Request.ResponseContent.Text);
        Grid1.Columns.Clear;
        for i := 0 to tablecontent.columncount-1 do
        begin
          tmpGCol := Grid1.Columns.Add;
          tmpGCol.Caption := TableContent.Columns[i].name;
          tmpGCol.DataColumn := TableContent.Columns[i].name;
        end;
        TDataSet(Request.Data).Open;
        Grid1.Dataset := TableContent;
        LoadTableData;
      end;
    end;
end;

- final piece is the LoadTableData that is trivial since the data load
is already written on framework side:

procedure TForm1.LoadTableData;
begin
  TableContent.DatasetName := EditTablename.Text;
  Database.baseURL := 'http://'+window.location.host+'/table/';
  Database.load(TableContent);
end;

That's all there is in EWB

See if any of this helps at all and questions welcome

Raul


On 7/21/2012 9:43 PM, Jerry Clancy wrote:
> Raul,
>
> I really appreciate your response. I'd love to see that DBISAM-to-JSON
> module if you are of a mind to share it. That piece is the only large
> concern I have left. I just don't have the kind of time to do a lot of
> new backend work. All we use is DBISAM and our apps generally use 20-30
> tables.
>
> I've been spending some time on this today. Downloaded the cdcollector
> app and, while I can run it from browsers, I am having some minor
> problems getting it to compile and run. I think it is pathing issues,
> but let me post separately on that. Having reviewed some of the code,
> however, I do understand your comment below on TDataSet.
>
> If I understand this correctly (and using cdcollector as an example), I
> would develop our own "LoadDataSet" function, probably in some generic
> data unit, which would send a ServerRequest (an HTTP GET/POST?) to the
> "real" web server (we run one in-house) access the real database and
> return JSON-formatted data. This implies functions/programs need to be
> written (I guess Delphi programs as .exes or ISAPIs) to handle the
> server requests at our server. This is where at the moment things get
> fuzzy. I suspect that this is also where something like SuperObject that
> Walter had mentioned in a long-ago post comes in.
>
> It's late. I'll pick this up again tomorrow afternoon.
>
> As for the last part of my earlier post, what I meant to ask is which
> EWB component would I use to populate with pure HTML for display to the
> user. TIWText is a comparable IntraWeb component where, if you set a
> "Raw" property, the HTML is converted to a proper display. Our primary
> app output is reports.
>
> Thanks, again.
>
> Jerry
>
> "Raul" <raul@removethis.raul.ca> wrote in message
> news:1B6B366B-9379-4F8E-8C2E-72D65111D391@news.elevatesoft.com...
>> Jerry,
>>
>> This works just fine - i'm using it today.
>>
>> It's very important to understand that the TDataSet in EWB has nothing
>> to do with the back-end database. It's simply a EWB construct to make
>> dealing with table data easy and it handles the to/from JSON
>> conversions for you and otherwise provides navigation etc.
>> In fact EDB, DBISAM, MS-SQL, etc will look identical on the EWB side.
>>
>> All Tim will do is to provide the EDB-to-JSON on the server side.
>>
>> However as i said before it's fairly trivial - i wrote a generic
>> DBISAM to JSON module in about 2 hours and now my web server can serve
>> ANY DBISAM table to EWB apps.
>>
>>
>> On EWB side you would do something like this :
>> - (optional) if you have blank TDataSet you can do a web request and
>> use LoadRows to get the column definitions into it. Your back end has
>> to send back the JSON as per EWB spec for column definitions.
>>
>> - if you already have the table structure defined then you can just
>> load data us by setting base URL and using the "load" function
>> (your back end will need to basically return the rows JSON).
>>
>> One your dataset is populated you can use as you want :
>> - "MyDataSet.Columns['MyColumn'].AsString" lets you access the value
>> of "MyColumn" field in the current row and you can assign it anyways
>> you want:
>> Edit1.text := MyDataSet.Columns['MyColumn'].AsString;
>> or
>> Grid1.Cells[1,1] := MyDataSet.Columns['MyColumn'].AsString;
>>
>> or use it in data-bound mode which makes things even easier for basic
>> display etc.
>>
>> The EWB install comes with couple of examples : cdcollector and
>> masterdetail (in examples folder of installed EWB).
>>
>> > Which component, BTW, would I use to return pure HTML?
>>
>> Sorry - not sure what you're asking here. Your back-end web service
>> can return whatever you want and you can access it from web request as
>> pure text in EWB if all you want is to display or parse it.
>>
>>
>> Raul
>
Sun, Jul 22 2012 1:59 PMPermanent Link

Gerald J. Clancy, Jr.

I'll look at it. Thanks for the tip.

"Uli Becker" <johnmuller54@googlemail.com> wrote in message
news:988BF33B-DDCB-40D4-8C05-B0AD1FE41991@news.elevatesoft.com...
> Malcolm,
>
> > Thanks for the link
>> I was not aware of it even though I had recently reset my OE.
>
> You are welcome.
> I switched to Mozilla Thunderbird as newsreader. Less problems Smile
>
> There are some interesting posts in the demos ng, especially the
> testserver project. It can easily be adapted to EDB.
>
> Regards Uli
>
>
Sun, Jul 22 2012 3:17 PMPermanent Link

Gerald J. Clancy, Jr.

Raul,

I have no problem with long posts, particularly when they are so useful.

The demo you sent worked fine with a couple of DBISAM files I copied over,
except that the server conversion program doesn't like Date fields -- it
stripped them all out.

I get the EWB side and it also uses the TServerRequest.URL field as I
expected. What I would like to see is your server-side JSON-related code
(without any of the proprietary stuff if you can extract it). I should be
able to cobble together a Delphi project to handle the calls and do the
conversion and run it as an .exe or callable .dll on our server. If I can
then develop and run a simple EWB project working on "my" data, I should
then be home free.

The EWB code you sent below is easily generalized for any DBISAM table
"open" as a TDataSet.

Can't thank you enough for the help.

Jerry

"Raul" <raul@removethis.raul.ca> wrote in message
news:8BAFAEF1-6A21-48C2-B885-B4C3EE8E85E7@news.elevatesoft.com...
> Jerry,
>
> Sorry for long post but you started it Smile
>
> I posted a small proof of concept sample here in case you're interested:
>
> http://rauls1.s3.amazonaws.com/DBIsamWebDemo.zip
>
> It's a stand-alone app that has a web server built in (that talks EWB
> JSON) as well as sample EWB table viewer app in poctblview folder
>
> to run
> - run the dbisamwebserver and allow it to listen on port if windows
> prompts
> - you need to take it back offline and change the "database folder" to
> somewhere you have some sample DBISAM4 tables (or just copy some tables
> into the same folder exe is in)
>
> - fire up browser and goto http://localhost/poctblview/tblview.html
> (assumes port 80 - otherwise do
> http://localhost:<port>/poctblview/tblview.html)
>
> - enter table name (without dat extension) )click Get Columns and if all
> is well the grid is filled with columns and data = served from your tables
>
> I can provide a source for the EWB side (exe is using lot of our internal
> classes so i can list some JSON related code but otherwise i can't give
> source for that.).
>
> EWB code is fairly straightforward (and in this case i've stripped most of
> error handign to make it simpler):
>
> - one TDataSet called "TableContent"
> - and one grid called "Grid1" which is data-bound to  TableContent
>
> since we don't know the table schema we must do following :
> - first get the columns from web service (by doing a new server request
> and adding the "method=columns" to params list so server knows to give
> back column data)
>
> procedure TForm1.btnGetColumnsClick(Sender: TObject);
> var
>  req:TServerRequest;
> begin
>   req := srQueue.GetNewRequest;
>   req.URL := 'http://'+window.location.host+'/table/' +
> EditTablename.Text;
>   req.Params.Add('method=columns');
>   req.Data := TableContent;
>   req.OnComplete := ColumnRequestComplete;
>   srQueue.AddRequest(req);
> end;
>
>
> - once that completes i just load it into TDataSet using LoadColumns and
> then populate the grid with columns as well (not sure if there is an
> easier way there - for now i just loop over them in TDataSet and insert
> into grid column defs.). Once columns are in i do the data request by
> callign LoadTableData):
>
> procedure TForm1.ColumnRequestComplete(Request: TServerRequest);
> var  i:integer;
>      tmpGCol:TGridColumn;
> begin
>   if (Request.StatusCode=200) then
>     begin
>       if (Request.Data <> nil) then
>       begin
>         TDataSet(Request.Data).Close;
>         Grid1.Dataset := nil;
> TDataSet(Request.Data).LoadColumns(Request.ResponseContent.Text);
>         Grid1.Columns.Clear;
>         for i := 0 to tablecontent.columncount-1 do
>         begin
>           tmpGCol := Grid1.Columns.Add;
>           tmpGCol.Caption := TableContent.Columns[i].name;
>           tmpGCol.DataColumn := TableContent.Columns[i].name;
>         end;
>         TDataSet(Request.Data).Open;
>         Grid1.Dataset := TableContent;
>         LoadTableData;
>       end;
>     end;
> end;
>
> - final piece is the LoadTableData that is trivial since the data load is
> already written on framework side:
>
> procedure TForm1.LoadTableData;
> begin
>   TableContent.DatasetName := EditTablename.Text;
>   Database.baseURL := 'http://'+window.location.host+'/table/';
>   Database.load(TableContent);
> end;
>
> That's all there is in EWB
>
> See if any of this helps at all and questions welcome
>
> Raul
« Previous PagePage 2 of 3Next Page »
Jump to Page:  1 2 3
Image