Hi everyone,
I'm new to Ebase and have a question regarding the scripting language... do most experienced Ebase dev's use Javascript more than FPL... or is there a time when you want to use both - I'm asking because I'd like to develop good habits starting off and I'd like to know if there is an advantage to using both.
Thanks,
Jason
Javascript and FPL
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 95
- Joined: Wed Feb 27, 2013 5:16 pm
We use Javascript...take a look at this thread from a while back.
http://forum.ebasetech.com/forum/viewto ... javascript
The ebase guys, moderators, have given some good answers
http://forum.ebasetech.com/forum/viewto ... javascript
The ebase guys, moderators, have given some good answers
0 x
-
- Ebase User
- Posts: 2
- Joined: Tue Jan 27, 2015 4:53 pm
Javascript and FPL
Perfect... Thanks for the quick response!
alexmcclune wrote:We use Javascript...take a look at this thread from a while back.
http://forum.ebasetech.com/forum/viewto ... javascript
The Ebase guys, moderators, have given some good answers
0 x
-
- Ebase User
- Posts: 649
- Joined: Mon Dec 09, 2013 6:37 pm
-
- Ebase User
- Posts: 95
- Joined: Wed Feb 27, 2013 5:16 pm
Following on the best practice sort of talk we have had in this thread and another I would like to explain how I built a form and I wondered if you guys thought it was good/bad practice.
Basically I found that for each form we developed we required a whole heap of scripts as we handled events on the various controls etc. I found this a bit hectic even when using a sensible naming convention within ebase. Our solution has been to create a number of global scripts to handle the some of the generic functionality followed by creating only two scripts per form.
One script that sets up parameters for the form.
One script that includes all of our functions for handling events on the controls within the form. These functions are then called via jquery as the script is then set as "client callable" and "shared" depending on how the functions are called.
Is there anything I should consider in creating the forms this way? Specifically security vulnerabilities...
Thanks
Basically I found that for each form we developed we required a whole heap of scripts as we handled events on the various controls etc. I found this a bit hectic even when using a sensible naming convention within ebase. Our solution has been to create a number of global scripts to handle the some of the generic functionality followed by creating only two scripts per form.
One script that sets up parameters for the form.
One script that includes all of our functions for handling events on the controls within the form. These functions are then called via jquery as the script is then set as "client callable" and "shared" depending on how the functions are called.
Is there anything I should consider in creating the forms this way? Specifically security vulnerabilities...
Thanks
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Technically, this approach makes the application more vulnerable to attack. This is because all the functions declared as "client callable" are now exposed to the browser.
If the concern is that you accumulate a large number of server scripts, an alternative approach might be to have just one script to handle all button clicks, immediate validations, hyperlink clicks, image clicks etc - in fact everything that comes from a control. And then in the script check what has been clicked, then call the appropriate function. Something like this:
You could also use this technique with before page events.
If the concern is that you accumulate a large number of server scripts, an alternative approach might be to have just one script to handle all button clicks, immediate validations, hyperlink clicks, image clicks etc - in fact everything that comes from a control. And then in the script check what has been clicked, then call the appropriate function. Something like this:
Code: Select all
var owner = event.owner.elementName;
switch (owner)
{
case "BUTTON1":
function1();
break:
case "BUTTON2:
function2();
break;
etc..
}
0 x
Who is online
Users browsing this forum: No registered users and 6 guests