SlideShare a Scribd company logo
XML-Free Programming : Java Server
and Client Development Without <>
Stephen Chin                     Arun Gupta
Chief Agile Methodologist, GXS   Oracle Corporation
steveonjava@gmail.com            arun.p.gupta@oracle.com
tweet: @steveonjava              tweet: @arungupta
Meet the Presenters

           Stephen Chin                              Arun Gupta

                                     Community Guy
      Family Man




                      Motorcyclist
                                                                  Marathoner
Our Plan
>   Quick (Humorous) History of Angle Brackets
>   XML-Free Programming
    1.   Configuration Lives with the Code
    2.   Data Transfer Models the Domain
    3.   Design Programming Languages for Humans
>   JavaOne Speakers Application <Demo>




                                                   3
Exhibit A – Angle Bracket Sighting in Virginia, 1922
Source: Library of Congress, Prints and Photographs Collection – Public Domain
http://www.flickr.com/photos/pingnews/434444310/



                                                                                 4
Exhibit B - Bermuda Tri-Angle Brackets
Source: NOAA National Ocean Service – CC licensed
http://www.flickr.com/photos/usoceangov/4276194691/sizes/o/in/photostream/



                                                                             5
Exhibit C – Tim Bray, Co-Founder of XML
Source: Linux.com
http://www.linux.com/archive/feature/133149



                                              6
History of XML
>   Based on Standard Generalized Markup Language (SGML)
>   Created by a W3C working group of eleven members

>   Version History:
       XML 1.0 (1998) – Widely adopted with 5 subsequent revisions
       XML 1.1 (2004) – Limited adoption




                                                                      7
XML Design Goals (a.k.a. problems with SGML)
1.    Usable Over the Internet
2.    Support a Wide Variety of Applications
3.    Compatible with SGML
4.    Easy to Write Programs to Process XML Documents
5.    Minimum Number of Optional Features
6.    Documents Should be Human-Legible and Reasonably Clear
7.    Design Should be Prepared Quickly
8.    Design Should be Formal and Concise
9.    Documents Should be Easy to Create
10.   Terseness in Markup is of Minimal Importance
                                                               8
Design Goals Per Application
                               Publishing   Configuration   Data Transfer   Programming
Usable Over Internet           Important    N/A             Important       N/A
Wide Variety of Applications   Acceptable   Negative        N/A             N/A
Compatible With SGML           Important    Negative        Negative        Negative
Computer Processable           Important    Important       Important       Important
No Optional Features           Important    Important       Important       Important
Human-Legible                  Important    Important       Acceptable      Important
Design Completed Quickly       Important    N/A             N/A             N/A
Formal and Concise Spec        Important    Important       Important       N/A
Easy to Create Documents       Important    Important       N/A             Important
Markup Can be Verbose          Negative     Negative        Negative        Negative


                                                                                          9
Tenet 1



Configuration Lives with the
Code


                               10
Letting Go of XML is Hard!


     This is not intended as a replacement for Spring's XML format.
                               Rod Johnson on Spring’s Annotations-based Configuration
                               “A Java configuration option for Spring,” 11/28/06




                                                                                    11
Java EE 6 Annotations
>   @Stateless
>   @Path
>   @WebServlet
>   @Inject
>   @Named
>   @Entity




                        12
But There is Hope!


     You can have a Groovy DSL … it is as short as can be.
                                       Dierk Koenig on Canoo Web Test
                                       “Interview with Dierk Koenig,” ThirstyHead.com 6/3/2009




                                                                                             13
Canoo Web Test Comparison
                    XML                                        Groovy Builder
<project default="test">                         class SimpleTest extends WebtestCase {
 <target name="test">                             void testWebtestOnGoogle() {
  <webtest                                         webtest("Google WebTest Search") {
       name="Google WebTest Search">                invoke "http://www.google.com/ncr"
    <invoke url="http://www.google.com/ncr" />      verifyTitle "Google"
    <verifyTitle text="Google" />                   setInputField name: "q", value: "WebTest"
    <setInputField name="q" value="WebTest" />      clickButton "I'm Feeling Lucky"
    <clickButton label="I'm Feeling Lucky" />       verifyTitle "Canoo WebTest"
    <verifyTitle text="Canoo WebTest" />           }
  </webtest>                                      }
 </target>                                       }
</project>




                                                                                          14
Tenet 2



Data Transfer Models the
Domain


                           15
JavaScript Object Notation (JSON)
>   Matches Relational/Object-Oriented Structures
>   Easy to Read and Write
>   Simple to Parse and Generate
>   Familiar to Programmers of the C-family of languages:
       C, C++, C#, Java, JavaScript, Perl, Python, etc.
>   Very Simple Specification




                                                            16
JSON Syntax in a Slide




                         Images courtesy: http://www.json.org/
                                                                 17
JAX-RS Sample
@Stateless                                             @GET
@Path("sezzion")                                       @Produces({"application/json", "application/xml"})
public class SezzionFacadeREST extends                 public List<Sezzion> findAll() {
AbstractFacade<Sezzion> {                                return super.findAll();
  @PersistenceContext                                  }
  private EntityManager em;
                                                        @GET
@POST                                                   @Path("{from}/{to}")
@Consumes({"application/json", "application/xml"})      @Produces({"application/xml", "application/json"})
 public void create(Sezzion entity) {                   public List<Sezzion> findRange(@PathParam("from") Integer
   super.create(entity);                             from, @PathParam("to") Integer to) {
 }                                                        return super.findRange(new int[]{from, to});
                                                        }




                                                                                                              18
Tenet 3



Design Programming
Languages for Humans


                       19
Counter Example – o:XML
>   Created By Martin Klang in 2002
>   Object Oriented Language
>   Features:
       Poymorphism
       Function Overloading
       Exception Handling            Diagram from: http://www.o-xml.org/documentation/o-xml-tool-chain.html

       Threads




                                                                                                               20
String Replacement in o:XML vs. Java
<?xml-stylesheethref="../xsl/default.xsl" type="text/xsl"?>       class Replace {
<program>                                                           public String replace(String input, String from, String to) {
  <o:function name="ex:replace">                                      StringBuilder result = new StringBuilder();
    <o:param name="input" type="String"/>                             int last = 0;
    <o:param name="from" type="String"/>                              int index = 0;
    <o:param name="to" type="String"/>                                while ((index = input.indexOf(from, last)) != -1) {
    <o:do>                                                              result.append(input.substring(last, index));
        16 Lines
      <o:variable name="result"/>                                           14 Lines
                                                                        result.append(to);
      <o:while test="contains($input, $from)">                          last = index + from.length()
        461 Characters
        <o:set result="concat($result, substring-before($input,
$from), $to)"/>
                                                                      }     319 Characters
                                                                      result.append(input.substring(last));
        <o:set input="substring-after($input, $from)"/>               return result.toString();
      </o:while>                                                    }
      <o:return select="concat($result, $input)"/>                }
    </o:do>
  </o:function>
</program>




                                                                                                                                    21
String Replacement in o:XML
<?xml-stylesheethref="../xsl/default.xsl" type="text/xsl"?>
<program>
  <o:function name="ex:replace">
    <o:param name="input" type="String"/>
    <o:param name="from" type="String"/>
    <o:param name="to" type="String"/>
    <o:do>
      <o:variable name="result"/>
      <o:while test="contains($input, $from)">
        <o:set result="concat($result, substring-before($input, $from), $to)"/>
        <o:set input="substring-after($input, $from)"/>
      </o:while>
      <o:return select="concat($result, $input)"/>
    </o:do>
  </o:function>
</program>

                                                                                  22
Equivalent Java
class Replace {
  public String replace(String input, String from, String to) {
    StringBuilder result = new StringBuilder();
    int last = 0;
    int index = 0;
    while ((index = input.indexOf(from, last)) != -1) {
      result.append(input.substring(last, index));
      result.append(to);
      last = index + from.length()
    }
    result.append(input.substring(last));
    return result.toString();
  }
}


                                                                  23
Simple Java
class Replace {
  public String replace(String input, String from, String to) {
    return input.replaceAll(from, to)
  }
}




                                                                  24
JavaFX 2.0
>   Powerful graphics, animation, and media capabilities
>   Deploys in the browser or on desktop
>   Includes builders for declarative construction
>   Alternative languages can also be used for simpler UI creation
       GroovyFX
       ScalaFX
       Visage




                                                                     25
Hello JavaOne (Java Version)
public class HelloJavaOne extends Application {
  public static void main(String[] args) {
    launch(HelloJavaOne.class, args);
  }
  @Override
  public void start(Stage primaryStage) {
    primaryStage.setTitle("Hello JavaOne");
    Group root = new Group();
    Scene scene = new Scene(root, 400, 250, Color.ALICEBLUE);
    Text text = new Text();
    text.setX(105);
    text.setY(120);
    text.setFont(new Font(30));
    text.setText("Hello JavaOne");
    root.getChildren().add(text);
    primaryStage.setScene(scene);
    primaryStage.show();
  }
}
                                                                26
Hello JavaOne (Builder Version)
public void start(Stage primaryStage) {
  primaryStage.setTitle("Hello JavaOne");
  primaryStage.setScene(SceneBuilder.create()
    .width(400)
    .height(250)
    .fill(Color.ALICEBLUE)
    .root(
      GroupBuilder.create().children(
      TextBuilder.create()
        .x(105)
        .y(120)
        .text("Hello JavaOne")
        .font(new Font(30))
        .build()
      ).build()
    )
  .build());
  primaryStage.show();
}
                                                27
Hello JavaOne (GroovyFX Version)
GroovyFX.start { primaryStage ->
  def sg = new SceneGraphBuilder()
  sg.stage(
    title: 'Hello JavaOne',
    show: true) {
      scene(
        fill: aliceblue,
        width: 400,
        height: 250) {
          text(
             x: 105,
             y: 120,
             text: "Hello JavaOne"
             font: "30pt")
        }
    }
}
                                     28
Hello JavaOne (ScalaFX Version)
object HelloJavaOne extends JFXApp {
  stage = new Stage {
    title = "Hello JavaFX"
    width = 400
    height = 250
    scene = new Scene {
      fill = BLUE
      Text {
        x = 105
        y = 120
        text = "Hello JavaOne"
        font = Font(size: 30)
      }
    }
  }
}
                                       29
Hello JavaOne (Visage Version)
Stage {
  title: "Hello JavaOne"
  width: 400
  height: 250
  scene: Scene {
    fill: BLUE
    content: Text {
      x: 105
      y: 120
      text: "Hello JavaOne"
      font: Font {size: 30pt}
    }
  }
}



                                 30
JavaOne Speakers Application
>   End-to-end application with no XML coding
>   Server written using JavaEE 6 annotations
>   Data transfer uses JSON
>   Client written in JavaFX 2.0




                                                31
Finished Application



                       32
Support the Freedom From XML Petition      </>
http://steveonjava.com/freedom-from-xml/

Provide Non-XML Alternatives For:
> Declarative Programming

> Configuration

> Data Transfer




    Sign the Petition Today!

                                                 33
Stephen Chin            Arun Gupta
steveonjava@gmail.com   arun.p.gupta@oracle.com
tweet: @steveonjava     tweet: @arungupta




                                                  34

More Related Content

What's hot

JSON-RPC - JSON Remote Procedure Call
JSON-RPC - JSON Remote Procedure CallJSON-RPC - JSON Remote Procedure Call
JSON-RPC - JSON Remote Procedure Call
Peter R. Egli
 
Jersey framework
Jersey frameworkJersey framework
Jersey frameworkknight1128
 
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful  Protocol BuffersJavaOne 2009 - TS-5276 - RESTful  Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
Matt O'Keefe
 
Cloudy Open Source and DevOps
Cloudy Open Source and DevOpsCloudy Open Source and DevOps
Cloudy Open Source and DevOps
Matt O'Keefe
 
Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능knight1128
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Arun Gupta
 
web2py:Web development like a boss
web2py:Web development like a bossweb2py:Web development like a boss
web2py:Web development like a boss
Francisco Ribeiro
 
Web前端标准在各浏览器中的实现差异
Web前端标准在各浏览器中的实现差异Web前端标准在各浏览器中的实现差异
Web前端标准在各浏览器中的实现差异
Open Party
 
Groovy Domain Specific Languages - SpringOne2GX 2012
Groovy Domain Specific Languages - SpringOne2GX 2012Groovy Domain Specific Languages - SpringOne2GX 2012
Groovy Domain Specific Languages - SpringOne2GX 2012
Guillaume Laforge
 
Faster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzzFaster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzz
JBug Italy
 
You suck at Memory Analysis
You suck at Memory AnalysisYou suck at Memory Analysis
You suck at Memory Analysis
Francisco Ribeiro
 
Embrace HTTP with ASP.NET Web API
Embrace HTTP with ASP.NET Web APIEmbrace HTTP with ASP.NET Web API
Embrace HTTP with ASP.NET Web APIFilip W
 
Foomo / Zugspitze Presentation
Foomo / Zugspitze PresentationFoomo / Zugspitze Presentation
Foomo / Zugspitze Presentation
weareinteractive
 
A JCR View of the World - adaptTo() 2012 Berlin
A JCR View of the World - adaptTo() 2012 BerlinA JCR View of the World - adaptTo() 2012 Berlin
A JCR View of the World - adaptTo() 2012 BerlinAlexander Klimetschek
 
httpie
httpiehttpie
Web services tutorial
Web services tutorialWeb services tutorial
Web services tutorial
Lorna Mitchell
 
03 form-data
03 form-data03 form-data
03 form-datasnopteck
 
groovy & grails - lecture 11
groovy & grails - lecture 11groovy & grails - lecture 11
groovy & grails - lecture 11
Alexandre Masselot
 
Camel and JBoss
Camel and JBossCamel and JBoss
Camel and JBoss
JBug Italy
 
Kotlin is charming; The reasons Java engineers should start Kotlin.
Kotlin is charming; The reasons Java engineers should start Kotlin.Kotlin is charming; The reasons Java engineers should start Kotlin.
Kotlin is charming; The reasons Java engineers should start Kotlin.
JustSystems Corporation
 

What's hot (20)

JSON-RPC - JSON Remote Procedure Call
JSON-RPC - JSON Remote Procedure CallJSON-RPC - JSON Remote Procedure Call
JSON-RPC - JSON Remote Procedure Call
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
 
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful  Protocol BuffersJavaOne 2009 - TS-5276 - RESTful  Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
 
Cloudy Open Source and DevOps
Cloudy Open Source and DevOpsCloudy Open Source and DevOps
Cloudy Open Source and DevOps
 
Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능Jdk(java) 7 - 6 기타기능
Jdk(java) 7 - 6 기타기능
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5
 
web2py:Web development like a boss
web2py:Web development like a bossweb2py:Web development like a boss
web2py:Web development like a boss
 
Web前端标准在各浏览器中的实现差异
Web前端标准在各浏览器中的实现差异Web前端标准在各浏览器中的实现差异
Web前端标准在各浏览器中的实现差异
 
Groovy Domain Specific Languages - SpringOne2GX 2012
Groovy Domain Specific Languages - SpringOne2GX 2012Groovy Domain Specific Languages - SpringOne2GX 2012
Groovy Domain Specific Languages - SpringOne2GX 2012
 
Faster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzzFaster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzz
 
You suck at Memory Analysis
You suck at Memory AnalysisYou suck at Memory Analysis
You suck at Memory Analysis
 
Embrace HTTP with ASP.NET Web API
Embrace HTTP with ASP.NET Web APIEmbrace HTTP with ASP.NET Web API
Embrace HTTP with ASP.NET Web API
 
Foomo / Zugspitze Presentation
Foomo / Zugspitze PresentationFoomo / Zugspitze Presentation
Foomo / Zugspitze Presentation
 
A JCR View of the World - adaptTo() 2012 Berlin
A JCR View of the World - adaptTo() 2012 BerlinA JCR View of the World - adaptTo() 2012 Berlin
A JCR View of the World - adaptTo() 2012 Berlin
 
httpie
httpiehttpie
httpie
 
Web services tutorial
Web services tutorialWeb services tutorial
Web services tutorial
 
03 form-data
03 form-data03 form-data
03 form-data
 
groovy & grails - lecture 11
groovy & grails - lecture 11groovy & grails - lecture 11
groovy & grails - lecture 11
 
Camel and JBoss
Camel and JBossCamel and JBoss
Camel and JBoss
 
Kotlin is charming; The reasons Java engineers should start Kotlin.
Kotlin is charming; The reasons Java engineers should start Kotlin.Kotlin is charming; The reasons Java engineers should start Kotlin.
Kotlin is charming; The reasons Java engineers should start Kotlin.
 

Similar to XML-Free Programming : Java Server and Client Development without &lt;>

"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ..."Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
Vadym Kazulkin
 
Ten practical ways to improve front-end performance
Ten practical ways to improve front-end performanceTen practical ways to improve front-end performance
Ten practical ways to improve front-end performance
Andrew Rota
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
Codemotion
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformWSO2
 
Java one 2010
Java one 2010Java one 2010
Java one 2010
scdn
 
Tml for Objective C
Tml for Objective CTml for Objective C
Tml for Objective C
Michael Berkovich
 
SAX - Android Development
SAX - Android DevelopmentSAX - Android Development
SAX - Android Development
Rafique Mohammed
 
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011Nick Sieger
 
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Vadym Kazulkin
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
Arun Gupta
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLsintelliyole
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Red Hat Developers
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
Mauricio "Maltron" Leal
 
Engage 2023: Taking Domino Apps to the next level by providing a Rest API
Engage 2023: Taking Domino Apps to the next level by providing a Rest APIEngage 2023: Taking Domino Apps to the next level by providing a Rest API
Engage 2023: Taking Domino Apps to the next level by providing a Rest API
Serdar Basegmez
 
GeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassleGeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassle
Anton Arhipov
 
Cross-Platform Data Access for Android and iPhone
Cross-Platform Data Access for Android and iPhoneCross-Platform Data Access for Android and iPhone
Cross-Platform Data Access for Android and iPhone
Peter Friese
 
Spring Data MongoDB 介紹
Spring Data MongoDB 介紹Spring Data MongoDB 介紹
Spring Data MongoDB 介紹
Kuo-Chun Su
 

Similar to XML-Free Programming : Java Server and Client Development without &lt;> (20)

Play framework
Play frameworkPlay framework
Play framework
 
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ..."Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
 
Ten practical ways to improve front-end performance
Ten practical ways to improve front-end performanceTen practical ways to improve front-end performance
Ten practical ways to improve front-end performance
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 Platform
 
Java one 2010
Java one 2010Java one 2010
Java one 2010
 
Tml for Objective C
Tml for Objective CTml for Objective C
Tml for Objective C
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
SAX - Android Development
SAX - Android DevelopmentSAX - Android Development
SAX - Android Development
 
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011
 
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
 
Engage 2023: Taking Domino Apps to the next level by providing a Rest API
Engage 2023: Taking Domino Apps to the next level by providing a Rest APIEngage 2023: Taking Domino Apps to the next level by providing a Rest API
Engage 2023: Taking Domino Apps to the next level by providing a Rest API
 
GeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassleGeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassle
 
Cross-Platform Data Access for Android and iPhone
Cross-Platform Data Access for Android and iPhoneCross-Platform Data Access for Android and iPhone
Cross-Platform Data Access for Android and iPhone
 
Spring Data MongoDB 介紹
Spring Data MongoDB 介紹Spring Data MongoDB 介紹
Spring Data MongoDB 介紹
 

More from Arun Gupta

5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf
Arun Gupta
 
Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019
Arun Gupta
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and Kubernetes
Arun Gupta
 
Secure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerSecure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using Firecracker
Arun Gupta
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019
Arun Gupta
 
Why Amazon Cares about Open Source
Why Amazon Cares about Open SourceWhy Amazon Cares about Open Source
Why Amazon Cares about Open Source
Arun Gupta
 
Machine learning using Kubernetes
Machine learning using KubernetesMachine learning using Kubernetes
Machine learning using Kubernetes
Arun Gupta
 
Building Cloud Native Applications
Building Cloud Native ApplicationsBuilding Cloud Native Applications
Building Cloud Native Applications
Arun Gupta
 
Chaos Engineering with Kubernetes
Chaos Engineering with KubernetesChaos Engineering with Kubernetes
Chaos Engineering with Kubernetes
Arun Gupta
 
How to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMHow to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAM
Arun Gupta
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018
Arun Gupta
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 Keynote
Arun Gupta
 
Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018
Arun Gupta
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv Summit
Arun Gupta
 
Top 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeTop 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's Landscape
Arun Gupta
 
Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017
Arun Gupta
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Arun Gupta
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developers
Arun Gupta
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!
Arun Gupta
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to Containers
Arun Gupta
 

More from Arun Gupta (20)

5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf5 Skills To Force Multiply Technical Talents.pdf
5 Skills To Force Multiply Technical Talents.pdf
 
Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019Machine Learning using Kubernetes - AI Conclave 2019
Machine Learning using Kubernetes - AI Conclave 2019
 
Machine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and KubernetesMachine Learning using Kubeflow and Kubernetes
Machine Learning using Kubeflow and Kubernetes
 
Secure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerSecure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using Firecracker
 
Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019Building Java in the Open - j.Day at OSCON 2019
Building Java in the Open - j.Day at OSCON 2019
 
Why Amazon Cares about Open Source
Why Amazon Cares about Open SourceWhy Amazon Cares about Open Source
Why Amazon Cares about Open Source
 
Machine learning using Kubernetes
Machine learning using KubernetesMachine learning using Kubernetes
Machine learning using Kubernetes
 
Building Cloud Native Applications
Building Cloud Native ApplicationsBuilding Cloud Native Applications
Building Cloud Native Applications
 
Chaos Engineering with Kubernetes
Chaos Engineering with KubernetesChaos Engineering with Kubernetes
Chaos Engineering with Kubernetes
 
How to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAMHow to be a mentor to bring more girls to STEAM
How to be a mentor to bring more girls to STEAM
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 Keynote
 
Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018Introduction to Amazon EKS - KubeCon 2018
Introduction to Amazon EKS - KubeCon 2018
 
Mastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv SummitMastering Kubernetes on AWS - Tel Aviv Summit
Mastering Kubernetes on AWS - Tel Aviv Summit
 
Top 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's LandscapeTop 10 Technology Trends Changing Developer's Landscape
Top 10 Technology Trends Changing Developer's Landscape
 
Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017
 
Java EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShiftJava EE and NoSQL using JBoss EAP 7 and OpenShift
Java EE and NoSQL using JBoss EAP 7 and OpenShift
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developers
 
Thanks Managers!
Thanks Managers!Thanks Managers!
Thanks Managers!
 
Migrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to ContainersMigrate your traditional VM-based Clusters to Containers
Migrate your traditional VM-based Clusters to Containers
 

Recently uploaded

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 

Recently uploaded (20)

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 

XML-Free Programming : Java Server and Client Development without &lt;>

  • 1. XML-Free Programming : Java Server and Client Development Without <> Stephen Chin Arun Gupta Chief Agile Methodologist, GXS Oracle Corporation steveonjava@gmail.com arun.p.gupta@oracle.com tweet: @steveonjava tweet: @arungupta
  • 2. Meet the Presenters Stephen Chin Arun Gupta Community Guy Family Man Motorcyclist Marathoner
  • 3. Our Plan > Quick (Humorous) History of Angle Brackets > XML-Free Programming 1. Configuration Lives with the Code 2. Data Transfer Models the Domain 3. Design Programming Languages for Humans > JavaOne Speakers Application <Demo> 3
  • 4. Exhibit A – Angle Bracket Sighting in Virginia, 1922 Source: Library of Congress, Prints and Photographs Collection – Public Domain http://www.flickr.com/photos/pingnews/434444310/ 4
  • 5. Exhibit B - Bermuda Tri-Angle Brackets Source: NOAA National Ocean Service – CC licensed http://www.flickr.com/photos/usoceangov/4276194691/sizes/o/in/photostream/ 5
  • 6. Exhibit C – Tim Bray, Co-Founder of XML Source: Linux.com http://www.linux.com/archive/feature/133149 6
  • 7. History of XML > Based on Standard Generalized Markup Language (SGML) > Created by a W3C working group of eleven members > Version History:  XML 1.0 (1998) – Widely adopted with 5 subsequent revisions  XML 1.1 (2004) – Limited adoption 7
  • 8. XML Design Goals (a.k.a. problems with SGML) 1. Usable Over the Internet 2. Support a Wide Variety of Applications 3. Compatible with SGML 4. Easy to Write Programs to Process XML Documents 5. Minimum Number of Optional Features 6. Documents Should be Human-Legible and Reasonably Clear 7. Design Should be Prepared Quickly 8. Design Should be Formal and Concise 9. Documents Should be Easy to Create 10. Terseness in Markup is of Minimal Importance 8
  • 9. Design Goals Per Application Publishing Configuration Data Transfer Programming Usable Over Internet Important N/A Important N/A Wide Variety of Applications Acceptable Negative N/A N/A Compatible With SGML Important Negative Negative Negative Computer Processable Important Important Important Important No Optional Features Important Important Important Important Human-Legible Important Important Acceptable Important Design Completed Quickly Important N/A N/A N/A Formal and Concise Spec Important Important Important N/A Easy to Create Documents Important Important N/A Important Markup Can be Verbose Negative Negative Negative Negative 9
  • 10. Tenet 1 Configuration Lives with the Code 10
  • 11. Letting Go of XML is Hard! This is not intended as a replacement for Spring's XML format. Rod Johnson on Spring’s Annotations-based Configuration “A Java configuration option for Spring,” 11/28/06 11
  • 12. Java EE 6 Annotations > @Stateless > @Path > @WebServlet > @Inject > @Named > @Entity 12
  • 13. But There is Hope! You can have a Groovy DSL … it is as short as can be. Dierk Koenig on Canoo Web Test “Interview with Dierk Koenig,” ThirstyHead.com 6/3/2009 13
  • 14. Canoo Web Test Comparison XML Groovy Builder <project default="test"> class SimpleTest extends WebtestCase { <target name="test"> void testWebtestOnGoogle() { <webtest webtest("Google WebTest Search") { name="Google WebTest Search"> invoke "http://www.google.com/ncr" <invoke url="http://www.google.com/ncr" /> verifyTitle "Google" <verifyTitle text="Google" /> setInputField name: "q", value: "WebTest" <setInputField name="q" value="WebTest" /> clickButton "I'm Feeling Lucky" <clickButton label="I'm Feeling Lucky" /> verifyTitle "Canoo WebTest" <verifyTitle text="Canoo WebTest" /> } </webtest> } </target> } </project> 14
  • 15. Tenet 2 Data Transfer Models the Domain 15
  • 16. JavaScript Object Notation (JSON) > Matches Relational/Object-Oriented Structures > Easy to Read and Write > Simple to Parse and Generate > Familiar to Programmers of the C-family of languages:  C, C++, C#, Java, JavaScript, Perl, Python, etc. > Very Simple Specification 16
  • 17. JSON Syntax in a Slide Images courtesy: http://www.json.org/ 17
  • 18. JAX-RS Sample @Stateless @GET @Path("sezzion") @Produces({"application/json", "application/xml"}) public class SezzionFacadeREST extends public List<Sezzion> findAll() { AbstractFacade<Sezzion> { return super.findAll(); @PersistenceContext } private EntityManager em; @GET @POST @Path("{from}/{to}") @Consumes({"application/json", "application/xml"}) @Produces({"application/xml", "application/json"}) public void create(Sezzion entity) { public List<Sezzion> findRange(@PathParam("from") Integer super.create(entity); from, @PathParam("to") Integer to) { } return super.findRange(new int[]{from, to}); } 18
  • 20. Counter Example – o:XML > Created By Martin Klang in 2002 > Object Oriented Language > Features:  Poymorphism  Function Overloading  Exception Handling Diagram from: http://www.o-xml.org/documentation/o-xml-tool-chain.html  Threads 20
  • 21. String Replacement in o:XML vs. Java <?xml-stylesheethref="../xsl/default.xsl" type="text/xsl"?> class Replace { <program> public String replace(String input, String from, String to) { <o:function name="ex:replace"> StringBuilder result = new StringBuilder(); <o:param name="input" type="String"/> int last = 0; <o:param name="from" type="String"/> int index = 0; <o:param name="to" type="String"/> while ((index = input.indexOf(from, last)) != -1) { <o:do> result.append(input.substring(last, index)); 16 Lines <o:variable name="result"/> 14 Lines result.append(to); <o:while test="contains($input, $from)"> last = index + from.length() 461 Characters <o:set result="concat($result, substring-before($input, $from), $to)"/> } 319 Characters result.append(input.substring(last)); <o:set input="substring-after($input, $from)"/> return result.toString(); </o:while> } <o:return select="concat($result, $input)"/> } </o:do> </o:function> </program> 21
  • 22. String Replacement in o:XML <?xml-stylesheethref="../xsl/default.xsl" type="text/xsl"?> <program> <o:function name="ex:replace"> <o:param name="input" type="String"/> <o:param name="from" type="String"/> <o:param name="to" type="String"/> <o:do> <o:variable name="result"/> <o:while test="contains($input, $from)"> <o:set result="concat($result, substring-before($input, $from), $to)"/> <o:set input="substring-after($input, $from)"/> </o:while> <o:return select="concat($result, $input)"/> </o:do> </o:function> </program> 22
  • 23. Equivalent Java class Replace { public String replace(String input, String from, String to) { StringBuilder result = new StringBuilder(); int last = 0; int index = 0; while ((index = input.indexOf(from, last)) != -1) { result.append(input.substring(last, index)); result.append(to); last = index + from.length() } result.append(input.substring(last)); return result.toString(); } } 23
  • 24. Simple Java class Replace { public String replace(String input, String from, String to) { return input.replaceAll(from, to) } } 24
  • 25. JavaFX 2.0 > Powerful graphics, animation, and media capabilities > Deploys in the browser or on desktop > Includes builders for declarative construction > Alternative languages can also be used for simpler UI creation  GroovyFX  ScalaFX  Visage 25
  • 26. Hello JavaOne (Java Version) public class HelloJavaOne extends Application { public static void main(String[] args) { launch(HelloJavaOne.class, args); } @Override public void start(Stage primaryStage) { primaryStage.setTitle("Hello JavaOne"); Group root = new Group(); Scene scene = new Scene(root, 400, 250, Color.ALICEBLUE); Text text = new Text(); text.setX(105); text.setY(120); text.setFont(new Font(30)); text.setText("Hello JavaOne"); root.getChildren().add(text); primaryStage.setScene(scene); primaryStage.show(); } } 26
  • 27. Hello JavaOne (Builder Version) public void start(Stage primaryStage) { primaryStage.setTitle("Hello JavaOne"); primaryStage.setScene(SceneBuilder.create() .width(400) .height(250) .fill(Color.ALICEBLUE) .root( GroupBuilder.create().children( TextBuilder.create() .x(105) .y(120) .text("Hello JavaOne") .font(new Font(30)) .build() ).build() ) .build()); primaryStage.show(); } 27
  • 28. Hello JavaOne (GroovyFX Version) GroovyFX.start { primaryStage -> def sg = new SceneGraphBuilder() sg.stage( title: 'Hello JavaOne', show: true) { scene( fill: aliceblue, width: 400, height: 250) { text( x: 105, y: 120, text: "Hello JavaOne" font: "30pt") } } } 28
  • 29. Hello JavaOne (ScalaFX Version) object HelloJavaOne extends JFXApp { stage = new Stage { title = "Hello JavaFX" width = 400 height = 250 scene = new Scene { fill = BLUE Text { x = 105 y = 120 text = "Hello JavaOne" font = Font(size: 30) } } } } 29
  • 30. Hello JavaOne (Visage Version) Stage { title: "Hello JavaOne" width: 400 height: 250 scene: Scene { fill: BLUE content: Text { x: 105 y: 120 text: "Hello JavaOne" font: Font {size: 30pt} } } } 30
  • 31. JavaOne Speakers Application > End-to-end application with no XML coding > Server written using JavaEE 6 annotations > Data transfer uses JSON > Client written in JavaFX 2.0 31
  • 33. Support the Freedom From XML Petition </> http://steveonjava.com/freedom-from-xml/ Provide Non-XML Alternatives For: > Declarative Programming > Configuration > Data Transfer Sign the Petition Today! 33
  • 34. Stephen Chin Arun Gupta steveonjava@gmail.com arun.p.gupta@oracle.com tweet: @steveonjava tweet: @arungupta 34