Servoy Advanced Programming Guide For FileMaker Developers

Release notes for Servoy betas

Postby Jan Aleman » Thu Sep 04, 2003 11:35 am

== page 25==
productname LIKE '%a' means, productname ends with small a. a couple of them are returned as you can see.

== page 27==
the dot syntax is generally used to dig down a object tree, you could see a table-column structure as an object structure therefore saying:
table.columnname. In JavaScript and other OO languages this is a common way to refer to objects. Other than this there is not much to say about it. Parenthesis are used to pass arguments, arguments are never passed behind a dot.
== page 28==
All an alias in SQL is is a different way to name an element. It's not a variable just an 'on the fly' renaming of a column.
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby Jan Aleman » Thu Sep 04, 2003 12:13 pm

== page 42==
Variables are just like Filemaker Pro globals, a place to hold a variable and only valid on the computer where executed. They are only valid in the current method (fmp: script) where they are executed. Servoy also has Global Variables that are valid accross an entire solution (as opposed to FIlemaker where they are only valid in one file)

Variables can contain anything in JavaScript. It can even change from type on the fly, this is called weak typing.

In JavaScript it is possible to overwrite variables. It will not warn you if you attempt to do that. Basicly that is the same as overwriting a Global in Filemaker Pro. As with any programming language: Know what you are doing.

JavaScript variables are just like FIlemaker globals only valid for the current execution.

== Page 44==
The demonstrated example just shows you CAN declare multiple variables at once even initializing some to NULL. In general it is good practice to declare them on separate lines to improve readability

== Page 47==
Sometimes you want to initialize a variable to used it further onwards, you can leave it undefined when you declare it to use it later.

== Page 48==
NULL means it doesnt exist. Basicly undefined is also NULL but somehow the JavaScript creators decided to give it a separate name as well.
A variable that has not been assigned a value is of type undefined. A method or
statement also returns undefined if the variable that is being evaluated does
not have an assigned value.
You can use undefined to determine whether a variable has a value.
In general I tend to use NULL everywhere as that is also the way used in Java and SQL

== Page 54==
You can find a very short but clear description of Object here:
http://headcase.case.syr.edu/welcome/In ... page3.html

== Page 67==
Objects can be variables. Objects can have properties and functions.
There are many introductions to Object Orientation out there, for example:
http://www.futureobjects.de/content/intro_oo_e.html
Alternatively do a search in Google and check which introduction works best for you.
== Page 145==
Yes, Servoy traps for usage of all reserved JavaScript word as well as reserved Servoy words and reserved SQL words
== Page 167==
Servoy will support Halt in the future to be able to support converted scripts. It is not recommended to use Halt both in Servoy and in Filemaker. It's better to program your scripts/methods correctly
== Page 178==
That's an error in the manual. setErrorCapture is also available in Servoy Client.
== controller==
The controller controls the current form. It's the object that can manage all form actions such as: new record, delete, sort, find, etc.
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby Morley » Thu Sep 04, 2003 2:38 pm

Morley -- Two general comments. The first half of the document reviews SQL and JavaScript concepts, occasionally but hardly ever discussing FMP equivalents, thus making for very hard reading and understanding for the neophyte to these environments. The second half reverses itself, running down all the FMP script steps and functions, the Servoy equivalents, one by one.


Jan -- Is that good or not? The idea is that you get an overview of SQL and JavaScript first and then start comparing this new knowledge to Filemaker. Did we achieve that? or not? How can we improve?


I'd recommend a paragraph off the top outlining where you're going. For the neophyte to SQL and JavaScript (me), it would help to draw parallels and contrasts to the already known environment of FMP (the audience this document is intended for). I would argue that all developers migrating from FMP to SQL and JS will need to be conversent with the contrasts in any case. So it would help to make them as issues are raised.

Morley -- In Chapter 4 with the introduction of JavaScript Objects I so badly lost my way I came close to abandoning ship. Objects are clearly an important concept, but without a clear foundation it proved nearly impossible to understand much of what followed. The definition of terms is terse to the point of tease, at least for this reader. I need context, examples, contrast, an explanation of the utility of Objects, what life would be like without them, etc. I have a general understanding of the overall concept, but has never had a programming environment to put them into practice. I'm still as clear as mud on this issue when it comes to the Servoy environment.


Jan -- We will consider adding an introduction to objects as well. There are however already many, many publications that cover that so I'm not sure that should be covered by this book.


A paragraph or two of intro, plus URL links to other sites and books for further reading, is probably all that's required. In fact, links for further learning throughout would be highly recommended.

Jan -- WHERE name IN ('Servoy', 'Bob') THe above is called a membership test, it searches in the field NAME for the values "Servoy" or "Bob". In Filemaker you perform a membership testing by searching for multiple values in the same field, separating them using the 'New Request' command.


An example of a contrast to FMP that would be helpful as we unlearn assumptions and take on new concepts.

The more I dig into it, the more I'm impressed with Servoy and its approach to SQL. Much thanks for the clarifications.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Postby Jan Aleman » Thu Sep 04, 2003 3:34 pm

== page 180==
Servoy only has one form of goto releated which does exactly what it says, it shows related records, nothing more and nothing less.

We frequently invoke Show GTRR just before jumping to a layout, or before running a loop. But there must be dozens of different ways we use this very useful command. I need much greater clarity on this one, please. Comments?


What else would you like to know about it?

== page 183==
Taborder is planned for future versions.

== page 186==
What do you mean with sort dialog is customizable?

To unsort use loadAllRecords

== page 198==
Show index is a specific Filemaker function that is not available in Servoy. First of all most SQL environments don't allow you to retrieve the contents of an index, secondly most SQL database index per column as opposed to Filemaker which indexes per word. There are many other ways in Servoy to help users search for data, keep in mind that in Servoy you have navigation panels to help navigation and search as well as popup forms that you can design to offer fast searches with much greater flexibility. Lastly you also have full SQL access to any datasource for even greater flexibility.

== page 204==
deleteRecord doesnt warn currently, there are plans to add that though.

== page 207==
The amount of rows is only limited by available memory.

Servoy loop is much faster than Filemaker's loop. For VERY big replaces we still recommend executing an update statement directly on the backend database.

== page 210==
Import Records/Export is not available as a method step. You can do export and import using dialogs or write directly data to a file (using a method to gather the data). Import and export through methods is planned for a future version.

Servoy always freezes the window during method. If you explicitly want to refresh it use updateUI(). Much easier than Filemaker Pro.

We don't have scroll window at this time.

Toggle window is not relevant as Servoy has an SDI (Single Document Interface). The status area can not be changed at runtime (only in designer)

== page 219==
showdialog only does very basic dialogs. For more controll use showFormInDialog, with that function you can pop a form into a dialog giving you ALL the flexibility (design, scripts, events) you could ever need.

== page 225==
you can use executeProgram to accomplish that

== page 229==
As of Servoy 1.1.1 that command is now available
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby Morley » Thu Sep 04, 2003 4:17 pm

jaleman wrote:Servoy will support Halt in the future to be able to support converted scripts. It is not recommended to use Halt both in Servoy and in Filemaker. It's better to program your scripts/methods correctly


Here's how we're currently using the Halt command within FMP. I'd be curious to know an alternative.

Because the Mac OS supports zoom, as control is shifted from file to file, open windows of other files appear underneath. Therefore we've created a utility script which calls a Hide command in the other files, then calls Halt.

When we make a call to an external script that transfers control, we follow it up with a call to that file's Halt Script which also ensures the user is left in the target file, not dangling in the originating file.

I would assume within a Servoy environment calls to such Halt Scripts would not be required.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Postby Morley » Thu Sep 04, 2003 4:26 pm

jaleman wrote:== page 180==
Servoy only has one form of goto releated which does exactly what it says, it shows related records, nothing more and nothing less.

We frequently invoke Show GTRR just before jumping to a layout, or before running a loop. But there must be dozens of different ways we use this very useful command. I need much greater clarity on this one, please. Comments?


What else would you like to know about it?


In FMP there are two forms -- just go to the first available related record, and Show which presents only records that satisfy the relationship.

It sounds as if Servoy has only the equivalent of FMP's Show GTRR, which is fine. Initially I read your text as the other way around.

Within FMP we frequently use the Count function to identify whether there are any records satisfying the relationship before involking GTRR. Even more frequently we use Show GTRR before initiating a loop.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Postby Morley » Thu Sep 04, 2003 4:35 pm

jaleman wrote:== page 198==
Show index is a specific Filemaker function that is not available in Servoy. First of all most SQL environments don't allow you to retrieve the contents of an index, secondly most SQL database index per column as opposed to Filemaker which indexes per word. There are many other ways in Servoy to help users search for data, keep in mind that in Servoy you have navigation panels to help navigation and search as well as popup forms that you can design to offer fast searches with much greater flexibility. Lastly you also have full SQL access to any datasource for even greater flexibility.


The major way we currently use the Index function is this. In FMP we present the user with a "Search..." button, which switches the user into Find mode and a special screen. Here they are shown with fields with buttons next to each. The button presents the user with an Index of all the valid options for that field.

This has been a very user friendly intuitive search technique for our users. What would be a suitable Servoy technique for an equivalent?

We frequently use the Index function when developing within FMP but the above is the only one I can think of to which the end user has access.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Postby Jan Aleman » Thu Sep 04, 2003 4:41 pm

== page 273==
getSummary is not supported at this point in time. You can get the same behaviour by using a selfjoin or you can use an executeSQL statement to accomplish the same. Your SQL query will look like this:
FMP: GetSummary(summary field, break field)
SQL: Select SUM(summary field) from tablename where BreakField= break field

Replace SUM with desired summary function, tablename with the name of the table, summary field with the field you want to sum on, BreakField with the column name of the break field and "break field" with the value of BreakField in the current record.

== status current error==
More errors will appear soon, it is work in progress

==page 295==
getMaxRecordIndex() returns max 200 rows, so it is very usable to check on counts, if you have more rows you can use getFoundSetCount() which will be expensive if you have millions of rows so only use it if you really need to know the TOTAL foundcount

Servoy doesnt have a unique form number so the currentLayoutnumber function cannot be supported

==page 309==
There is no usercount currently but it will be added in future versions

==page 313==
In servoy you can fill a valuelist with a custom selection of choices.
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby Jan Aleman » Thu Sep 04, 2003 4:44 pm

Within FMP we frequently use the Count function to identify whether there are any records satisfying the relationship before involking GTRR. Even more frequently we use Show GTRR before initiating a loop.

Both are supported by Servoy
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby Morley » Thu Sep 04, 2003 4:46 pm

jaleman wrote:== page 210==
Import Records/Export is not available as a method step. You can do export and import using dialogs or write directly data to a file (using a method to gather the data). Import and export through methods is planned for a future version.


Recommend adding that clarification to the text.

We use FMP's Import function quite extensively behind the scenes in supporting clients. We definitely need to know the options for bringing data in.

Currently we also give users access to FMP's Export function through a script. Select a document and instead of choosing the Print button, choose Export. The user is then given a choice of Excel or FMP formats. In fact the Excel option is tab delimited text with a ".xls" extension.

It would be useful to know what options we can give to end users for migrating selections of their data for independent analysis. A genuine Excel format would be excellent.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Postby Jan Aleman » Thu Sep 04, 2003 4:51 pm

Morley wrote:
jaleman wrote:Servoy will support Halt in the future to be able to support converted scripts. It is not recommended to use Halt both in Servoy and in Filemaker. It's better to program your scripts/methods correctly


Here's how we're currently using the Halt command within FMP. I'd be curious to know an alternative.

Because the Mac OS supports zoom, as control is shifted from file to file, open windows of other files appear underneath. Therefore we've created a utility script which calls a Hide command in the other files, then calls Halt.

When we make a call to an external script that transfers control, we follow it up with a call to that file's Halt Script which also ensures the user is left in the target file, not dangling in the originating file.

I would assume within a Servoy environment calls to such Halt Scripts would not be required.


Because in Servoy methods have access to the entire solution (in filemaker only one file) you don't have to do the HALT workaround to end up somewhere. You should never use halt, always make your conditions in such a way that everything is catched properly.
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby Jan Aleman » Thu Sep 04, 2003 4:56 pm

Morley wrote:
jaleman wrote:== page 198==
Show index is a specific Filemaker function that is not available in Servoy. First of all most SQL environments don't allow you to retrieve the contents of an index, secondly most SQL database index per column as opposed to Filemaker which indexes per word. There are many other ways in Servoy to help users search for data, keep in mind that in Servoy you have navigation panels to help navigation and search as well as popup forms that you can design to offer fast searches with much greater flexibility. Lastly you also have full SQL access to any datasource for even greater flexibility.


The major way we currently use the Index function is this. In FMP we present the user with a "Search..." button, which switches the user into Find mode and a special screen. Here they are shown with fields with buttons next to each. The button presents the user with an Index of all the valid options for that field.

This has been a very user friendly intuitive search technique for our users. What would be a suitable Servoy technique for an equivalent?

We frequently use the Index function when developing within FMP but the above is the only one I can think of to which the end user has access.


Can you give an example on how that helps? Doesn't a user know what he is searching for that he has to be presented with all possiblw words he can search for?
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby Morley » Thu Sep 04, 2003 4:58 pm

jaleman wrote:== page 219==
showdialog only does very basic dialogs. For more controll use showFormInDialog, with that function you can pop a form into a dialog giving you ALL the flexibility (design, scripts, events) you could ever need.


Excellent.

Currently we use the excellent Troi FMP Dialog exclusively, but I'd like to branch beyond even its limitations. Eager to see examples of what's possible within Servoy. Some references and screenshots in your document would be helpful.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Postby Morley » Thu Sep 04, 2003 5:12 pm

jaleman wrote:==page 295==
getMaxRecordIndex() returns max 200 rows, so it is very usable to check on counts, if you have more rows you can use getFoundSetCount() which will be expensive if you have millions of rows so only use it if you really need to know the TOTAL foundcount.


In other words Servoy really does have equivalents to FMP's CurrentFoundCount function. One which will efficiently report if a relationship has any rows, a handful or something more than 200.

I doubt very much we'll have much call on getFoundSetCount() but it's good to know it's available.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Postby Morley » Thu Sep 04, 2003 5:14 pm

jaleman wrote:==page 313==
In servoy you can fill a valuelist with a custom selection of choices.


Please elaborate.
User avatar
Morley
 
Posts: 891
Joined: Fri Apr 25, 2003 4:54 pm
Location: Toronto, Canada

Previous

Return to Latest Releases

Who is online

Users browsing this forum: No registered users and 13 guests