This is an automated email from the ASF dual-hosted git repository.
harbs pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/royale-docs.git
The following commit(s) were added to refs/heads/master by this push:
new 853eda0 Gave working-with-data its own structure
853eda0 is described below
commit 853eda04bdc0bb53eb686051d8d8f45063d64ca1
Author: Harbs <[email protected]>
AuthorDate: Thu Jan 13 01:19:49 2022 +0200
Gave working-with-data its own structure
---
_data/toc.json | 54 +++++++++++-----------
component-sets/jewel/jewel-datacontainer.md | 2 +-
.../application-tutorial/data-model.md | 2 +-
.../application-tutorial/value-objects.md | 2 +-
.../optimizations/minification.md | 2 +-
features/{ => as3}/reflection-introspection.md | 2 +-
features/external-interface.md | 4 +-
libraries/crux/client-persistence.md | 2 +-
working-with-data.md | 6 +--
{features => working-with-data}/item-renderers.md | 2 +-
.../loading-external-data.md | 28 ++++++++---
.../loading-external-data/amf.md | 6 +--
.../loading-external-data/httpservice.md | 2 +-
.../loading-external-data/json.md | 2 +-
.../loading-external-data/localsharedobject.md | 4 +-
.../loading-external-data/remoteobject.md | 4 +-
16 files changed, 69 insertions(+), 55 deletions(-)
diff --git a/_data/toc.json b/_data/toc.json
index 3498869..b370e67 100644
--- a/_data/toc.json
+++ b/_data/toc.json
@@ -106,9 +106,6 @@
"path": "features/data-binding.md"
},
{
- "path": "features/loading-external-data/amf.md"
- },
- {
"path": "features/external-interface.md"
},
{
@@ -120,9 +117,6 @@
{ "path": "features/routing.md"
},
{
- "path": "features/item-renderers.md"
- },
- {
"path": "features/modules.md"
},
{
@@ -145,6 +139,32 @@
]
},
{
+ "path": "working-with-data.md",
+ "children": [
+ {
+ "path": "working-with-data/loading-external-data.md",
+ "children": [
+ {
+ "path":
"working-with-data/loading-external-data/amf.md"
+ },
+ {
+ "path":
"working-with-data/loading-external-data/localsharedobject.md"
+ },
+ {
+ "path":
"working-with-data/loading-external-data/httpservice.md"
+ },
+ {
+ "path":
"working-with-data/loading-external-data/remoteobject.md"
+ }
+
+ ]
+ },
+ {
+ "path": "working-with-data/item-renderers.md"
+ }
+ ]
+ },
+ {
"path": "user-interface.md",
"children": [
@@ -170,28 +190,6 @@
]
},
{
- "path": "working-with-data.md",
- "children": [
- {
- "path": "features/loading-external-data.md",
- "children": [
- {
- "path": "features/loading-external-data/json.md"
- },
- {
- "path":
"features/loading-external-data/localsharedobject.md"
- },
- {
- "path":
"features/loading-external-data/httpservice.md"
- },
- {
- "path":
"features/loading-external-data/remoteobject.md"
- }
- ]
- }
- ]
- },
- {
"path": "frameworks-and-libraries.md",
"children": [
{
diff --git a/component-sets/jewel/jewel-datacontainer.md
b/component-sets/jewel/jewel-datacontainer.md
index 0fba25c..0014be6 100644
--- a/component-sets/jewel/jewel-datacontainer.md
+++ b/component-sets/jewel/jewel-datacontainer.md
@@ -38,7 +38,7 @@ Available since version __0.9.4__.
The Jewel DataContainer class is a component that displays multiple data items.
-This component gets the data through its `dataProvider` property that receives
an `ArrayList` of data objects. To represent each item the component uses a
suitably-configured [ItemRenderer](features/item-renderers) class. The
component generates dynamically as many instances of its ItemRenderer as there
are items in the data provider array, and fills each instance with the
appropiate data. By default it uses `StringItemRenderer` as the item renderer.
+This component gets the data through its `dataProvider` property that receives
an `ArrayList` of data objects. To represent each item the component uses a
suitably-configured [ItemRenderer](working-with-data/item-renderers) class. The
component generates dynamically as many instances of its ItemRenderer as there
are items in the data provider array, and fills each instance with the
appropiate data. By default it uses `StringItemRenderer` as the item renderer.
By default items are laid out vertically using Jewel `VerticalLayout`. This
component has a `Viewport` that clips generated items.
diff --git a/create-an-application/application-tutorial/data-model.md
b/create-an-application/application-tutorial/data-model.md
index 7ff27a3..8ea0c56 100644
--- a/create-an-application/application-tutorial/data-model.md
+++ b/create-an-application/application-tutorial/data-model.md
@@ -45,7 +45,7 @@ public var repos:Array;
public var projectName:String;
```
-Next, we need to get the values for these arrays. Let's use a
[JSON](features/loading-external-data/json) file, called `project.json`, to
configure which repos to use and the project name. The file contents look like:
+Next, we need to get the values for these arrays. Let's use a JSON file,
called `project.json`, to configure which repos to use and the project name.
The file contents look like:
```json
{
diff --git a/create-an-application/application-tutorial/value-objects.md
b/create-an-application/application-tutorial/value-objects.md
index c03daa7..405fc2f 100644
--- a/create-an-application/application-tutorial/value-objects.md
+++ b/create-an-application/application-tutorial/value-objects.md
@@ -24,7 +24,7 @@ permalink:
/create-an-application/application-tutorial/value-objects
Plain ActionScript Objects with properties or arrays
-Queries for data to many servers return
[JSON](features/loading-external-data/json), which is a plain object or array
often referencing other plain objects and arrays. In ActionScript there are
advantages to using something called "data classes" or "value objects" (also
sometimes "ValueObjects").
+Queries for data to many servers return JSON, which is a plain object or array
often referencing other plain objects and arrays. In ActionScript there are
advantages to using something called "data classes" or "value objects" (also
sometimes "ValueObjects").
Value Objects tell the compiler that your data has a fixed set of properties
of a given type. If you misspell the name of a field in the data, the compiler
will catch it. Some [IDEs](get-started/development-tools) know how to complete
the field name as you type it and only offer completions for that data object
instead of all strings used in the file.
diff --git a/create-an-application/optimizations/minification.md
b/create-an-application/optimizations/minification.md
index b4e0c8a..b68ed68 100644
--- a/create-an-application/optimizations/minification.md
+++ b/create-an-application/optimizations/minification.md
@@ -116,5 +116,5 @@ Constantly checking that your app works both in debug and
release mode is import
## Features which affect file size
In general, only dependencies you need are included in your app when using
Royale. Usually this means additional classes and the associated code. In
certain cases, using features will affect the size of *all* your classes
because more information will be needed at runtime.
1. Reflection classes and functions. (To do -- needs a page) (i.e.
`getDefinitionByName`, `getQualifiedClassName`, etc.) If you use reflection,
information about your classes and accessors is needed at runtime. This adds
significantly to the size of your runtime output. If you just need to get the
class from an instance, you **do not** need reflection (unlike in Flash). There
is `org.apache.royale.utils.object.classFromInstance()`, which helps with this
without a reflection dependency.
-2. [AMF](features/loading-external-data/amf). AMF uses reflection under the
hood to recreate classes from data at runtime. If AMF is important to you, the
extra weight might be justified, but make an informed decision.
+2. [AMF](working-with-data/loading-external-data/amf). AMF uses reflection
under the hood to recreate classes from data at runtime. If AMF is important to
you, the extra weight might be justified, but make an informed decision.
3. [Crux](libraries/crux). Crux uses reflection as well. If dependency
injection is your thing, then Crux is a solution; but you should be aware of
the cost it brings.
diff --git a/features/reflection-introspection.md
b/features/as3/reflection-introspection.md
similarity index 99%
rename from features/reflection-introspection.md
rename to features/as3/reflection-introspection.md
index fa81eab..712aa47 100644
--- a/features/reflection-introspection.md
+++ b/features/as3/reflection-introspection.md
@@ -17,7 +17,7 @@
layout: docpage
title: Reflection and introspection
description: Finding the class and details of an object
-permalink: /features/reflection-introspection
+permalink: /features/as3/reflection-introspection
---
# Reflection and introspection
diff --git a/features/external-interface.md b/features/external-interface.md
index 9a1066c..131d7d5 100644
--- a/features/external-interface.md
+++ b/features/external-interface.md
@@ -24,12 +24,12 @@ permalink: /features/external-interface
Calling to/from External JavaScript
-In Flash, there is a class,
[ExternalInterface](https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html){:target='_blank'},
+In Flash, there is a class,
[ExternalInterface](https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/loading-external-data/ExternalInterface.html){:target='_blank'},
that lets your Flex (or Flash) application call other JavaScript code that has
been embedded on the hosting web page,
and lets external JavaScript code call a function within the Flex application.
When you port a Flex application to Royale,
you may need to replicate this functionality.
-> To make this easier, there is an implementation of the same API available as
[mx.external.ExternalInterface](https://github.com/apache/royale-asjs/blob/develop/frameworks/projects/MXRoyale/src/main/royale/mx/external/ExternalInterface.as){:target='_blank'}.
You should be able to just rename your imports from
`flash.external.ExternalInterface` to `mx.external.ExternalInterface`.
+> To make this easier, there is an implementation of the same API available as
[mx.external.ExternalInterface](https://github.com/apache/royale-asjs/blob/develop/frameworks/projects/MXRoyale/src/main/royale/mx/loading-external-data/ExternalInterface.as){:target='_blank'}.
You should be able to just rename your imports from
`flash.external.ExternalInterface` to `mx.external.ExternalInterface`.
For new code, it would be preferable to create an ActionScript wrapper API
into the required JavaScript.
This allows you to define a typed interface and the compiler would then pick
up any issues around incompatible types
diff --git a/libraries/crux/client-persistence.md
b/libraries/crux/client-persistence.md
index d61c83a..905655c 100644
--- a/libraries/crux/client-persistence.md
+++ b/libraries/crux/client-persistence.md
@@ -24,7 +24,7 @@ permalink: /libraries/crux/client-persistence
Learn about how to persist data in the client using Crux
-Crux provides a bean to help with client persistence: `AMFStorageBean`. This
bean the `AMFStorage` clasx under the hood that uses
[AMF](features/loading-external-data/amf) to encode/decode data in browser's
local storage.
+Crux provides a bean to help with client persistence: `AMFStorageBean`. This
bean the `AMFStorage` clasx under the hood that uses
[AMF](working-with-data/loading-external-data/amf) to encode/decode data in
browser's local storage.
> Using AMF simplifies development since you don't need to code additional
> methods for encode and decode your objects from/to the browser local
> storage, also it provides strong typing. Using JSON instead, will need more
> work from your side, while AMF does the heavy duty for you under the hood.
diff --git a/working-with-data.md b/working-with-data.md
index 0956723..6222a20 100644
--- a/working-with-data.md
+++ b/working-with-data.md
@@ -27,13 +27,13 @@ Getting, sending, and displaying data in your app
These pages can help you get, send, and display data smoothly and efficiently
in your Apache Royale apps.
* Getting, storing and sending data
- * [Loading external data](features/loading-external-data)
- * [Local Shared Object](features/loading-external-data/localsharedobject)
+ * [Loading external data](working-with-data/loading-external-data)
+ * [Local Shared
Object](working-with-data/loading-external-data/localsharedobject)
* Managing data
* [Data model](features/data-model)
* Displaying data
* [Data binding](features/data-binding)
- * [Item renderers](features/item-renderers)
+ * [Item renderers](working-with-data/item-renderers)
diff --git a/features/item-renderers.md b/working-with-data/item-renderers.md
similarity index 98%
rename from features/item-renderers.md
rename to working-with-data/item-renderers.md
index 8748f1c..d1ea6eb 100644
--- a/features/item-renderers.md
+++ b/working-with-data/item-renderers.md
@@ -17,7 +17,7 @@
layout: docpage
title: ItemRenderers
description: Visual representation of data items in lists and other collection
components
-permalink: /features/item-renderers
+permalink: /working-with-data/item-renderers
---
# Item Renderers
diff --git a/features/loading-external-data.md
b/working-with-data/loading-external-data.md
similarity index 66%
rename from features/loading-external-data.md
rename to working-with-data/loading-external-data.md
index 97576e2..8b73e9b 100644
--- a/features/loading-external-data.md
+++ b/working-with-data/loading-external-data.md
@@ -17,7 +17,7 @@
layout: docpage
title: Loading External Data
description: Dynamic sites and real-time updates lead to good user experiences
-permalink: /features/loading-external-data
+permalink: /working-with-data/loading-external-data
---
# Loading External Data
@@ -26,10 +26,26 @@ Dynamic sites and real-time updates lead to good user
experiences
Unless you are building a brochure-style website that makes a statement and
provides contact information, you are going to be working with _data_. You will
get some of that data from your site or application users, but you will
probably also get a lot from outside your app or website.
-Royale provides reliable, fast, and secure ways to get data from remote
sources, and also to send data when you need to:
+Royale provides reliable, fast, and secure ways to get data from remote
sources, and also to send data.
+
+The following data types have built-in support:
+
+* Raw Strings
+* JSON
+* Binary
+* [XML](features/as3/xml)
+* [AMF](working-with-data/loading-external-data/amf)
+
+AMF is supported using either of:
+*
[LocalSharedObject](working-with-data/loading-external-data/localsharedobject)
+* [RemoteObject](working-with-data/loading-external-data/remoteobject)
+
+Classes which can be used for loading external data include:
+* [HTTPService](working-with-data/loading-external-data/httpservice)
+* URLBinaryLoader for loading of any kind of binary data
+* HttpRequestTask
+* HttpDownloadTask
+
+and others
-* [JSON](features/loading-external-data/json)
-* [LocalSharedObject](features/loading-external-data/localsharedobject)
-* [HTTPService](features/loading-external-data/httpservice)
-* [RemoteObject](features/loading-external-data/remoteobject)
diff --git a/features/loading-external-data/amf.md
b/working-with-data/loading-external-data/amf.md
similarity index 94%
rename from features/loading-external-data/amf.md
rename to working-with-data/loading-external-data/amf.md
index 5249d79..7cfab26 100644
--- a/features/loading-external-data/amf.md
+++ b/working-with-data/loading-external-data/amf.md
@@ -17,7 +17,7 @@
layout: docpage
title: AMF
description: ActionScript Message Format binary protocol
-permalink: /features/loading-external-data/amf
+permalink: /working-with-data/loading-external-data/amf
---
# AMF
@@ -50,6 +50,6 @@ Here's a list of languages used to create backend servers
that support AMF and c
Apache Royale supports the AMF protocol through these implementations:
-- [RemoteObject](features/loading-external-data/remoteobject)
-- [LocalSharedObject](features/loading-external-data/localsharedobject)
+- [RemoteObject](working-with-data/loading-external-data/remoteobject)
+-
[LocalSharedObject](working-with-data/loading-external-data/localsharedobject)
diff --git a/features/loading-external-data/httpservice.md
b/working-with-data/loading-external-data/httpservice.md
similarity index 97%
rename from features/loading-external-data/httpservice.md
rename to working-with-data/loading-external-data/httpservice.md
index a82350c..e18e888 100644
--- a/features/loading-external-data/httpservice.md
+++ b/working-with-data/loading-external-data/httpservice.md
@@ -17,7 +17,7 @@
layout: docpage
title: HTTPService
description: Loading external data through REST services
-permalink: /features/loading-external-data/httpservice
+permalink: /working-with-data/loading-external-data/httpservice
---
# HTTPService
diff --git a/features/loading-external-data/json.md
b/working-with-data/loading-external-data/json.md
similarity index 96%
rename from features/loading-external-data/json.md
rename to working-with-data/loading-external-data/json.md
index d943d46..f349563 100644
--- a/features/loading-external-data/json.md
+++ b/working-with-data/loading-external-data/json.md
@@ -17,7 +17,7 @@
layout: docpage
title: JSON
description: A plain object or array often referencing other plain objects and
arrays
-permalink: /features/loading-external-data/json
+permalink: /working-with-data/loading-external-data/json
---
# JSON
diff --git a/features/loading-external-data/localsharedobject.md
b/working-with-data/loading-external-data/localsharedobject.md
similarity index 96%
rename from features/loading-external-data/localsharedobject.md
rename to working-with-data/loading-external-data/localsharedobject.md
index 3f3c851..f4dcd83 100644
--- a/features/loading-external-data/localsharedobject.md
+++ b/working-with-data/loading-external-data/localsharedobject.md
@@ -17,7 +17,7 @@
layout: docpage
title: Local Shared Object
description: Use LocalSharedObject to store user or session data
-permalink: /features/loading-external-data/localsharedobject
+permalink: /working-with-data/loading-external-data/localsharedobject
---
# Local Shared Object (LSO)
@@ -35,7 +35,7 @@ Instead of using cookies, your Royale application can use
Local Shared Objects (
* can even store instances of a custom class, if the class is registered using
the _RemoteCass_ -metadata tag.
* have whatever name you give them, with the _.sol_ file type
-> Storing data types and instances of a custom class use
[AMF](features/loading-external-data/amf) encoding, which
[RemoteObject](features/loading-external-data/remoteobject) also uses.
+> Storing data types and instances of a custom class use
[AMF](working-with-data/loading-external-data/amf) encoding, which
[RemoteObject](features/loading-external-data/remoteobject) also uses.
## Implementations
diff --git a/features/loading-external-data/remoteobject.md
b/working-with-data/loading-external-data/remoteobject.md
similarity index 96%
rename from features/loading-external-data/remoteobject.md
rename to working-with-data/loading-external-data/remoteobject.md
index c7e8efe..b108ddb 100644
--- a/features/loading-external-data/remoteobject.md
+++ b/working-with-data/loading-external-data/remoteobject.md
@@ -17,14 +17,14 @@
layout: docpage
title: RemoteObject
description: Remote procedure calls with the AMF binary protocol
-permalink: /features/loading-external-data/remoteobject
+permalink: /working-with-data/loading-external-data/remoteobject
---
# RemoteObject
Remote procedure calls with the AMF binary protocol
-RemoteObject lets Apache Royale applications make [Remote Procedure Calls
(RPCs)](https://en.wikipedia.org/wiki/Remote_procedure_call){:target='_blank'}
to a back-end server using the [ActionScript Message Format (AMF)
protocol](features/loading-external-data/amf). The server can be written in
Java, PHP, ColdFusion, .NET, Ruby, Python or many other back-end technologies.
+RemoteObject lets Apache Royale applications make [Remote Procedure Calls
(RPCs)](https://en.wikipedia.org/wiki/Remote_procedure_call){:target='_blank'}
to a back-end server using the [ActionScript Message Format (AMF)
protocol](working-with-data/loading-external-data/amf). The server can be
written in Java, PHP, ColdFusion, .NET, Ruby, Python or many other back-end
technologies.
## Implementations