Providing overview
authorJaroslav Tulach <jaroslav.tulach@netbeans.org>
Thu, 06 Feb 2014 16:12:49 +0100
changeset 54193ca8cad4af9
parent 540 eaba453cfad7
child 542 ae488d072a16
Providing overview
json/src/main/java/net/java/html/json/doc-files/DukeHTML.png
src/main/javadoc/overview.html
     1.1 Binary file json/src/main/java/net/java/html/json/doc-files/DukeHTML.png has changed
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/src/main/javadoc/overview.html	Thu Feb 06 16:12:49 2014 +0100
     2.3 @@ -0,0 +1,119 @@
     2.4 +<!DOCTYPE html>
     2.5 +<!--
     2.6 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     2.7 +
     2.8 +Copyright 2014 Oracle and/or its affiliates. All rights reserved.
     2.9 +
    2.10 +Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    2.11 +Other names may be trademarks of their respective owners.
    2.12 +
    2.13 +The contents of this file are subject to the terms of either the GNU
    2.14 +General Public License Version 2 only ("GPL") or the Common
    2.15 +Development and Distribution License("CDDL") (collectively, the
    2.16 +"License"). You may not use this file except in compliance with the
    2.17 +License. You can obtain a copy of the License at
    2.18 +http://www.netbeans.org/cddl-gplv2.html
    2.19 +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    2.20 +specific language governing permissions and limitations under the
    2.21 +License.  When distributing the software, include this License Header
    2.22 +Notice in each file and include the License file at
    2.23 +nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
    2.24 +particular file as subject to the "Classpath" exception as provided
    2.25 +by Oracle in the GPL Version 2 section of the License file that
    2.26 +accompanied this code. If applicable, add the following below the
    2.27 +License Header, with the fields enclosed by brackets [] replaced by
    2.28 +your own identifying information:
    2.29 +"Portions Copyrighted [year] [name of copyright owner]"
    2.30 +
    2.31 +If you wish your version of this file to be governed by only the CDDL
    2.32 +or only the GPL Version 2, indicate your decision by adding
    2.33 +"[Contributor] elects to include this software in this distribution
    2.34 +under the [CDDL or GPL Version 2] license." If you do not indicate a
    2.35 +single choice of license, a recipient has the option to distribute
    2.36 +your version of this file under either the CDDL, the GPL Version 2 or
    2.37 +to extend the choice of license to its licensees as provided above.
    2.38 +However, if you add GPL Version 2 code and therefore, elected the GPL
    2.39 +Version 2 license, then the option applies only if the new code is
    2.40 +made subject to such option by the copyright holder.
    2.41 +
    2.42 +Contributor(s):
    2.43 +
    2.44 +Portions Copyrighted 2014 Sun Microsystems, Inc.
    2.45 +-->
    2.46 +<html>
    2.47 +    <head>
    2.48 +        <title>HTML for Java APIs</title>
    2.49 +        <meta charset="UTF-8">
    2.50 +        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    2.51 +    </head>
    2.52 +    <body>
    2.53 +        <p>
    2.54 +         Use Java to write application logic; use HTML5 to render the UI.
    2.55 +         Get the best of both worlds. 
    2.56 +         The goal of these APIs is to use full featured Java runtime 
    2.57 +         (e.g. real <a href="http://wiki.apidesign.org/wiki/HotSpot">HotSpot VM</a>), 
    2.58 +         but still rely on a very lightweight rendering technology 
    2.59 +         (so it can potentially fit 
    2.60 +         <a href="http://bck2brwsr.apidesign.org">Bck2Brwsr</a> and definitely
    2.61 +         to various types of phones). What can be more lightweight 
    2.62 +         (from a browser perspective) than 
    2.63 +         <a href="http://wiki.apidesign.org/wiki/HTML">HTML</a>!?
    2.64 +         By default we use {@link net.java.html.boot.fx JavaFX's WebView} 
    2.65 +         component to display the <a href="http://wiki.apidesign.org/wiki/HTML">HTML</a>. 
    2.66 +         We eliminate the need to manipulate the DOM directly, 
    2.67 +         there is a special {@link net.java.html.json Java to Knockout.js binding}. 
    2.68 +         As a result the <a href="http://wiki.apidesign.org/wiki/Knockout4Java">HTML uses Knockout.js syntax></a>, 
    2.69 +         yet the application code can be written in Java.
    2.70 +        </p>
    2.71 +        
    2.72 +        <h3>Interesting Entry Points</h3>
    2.73 +        
    2.74 +        <p>Learn how to {@link net.java.html.json.Model animate an HTML page from Java}
    2.75 +            without referencing single HTML element from the Java code.
    2.76 +        </p>
    2.77 +        <p>Use {@link net.java.html.json.OnReceive JSON} to communicate
    2.78 +            with REST based server API.
    2.79 +        </p>
    2.80 +        <p>Use <a href="net/java/html/json/doc-files/websockets.html">WebSockets</a>
    2.81 +            and JSON.
    2.82 +        </p>
    2.83 +        <p>Call JavaScript methods from Java and vice versa, via
    2.84 +            <a href="net/java/html/js/package-summary.html">JavaScriptBody</a>.
    2.85 +        </p>
    2.86 +
    2.87 +        <h3>Getting Started</h3>
    2.88 +
    2.89 +        There are many ways to start developing 
    2.90 +        <a href="http://html.java.net">Html for Java</a> application. 
    2.91 +        However to be sure one chooses the most recent setup, it is recommended
    2.92 +        to switch to good old command line and use a 
    2.93 +        <a href="http://wiki.apidesign.org/wiki/Knockout4Java">Maven archetype</a>
    2.94 +        associated with every version of this project. Just type:
    2.95 +        <pre>      
    2.96 +$ mvn archetype:generate \
    2.97 + -DarchetypeGroupId=org.apidesign.html \
    2.98 + -DarchetypeArtifactId=knockout4j-archetype \
    2.99 + -DarchetypeVersion=x.y
   2.100 +        </pre>
   2.101 +        Answer few questions (for example choose myfirstbrwsrpage as artifactId) and then you can:
   2.102 +        <pre>
   2.103 +$ cd myfirstbrwsrpage
   2.104 +$ mvn process-classes exec:java
   2.105 +        </pre>
   2.106 +        In a few seconds (or minutes if 
   2.107 +        <a href="http://wiki.apidesign.org/wiki/Maven">Maven</a>
   2.108 +        decides to download the whole Internet of dependencies) you should 
   2.109 +        see a sample Hello World application. It is basically composed from one 
   2.110 +        Java and one HTML file:
   2.111 +        <pre>
   2.112 +$ ls src/main/java/**/DataModel.java
   2.113 +$ ls src/main/webapp/pages/index.html
   2.114 +        </pre>
   2.115 +        Play with them, modify them and enjoy
   2.116 +        <a href="http://html.java.net">Html for Java</a>!
   2.117 +        
   2.118 +        <p>
   2.119 +        <img src="net/java/html/json/doc-files/DukeHTML.png" width="640" height="480" alt="Duke and HTML5. Together at last!"/>
   2.120 +        </p>
   2.121 +    </body>
   2.122 +</html>