A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A...

46
A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc Wrangler, Ux Advocate [email protected]

Transcript of A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A...

Page 1: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

A Whirlwind Tour of Platform Development Capabilities

Eric Armstrong Developer Doc Wrangler Ux Advocate ericarmstrongsoftwareAGcom

Overview Where to find Information

Application Anatomy

Hands On A small app wa JSP page and a controller

Additional information for Java developers

JavaScript and REST Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

2

3

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

One Stop Shopping for Dev Info httpagileappsliveinfowikiDevelopers_Index

Java APIs amp Cheatsheet

JavaDocs

Rest APIs amp Cheatsheet

JavaScript APIs + jQuery

SQL Browser Syntax amp APIs

Lots morehellip

4

o Search is your friendhellip

5

6

7

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Fields DateTime amp Currency (localizable)

Formulas hellip

Forms (defaults interactive builder)

Validations (fieldexpression comparison)

Rules Processes amp Web Services SLAs

Indexes

Record Locators

DB Configuration amp access

More

8

ldquoJSPrdquo Page = HTML + Java Code Interact with the Platform Work with your data

JSP Basics lt hellip codehellip gt -- do something lt=variable gt -- insert data

Conditionals and Loops lt if (hellip) gt lt for (itemList) gt

hellip HTML hellip hellip HTML hellip lt gt lt gt

9

10

Visit the URL (httpsnetworkingpagesxyzjsp)

(no contextmdashjust the page)

Web Tabs (appears like any other tab in the application)

Dashboard Widgets (display data amp graphics)

Sites

Custom Forms

Custom Lookups

Application Architecture httpagileappsliveinfowikiApplication_Architecture

11

Add libraries (eg A 3rd party rules engine or existing libraries

that integrate wexternal systems or with custom web services)

12

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 2: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Overview Where to find Information

Application Anatomy

Hands On A small app wa JSP page and a controller

Additional information for Java developers

JavaScript and REST Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

2

3

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

One Stop Shopping for Dev Info httpagileappsliveinfowikiDevelopers_Index

Java APIs amp Cheatsheet

JavaDocs

Rest APIs amp Cheatsheet

JavaScript APIs + jQuery

SQL Browser Syntax amp APIs

Lots morehellip

4

o Search is your friendhellip

5

6

7

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Fields DateTime amp Currency (localizable)

Formulas hellip

Forms (defaults interactive builder)

Validations (fieldexpression comparison)

Rules Processes amp Web Services SLAs

Indexes

Record Locators

DB Configuration amp access

More

8

ldquoJSPrdquo Page = HTML + Java Code Interact with the Platform Work with your data

JSP Basics lt hellip codehellip gt -- do something lt=variable gt -- insert data

Conditionals and Loops lt if (hellip) gt lt for (itemList) gt

hellip HTML hellip hellip HTML hellip lt gt lt gt

9

10

Visit the URL (httpsnetworkingpagesxyzjsp)

(no contextmdashjust the page)

Web Tabs (appears like any other tab in the application)

Dashboard Widgets (display data amp graphics)

Sites

Custom Forms

Custom Lookups

Application Architecture httpagileappsliveinfowikiApplication_Architecture

11

Add libraries (eg A 3rd party rules engine or existing libraries

that integrate wexternal systems or with custom web services)

12

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 3: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

3

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

One Stop Shopping for Dev Info httpagileappsliveinfowikiDevelopers_Index

Java APIs amp Cheatsheet

JavaDocs

Rest APIs amp Cheatsheet

JavaScript APIs + jQuery

SQL Browser Syntax amp APIs

Lots morehellip

4

o Search is your friendhellip

5

6

7

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Fields DateTime amp Currency (localizable)

Formulas hellip

Forms (defaults interactive builder)

Validations (fieldexpression comparison)

Rules Processes amp Web Services SLAs

Indexes

Record Locators

DB Configuration amp access

More

8

ldquoJSPrdquo Page = HTML + Java Code Interact with the Platform Work with your data

JSP Basics lt hellip codehellip gt -- do something lt=variable gt -- insert data

Conditionals and Loops lt if (hellip) gt lt for (itemList) gt

hellip HTML hellip hellip HTML hellip lt gt lt gt

9

10

Visit the URL (httpsnetworkingpagesxyzjsp)

(no contextmdashjust the page)

Web Tabs (appears like any other tab in the application)

Dashboard Widgets (display data amp graphics)

Sites

Custom Forms

Custom Lookups

Application Architecture httpagileappsliveinfowikiApplication_Architecture

11

Add libraries (eg A 3rd party rules engine or existing libraries

that integrate wexternal systems or with custom web services)

12

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 4: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

One Stop Shopping for Dev Info httpagileappsliveinfowikiDevelopers_Index

Java APIs amp Cheatsheet

JavaDocs

Rest APIs amp Cheatsheet

JavaScript APIs + jQuery

SQL Browser Syntax amp APIs

Lots morehellip

4

o Search is your friendhellip

5

6

7

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Fields DateTime amp Currency (localizable)

Formulas hellip

Forms (defaults interactive builder)

Validations (fieldexpression comparison)

Rules Processes amp Web Services SLAs

Indexes

Record Locators

DB Configuration amp access

More

8

ldquoJSPrdquo Page = HTML + Java Code Interact with the Platform Work with your data

JSP Basics lt hellip codehellip gt -- do something lt=variable gt -- insert data

Conditionals and Loops lt if (hellip) gt lt for (itemList) gt

hellip HTML hellip hellip HTML hellip lt gt lt gt

9

10

Visit the URL (httpsnetworkingpagesxyzjsp)

(no contextmdashjust the page)

Web Tabs (appears like any other tab in the application)

Dashboard Widgets (display data amp graphics)

Sites

Custom Forms

Custom Lookups

Application Architecture httpagileappsliveinfowikiApplication_Architecture

11

Add libraries (eg A 3rd party rules engine or existing libraries

that integrate wexternal systems or with custom web services)

12

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 5: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

5

6

7

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Fields DateTime amp Currency (localizable)

Formulas hellip

Forms (defaults interactive builder)

Validations (fieldexpression comparison)

Rules Processes amp Web Services SLAs

Indexes

Record Locators

DB Configuration amp access

More

8

ldquoJSPrdquo Page = HTML + Java Code Interact with the Platform Work with your data

JSP Basics lt hellip codehellip gt -- do something lt=variable gt -- insert data

Conditionals and Loops lt if (hellip) gt lt for (itemList) gt

hellip HTML hellip hellip HTML hellip lt gt lt gt

9

10

Visit the URL (httpsnetworkingpagesxyzjsp)

(no contextmdashjust the page)

Web Tabs (appears like any other tab in the application)

Dashboard Widgets (display data amp graphics)

Sites

Custom Forms

Custom Lookups

Application Architecture httpagileappsliveinfowikiApplication_Architecture

11

Add libraries (eg A 3rd party rules engine or existing libraries

that integrate wexternal systems or with custom web services)

12

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 6: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

6

7

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Fields DateTime amp Currency (localizable)

Formulas hellip

Forms (defaults interactive builder)

Validations (fieldexpression comparison)

Rules Processes amp Web Services SLAs

Indexes

Record Locators

DB Configuration amp access

More

8

ldquoJSPrdquo Page = HTML + Java Code Interact with the Platform Work with your data

JSP Basics lt hellip codehellip gt -- do something lt=variable gt -- insert data

Conditionals and Loops lt if (hellip) gt lt for (itemList) gt

hellip HTML hellip hellip HTML hellip lt gt lt gt

9

10

Visit the URL (httpsnetworkingpagesxyzjsp)

(no contextmdashjust the page)

Web Tabs (appears like any other tab in the application)

Dashboard Widgets (display data amp graphics)

Sites

Custom Forms

Custom Lookups

Application Architecture httpagileappsliveinfowikiApplication_Architecture

11

Add libraries (eg A 3rd party rules engine or existing libraries

that integrate wexternal systems or with custom web services)

12

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 7: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

7

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Fields DateTime amp Currency (localizable)

Formulas hellip

Forms (defaults interactive builder)

Validations (fieldexpression comparison)

Rules Processes amp Web Services SLAs

Indexes

Record Locators

DB Configuration amp access

More

8

ldquoJSPrdquo Page = HTML + Java Code Interact with the Platform Work with your data

JSP Basics lt hellip codehellip gt -- do something lt=variable gt -- insert data

Conditionals and Loops lt if (hellip) gt lt for (itemList) gt

hellip HTML hellip hellip HTML hellip lt gt lt gt

9

10

Visit the URL (httpsnetworkingpagesxyzjsp)

(no contextmdashjust the page)

Web Tabs (appears like any other tab in the application)

Dashboard Widgets (display data amp graphics)

Sites

Custom Forms

Custom Lookups

Application Architecture httpagileappsliveinfowikiApplication_Architecture

11

Add libraries (eg A 3rd party rules engine or existing libraries

that integrate wexternal systems or with custom web services)

12

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 8: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Fields DateTime amp Currency (localizable)

Formulas hellip

Forms (defaults interactive builder)

Validations (fieldexpression comparison)

Rules Processes amp Web Services SLAs

Indexes

Record Locators

DB Configuration amp access

More

8

ldquoJSPrdquo Page = HTML + Java Code Interact with the Platform Work with your data

JSP Basics lt hellip codehellip gt -- do something lt=variable gt -- insert data

Conditionals and Loops lt if (hellip) gt lt for (itemList) gt

hellip HTML hellip hellip HTML hellip lt gt lt gt

9

10

Visit the URL (httpsnetworkingpagesxyzjsp)

(no contextmdashjust the page)

Web Tabs (appears like any other tab in the application)

Dashboard Widgets (display data amp graphics)

Sites

Custom Forms

Custom Lookups

Application Architecture httpagileappsliveinfowikiApplication_Architecture

11

Add libraries (eg A 3rd party rules engine or existing libraries

that integrate wexternal systems or with custom web services)

12

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 9: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

ldquoJSPrdquo Page = HTML + Java Code Interact with the Platform Work with your data

JSP Basics lt hellip codehellip gt -- do something lt=variable gt -- insert data

Conditionals and Loops lt if (hellip) gt lt for (itemList) gt

hellip HTML hellip hellip HTML hellip lt gt lt gt

9

10

Visit the URL (httpsnetworkingpagesxyzjsp)

(no contextmdashjust the page)

Web Tabs (appears like any other tab in the application)

Dashboard Widgets (display data amp graphics)

Sites

Custom Forms

Custom Lookups

Application Architecture httpagileappsliveinfowikiApplication_Architecture

11

Add libraries (eg A 3rd party rules engine or existing libraries

that integrate wexternal systems or with custom web services)

12

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 10: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

10

Visit the URL (httpsnetworkingpagesxyzjsp)

(no contextmdashjust the page)

Web Tabs (appears like any other tab in the application)

Dashboard Widgets (display data amp graphics)

Sites

Custom Forms

Custom Lookups

Application Architecture httpagileappsliveinfowikiApplication_Architecture

11

Add libraries (eg A 3rd party rules engine or existing libraries

that integrate wexternal systems or with custom web services)

12

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 11: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Application Architecture httpagileappsliveinfowikiApplication_Architecture

11

Add libraries (eg A 3rd party rules engine or existing libraries

that integrate wexternal systems or with custom web services)

12

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 12: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Add libraries (eg A 3rd party rules engine or existing libraries

that integrate wexternal systems or with custom web services)

12

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 13: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

javautilHashMap (valueMap)

complatformapiParameters (params) (used by all platform APIs)

13

valueMap = controllerResponse getData()

Parameters (action)

HashMap (control )

Controller Class

execute(Parameters params) cr = new ControllerResponse hellip crsetTargetPage(next page) valueMap = new HashMap hellip(add values)hellip crsetData(valueMap) return cr

Page (HTML JSP)

HTML Form (post)

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 14: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

14

99 in the Functionsclass httpagileappsliveinfowikidownloadjavadocs

Going In complatformapiParameters Parameters params = FunctionsgetParametersInstance()

Coming Back Out complatformapiResult Failure getCode() lt 0 -- getMessage() for info

Search Success getCode() gt= 0 -- of items returned Other Success getCode() == 0

Exactly one value (getRecord) a Parameters object Parameters result_params = resultgetParameters()

One or more (search) A list of Parameters objects ParametersIterator it = resultgetIterator() Parameters result_params = itnext()

Controller Put Result values into a HashMap for the JSP page

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 15: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

In an attempt to improve clarityhellip

valueMap = HashMap instance passed to a Page

page_control = passed to a Page in a valueMap

params =Parameters instance passed to an API

page_action = passed from a Page in the params

result = Result values passed back from an API

result_params = Parameters object from the result

15

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 16: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

16

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 17: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Simple ldquoMailing Listrdquo object

Fields contact_name contact_email

Functional Spec Add new nameaddress pairs to the list Donrsquot add if the email address already exists Give user a chance to update the name

17

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 18: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

JSP Page Java Controller

Email already exists

18

Update the record

Add

update_query

Update

updated

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 19: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Login httpsyourDomainagileappslivecom

Supply Username amp Password

Setup gear gtDeveloper Resources Developer Configuration gt [Edit]

Namespace - the company package name (ldquomyCordquo) (You define subspaces when you add classes)

Debug Log Level ndash how much info you see Debug Log (end of sidebar)

Full Instructions httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller

19

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 20: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

gear gt Developer Resources gt Pages gt New Page

Name AddUpdateYOURNAMEjsp (extension no _rsquos)

Header Files Yes (so the page can appear as a tab)

Copy content from httpagileappsliveinfowikidownloadtrainingAddUpdatejsp

Personalize debug msgs namespace amp target Class

20

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 21: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Obtaining values passed by controller javautilHashMap valueMap =

(javautilHashMap)controllerResponsegetData()

Form display controlled by passed values lt if (page_control == record_added ) gt

Form contents passed as namevalue pairs ltinput type=textldquo name=contact_namegt

ltinput type=ldquosubmitldquo name=ldquoactionldquo value=ldquoUpdategt

ltinput type=ldquohiddenldquo name=ldquorecord_idgt

21

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 22: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

gear gt Developer Resources gt Classes gt [New Class]

Package mailinglist

Name AddUpdateController_YOURNAME (no extension)

[Next]

22

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 23: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Copy content from httpagileappsliveinfowikidownloadtraining --AddUpdateControllerjava

Personalize the namespace class messages amp target page

23

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 24: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Getting Parameters passed by a Form

Specifying target page

Passing Values

24

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 25: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

SQL Search in the find() function

Other APIs in add() and update() functions

25

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 26: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

execute() method = ldquoDispatch Tablerdquo

26

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 27: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Visit the page httpsdomainnetworkingpagesAddUpdate_YourNamejsp

Experiment Add a record and view the data in the GUI (refresh)

Update a record (refresh)

Cancel an update

Add the page as a Web Tab httpagileappsliveinfowikiPagesDisplay_a_Page_as_a_Web_Tab

Learn More httpagileappsliveinfowiki

Lab_ExercisesBasic_Programming_Exercises (from ground up)

HowToCreate_a_JSP_Page_and_Java_Controller (this application)

27

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 28: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Go to the Log gear gt Developer Resources gt Debug Log (refresh)

Edit the view (hover over the wrench icon)

Filter tab Field Operator Value Type starts with YourName

[Save As]

28

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 29: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Uncomment to add HashMap to Debug Log

29

See the entry in the Debug Log (refresh)

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 30: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

30

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 31: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

When creating a new class

31

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 32: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Logger utility class javadocscomplatformapiLoggerhtml

Log messages at specified levels Debug Error Fatal Info Trace Warn

More httpagileappsliveinfowikiJava_Debugging_Tips

httpagileappsliveinfowikiDebug_LogWorking_with_the_Debug_Log

32

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 33: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Limits on Resource Usage Memory String Heap Statements executed

Defaults built into the installation

Can be set for each tenant (on-premise)

(helpful if yoursquore billing by usage)

Can be disabled (on-premise)

not recommended except for development

33

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 34: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

34

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 35: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

gear gt Objects gt Mailing List

Forms gt Default Layout Field scripts (Hover -gt Scroll icon on change on focus)

gt [Form Scripts] gt [Edit] On Load On Save Functions

On Save Script if (getTextFieldValue(_sdForm contact_name) ==

) alert(Name is required)

Test it

35

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 36: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

jQuery library Built-in (best way access amp modify the DOM)

can also use jQuery components

and JSON functions

JavaScript APIs httpagileappsliveinfowikiJavaScript

AJAX Invoke REST APIs from JavaScript

Get back XML or JSON as desired hellipwikiHowTo_GuidesBuild_Custom_Web_Pages

36

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 37: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

37

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 38: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Firefox gt Tools gt Poster (plugin)

38

XML Response (default)

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 39: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

39

restexecSQLsql=SELECT2020FROM20Mailing_Listampalt=json

Spaces encoded

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 40: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

import complatformapiutilityBase64Codec String sql = SELECT FROM Mailing_List Base64Codec codec = new Base64Codec() String encodedSQL = codecencode(sql) String base_url = helliprestexecSQLsql= String url= base_url + encodedSQL

40

complatformapiutilityBase64Codec

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 41: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

41

Overview Where to find Information

Application Overview

Hands On A small app wa JSP page and a controller

Additional information for Java developers

Demos Add JavaScript to an Object Form

Using the REST APIs

Summary of Tools

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 42: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Code completion error reporting highlighting

Download amp installation instructions httpagileappsliveinfowikiEclipse_Plug-In

Create a Project (give name URL username password)

File gt New gt LongJump Project

View Window gt Open Perspective gt Other gt LongJump

Modify Login Settings

Rt click (project) gt Properties gt LongJump Authentication

Synchronize Rt click (project folder or file) gt LongJump Server gt

Save on Server - Refresh from Server - Delete from Server

Refresh Libraries (for new APIs after a platform upgrade)

42

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 43: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

43

NotePad++ for JSP pages (great highlighting) --Use in conjunction with Eclipse Plugin

Built-in SQL Browser to test SQL statements httpagileappsliveinfowikiSQL_Browser

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 44: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Poster (Firefox plugin) for REST exploration

FireBug (Firefox) or Devrsquor Tools (Chrome)

GUI-select to view page components

View page interactions in the console

44

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 45: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Version-controlled files for pages amp classes

Eclipse Plugin platform files

Tortoise SVN files shared repository

Use a Package to Create a Snapshot Publish download amp add date

Remove date to re-install

Sandboxes (production QA dev)

45

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46

Page 46: A Whirlwind Tour of Platform Development …agileappscloud.info/wiki/download/training/Platform...A Whirlwind Tour of Platform Development Capabilities Eric Armstrong Developer, Doc

Resources httpagileappsliveinfowikidownloadtraining

PlatformDevelopment101pdf (this talk code files)

httpagileappsliveinfowiki

HowToCreate_a_JSP_Page_and_Java_Controller (writeup)

46