SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
DUKESCRIPT
Puts the Java in JavaScript
ProblemI
ProblemII
Chuck
Norris
can instantiate abstract
classes
can run Java on iPad and
Android without
Jailbreak!
uses generics since Java 1.0
overrides final methods
Chuck Norris on the set of "The Delta Force" (1986), Copyright Yoni S.Hamenahem
bck2brwsr vs HotSpot
„World of Warcraft Commercial" Copyright ©Blizzard Entertainment
The Solution
"The Way of the Dragon" Copyright © 20th Century Fox Home Entertainment / Bryanston Distributing / CBS/Fox / Cinema Classics
BCK2BRWSR
DESIGNER VS DEVELOPER
DESIGNER VS DEVELOPER
index.html
<html>
<button id="hello">
Say Hello!</button>
</html>
!
App.java
@Model(className="Person"
, properties={
@Property(name =
"selectedName",
type=String.class),
})
static class PersonModel{
...
}
DUKESCRIPT
Puts the Java in JavaScript
alternatively use bck2brwsr
KNOCKOUT4J
@Model(className="Person", properties={	

@Property(name = "firstName", type=String.class),	

@Property(name = "lastName", type=String.class)	

@Property(name = "addresses", type=Address.class, array = true)	

})	

static class PersonModel {
http://bits.netbeans.org/html4j/0.7.5/net/java/html/json/
package-summary.html
@Model(className="Address", properties={	

@Property(name = "street", type=String.class),	

@Property(name = "town", type=String.class)	

})	

static class AddressModel {	

}
http://bits.netbeans.org/html4j/0.7.5/net/java/html/json/
package-summary.html
@ComputedProperty	

static String fullName(String firstName, String
lastName) {	

return firstName + " " + lastName;	

}
http://bits.netbeans.org/html4j/0.7.5/net/java/html/json/
package-summary.html
<span data-bind="text: fullName">	

<div data-bind="foreach: addresses">	

Lives in <span data-bind="text: town"/>	

</div>
http://bits.netbeans.org/html4j/0.7.5/net/java/html/json/
package-summary.html
@ComputedProperty	

static String fullName(String firstName, String lastName) {	

return firstName + " " + lastName;	

}
http://bits.netbeans.org/html4j/0.7.5/net/java/html/json/
package-summary.html
CANVAS 0.5.2
https://github.com/eppleton/canvas
!
≈!
HTML5 CANVAS!
CANVAS API
CANVAS API
GraphicsContext2D gc = HTML5Graphics.getOrCreate("canvas");	

gc.setLineWidth(30);	

gc.setFont("24px Helvetica");	

gc.fillText("Hello World!", 175, 200);	

gc.setFillStyle(new Color("rgba(0, 0, 255, 0.5)“)); 	

gc.strokeRect(75, 100, 200, 200);	

gc.fillRect(325, 100, 200, 200);
JAVAFX WITH CANVAS API	

IN BCK2BRWSR
http://xelfi.cz/fishsim/
FXGAMES
https://github.com/eppleton/FXGameEngine
DUKESCRIPT
!
!
!
UNIVERSITY
Task 1
Create your own application in Java that renders through HTML.!
Write your own model and display and animate it.
mvn archetype:generate
-DarchetypeGroupId=org.apidesign.html
-DarchetypeArtifactId=knockout4j-archetype
-DarchetypeVersion=0.7.5
Task 2
Create your own application using the Canvas API
mvn archetype:generate
-DarchetypeGroupId=org.apidesign.canvas
-DarchetypeArtifactId=canvas-archetype
-DarchetypeVersion=0.5.2
Task 3
Use JSON/REST to communicate with a server
API Doc:	

http://bits.netbeans.org/html4j/0.7.5/net/java/html/json/OnReceive.html	

Demo:	

http://dew.apidesign.org/dew/#7138581	

See also:	

http://bits.netbeans.org/html4j/0.7.5/net/java/html/json/doc-files/websockets.html
HOW CAN WE IMPROVE IT?
We want you for	

DukeScript	

http://bits.netbeans.org/html4j/0.7.5/	

and	

https://github.com/eppleton/canvas
Thank you!
!
@monacotoni

Weitere ähnliche Inhalte

Andere mochten auch

Raspberry pi gaming 4 kids
Raspberry pi gaming 4 kidsRaspberry pi gaming 4 kids
Raspberry pi gaming 4 kids
Stephen Chin
 

Andere mochten auch (13)

Hacking JavaFX with Groovy, Clojure, Scala, and Visage
Hacking JavaFX with Groovy, Clojure, Scala, and VisageHacking JavaFX with Groovy, Clojure, Scala, and Visage
Hacking JavaFX with Groovy, Clojure, Scala, and Visage
 
Zombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadZombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the Undead
 
Raspberry pi gaming 4 kids
Raspberry pi gaming 4 kidsRaspberry pi gaming 4 kids
Raspberry pi gaming 4 kids
 
Raspberry Pi Gaming 4 Kids - Dutch Version
Raspberry Pi Gaming 4 Kids - Dutch VersionRaspberry Pi Gaming 4 Kids - Dutch Version
Raspberry Pi Gaming 4 Kids - Dutch Version
 
RetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming ConsoleRetroPi Handheld Raspberry Pi Gaming Console
RetroPi Handheld Raspberry Pi Gaming Console
 
OpenJFX on Android and Devices
OpenJFX on Android and DevicesOpenJFX on Android and Devices
OpenJFX on Android and Devices
 
JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)
 
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
 
Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)
 
Oracle IoT Kids Workshop
Oracle IoT Kids WorkshopOracle IoT Kids Workshop
Oracle IoT Kids Workshop
 
Java 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosJava 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and Legos
 
Devoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopDevoxx4Kids NAO Workshop
Devoxx4Kids NAO Workshop
 
Devoxx4Kids Lego Workshop
Devoxx4Kids Lego WorkshopDevoxx4Kids Lego Workshop
Devoxx4Kids Lego Workshop
 

Ähnlich wie DukeScript (6)

The curious Life of JavaScript - Talk at SI-SE 2015
The curious Life of JavaScript - Talk at SI-SE 2015The curious Life of JavaScript - Talk at SI-SE 2015
The curious Life of JavaScript - Talk at SI-SE 2015
 
Crash wars - The handling awakens v3.0
Crash wars - The handling awakens v3.0Crash wars - The handling awakens v3.0
Crash wars - The handling awakens v3.0
 
Play framework
Play frameworkPlay framework
Play framework
 
Red Dirt JS
Red Dirt JSRed Dirt JS
Red Dirt JS
 
Crash wars - The handling awakens
Crash wars - The handling awakensCrash wars - The handling awakens
Crash wars - The handling awakens
 
Object-oriented Basics
Object-oriented BasicsObject-oriented Basics
Object-oriented Basics
 

Mehr von Stephen Chin

Mehr von Stephen Chin (9)

DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2
 
10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community
 
Java Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideJava Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive Guide
 
DevOps Tools for Java Developers
DevOps Tools for Java DevelopersDevOps Tools for Java Developers
DevOps Tools for Java Developers
 
Java Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCJava Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJC
 
LUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi HackingLUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi Hacking
 
Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5
 
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
 
JavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkJavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring Framework
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

DukeScript