You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/04/14 18:30:17 UTC

svn commit: r934006 - /pivot/site/trunk/www/faq.xml

Author: gbrown
Date: Wed Apr 14 16:30:17 2010
New Revision: 934006

URL: http://svn.apache.org/viewvc?rev=934006&view=rev
Log:
Add FAQ to site.

Added:
    pivot/site/trunk/www/faq.xml

Added: pivot/site/trunk/www/faq.xml
URL: http://svn.apache.org/viewvc/pivot/site/trunk/www/faq.xml?rev=934006&view=auto
==============================================================================
--- pivot/site/trunk/www/faq.xml (added)
+++ pivot/site/trunk/www/faq.xml Wed Apr 14 16:30:17 2010
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file except in
+compliance with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<document>
+    <properties>
+        <title>Frequently Asked Questions (FAQ)</title>
+    </properties>
+
+    <body>
+        <h1>Platform</h1>
+        <p>This section answers questions related to the Pivot platform.</p>
+        
+        <h2>What is Apache Pivot?</h2>
+        <p>Apache Pivot is an open-source platform for building rich internet applications in Java. It combines the enhanced productivity and usability features of a modern RIA toolkit with the robustness of the Java platform. Pivot applications are written using a combination of Java and XML and can be run either as an applet or as a standalone, optionally offline, desktop application.</p>
+        
+        <p>Like other modern development platforms, Pivot provides a comprehensive set of foundation classes that together comprise a "framework". These classes form the building blocks upon which more complex and sophisticated applications can be built.</p>
+        
+        <h2>Who is Pivot's target audience?</h2>
+        <p>Pivot was designed to be familiar to web developers who have experience building AJAX applications using HTML, CSS, and JavaScript. However, it provides a much richer set of standard widgets than HTML, and allows developers to create sophisticated user experiences much more quickly and easily. Pivot will also seem familiar to Swing developers, as both Swing and Pivot are based on Java2D and employ a model-view-controller (MVC) architecture to separate component data from presentation. However, Pivot includes additional features that make building modern GUI applications much easier, including declarative UI, data binding, effects and transitions, and web services integration.</p>
+        
+        <h2>Why RIA?</h2>
+        <p>The web has become the defacto standard method for application delivery. However, functional requirements for web applications have begun to scale beyond the capabilities of the browser. Even with the addition of scripting support, dynamic element manipulation, and asynchronous server communication, it is difficult to create a user experience in HTML that is truly on par with that of a desktop application.</p>
+        
+        <p>Rich Internet application (RIA) development platforms are a means of bridging the gap between the web and desktop experiences. Using browser plugins, these platforms allow developers to build applications that look and feel more like native desktop applications but are deployable via the web, like traditional, HTML-based web applications. RIAs also often incorporate visual effects intended to enhance the overall user experience, such as animations and other dynamic behavior.</p>
+        
+        <a href="http://www.adobe.com/products/flex">Adobe Flex</a>, <a href="http://www.microsoft.com/silverlight">Microsoft Silverlight</a>, and <a href="http://javafx.com">JavaFX</a> are arguably the most high-profile of these platforms; others include <a href="http://www.openlaszlo.org">OpenLaszlo</a> and <a href="http://www.curl.com">Curl</a>. Pivot itself falls into this category.</p>
+        
+        <h2>Why Pivot?</h2>
+        <p>Pivot was created for two primary reasons:</p>
+        
+        <ul>
+        <li><p>To provide a viable option for developers who want to build rich client applications in Java (or any other JVM-compatible language). Flex applications are written in ActionScript, Silverlight applications are built using .NET, and JavaFX applications are built with JavaFX Script. Pivot allows Java developers to build RIAs using technologies and APIs they already know.</p></li>
+        
+        <li><p>To provide a truly open alternative for RIA developers. While they may be open source to varying degrees, Flex, Silverlight, and JavaFX are still proprietary platforms that are driven by corporate objectives. Since its inception, Pivot was envisioned as an open-source project and is driven entirely by the software development community.</p></li>
+        </ul>
+        
+        <h2>Where did Pivot come from?</h2>
+        <p>Pivot began as an R&D effort in the Web UI group at VMware in 2007, and was released as an open-source project in June, 2008 under the Apache 2.0 license. Pivot joined the Apache Incubator in January, 2009 and graduated as a top-level Apache project in December, 2009.</p>
+        
+        <h2>What platforms does Pivot support?</h2>
+        <p>Pivot applications run on any operating system with a Java Runtime Environment (JRE) version 6 or greater (though Java 6 update 14 or later is recommended). They can be run locally as desktop applications or via the web using the Java plugin or Java Web Start.</p>
+        
+        <h2>How does Pivot compare to Swing?</h2>
+        <p>While it is technically feasible to build an RIA in Java using the <a href="http://java.sun.com/docs/books/tutorial/uiswing">Swing toolkit</a>, Pivot offers a number of advantages that make it a more compelling, modern alternative:</p>
+        
+        </ul>
+        <li><p>Pivot provides an XML markup language called WTKX for simplifying user interface construction. Flex, Silverlight, and OpenLaszlo all offer a similar feature; web developers are comfortable with the markup metaphor, and it can considerably reduce overall development time.</p></li>
+        
+        <li><p>Components are not limited to an "atomic" preferred size; they are allowed to report a preferred size as constrained by either width or height - this facilitates such features as label wrapping, which Swing does not support.</p></li>
+        
+        <li><p>Pivot employs a consistent data model that is used throughout the entire framework; for example, JSON data returned from a REST service is serialized into the same data structures used by a table view component to present data. No additional translation is necessary, which can significantly improve performance. A common data model also reduces the learning curve for new developers.</p></li>
+        
+        <li><p>Pivot includes built-in support for REST-based data services, which Pivot calls "web queries". This provides parity with Flex, which comes with out-of-the-box support for RPC via the AMF protocol, and Silverlight, which supports both SOAP and REST-style services. Swing does not include any built-in facilities for server communication, making it less convenient to work with.
+        Note, however, that Pivot is not limited to REST for server communication. Because it runs in a JRE, a Pivot application can take advantage of any client/server protocol that has a Java API; for example SOAP-based services via <a href="http://ws.apache.org/axis">Axis</a> or Flex RPC using the BlazeDS <a href="http://opensource.adobe.com/wiki/display/blazeds/Java+AMF+Client">AMF client</a>.</p></li>
+        
+        <li><p>Pivot includes built-in data binding support, which allows data returned from web queries (as well as other types of data services) to easily be mapped to form contents.</p></li>
+        
+        <li><p>Pivot includes (and takes advantage of) platform-level support for visual effects and transitions (i.e. animations).</p></li>
+        
+        <li><p>Pivot applications are inherently resolution independent. Bitmapped and vector images are interchangeable, and the entire user interface can be scaled to take advantage of high-resolution displays or for accessibility purposes.</p></li> 
+        
+        <li><p>Pivot defines a single Application inteface that is used for launching both desktop and web-based applications - multiple codebases for applets and applications are not required.</p></li>
+        
+        <li><p>Because it requires Java 6, Pivot is able to take advantage of newer Java language features such as generics, enums, for..each loops, varargs, and annotations.</p></li>
+        </ul>
+        
+        <h2>How does Pivot compare to JavaFX?</h2>
+        <p>Pivot primarily differentiates itself from JavaFX by allowing developers to build applications in Java, rather than the JavaFX scripting language. Also, Pivot and JavaFX appear to be serving two slightly different use cases. Pivot is designed primarily to address the "Application" in "RIA", whereas JavaFX appears to be geared more towards the "Rich" part of the acronym. This isn't to say that the two are mutually exclusive - Pivot supports a variety of features for adding visual richness to an application. However, Pivot is first and foremost a tool for creating applications - animations and other effects are primarily intended to enhance the user experience of those applications, not serve as simple eye-candy.</p>
+        
+        <p>In short, Pivot represents what we think Sun should have done instead of JavaFX.</p>
+        
+        <h2>How does Pivot compare to the Google Widget Toolkit (GWT)?</h2>
+        <p>While GWT allows developers to use the Java language to write web-based applications, the runtime enviroment for a GWT application is the browser itself, not a JVM. This has a number of drawbacks:</p>
+        
+        <ul>
+        <li><p>The compiled code executes as interpreted JavaScript, not bytecode. While browser vendors have made great strides recently in improving JavaScript performance, there are still many layers between the application code and the actual runtime environment. There are far fewer layers in a Pivot application - this results in less code to execute and translates to better overall performance.</li></p>
+        
+        <li><p>The only language features and APIs available are those that can be supported by the browser and have been ported to GWT by Google. For example, there is no support for multi-threading, network, or I/O operations. Pivot applications have access to the full feature set of the Java Virtual Machine, including all standard Java libraries and APIs as well as any third-party libraries.</li></p>
+        
+        <li><p>All presentation must be done via CSS and DOM manipulation. Fundamentally, HTML is a page layout language and is not optimized for general-purpose drawing. Pivot uses Java2D for presentation and can also take advantage of 3D APIs including Java3D and JOGL.</li></p>
+        
+        <li><p>GWT's native means of server communication, GWT RPC, is a closed protocol, which limits options for sharing back-end functionality. REST services are not natively supported, and SOAP/AMF services are not supported at all.</p></li>
+        </ul>
+        
+        <p>Pivot allows developers to efficiently construct RIAs that can truly take advantage of the Java platform.</p>
+        
+        <section>Features</section>
+        <p>This section answers questions related to Pivot features.</p>
+        
+        <h2>Where can I find information on how to use Pivot?</h2>
+        <p>Javadoc for Pivot is available <a href="http://incubator.apache.org/pivot/1.5/docs/api">online</a>, and a complete tutorial is available <a href="http://incubator.apache.org/pivot/tutorials">here</a>.</p>
+        
+        <p>Readers who want a quicker introduction to the platform may prefer to jump directly to the <a href="http://incubator.apache.org/pivot/tutorials/stock-tracker.html">final section</a> of the tutorial, which walks through the implementation of a simple but practical sample application called "Stock Tracker". Stock Tracker demonstrates a number of key features used by many "real world" applications, including UI markup, event handling, web queries, data binding, and localization, among others.</p>
+        
+        <p>Readers may also find it helpful to review the <a href="http://incubator.apache.org/pivot/tutorials/wtkx-primer.html">WTKX Primer</a>, which provides an introduction to Pivot's markup language, before browsing the tutorials themsevles.</p>
+        
+        <h2>How can I create a Pivot project in Eclipse?</h2>
+        <p>It is very easy to set up a Pivot project using Eclipse (the Pivot platform itself is actually built using Eclipse):</p>
+        
+        <ul>
+        <li><p>Create a new Java project (File > New Java Project).
+        
+        <li><p>Add a lib folder to the project.
+        
+        <li><p>Copy the Pivot JARs you need to the lib folder. At a minimum, you'll need pivot-core-1.5.jar, pivot-wtk-1.5.jar, and pivot-wtk-terra-1.5.jar. The contents of all the Pivot JARs are discussed in the <a href="http://pivot.apache.org/tutorials/platform-overview.html">Platform Overview</a> section of the tutorial.
+        
+        <li><p>Right-click on the project in Eclipse and select Properties. Click on Java Build Path.</p></li>
+        
+        <li><p>Select the Libraries tab and click Add JARs.</p></li>
+        
+        <li><p>Navigate to the lib directory in your newly created project, select the Pivot JARs, and
+        click OK.</p></li>
+        </ul>
+        
+        <p>You can now create your main application class (the one that implements org.apache.pivot.wtk.Application). The <a href="http://pivot.apache.org/tutorials/hello-world.html">Hello World</a> tutorial page discusses this interface in more detail and provides information on how to launch it in a browser or as a desktop application.</p>
+        
+        <h2>How can I reference the Pivot source code in Eclipse?</h2>
+        <p>Assuming you have followed the previous steps for setting up a Pivot project in Eclipse, you can do the following to link the source code from the source distribution the libraries in Eclipse:</p>
+        
+        <ul>
+        <li><p>Expand the Pivot source distribution, available from the <a href="http://pivot.apache.org/download.cgi#1.5">Downloads</a> page.</p></li>
+        
+        <li><p>In Eclipse, expand the Referenced Libraries node in the tree view and right-click on the library name (e.g. pivot-core-1.5.jar). </p></li>
+        
+        <li><p>Select Java Source Attachment. </p></li>
+        
+        <li><p>Click External Folder. </p></li>
+        </ul>
+        
+        <p>Browse to the location of the source folder in the expanded source distribution (e.g. core/src) and click OK. Repeat this process for all Pivot libraries. </p>
+        
+        <h2>Why does Pivot include its own collection classes?</h2>
+        <p>The short answer is that they make the API easier to use, and provide a consistent API across all classes that require indexed or keyed access.</p>
+        
+        <p>The longer answer: </p>
+        
+        <ul>
+        <li><p>Pivot's collection classes fire events that notify listeners when collections are modified. This makes it very easy to wire an application data structure directly into a UI.</p></ul>
+        
+        <li><p>Pivot's collection interfaces enable construction of arbitrary object hierarchies using XML. Any class that implements the Sequence or Dictionary interface can be instantiated and configured completely in markup. </p></ul>
+        </ul>
+        
+        <p>Note, however, that developers aren't required to use these collection classes. Pivot includes various wrapper classes that allow existing model and collection data to be incorporated directly into a Pivot user interface.</p>
+        
+        <h2>Why doesn't copy/paste work in Pivot?</h2>
+        <p>Copy/paste does work in Pivot. However, untrusted Java applets aren't allowed to interact with the system clipboard for security reasons. Trusted (signed) applets and applications running locally have full access to the system clipboard and can share data with native applications as well as other Pivot applications.</p>
+    </body>
+</document>
+