• No results found

Safe Harbor Statement

N/A
N/A
Protected

Academic year: 2021

Share "Safe Harbor Statement"

Copied!
33
0
0

Loading.... (view fulltext now)

Full text

(1)

Logging & Debugging von

M(obile)AF Applikationen

Jürgen Menge

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Jürgen Menge

Sales Consultant

(2)

Safe Harbor Statement

The following is intended to outline our general product direction. It is intended for

information purposes only, and may not be incorporated into any contract. It is not a

commitment to deliver any material, code, or functionality, and should not be relied upon

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

commitment to deliver any material, code, or functionality, and should not be relied upon

in making purchasing decisions. The development, release, and timing of any features or

functionality described for Oracle’s products remains at the sole discretion of Oracle.

(3)

Einstieg ins Thema

Logging

Debugging

1

2

Agenda

3

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Debugging

Weitere Informationen

3

4

(4)

Bestandteile einer Mobile Plattform

Security

Schutz der Unternehmensdaten

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Integration

Mobile

Strategy

Multiplatform

Entwicklung mobiler

Applikationen

Zugriff auf Daten und

Services

MAINFRAME MAINFRAME MAINFRAME

(5)

Oracle Mobile Application Framework

Oracle MAF

Oracle MAF

Write Once, Deploy to Many

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Nutzung vorhandener Kenntnisse

Nutzung vorhandener Kenntnisse

Basierende auf Standards

Basierende auf Standards

Nutzung vorhandener Kenntnisse

Nutzung vorhandener Kenntnisse

Basierend auf Standards

Basierend auf Standards

Oracle MAF

Oracle MAF

(6)

Mobile

Device

Server

Server-Generated

Configuration

Service

App. Configuration

Web View

HTML 5, CSS3 & JavaScript Representation

AMX Feature

Local HTML

Feature

Remote URL

Feature

MAF Device Native Container

Components

A

u

th

e

n

tic

a

tio

n

, C

re

d

e

n

tia

l M

a

n

a

g

e

m

e

n

t

&

A

cc

e

ss

C

o

n

tr

o

l

Mobile Application Framework - Architektur

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 6

REST or SOAP

Services

Server-Generated

HTML

Apache Cordova

Plugins & APIs

Java VM

S

Q

Li

te

Client Logic

JDBC

Encrypted Database

APN/GCM Push

Services

Components

Controller

Device Services

A

u

th

e

n

tic

a

tio

n

, C

re

d

e

n

tia

l M

a

n

a

g

e

m

e

n

t

(7)

Logging & Debugging von MAF-Applikationen

iOS

Android

Werkzeuge

von

Oracle MAF

JDeveloper

Remote

Debugging

JDeveloper

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 7

Oracle MAF

Plattform-spezifische

Werkzeuge

Android

Monitor

ddms

chrome:/

/inspect

Safari

Web

Inspector

JDeveloper

Logging

(8)

Einstieg ins Thema

Logging

Debugging

1

2

Agenda

3

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Debugging

Weitere Informationen

3

4

(9)

Mobile Application Framework – Java Logging

System & Error Log (System.out.println, System.err.println)

Embedded Logging(Default: com.sun.util.logging.Logger)

Konfiguration in der Datei ../META-INF/logging.properties

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 9

Logger.getLogger("oracle.adfmf.application").logp(Level.WARNING,

this.getClass().getName(),

"onTestMessage",

(10)

Konfiguration des Logging - logging.properties

Logger Default

Settings

(11)

Mobile Application Framework – JavaScript Logging

Redirect des Output in Datei durch System.out

<script type="text/javascript" charset="utf-8">

function test_function() { console.log("Message from JavaScript");}

</script>

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 11

Verwendung einer Logging Methode im JavaScript

adf.mf.log.Application.logp(adf.mf.log.level.WARNING,

"myClass",

"myMethod",

"My Message");

(12)

iOS Logging

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

(13)

Android Logging – Output Log Datei

Datei <AppName>.txt in /sdcard (vorletzte Version als *.txt.bak)

Anzeige des Inhalts

Lokaler Viewer auf dem Device/Emulator

adb logcat (analog tail)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

adb logcat (analog tail)

Kopieren der Datei auf den Desktop

Media Transfer Protocol (mtp)

(14)

Android Logging – Monitor und ddms

Debug Monitor (../android-sdk-linux/tools/monitor)

Log Messages

Filter, Suchfunktionalität

File System Explorer

Threads

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Threads

Heap usage

Network stats

Dalvik Debug Monitor Server (../android-sdk-linux/tools/ddms)

(15)

DEMONSTRATION

Android Logging

(16)

Einstieg ins Thema

Logging

Debugging

1

2

Agenda

3

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Debugging

Weitere Informationen

3

4

(17)

Mobile Application Framework – Remote Debugging

Breakpoints im Java Code setzen

Debugging in der MAF-Applikation konfigurieren

Gerät bzw. Simulator/Emulator vorbereiten

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Gerät bzw. Simulator/Emulator vorbereiten

Applikation im Debug Mode auf Gerät

oder Simulator/Emulator deployen

Applikation starten

(18)

Debugging – Breakpoints setzen

Breakpoints in Java-Klassen setzen

Lifecycle Methoden

Managed Beans

POJO Data Control

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

POJO Data Control

keine Evaluierung

von EL-Ausdrücken

(19)

Konfiguration des Debugging – cvm.properties

Konfiguration in der Datei ../META-INF/cvm.properties

Aktivieren des Debugging

java.debug.enabled=true

java.debug.port=8000

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

java.debug.port=8000

(20)

Debugging – Gerät bzw. Simulator/Emulator

Android Emulator

Android Virtual Device (AVD) anlegen

und konfigurieren

Android Device

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Android Device

USB Debugging aktivieren (Developer Options)

Installation von Apps aus unbekannten Quellen

erlauben

(21)

Debugging – Applikation deployen

Deployment Profile auf Debug Mode setzen (Default)

Application Properties

Deployment => Deployment Profiles

evtl. eigenes Profil für Debugging

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

evtl. eigenes Profil für Debugging

anlegen

Gerät per USB verbinden

(22)

Debugging – Applikation starten und verbinden

Applikation auf dem Gerät oder Simulator/Emulator starten

Applikation wartet nach dem Start auf den Debug-Prozess

Android

Port Forwarding

adb -d forward tcp:8000 tcp:8000

/Device

adb -e forward tcp:8000 tcp:8000

/Emulator

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Port Forwarding

iOS Simulator

Eingehenden Netzwerk-Verbindung akzeptieren

(23)

Debugging – Debugger starten

Debugger im JDeveloper aufrufen

Debugger mit der App verbinden

(24)

Debugging – Applikation debuggen

Debugger wartet am Breakpoint

Step Through | Step to the End

Auswertung

Breakpoints

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Breakpoints

ADF Data

Smart Data

Data

Watches

Resume

(25)

DEMONSTRATION

Android Debugging

(26)

Chrome Remote Debugging (1)

Chrome Developer Tools

ab Chrome 32 und Android 4.4 für WebView-Applikationen

Datei cvm.properties

javascript.debug.enabled=true

Schritte

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Schritte

Chrome aufrufen

URL: chrome://inspect

Discover USB Devices

Port Forwarding ?

(27)

Chrome Remote Debugging (2)

Elements: DOM Tree, HTML-Elemente, CSS, Event Listener, Viewport

Sources: Debugging JavaScript

Network: aufgerufene Dateien, Ladezeiten [F5]

Audits: Analyse der Seiten beim Laden

Console: Kommunikation

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Console: Kommunikation

mit der Anwendung

(28)

Safari Remote Debugging (1)

Datei cvm.properties

javascript.debug.enabled=true

Schritte

Safari aufrufen

Preferences => Advanced

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Preferences => Advanced

=> Show Develop menu ...

Start der Applikation

(29)

Safari Remote Debugging (2)

Resources: DOM Tree, HTML-Elemente

Styles: CSS

Timelines: aufgerufene Dateien,

Ladezeiten

Console: Kommunikation

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Console: Kommunikation

mit der Anwendung

(30)

DEMONSTRATION

Remote Debugging

Chrome

(31)

Einstieg ins Thema

Logging

Debugging

1

2

Agenda

3

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Debugging

Weitere Informationen

3

4

(32)

Weitere Informationen

Dokumentation – Mobile Application Framework 2.0.1

https://docs.oracle.com/middleware/mobile201/mobile/develop/maf-debug-test.htm#ADFMF1044

Blogs – Debugging ADF Mobile

https://blogs.oracle.com/shay/entry/debugging_adf_mobile_apps_on

https://blogs.oracle.com/mobile/entry/enable_javascript_debugging_on_mac

http://java.dzone.com/articles/debugging-oracle-adf-mobile

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

http://java.dzone.com/articles/debugging-oracle-adf-mobile

YouTube Videos – Debugging ADF Mobile

http://www.youtube.com/watch?v=uuQTBSMkmhU

Chrome – Developer Tools

https://developer.chrome.com/devtools

(33)

Fragen & Antworten

Jürgen Menge

juergen.menge@oracle.com

References

Related documents

If Central States does not reduce participants’ benefits and the plan becomes insolvent, then the Pension Benefit Guaranty Corporation (PBGC) would provide financial assistance to

convolutions with rational surfaces. Computer Aided Geometric Design, Vol. W., Nishita, T.: Curve intersection using B´ezier clipping. Computer Aided Design, Vol. Com- puter

Administrators hope to identify, adapt, and create policing policies that can improve relationships, reduce criminal behaviors, and improve perceptions both by the communities

Oracle Confidential – Internal/Restricted/Highly Restricted 36 CREATE VALUE FROM DATA &amp; ANALYTICS Analytic Apps BI Foundation Data Warehouse Enterprise Performance

methods or programs, teachers should try out a range of practices or conduct self-initiated research in their classrooms” (p.45). The opinions of the teachers, however—the ones

We revealed that social-oriented not-for-profit organizations and state social agencies work with the same social groups and offer similar services; we found that the problem

Earlier work had shown that ScbR directly repressed expression of cpkO, the pathway-specific transcriptional activator gene of the cpk cluster, through two binding sites

The most important finding of the present study was that after 24 months of implantation of a polymer meniscus, significantly more cartilage damage was found compared with the native,