You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Andrew Wetmore <an...@apache.org> on 2020/04/22 17:13:37 UTC
Structure of a typical main mxml file
Hi, all. I am stepping through the tutorial on our website for building
your first application [1], to see if it is clear enough for someone who
does not already know how to do this.
I am on the step that starts to build up the data model and use a service
call, and am wondering whether, before this, it would be useful to say
quickly what the typical layout of the main .mxml file in a Royale app is.
Please correct me, but I believe the standard structure is:
- .xml tag to indicate the version and the encoding, like UTF-8
- open <application> tag with some declarations about namespaces, page
title, initial view, and so on
-- <fx:script> area to hold imports from libraries, imports of
components, initialization of variables, and declaration of functions
-- <fx declarations> area to hold things like effects, validators, and
formatters
-- service call area to hold things like <https> calls to fetch or send
data
-- <js:initialView> area to hold the visible components of the user
interface
- closing <application> tag.
Am I missing something in that very-high-level outline?
Andrew
[1] https://apache.github.io/royale-docs/create-an-application
--
Andrew Wetmore
Technical Writer-Editor
Infra
*Apache Software Foundation*
andreww@apache.org
Re: Structure of a typical main mxml file
Posted by Alex Harui <ah...@adobe.com.INVALID>.
I suppose that at a higher-level there might be a template of sorts:
<MainTag. Namespaces SimplePropertiesforMainTag="SimpleValuesForSimplePropeties" implements="listofinterface">
<fx:MetaData />
<fx:Declarations />
<fx:Styles>
<fx:Script />
<ComplexPropertiesIncludingBeads />
<ChildrenIfMainTagIsUI />
</MainTag>
But I think I've seen server/network stuff in Declarations or Script or ComplexProperties and I'm not sure there is a preferred way. But I agree that within a team, it is helpful to use the same patterns.
HTH,
-Alex
On 4/22/20, 3:24 PM, "Andrew Wetmore" <co...@gmail.com> wrote:
Kind words!
I realize I forgot that many apps will need a place to put the beads.
I think I may expand the page in the help docs about mxml [2], and then
reference it from the tutorial.
Thinking back to when I started writing code in Adobe Flex, it was hard to
figure out at first where to put things; and, a little later, how important
it was when working in a team to have a consistent pattern of where stuff
was likely to be. My first complex .mxml file had like six different
<fx:Script> sections, which sure reduced readability.
[2] https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fmxml&data=02%7C01%7Caharui%40adobe.com%7C0855e382e1034e9d3b0008d7e70befc6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637231910766934589&sdata=b7ByfJmipCSABYJ6RyBY6dJ9g34iiPV%2B%2FJJhwqPSq8U%3D&reserved=0
a
On Wed, Apr 22, 2020 at 5:22 PM Alex Harui <ah...@adobe.com.invalid> wrote:
> Hi Andrew,
>
> I'm sorry I can't keep up with the great work you are doing. I only have
> time to day that I'm not sure there is only one typical MXML file
> structure. Basic Application will require more configuration than MX
> Application. Jewel and Express I think are somewhere in the middle.
>
> My 2 cents,
> -Alex
>
> On 4/22/20, 11:27 AM, "Andrew Wetmore" <an...@apache.org> wrote:
>
> Ah, I forgot the valuesImpl section, which I presume appears before the
> intialView section. Does anything go in there that is not related to
> CSS?
>
> On Wed, Apr 22, 2020 at 2:13 PM Andrew Wetmore <an...@apache.org>
> wrote:
>
> > Hi, all. I am stepping through the tutorial on our website for
> building
> > your first application [1], to see if it is clear enough for someone
> who
> > does not already know how to do this.
> >
> > I am on the step that starts to build up the data model and use a
> service
> > call, and am wondering whether, before this, it would be useful to
> say
> > quickly what the typical layout of the main .mxml file in a Royale
> app is.
> >
> > Please correct me, but I believe the standard structure is:
> >
> > - .xml tag to indicate the version and the encoding, like UTF-8
> > - open <application> tag with some declarations about namespaces,
> page
> > title, initial view, and so on
> >
> > -- <fx:script> area to hold imports from libraries, imports of
> > components, initialization of variables, and declaration of functions
> >
> > -- <fx declarations> area to hold things like effects,
> validators,
> > and formatters
> >
> > -- service call area to hold things like <https> calls to fetch
> or
> > send data
> >
> > -- <js:initialView> area to hold the visible components of the
> user
> > interface
> >
> > - closing <application> tag.
> >
> >
> > Am I missing something in that very-high-level outline?
> >
> > Andrew
> >
> >
> > [1]
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Fcreate-an-application&data=02%7C01%7Caharui%40adobe.com%7C0855e382e1034e9d3b0008d7e70befc6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637231910766934589&sdata=mwxRa5l5DX3uCqAtDARm5v%2Fyi2NtRIimqeLUu8lOOU8%3D&reserved=0
> >
> > --
> > Andrew Wetmore
> > Technical Writer-Editor
> > Infra
> > *Apache Software Foundation*
> > andreww@apache.org
> >
>
>
> --
> Andrew Wetmore
> Technical Writer-Editor
> Infra
> *Apache Software Foundation*
> andreww@apache.org
>
>
>
--
Andrew Wetmore
https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcottage14.blogspot.com%2F&data=02%7C01%7Caharui%40adobe.com%7C0855e382e1034e9d3b0008d7e70befc6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637231910766934589&sdata=OX8e83v4uquN8mWEbUGdSHR144sExcgTOyip7%2FYvQSs%3D&reserved=0
Re: Structure of a typical main mxml file
Posted by Andrew Wetmore <co...@gmail.com>.
Kind words!
I realize I forgot that many apps will need a place to put the beads.
I think I may expand the page in the help docs about mxml [2], and then
reference it from the tutorial.
Thinking back to when I started writing code in Adobe Flex, it was hard to
figure out at first where to put things; and, a little later, how important
it was when working in a team to have a consistent pattern of where stuff
was likely to be. My first complex .mxml file had like six different
<fx:Script> sections, which sure reduced readability.
[2] https://apache.github.io/royale-docs/features/mxml
a
On Wed, Apr 22, 2020 at 5:22 PM Alex Harui <ah...@adobe.com.invalid> wrote:
> Hi Andrew,
>
> I'm sorry I can't keep up with the great work you are doing. I only have
> time to day that I'm not sure there is only one typical MXML file
> structure. Basic Application will require more configuration than MX
> Application. Jewel and Express I think are somewhere in the middle.
>
> My 2 cents,
> -Alex
>
> On 4/22/20, 11:27 AM, "Andrew Wetmore" <an...@apache.org> wrote:
>
> Ah, I forgot the valuesImpl section, which I presume appears before the
> intialView section. Does anything go in there that is not related to
> CSS?
>
> On Wed, Apr 22, 2020 at 2:13 PM Andrew Wetmore <an...@apache.org>
> wrote:
>
> > Hi, all. I am stepping through the tutorial on our website for
> building
> > your first application [1], to see if it is clear enough for someone
> who
> > does not already know how to do this.
> >
> > I am on the step that starts to build up the data model and use a
> service
> > call, and am wondering whether, before this, it would be useful to
> say
> > quickly what the typical layout of the main .mxml file in a Royale
> app is.
> >
> > Please correct me, but I believe the standard structure is:
> >
> > - .xml tag to indicate the version and the encoding, like UTF-8
> > - open <application> tag with some declarations about namespaces,
> page
> > title, initial view, and so on
> >
> > -- <fx:script> area to hold imports from libraries, imports of
> > components, initialization of variables, and declaration of functions
> >
> > -- <fx declarations> area to hold things like effects,
> validators,
> > and formatters
> >
> > -- service call area to hold things like <https> calls to fetch
> or
> > send data
> >
> > -- <js:initialView> area to hold the visible components of the
> user
> > interface
> >
> > - closing <application> tag.
> >
> >
> > Am I missing something in that very-high-level outline?
> >
> > Andrew
> >
> >
> > [1]
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Fcreate-an-application&data=02%7C01%7Caharui%40adobe.com%7C1f62d3361af44d483e9208d7e6eac880%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637231768373406540&sdata=J5dNLUrS253gajmjwEXgMp1LIJkYTwRbio6IXfWu1xI%3D&reserved=0
> >
> > --
> > Andrew Wetmore
> > Technical Writer-Editor
> > Infra
> > *Apache Software Foundation*
> > andreww@apache.org
> >
>
>
> --
> Andrew Wetmore
> Technical Writer-Editor
> Infra
> *Apache Software Foundation*
> andreww@apache.org
>
>
>
--
Andrew Wetmore
http://cottage14.blogspot.com/
Re: Structure of a typical main mxml file
Posted by Alex Harui <ah...@adobe.com.INVALID>.
Hi Andrew,
I'm sorry I can't keep up with the great work you are doing. I only have time to day that I'm not sure there is only one typical MXML file structure. Basic Application will require more configuration than MX Application. Jewel and Express I think are somewhere in the middle.
My 2 cents,
-Alex
On 4/22/20, 11:27 AM, "Andrew Wetmore" <an...@apache.org> wrote:
Ah, I forgot the valuesImpl section, which I presume appears before the
intialView section. Does anything go in there that is not related to CSS?
On Wed, Apr 22, 2020 at 2:13 PM Andrew Wetmore <an...@apache.org> wrote:
> Hi, all. I am stepping through the tutorial on our website for building
> your first application [1], to see if it is clear enough for someone who
> does not already know how to do this.
>
> I am on the step that starts to build up the data model and use a service
> call, and am wondering whether, before this, it would be useful to say
> quickly what the typical layout of the main .mxml file in a Royale app is.
>
> Please correct me, but I believe the standard structure is:
>
> - .xml tag to indicate the version and the encoding, like UTF-8
> - open <application> tag with some declarations about namespaces, page
> title, initial view, and so on
>
> -- <fx:script> area to hold imports from libraries, imports of
> components, initialization of variables, and declaration of functions
>
> -- <fx declarations> area to hold things like effects, validators,
> and formatters
>
> -- service call area to hold things like <https> calls to fetch or
> send data
>
> -- <js:initialView> area to hold the visible components of the user
> interface
>
> - closing <application> tag.
>
>
> Am I missing something in that very-high-level outline?
>
> Andrew
>
>
> [1] https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Fcreate-an-application&data=02%7C01%7Caharui%40adobe.com%7C1f62d3361af44d483e9208d7e6eac880%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637231768373406540&sdata=J5dNLUrS253gajmjwEXgMp1LIJkYTwRbio6IXfWu1xI%3D&reserved=0
>
> --
> Andrew Wetmore
> Technical Writer-Editor
> Infra
> *Apache Software Foundation*
> andreww@apache.org
>
--
Andrew Wetmore
Technical Writer-Editor
Infra
*Apache Software Foundation*
andreww@apache.org
Re: Structure of a typical main mxml file
Posted by Andrew Wetmore <an...@apache.org>.
Ah, I forgot the valuesImpl section, which I presume appears before the
intialView section. Does anything go in there that is not related to CSS?
On Wed, Apr 22, 2020 at 2:13 PM Andrew Wetmore <an...@apache.org> wrote:
> Hi, all. I am stepping through the tutorial on our website for building
> your first application [1], to see if it is clear enough for someone who
> does not already know how to do this.
>
> I am on the step that starts to build up the data model and use a service
> call, and am wondering whether, before this, it would be useful to say
> quickly what the typical layout of the main .mxml file in a Royale app is.
>
> Please correct me, but I believe the standard structure is:
>
> - .xml tag to indicate the version and the encoding, like UTF-8
> - open <application> tag with some declarations about namespaces, page
> title, initial view, and so on
>
> -- <fx:script> area to hold imports from libraries, imports of
> components, initialization of variables, and declaration of functions
>
> -- <fx declarations> area to hold things like effects, validators,
> and formatters
>
> -- service call area to hold things like <https> calls to fetch or
> send data
>
> -- <js:initialView> area to hold the visible components of the user
> interface
>
> - closing <application> tag.
>
>
> Am I missing something in that very-high-level outline?
>
> Andrew
>
>
> [1] https://apache.github.io/royale-docs/create-an-application
>
> --
> Andrew Wetmore
> Technical Writer-Editor
> Infra
> *Apache Software Foundation*
> andreww@apache.org
>
--
Andrew Wetmore
Technical Writer-Editor
Infra
*Apache Software Foundation*
andreww@apache.org