Java script for foxpro developers

  • 1,396 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,396
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
12
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. JavaScript for FoxPro Developers Mike Feltman F1 Technologies
  • 2. Who Am I?• President F1 Technologies since 1990• Co-author Visual FoxExpress• Consultant
  • 3. Agenda• Why JavaScript?• VFP vs. JavaScript• JS Basics• JS Syntax & VFP Concordance• JS OOP• AJAX w/ VFP
  • 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. 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. 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. 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. 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. SyntaxVFP JavaScript – Line Terminator: – Line Terminator: semi- carriage return colon – Line Continuation: – Line Continuation: n/a semi-colon
  • 10. Math OperatorsFunction VFP JavaScriptAddition + +Subtraction - -Multiplication * *Division / /Modulus MOD() %Unary addition x=x+1 x++Unary x=x-1 x--subtraction
  • 11. Assignment OperatorsFunction VFP JavaScriptEquality = =Addition n/a +=Subtraction n/a -=Multiplication n/a *=Division n/a /=Modulus n/a %=
  • 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. Logical OperatorsFunction VFP JavaScriptAnd AND &&Or OR ||Not NOT, ! !
  • 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. Constructs: WhileVFP JavaScript DO WHILE expression while (expression) statements { ENDDO statements } EXIT break LOOP continue
  • 16. Constructs: ForVFP JavaScript FOR var = n to n STEP n for statements (var=startvalue;var<= ENDFOR endvalue;var=var+inc rement) { statements }
  • 17. Object Model
  • 18. Event Model
  • 19. Forms
  • 20. 3 Party rd