You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Michael Schmalle <ap...@teotigraphix.com> on 2012/12/06 13:12:51 UTC

[ASJS] Some information on "templates"

Hi Erik,

This is mainly directed at you. Can you give as much information as to  
can on what needs to be produced from the compiler?

I finally have myself back up and running so I want to try and change  
the output code. It will be a way to get my hands dirty and try to  
break things.

This way maybe Alex can do other important things. If I can't get it,  
I'll let the list know. :)

I am looking at the code you committed to figure out the "flow".

By using this framework (goog closure) does that mean we have access  
to all their UI components in javascript and html? If so, this means  
we actually have a component platform that can start to be integrated  
with Flex components? ... our new component framework I mean.

Remember I am completely ignorant to js, but learning a lot now.

Mike

-- 
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com


Re: [ASJS] Some information on "templates"

Posted by Michael Schmalle <ap...@teotigraphix.com>.
I guess right now everything is too jumbled and we are prototyping so  
I will just let this question rest.

Mike


Quoting Erik de Bruin <er...@ixsoftware.nl>:

> With regard to the UI components, I haven't looked into the
> possibilities of the Google Closure Library. For now (and my gut tells
> me that it may very well be the final solution) we use the FlexJS JS
> framework Alex created and yours truly refactored.
>
> EdB
>
>
> On Thu, Dec 6, 2012 at 1:59 PM, Michael Schmalle
> <ap...@teotigraphix.com> wrote:
>> Ok, I will take a look.
>>
>> Can you answer this question I had?
>>
>>
>> """
>> By using this framework (goog closure) does that mean we have access to all
>> their UI components in javascript and html? If so, this means we actually
>> have a component platform that can start to be integrated with Flex
>> components? ... our new component framework I mean.
>> """
>>
>> Mike
>>
>>
>>
>>
>>
>>
>>
>> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>>
>>> Mike,
>>>
>>> After I'm done fixing the mess I made in SVN, I'll start work on the
>>> 'template', but here is the basic idea to get you started: I would
>>> like the compiler to output "intermediate" JS, by which I mean "human
>>> readable". My Publisher then takes this intermediate code and puts it
>>> through the Google Closure Builder, which optimises and minifies it.
>>> The advantage of having the "intermediate" step is that it makes
>>> debugging much (MUCH) easier. It will allow us to write tests,
>>> something that minified code won't. And it will let us run the code in
>>> the various browser based tooling and have the output make sense.
>>>
>>> So, to the basics (remember this is a work in progress!):
>>>
>>> AnActionScript (AS) class:
>>>
>>> <code>
>>> package just.some.package
>>> {
>>>
>>> import mx.controls.Button;
>>>
>>> public class MyClass extends Button
>>> {
>>>     public function MyClass()
>>>     {
>>>         super();
>>>      }
>>>
>>>     private var _privateVar:String = "do ";
>>>
>>>     public var publicProperty:Number = 100;
>>>
>>>     public function myFunction(value: String): String
>>>     {
>>>         return "Don't " + _privateVar + value;
>>>     }
>>> }
>>> }
>>> </code>
>>>
>>> Should output the following JavaScript (JS) object:
>>>
>>> <code>
>>> goog.provide('just.some.package.MyClass');
>>>
>>> goog.require('org.apache.flex.html.staticControls.TextButton');
>>>
>>> /**
>>>  * @constructor
>>>  * @extends {org.apache.flex.html.staticControls.TextButton}
>>>  */
>>> just.some.package.MyClass = function() {
>>>     org.apache.flex.html.staticControls.TextButton.call(this);
>>>
>>>     /**
>>>      * @private
>>>      * @type {string}
>>>      */
>>>     this.privateVar_ = 'do ';
>>> }
>>> goog.inherits(just.some.package.MyClass,
>>> org.apache.flex.html.staticControls.TextButton);
>>>
>>> /**
>>>  * @expose
>>>  * @type {number}
>>>  */
>>> just.some.package.MyClass.prototype.publicProperty = 100;
>>>
>>> /**
>>>  * @this {just.some.package.MyClass}
>>>  * @param {string} value The value argument.
>>>  * @return {string} The nicely concatenated return.
>>>  */
>>> org.apache.flex.core.ViewBase.prototype.myFunction = function(value) {
>>>     return 'Don\'t ' + this.privateVar_ . value;
>>> };
>>> </code>
>>>
>>> That should give you a broad idea of what needs to be done. There are
>>> obviously other constructs that I don't address here, but as a start
>>> it should serve you well.
>>>
>>> Thanks,
>>>
>>> EdB
>>>
>>>
>>>
>>> On Thu, Dec 6, 2012 at 1:12 PM, Michael Schmalle
>>> <ap...@teotigraphix.com> wrote:
>>>>
>>>> Hi Erik,
>>>>
>>>> This is mainly directed at you. Can you give as much information as to
>>>> can
>>>> on what needs to be produced from the compiler?
>>>>
>>>> I finally have myself back up and running so I want to try and change the
>>>> output code. It will be a way to get my hands dirty and try to break
>>>> things.
>>>>
>>>> This way maybe Alex can do other important things. If I can't get it,
>>>> I'll
>>>> let the list know. :)
>>>>
>>>> I am looking at the code you committed to figure out the "flow".
>>>>
>>>> By using this framework (goog closure) does that mean we have access to
>>>> all
>>>> their UI components in javascript and html? If so, this means we actually
>>>> have a component platform that can start to be integrated with Flex
>>>> components? ... our new component framework I mean.
>>>>
>>>> Remember I am completely ignorant to js, but learning a lot now.
>>>>
>>>> Mike
>>>>
>>>> --
>>>> Michael Schmalle - Teoti Graphix, LLC
>>>> http://www.teotigraphix.com
>>>> http://blog.teotigraphix.com
>>>>
>>>
>>>
>>>
>>> --
>>> Ix Multimedia Software
>>>
>>> Jan Luykenstraat 27
>>> 3521 VB Utrecht
>>>
>>> T. 06-51952295
>>> I. www.ixsoftware.nl
>>>
>>
>> --
>> Michael Schmalle - Teoti Graphix, LLC
>> http://www.teotigraphix.com
>> http://blog.teotigraphix.com
>>
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>

-- 
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com


Re: [ASJS] Some information on "templates"

Posted by Erik de Bruin <er...@ixsoftware.nl>.
With regard to the UI components, I haven't looked into the
possibilities of the Google Closure Library. For now (and my gut tells
me that it may very well be the final solution) we use the FlexJS JS
framework Alex created and yours truly refactored.

EdB


On Thu, Dec 6, 2012 at 1:59 PM, Michael Schmalle
<ap...@teotigraphix.com> wrote:
> Ok, I will take a look.
>
> Can you answer this question I had?
>
>
> """
> By using this framework (goog closure) does that mean we have access to all
> their UI components in javascript and html? If so, this means we actually
> have a component platform that can start to be integrated with Flex
> components? ... our new component framework I mean.
> """
>
> Mike
>
>
>
>
>
>
>
> Quoting Erik de Bruin <er...@ixsoftware.nl>:
>
>> Mike,
>>
>> After I'm done fixing the mess I made in SVN, I'll start work on the
>> 'template', but here is the basic idea to get you started: I would
>> like the compiler to output "intermediate" JS, by which I mean "human
>> readable". My Publisher then takes this intermediate code and puts it
>> through the Google Closure Builder, which optimises and minifies it.
>> The advantage of having the "intermediate" step is that it makes
>> debugging much (MUCH) easier. It will allow us to write tests,
>> something that minified code won't. And it will let us run the code in
>> the various browser based tooling and have the output make sense.
>>
>> So, to the basics (remember this is a work in progress!):
>>
>> AnActionScript (AS) class:
>>
>> <code>
>> package just.some.package
>> {
>>
>> import mx.controls.Button;
>>
>> public class MyClass extends Button
>> {
>>     public function MyClass()
>>     {
>>         super();
>>      }
>>
>>     private var _privateVar:String = "do ";
>>
>>     public var publicProperty:Number = 100;
>>
>>     public function myFunction(value: String): String
>>     {
>>         return "Don't " + _privateVar + value;
>>     }
>> }
>> }
>> </code>
>>
>> Should output the following JavaScript (JS) object:
>>
>> <code>
>> goog.provide('just.some.package.MyClass');
>>
>> goog.require('org.apache.flex.html.staticControls.TextButton');
>>
>> /**
>>  * @constructor
>>  * @extends {org.apache.flex.html.staticControls.TextButton}
>>  */
>> just.some.package.MyClass = function() {
>>     org.apache.flex.html.staticControls.TextButton.call(this);
>>
>>     /**
>>      * @private
>>      * @type {string}
>>      */
>>     this.privateVar_ = 'do ';
>> }
>> goog.inherits(just.some.package.MyClass,
>> org.apache.flex.html.staticControls.TextButton);
>>
>> /**
>>  * @expose
>>  * @type {number}
>>  */
>> just.some.package.MyClass.prototype.publicProperty = 100;
>>
>> /**
>>  * @this {just.some.package.MyClass}
>>  * @param {string} value The value argument.
>>  * @return {string} The nicely concatenated return.
>>  */
>> org.apache.flex.core.ViewBase.prototype.myFunction = function(value) {
>>     return 'Don\'t ' + this.privateVar_ . value;
>> };
>> </code>
>>
>> That should give you a broad idea of what needs to be done. There are
>> obviously other constructs that I don't address here, but as a start
>> it should serve you well.
>>
>> Thanks,
>>
>> EdB
>>
>>
>>
>> On Thu, Dec 6, 2012 at 1:12 PM, Michael Schmalle
>> <ap...@teotigraphix.com> wrote:
>>>
>>> Hi Erik,
>>>
>>> This is mainly directed at you. Can you give as much information as to
>>> can
>>> on what needs to be produced from the compiler?
>>>
>>> I finally have myself back up and running so I want to try and change the
>>> output code. It will be a way to get my hands dirty and try to break
>>> things.
>>>
>>> This way maybe Alex can do other important things. If I can't get it,
>>> I'll
>>> let the list know. :)
>>>
>>> I am looking at the code you committed to figure out the "flow".
>>>
>>> By using this framework (goog closure) does that mean we have access to
>>> all
>>> their UI components in javascript and html? If so, this means we actually
>>> have a component platform that can start to be integrated with Flex
>>> components? ... our new component framework I mean.
>>>
>>> Remember I am completely ignorant to js, but learning a lot now.
>>>
>>> Mike
>>>
>>> --
>>> Michael Schmalle - Teoti Graphix, LLC
>>> http://www.teotigraphix.com
>>> http://blog.teotigraphix.com
>>>
>>
>>
>>
>> --
>> Ix Multimedia Software
>>
>> Jan Luykenstraat 27
>> 3521 VB Utrecht
>>
>> T. 06-51952295
>> I. www.ixsoftware.nl
>>
>
> --
> Michael Schmalle - Teoti Graphix, LLC
> http://www.teotigraphix.com
> http://blog.teotigraphix.com
>



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [ASJS] Some information on "templates"

Posted by Michael Schmalle <ap...@teotigraphix.com>.
Ok, I will take a look.

Can you answer this question I had?

"""
By using this framework (goog closure) does that mean we have access to all
their UI components in javascript and html? If so, this means we actually
have a component platform that can start to be integrated with Flex
components? ... our new component framework I mean.
"""

Mike






Quoting Erik de Bruin <er...@ixsoftware.nl>:

> Mike,
>
> After I'm done fixing the mess I made in SVN, I'll start work on the
> 'template', but here is the basic idea to get you started: I would
> like the compiler to output "intermediate" JS, by which I mean "human
> readable". My Publisher then takes this intermediate code and puts it
> through the Google Closure Builder, which optimises and minifies it.
> The advantage of having the "intermediate" step is that it makes
> debugging much (MUCH) easier. It will allow us to write tests,
> something that minified code won't. And it will let us run the code in
> the various browser based tooling and have the output make sense.
>
> So, to the basics (remember this is a work in progress!):
>
> AnActionScript (AS) class:
>
> <code>
> package just.some.package
> {
>
> import mx.controls.Button;
>
> public class MyClass extends Button
> {
>     public function MyClass()
>     {
>         super();
>      }
>
>     private var _privateVar:String = "do ";
>
>     public var publicProperty:Number = 100;
>
>     public function myFunction(value: String): String
>     {
>         return "Don't " + _privateVar + value;
>     }
> }
> }
> </code>
>
> Should output the following JavaScript (JS) object:
>
> <code>
> goog.provide('just.some.package.MyClass');
>
> goog.require('org.apache.flex.html.staticControls.TextButton');
>
> /**
>  * @constructor
>  * @extends {org.apache.flex.html.staticControls.TextButton}
>  */
> just.some.package.MyClass = function() {
>     org.apache.flex.html.staticControls.TextButton.call(this);
>
>     /**
>      * @private
>      * @type {string}
>      */
>     this.privateVar_ = 'do ';
> }
> goog.inherits(just.some.package.MyClass,
> org.apache.flex.html.staticControls.TextButton);
>
> /**
>  * @expose
>  * @type {number}
>  */
> just.some.package.MyClass.prototype.publicProperty = 100;
>
> /**
>  * @this {just.some.package.MyClass}
>  * @param {string} value The value argument.
>  * @return {string} The nicely concatenated return.
>  */
> org.apache.flex.core.ViewBase.prototype.myFunction = function(value) {
>     return 'Don\'t ' + this.privateVar_ . value;
> };
> </code>
>
> That should give you a broad idea of what needs to be done. There are
> obviously other constructs that I don't address here, but as a start
> it should serve you well.
>
> Thanks,
>
> EdB
>
>
>
> On Thu, Dec 6, 2012 at 1:12 PM, Michael Schmalle
> <ap...@teotigraphix.com> wrote:
>> Hi Erik,
>>
>> This is mainly directed at you. Can you give as much information as to can
>> on what needs to be produced from the compiler?
>>
>> I finally have myself back up and running so I want to try and change the
>> output code. It will be a way to get my hands dirty and try to break things.
>>
>> This way maybe Alex can do other important things. If I can't get it, I'll
>> let the list know. :)
>>
>> I am looking at the code you committed to figure out the "flow".
>>
>> By using this framework (goog closure) does that mean we have access to all
>> their UI components in javascript and html? If so, this means we actually
>> have a component platform that can start to be integrated with Flex
>> components? ... our new component framework I mean.
>>
>> Remember I am completely ignorant to js, but learning a lot now.
>>
>> Mike
>>
>> --
>> Michael Schmalle - Teoti Graphix, LLC
>> http://www.teotigraphix.com
>> http://blog.teotigraphix.com
>>
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl
>

-- 
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com


Re: [ASJS] Some information on "templates"

Posted by Carol Frampton <cf...@adobe.com>.

On 12/6/12 7 :49AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:

>Mike,
>
>After I'm done fixing the mess I made in SVN, I'll start work on the
>'template', but here is the basic idea to get you started: I would
>like the compiler to output "intermediate" JS, by which I mean "human
>readable". My Publisher then takes this intermediate code and puts it
>through the Google Closure Builder, which optimises and minifies it.
>The advantage of having the "intermediate" step is that it makes
>debugging much (MUCH) easier. It will allow us to write tests,
>something that minified code won't. And it will let us run the code in
>the various browser based tooling and have the output make sense.

If you use an intermediate form to test how to you know there aren't bugs
introduced by the publishing process?

Carol


Re: [ASJS] Some information on "templates"

Posted by Erik de Bruin <er...@ixsoftware.nl>.
Mike,

After I'm done fixing the mess I made in SVN, I'll start work on the
'template', but here is the basic idea to get you started: I would
like the compiler to output "intermediate" JS, by which I mean "human
readable". My Publisher then takes this intermediate code and puts it
through the Google Closure Builder, which optimises and minifies it.
The advantage of having the "intermediate" step is that it makes
debugging much (MUCH) easier. It will allow us to write tests,
something that minified code won't. And it will let us run the code in
the various browser based tooling and have the output make sense.

So, to the basics (remember this is a work in progress!):

AnActionScript (AS) class:

<code>
package just.some.package
{

import mx.controls.Button;

public class MyClass extends Button
{
    public function MyClass()
    {
        super();
     }

    private var _privateVar:String = "do ";

    public var publicProperty:Number = 100;

    public function myFunction(value: String): String
    {
        return "Don't " + _privateVar + value;
    }
}
}
</code>

Should output the following JavaScript (JS) object:

<code>
goog.provide('just.some.package.MyClass');

goog.require('org.apache.flex.html.staticControls.TextButton');

/**
 * @constructor
 * @extends {org.apache.flex.html.staticControls.TextButton}
 */
just.some.package.MyClass = function() {
    org.apache.flex.html.staticControls.TextButton.call(this);

    /**
     * @private
     * @type {string}
     */
    this.privateVar_ = 'do ';
}
goog.inherits(just.some.package.MyClass,
org.apache.flex.html.staticControls.TextButton);

/**
 * @expose
 * @type {number}
 */
just.some.package.MyClass.prototype.publicProperty = 100;

/**
 * @this {just.some.package.MyClass}
 * @param {string} value The value argument.
 * @return {string} The nicely concatenated return.
 */
org.apache.flex.core.ViewBase.prototype.myFunction = function(value) {
    return 'Don\'t ' + this.privateVar_ . value;
};
</code>

That should give you a broad idea of what needs to be done. There are
obviously other constructs that I don't address here, but as a start
it should serve you well.

Thanks,

EdB



On Thu, Dec 6, 2012 at 1:12 PM, Michael Schmalle
<ap...@teotigraphix.com> wrote:
> Hi Erik,
>
> This is mainly directed at you. Can you give as much information as to can
> on what needs to be produced from the compiler?
>
> I finally have myself back up and running so I want to try and change the
> output code. It will be a way to get my hands dirty and try to break things.
>
> This way maybe Alex can do other important things. If I can't get it, I'll
> let the list know. :)
>
> I am looking at the code you committed to figure out the "flow".
>
> By using this framework (goog closure) does that mean we have access to all
> their UI components in javascript and html? If so, this means we actually
> have a component platform that can start to be integrated with Flex
> components? ... our new component framework I mean.
>
> Remember I am completely ignorant to js, but learning a lot now.
>
> Mike
>
> --
> Michael Schmalle - Teoti Graphix, LLC
> http://www.teotigraphix.com
> http://blog.teotigraphix.com
>



--
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl