Page 2 of 2

PostPosted: Mon Apr 03, 2006 3:44 pm
by hpmxxx
Hello Rene,

Thanks for bringing some light to me about this feature. In this context I have to questions:

1) How are you dealing with dynamic things like "element.settings based on a field value" ?

For example like the following code which is used on a record view report:

Code: Select all
if ( pobox_status )
{
//set label pobox visible
elements.fl_label_pobox.visible = true;
elements.ffxtxt_label_pobox.visible = true;
}
else
{
//set label pobox invisible
elements.fl_label_pobox.visible = false;
elements.ffxtxt_label_pobox.visible = false;
}


This code works as long as only one record should be printed. But if I 'm printing multiple records which have different values in "pobox_status", I need an event like "onPrintRecord" or better "beforePrintRecord" :). This event has to work on a print preview, doesn't it?

At the moment the settings are based on the "pobox_status" from the first record, and the code has no effect on the following records because it is executet before the print preview is shown.

At the moment the only solutions I'm seeing, are a html area (I don't like html for printing -> pagebreaks, etc.) or calculation fields (in this case ends up in two more calcs only for a gui effect -> label and field).

2) How can I set page settings like: size, orientation and margins by scripting?


Thanks for help
Hans-Peter

PostPosted: Wed Apr 05, 2006 9:44 pm
by john.allen
Hi Morley,

I just happened to notice this post of yours of a week ago or so.
In my solution Rich Client via a server is about three to four times slower than Servoy Developer via localhost. Thus, coding which seems fine in Developer can be found unacceptable when served to users.
Based on this I would definitely say that there is some network bottleneck going on there as Robert suggested. The regular Servoy client is always faster than Developer in my experience unless the client has some network issue. This stands to reason as there is so much more going on in Developer. Sometimes, when I notice a little pause running some method on Developer, I look at it using Client (with the same network access) and it is always instantaneous. If you ever notice things are faster in Developer than the client there is definitely something going with the network setup.

PostPosted: Thu Apr 06, 2006 3:05 pm
by Morley
john.allen wrote:Hi Morley,

I just happened to notice this post of yours of a week ago or so.
In my solution Rich Client via a server is about three to four times slower than Servoy Developer via localhost. Thus, coding which seems fine in Developer can be found unacceptable when served to users.
Based on this I would definitely say that there is some network bottleneck going on there as Robert suggested. The regular Servoy client is always faster than Developer in my experience unless the client has some network issue. This stands to reason as there is so much more going on in Developer. Sometimes, when I notice a little pause running some method on Developer, I look at it using Client (with the same network access) and it is always instantaneous. If you ever notice things are faster in Developer than the client there is definitely something going with the network setup.

Hi John,

Let's be clear we're talking about the same thing. With Developer I'm running two ways. Principal development is via Servoy's default environment using localhost, i.e. no network at all. The advantages being I don't worry about mangling my development test data and I don't disturb the production server. Performance is always almost instantaneous.

I also test with Developer pulling data from the production server via the internet. This is always slower than via localhost. For instance, the loadRecord() function can take a second or two, occasionally more, instead of a few milliseconds. This form of testing gives me a preview of performance bottlenecks without having to commit a new release to the server. Servoy Client over the net, on the other hand, is somewhat faster than Developer over the net. I've not performed an exact comparison, but that's the impression.

In my original posting I was hypothesizing the possibility Servoy3 could move towards the performance of Developer localhost. For the following reasoning. By running a virtual client locally on the server, Servoy3 may be more efficient than the dialogue of Servoy2 client to server to client. I emphasize "may" because there are several other factors at work here as well, such as the new additional task of generating HTML and then drawing the screen. So, in some ways, my speculation was also a hope.

Robert seems to think Servoy3 will be slower than Servoy2, all other things being equal. I've heard nothing to confirm or deny his expectation. I'd be very interested to know the results of some field testing.

Let me know if I was understanding your points correctly.

Kind regards,

PostPosted: Thu Apr 06, 2006 6:31 pm
by john.allen
Hi Morley,

By running a virtual client locally on the server, Servoy3 may be more efficient than the dialogue of Servoy2 client to server to client. I emphasize "may" because there are several other factors at work here as well, such as the new additional task of generating HTML and then drawing the screen.

Leaving aside the HTML/screen redraw for a moment, as far as my understanding of how 3 works as a web client is that there is no possibility of it being faster than the regular client. Communication still has to go via the Servoy server and then to the database server back the same way and then to the local browser. And I can't imagine that there could be 'less' network traffic even with AJAX than with the regular client. When you bring in the screen redraw stuff - again even with AJAX - I think it is bound to be slower. I'm a little prejudiced admittedly because of a constant battle going on here over browser based solutions. And I love the fact that Servoy is doing the web client because there is a real need for it. But for a solution that will have users doing constant data entry, my feeling is that the regular client will always be the way to go. A browser is built for browsing: great for offering clients who need access anywhere, anytime and who aren't having to use it all day long entering data. But those needing to use a solution constantly, the control, richness and speed of a regular application is always better: it doesn't have to get funneled through a browser.

We do have very fast connections here but I find with my solutions that the client solutions via the internet are still faster than Developer running locally. Both are very 'fast' - no problems at all - but my experience is that the client on a fast network is even faster than Developer locally.

John

PostPosted: Thu Apr 06, 2006 8:26 pm
by Morley
john.allen wrote:We do have very fast connections here but I find with my solutions that the client solutions via the internet are still faster than Developer running locally. Both are very 'fast' - no problems at all - but my experience is that the client on a fast network is even faster than Developer locally.

John

Thanks for your comments, John. They clarify the lay of the land considerably. In light of your remarks I'll be tilting my users towards the rich client rather than the web client. It's easy for the timid to opt for the familiar web browser route but performance is always a significant issue.

Overall (excepting a few functions) my solution performs well via Servoy Client over the internet but Servoy Developer localhost always trumps it -- the direct opposite of your experience. I'm guessing you're not going out to the internet cloud on your connections.

Kind regards,

PostPosted: Sat Apr 08, 2006 3:15 pm
by Rene
Hello Hans-Peter,

1. Another solution is to loop through the records and printing the records one by one.

2. As far as I know this is not (yet) possible. Do you mean you have different size, orientation and margins per record?
You can only set these settings on the form in designer

Rene

PostPosted: Tue Jul 04, 2006 10:31 pm
by amcgilly
From the beta 1 announcement:

Will default only work on Java 5!
To run Servoy 3.0 under Java 1.4.x use: java - Djava.security.policy="./server/conf/catalina.policy" -jar servoy_developer.jar


In case anyone is copying and pasting this into their command prompt, there's a slight typo - there should be no space between the - and the D, so it should be:

java -Djava.security.policy="./server/conf/catalina.policy" -jar servoy_developer.jar

Re: Servoy 3.0 Beta 1

PostPosted: Fri Sep 22, 2006 4:45 pm
by Karel Broer
Jan Blok wrote: [enh]- application.getValueListDisplayValue(...)
[enh]-application.getValueListArray(...)

I try to get the length of application.getValueListArray('myValuelist') with:

var valueArray = application.getValueListArray('myValuelist')
var size = valueArray.length

...but I get null as result :(

PostPosted: Fri Sep 22, 2006 5:05 pm
by IT2Be
I have also noticed that this week but with 2.2.5 . Forgot to mention/report it.

PostPosted: Fri Sep 22, 2006 5:59 pm
by Karel Broer
IT2Be wrote:I have also noticed that this week but with 2.2.5 . Forgot to mention/report it.

var word = myString
application.getValueListDisplayValue('myValuelist', word)
Doesn't work either :(