Amber and Ionic (aka Angular)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Amber and Ionic (aka Angular)

Tim Mackinnon-6
Hi guys - Norbert piqued my interest with his reference to ionic and using Amber. I’ve searched the archive and can’t see much about using angular - or ionic. Anyone had any positive experiences with this?

I would love it Norbert or anyone wouldn’t mind commenting on their use of ionic/angular? I didn’t think I would need all the angular complexity - but then I’ve been reading that ionic has all kinds of useful goodness in it for swipes etc. So is it worth learning about this instead? Does angular play well with Amber and do you end up amber’izing any useful bits that make it nice to use - or do you write some bits in angular/js with directives and the like and then some bits in Amber?

I’m quite curious about this aspect as it might be my gateway to getting back into web browser smalltalk.

Tim

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Amber and Ionic (aka Angular)

NorbertHartl

> Am 07.03.2016 um 19:04 schrieb Tim Mackinnon <[hidden email]>:
>
> Hi guys - Norbert piqued my interest with his reference to ionic and using Amber. I’ve searched the archive and can’t see much about using angular - or ionic. Anyone had any positive experiences with this?
>
> I would love it Norbert or anyone wouldn’t mind commenting on their use of ionic/angular? I didn’t think I would need all the angular complexity - but then I’ve been reading that ionic has all kinds of useful goodness in it for swipes etc. So is it worth learning about this instead? Does angular play well with Amber and do you end up amber’izing any useful bits that make it nice to use - or do you write some bits in angular/js with directives and the like and then some bits in Amber?
>
> I’m quite curious about this aspect as it might be my gateway to getting back into web browser smalltalk.
>
We are using a thin layer in JS that dispatches the controller code to angular. Integrating angular in amber is not too easy because angular has a lot of special variables (the ones starting with $). There are also a lot of problems when using angular. The data binding can slow down an application really quick if used without care. I don't know if these problems are still there in angular2. But we are quite happy with this approach.

Norbert

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Amber and Ionic (aka Angular)

Martin Bähr
Excerpts from Norbert Hartl's message of 2016-03-07 19:12:44 +0100:
> We are using a thin layer in JS that dispatches the controller code to
> angular.

so you are writing your controllers in amber...

can you point to an example of how this works?

> Integrating angular in amber is not too easy because angular has a
> lot of special variables (the ones starting with $).

what is problematic about them?

> There are also a lot of problems when using angular.  The data binding can
> slow down an application really quick if used without care.

do these problems affect amber, or are you talking about problems using angular
in general?

because if it is the latter then that's not really an issue for someone like me
who is already using angular, and only wants to find out if it makes sense to
use amber to drive it.

personally, the databinding is the most interesting aspect about angular for
me, apart from the ability to write directives.

alternatively though, i'd like to know if amber itself provides something similar.
is there any form of databinding in amber? or writing directives for html templates?

especially when writing applications from scratch, what does angular add that
amber itself doesn't have?

> I don't know if these problems are still
> there in angular2. But we are quite happy with this approach.

what little i read about angular2, aparently those problems are being
addressed.

greetings, martin.

--
eKita                   -   the online platform for your entire academic life
--
chief engineer                                                       eKita.co
pike programmer      pike.lysator.liu.se    caudium.net     societyserver.org
secretary                                                      beijinglug.org
mentor                                                           fossasia.org
foresight developer  foresightlinux.org                            realss.com
unix sysadmin
Martin Bähr          working in china        http://societyserver.org/mbaehr/

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Amber and Ionic (aka Angular)

NorbertHartl


> Am 07.03.2016 um 23:31 schrieb Martin Bähr <[hidden email]>:
>
> Excerpts from Norbert Hartl's message of 2016-03-07 19:12:44 +0100:
>> We are using a thin layer in JS that dispatches the controller code to
>> angular.
>
> so you are writing your controllers in amber...
>
No, they are written in JS but the functions just take the necessary variables and calls a method in amber.

> can you point to an example of how this works?
>
>> Integrating angular in amber is not too easy because angular has a
>> lot of special variables (the ones starting with $).
>
> what is problematic about them?

I don't have a glue how to mimick the $ behaviour if I would write a whole controller in amber.
>
>> There are also a lot of problems when using angular.  The data binding can
>> slow down an application really quick if used without care.
>
> do these problems affect amber, or are you talking about problems using angular
> in general?
>
These are angular problems.

> because if it is the latter then that's not really an issue for someone like me
> who is already using angular, and only wants to find out if it makes sense to
> use amber to drive it.
>
I think it does. There is just no generic way by now to make it really easy without having to write glue code.

> personally, the databinding is the most interesting aspect about angular for
> me, apart from the ability to write directives.
>
Yes, data binding is great. But angular shows that it really isn't applicable transparently. You are collecting so mucher watchers that with a list of 20 entries you can slow down your app seriously.
> alternatively though, i'd like to know if amber itself provides something similar.
> is there any form of databinding in amber? or writing directives for html templates?
>
> especially when writing applications from scratch, what does angular add that
> amber itself doesn't have?
>
We use it because of ionic.

Norbert

>> I don't know if these problems are still
>> there in angular2. But we are quite happy with this approach.
>
> what little i read about angular2, aparently those problems are being
> addressed.
>
> greetings, martin.
>
> --
> eKita                   -   the online platform for your entire academic life
> --
> chief engineer                                                       eKita.co
> pike programmer      pike.lysator.liu.se    caudium.net     societyserver.org
> secretary                                                      beijinglug.org
> mentor                                                           fossasia.org
> foresight developer  foresightlinux.org                            realss.com
> unix sysadmin
> Martin Bähr          working in china        http://societyserver.org/mbaehr/
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Amber and Ionic (aka Angular)

Martin Bähr
Excerpts from Norbert Hartl's message of 2016-03-08 09:03:45 +0100:
> > so you are writing your controllers in amber...
> No, they are written in JS but the functions just take the necessary
> variables and calls a method in amber.
> I don't have a glue how to mimick the $ behaviour if I would write a whole controller in amber.

would that be solveable? some other character that could get translated to $ (€,£ :-)
or the other way around, a generic wrapper for angular that provides an
alternative name for each identifier using $

> > wants to find out if it makes sense to use amber to drive it.
> I think it does. There is just no generic way by now to make it really easy
> without having to write glue code.

could you share a glue code example please?

i find the need for glue code not very attractive.

so let me ask the reverse: what benefit does using amber provide over plain angular?
when is the added complexity of needing glue code worth effort?

greetings, martin.

--
eKita                   -   the online platform for your entire academic life
--
chief engineer                                                       eKita.co
pike programmer      pike.lysator.liu.se    caudium.net     societyserver.org
secretary                                                      beijinglug.org
mentor                                                           fossasia.org
foresight developer  foresightlinux.org                            realss.com
unix sysadmin
Martin Bähr          working in china        http://societyserver.org/mbaehr/

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Amber and Ionic (aka Angular)

Herby Vojčík


Dňa 8. marca 2016 9:34:08 CET používateľ "Martin Bähr" <[hidden email]> napísal:

>Excerpts from Norbert Hartl's message of 2016-03-08 09:03:45 +0100:
>> > so you are writing your controllers in amber...
>> No, they are written in JS but the functions just take the necessary
>> variables and calls a method in amber.
>> I don't have a glue how to mimick the $ behaviour if I would write a
>whole controller in amber.
>
>would that be solveable? some other character that could get translated
>to $ (€,£ :-)
>or the other way around, a generic wrapper for angular that provides an
>alternative name for each identifier using $

Compiler already does variable name transformations, when the name is JD reserved keyword. So generic solution could be adding an explicit name-mapping pragma which would allow to transform more variable names used inside ST code to explicitly specified JS names.

In that case you could write

  [ :httpSrv | | globalAlias |
    <#alias httpSrv $http>
    <#alias globalAlias $somethingGlobal>
    "code using httpSrv and globalAlias" ]

>
>> > wants to find out if it makes sense to use amber to drive it.
>> I think it does. There is just no generic way by now to make it
>really easy
>> without having to write glue code.

Isn't it possible to generate it?

>could you share a glue code example please?
>
>i find the need for glue code not very attractive.
>
>so let me ask the reverse: what benefit does using amber provide over
>plain angular?
>when is the added complexity of needing glue code worth effort?
>
>greetings, martin.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Amber and Ionic (aka Angular)

Martin Bähr
Excerpts from Herby Vojčík's message of 2016-03-08 11:20:56 +0100:

> >> I don't have a glue how to mimick the $ behaviour if I would write a
> >> whole controller in amber.
> >would that be solveable?
> Compiler already does variable name transformations, when the name is JD
> reserved keyword. So generic solution could be adding an explicit
> name-mapping pragma which would allow to transform more variable names used
> inside ST code to explicitly specified JS names.
>
> In that case you could write
>
>   [ :httpSrv | | globalAlias |
>     <#alias httpSrv $http>
>     <#alias globalAlias $somethingGlobal>
>     "code using httpSrv and globalAlias" ]

i have not written any amber code yet, so i can't really judge, but that does
sound very useful.

> >> > wants to find out if it makes sense to use amber to drive it.
> >> I think it does. There is just no generic way by now to make it
> >> really easy without having to write glue code.
> Isn't it possible to generate it?

generate it from what?
it would have to be javascript code that implements some sort of convention of
what is a controller in amber, then figures out a way to call amber to get a
list of all controllers, and then dynamically create a bunch of javascript
wrappers for each controller.

or it would be some build tool, that does the same when manually called (or
when the code on disk changes)

it can't be written in amber unless the above alias feature exists, and it
seems complex enough that it would only be worth it on a large project with
lots of controllers.

writing code generators is a lot harder than writing static wrappers, and
unless someone writes a generic solution that works for the whole amber+angular
community, so that it gets enough testing and issues ironed out, i would not
dare to try that.

greetings, martin.

--
eKita                   -   the online platform for your entire academic life
--
chief engineer                                                       eKita.co
pike programmer      pike.lysator.liu.se    caudium.net     societyserver.org
secretary                                                      beijinglug.org
mentor                                                           fossasia.org
foresight developer  foresightlinux.org                            realss.com
unix sysadmin
Martin Bähr          working in china        http://societyserver.org/mbaehr/

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Amber and Ionic (aka Angular)

Herby Vojčík


Martin Bähr wrote:

> Excerpts from Herby Vojčík's message of 2016-03-08 11:20:56 +0100:
>>>> I don't have a glue how to mimick the $ behaviour if I would write a
>>>> whole controller in amber.
>>> would that be solveable?
>> Compiler already does variable name transformations, when the name is JD
>> reserved keyword. So generic solution could be adding an explicit
>> name-mapping pragma which would allow to transform more variable names used
>> inside ST code to explicitly specified JS names.
>>
>> In that case you could write
>>
>>    [ :httpSrv | | globalAlias |
>>      <#alias httpSrv $http>
>>      <#alias globalAlias $somethingGlobal>
>>      "code using httpSrv and globalAlias" ]
>
> i have not written any amber code yet, so i can't really judge, but that does
> sound very useful.
>
>>>>> wants to find out if it makes sense to use amber to drive it.
>>>> I think it does. There is just no generic way by now to make it
>>>> really easy without having to write glue code.
>> Isn't it possible to generate it?
>
> generate it from what?
> it would have to be javascript code that implements some sort of convention of
> what is a controller in amber, then figures out a way to call amber to get a
> list of all controllers, and then dynamically create a bunch of javascript
> wrappers for each controller.

Something like that. Not to mention, it may be helped with "figures out"
part by passing some things explicitly (names, basically)
>
> or it would be some build tool, that does the same when manually called (or
> when the code on disk changes)
>
> it can't be written in amber unless the above alias feature exists, and it
> seems complex enough that it would only be worth it on a large project with
> lots of controllers.

It only needs to be written once, though.

> writing code generators is a lot harder than writing static wrappers, and
> unless someone writes a generic solution that works for the whole amber+angular

One things at a time. Like, directives wrapper over a class, or a block.

> community, so that it gets enough testing and issues ironed out, i would not
> dare to try that.
>
> greetings, martin.

Herby

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Amber and Ionic (aka Angular)

Tim Mackinnon-6
In reply to this post by NorbertHartl
Thanks for an interesting thread Norbert et al.

So it seems like I need to roll my sleeve up and play a little bit to understand the implications of this (effectively writing minimal angular and offloading the meatier bits to Amber).

One thing I didn’t quite get to the bottom of - what is it in Ionic that makes this so desirable? Is it the rolled in touch libraries etc (I’m trying to understand what all the moving parts are - its quite hard to get your arm around all of this stuff as there is so much to learn).

Tim

> On 7 Mar 2016, at 18:12, Norbert Hartl <[hidden email]> wrote:
>
>
>> Am 07.03.2016 um 19:04 schrieb Tim Mackinnon <[hidden email]>:
>>
>> Hi guys - Norbert piqued my interest with his reference to ionic and using Amber. I’ve searched the archive and can’t see much about using angular - or ionic. Anyone had any positive experiences with this?
>>
>> I would love it Norbert or anyone wouldn’t mind commenting on their use of ionic/angular? I didn’t think I would need all the angular complexity - but then I’ve been reading that ionic has all kinds of useful goodness in it for swipes etc. So is it worth learning about this instead? Does angular play well with Amber and do you end up amber’izing any useful bits that make it nice to use - or do you write some bits in angular/js with directives and the like and then some bits in Amber?
>>
>> I’m quite curious about this aspect as it might be my gateway to getting back into web browser smalltalk.
>>
> We are using a thin layer in JS that dispatches the controller code to angular. Integrating angular in amber is not too easy because angular has a lot of special variables (the ones starting with $). There are also a lot of problems when using angular. The data binding can slow down an application really quick if used without care. I don't know if these problems are still there in angular2. But we are quite happy with this approach.
>
> Norbert
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Amber and Ionic (aka Angular)

NorbertHartl
Ionic is a set of css and js additions that mimick native application behaviour. An iOS app really feels like a native application. Swiping etc is there and the animations look like the native ones. That was always a problem with mobile web apps.
Norbert

> Am 08.03.2016 um 19:19 schrieb Tim Mackinnon <[hidden email]>:
>
> Thanks for an interesting thread Norbert et al.
>
> So it seems like I need to roll my sleeve up and play a little bit to understand the implications of this (effectively writing minimal angular and offloading the meatier bits to Amber).
>
> One thing I didn’t quite get to the bottom of - what is it in Ionic that makes this so desirable? Is it the rolled in touch libraries etc (I’m trying to understand what all the moving parts are - its quite hard to get your arm around all of this stuff as there is so much to learn).
>
> Tim
>
>> On 7 Mar 2016, at 18:12, Norbert Hartl <[hidden email]> wrote:
>>
>>
>>> Am 07.03.2016 um 19:04 schrieb Tim Mackinnon <[hidden email]>:
>>>
>>> Hi guys - Norbert piqued my interest with his reference to ionic and using Amber. I’ve searched the archive and can’t see much about using angular - or ionic. Anyone had any positive experiences with this?
>>>
>>> I would love it Norbert or anyone wouldn’t mind commenting on their use of ionic/angular? I didn’t think I would need all the angular complexity - but then I’ve been reading that ionic has all kinds of useful goodness in it for swipes etc. So is it worth learning about this instead? Does angular play well with Amber and do you end up amber’izing any useful bits that make it nice to use - or do you write some bits in angular/js with directives and the like and then some bits in Amber?
>>>
>>> I’m quite curious about this aspect as it might be my gateway to getting back into web browser smalltalk.
>> We are using a thin layer in JS that dispatches the controller code to angular. Integrating angular in amber is not too easy because angular has a lot of special variables (the ones starting with $). There are also a lot of problems when using angular. The data binding can slow down an application really quick if used without care. I don't know if these problems are still there in angular2. But we are quite happy with this approach.
>>
>> Norbert
>>
>> --
>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.