JavaScript for FoxPro    Developers     Mike Feltman    F1 Technologies
Who Am I?• President F1 Technologies since 1990• Co-author Visual FoxExpress• Consultant
Agenda•   Why JavaScript?•   VFP vs. JavaScript•   JS Basics•   JS Syntax & VFP Concordance•   JS OOP•   AJAX w/ VFP
Why JavaScript?•   Web 2.0•   Great way to take VFP Skills to the Web•   In demand•   Cross-Platform•   Relatively easy fo...
VFP vs. JavaScript: Runtime             EnvironmentVFP                             JavaScript – Operating System:         ...
VFP vs. JavaScript: Development           EnvironmentVFP                               JavaScript  – Designers: Editor, Fo...
VFP vs. JavaScript: CapabilitiesVFP                          JavaScript – Access to File System       – No File System – D...
VFP vs. JavaScript: Language            FeaturesVFP                      JavaScript – Dynamically Typed       –   Dynamica...
SyntaxVFP                     JavaScript – Line Terminator:       – Line Terminator: semi-   carriage return          colo...
Math OperatorsFunction         VFP     JavaScriptAddition         +       +Subtraction      -       -Multiplication   *   ...
Assignment OperatorsFunction         VFP   JavaScriptEquality         =     =Addition         n/a   +=Subtraction      n/a...
Comparison OperatorsFunction         VFP         JavaScriptEquality         =,==        ==Greater than     >, >=       >, ...
Logical OperatorsFunction      VFP        JavaScriptAnd           AND        &&Or            OR         ||Not           NO...
Constructs: IfVFP:                     JavaScript:IF                       if (logical expression)   statement(s)         ...
Constructs: WhileVFP                    JavaScript DO WHILE expression     while (expression)  statements             { EN...
Constructs: ForVFP                      JavaScript FOR var = n to n STEP n   for  statements               (var=startvalue...
Object Model
Event Model
Forms
3 Party rd
Upcoming SlideShare
Loading in...5
×

Java script for foxpro developers

1,739

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,739
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
14
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Java script for foxpro developers

  1. 1. JavaScript for FoxPro Developers Mike Feltman F1 Technologies
  2. 2. Who Am I?• President F1 Technologies since 1990• Co-author Visual FoxExpress• Consultant
  3. 3. Agenda• Why JavaScript?• VFP vs. JavaScript• JS Basics• JS Syntax & VFP Concordance• JS OOP• AJAX w/ VFP
  4. 4. Why JavaScript?• Web 2.0• Great way to take VFP Skills to the Web• In demand• Cross-Platform• Relatively easy for VFP Developers to pick up
  5. 5. VFP vs. JavaScript: Runtime EnvironmentVFP JavaScript – Operating System: – Operating System: • Windows • Windows, MAC, Linux, Version: Unix, etc. • VFP Compiler Version Version: • Browser Controlled: IE, Firefox, Opera, Safari, etc. • 1.5 current “standard”
  6. 6. VFP vs. JavaScript: Development EnvironmentVFP JavaScript – Designers: Editor, Form – Designers: n/a, Requires 3rd Class Designer, Report Party tools. No definitive Write, Class Browser, etc. IDE built-in. – Debugger: virtually nothing – Debugger: Integrated native. Varies by browser, debugger, with Trace, Firebug for Firefox and Watch, Locals, Output, Call Debugbar for IE. Stack – JavaScript Console various – Command Window other Command Window like utilities.
  7. 7. VFP vs. JavaScript: CapabilitiesVFP JavaScript – Access to File System – No File System – Database Engine Access – Network access – Can’t read or write to limited only by network files on server security – Can’t read or write to files on client – No network access – Cannot access pages on another domain
  8. 8. VFP vs. JavaScript: Language FeaturesVFP JavaScript – Dynamically Typed – Dynamically Typed – Case Insensitive – Case Sensitive – “Second Class” – First Class Functions Functions – Nested Functions – No Nested Functions – Interpreted – Compiled or – OOP: Prototype based Interpreted – “0 based” – OOP: Class Based – “1 based”
  9. 9. SyntaxVFP JavaScript – Line Terminator: – Line Terminator: semi- carriage return colon – Line Continuation: – Line Continuation: n/a semi-colon
  10. 10. Math OperatorsFunction VFP JavaScriptAddition + +Subtraction - -Multiplication * *Division / /Modulus MOD() %Unary addition x=x+1 x++Unary x=x-1 x--subtraction
  11. 11. Assignment OperatorsFunction VFP JavaScriptEquality = =Addition n/a +=Subtraction n/a -=Multiplication n/a *=Division n/a /=Modulus n/a %=
  12. 12. Comparison OperatorsFunction VFP JavaScriptEquality =,== ==Greater than >, >= >, >=Less Than <, <= <, <=Identical & of n/a ===Same TypeNot Identical !=,!==,<> !==Inline IF IIF() (condition)?true value: false value
  13. 13. Logical OperatorsFunction VFP JavaScriptAnd AND &&Or OR ||Not NOT, ! !
  14. 14. Constructs: IfVFP: JavaScript:IF if (logical expression) statement(s) {statement(s)}ELSE else if (logical statement(s) expression)ENDIF {statements} else {statement(s)}
  15. 15. Constructs: WhileVFP JavaScript DO WHILE expression while (expression) statements { ENDDO statements } EXIT break LOOP continue
  16. 16. Constructs: ForVFP JavaScript FOR var = n to n STEP n for statements (var=startvalue;var<= ENDFOR endvalue;var=var+inc rement) { statements }
  17. 17. Object Model
  18. 18. Event Model
  19. 19. Forms
  20. 20. 3 Party rd
  1. Gostou de algum slide específico?

    Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

×