Routing in Amber

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

Routing in Amber

Tommaso DS
Hi all,

I was wondering if there currently is a "preferred way" to implement browser routing with Amber.
By browser router I mean a component that dinamically manages the url part after the '#', without reloading the whole page.

Is there already something half baked in Helios or using something like page.js would be as good?

--
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: Routing in Amber

Herby Vojčík
Use some js library., Amber is good with reusing JS libs, so why reinventing the wheel?

I personally liked leviroutes that I found on microjs.com, but any should do.

Herby

P.S.: Not used it yet, I just looked for something but after all did not use anything.

[hidden email] wrote:

> Hi all,
>
> I was wondering if there currently is a "preferred way" to implement
> browser routing with Amber.
> By browser router I mean a component that dinamically manages the url
> part after the '#', without reloading the whole page.
>
> Is there already something half baked in Helios or using something
> like page.js would be as good?
>
> --
> 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]
> <mailto:[hidden email]>.
> For more options, visit https://groups.google.com/d/opt
out.

--
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: Routing in Amber

sebastianconcept
I agree about leviroutes being better designed than page.js



On May 6, 2014, at 9:39 AM, Herby Vojčík <[hidden email]> wrote:

> Use some js library., Amber is good with reusing JS libs, so why reinventing the wheel?
>
> I personally liked leviroutes that I found on microjs.com, but any should do.
>
> Herby
>
> P.S.: Not used it yet, I just looked for something but after all did not use anything.
>
> [hidden email] wrote:
>> Hi all,
>>
>> I was wondering if there currently is a "preferred way" to implement browser routing with Amber.
>> By browser router I mean a component that dinamically manages the url part after the '#', without reloading the whole page.
>>
>> Is there already something half baked in Helios or using something like page.js would be as good?
>>
>> --
>> 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] <mailto:[hidden email]>.
>> For more options, visit https://groups.google.com/d/opt
> out.
>
> --
> 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: Routing in Amber

Tommaso DS
In reply to this post by Herby Vojčík
Cool, I will try leviroutes then.
Thank you!

Tommaso

--
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: Routing in Amber

Siemen Baader
Leviroutes looks good. It is neither in bower repos nor does it seem to work with requirejs. For now I just clone it as a git submodule and put into my index.html in a script tag, but --

What is the recommended way of maintaining non-bower, non-AMD packages in an Amber project? What did you do, Herby? 

best,
Siemen


On 08 May 2014, at 14:49, [hidden email] wrote:

Cool, I will try leviroutes then.
Thank you!

Tommaso

--
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: Routing in Amber

Hannes Hirzel
You may put them in the shim part of requirejs.config.

irejs.org/docs/api.html#config-shim

On 5/16/14, Siemen Baader <[hidden email]> wrote:

> Leviroutes looks good. It is neither in bower repos nor does it seem to work
> with requirejs. For now I just clone it as a git submodule and put into my
> index.html in a script tag, but --
>
> What is the recommended way of maintaining non-bower, non-AMD packages in an
> Amber project? What did you do, Herby?
>
> best,
> Siemen
>
>
> On 08 May 2014, at 14:49, [hidden email] wrote:
>
>> Cool, I will try leviroutes then.
>> Thank you!
>>
>> Tommaso
>>
>> --
>> 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.
Reply | Threaded
Open this post in threaded view
|

Re: Routing in Amber

Hannes Hirzel
http://requirejs.org/docs/api.html#config-shim

shim: Configure the dependencies, exports, and custom initialization
for older, traditional "browser globals" scripts that do not use
define() to declare the dependencies and set a module value.

On 5/16/14, H. Hirzel <[hidden email]> wrote:

> You may put them in the shim part of requirejs.config.
>
> irejs.org/docs/api.html#config-shim
>
> On 5/16/14, Siemen Baader <[hidden email]> wrote:
>> Leviroutes looks good. It is neither in bower repos nor does it seem to
>> work
>> with requirejs. For now I just clone it as a git submodule and put into
>> my
>> index.html in a script tag, but --
>>
>> What is the recommended way of maintaining non-bower, non-AMD packages in
>> an
>> Amber project? What did you do, Herby?
>>
>> best,
>> Siemen
>>
>>
>> On 08 May 2014, at 14:49, [hidden email] wrote:
>>
>>> Cool, I will try leviroutes then.
>>> Thank you!
>>>
>>> Tommaso
>>>
>>> --
>>> 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.
Reply | Threaded
Open this post in threaded view
|

Re: Routing in Amber

Siemen Baader

On 16 May 2014, at 09:31, H. Hirzel <[hidden email]> wrote:

> http://requirejs.org/docs/api.html#config-shim
>
> shim: Configure the dependencies, exports, and custom initialization
> for older, traditional "browser globals" scripts that do not use
> define() to declare the dependencies and set a module value.
>
> On 5/16/14, H. Hirzel <[hidden email]> wrote:
>> You may put them in the shim part of requirejs.config.
>>
>> irejs.org/docs/api.html#config-shim


Thanks, Hannes!

And wrt the component itself -- would you use git submodules? I'm interested best practices & experiences..

-- Siemen

--
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: Routing in Amber

Herby Vojčík
In reply to this post by Tommaso DS


Siemen Baader <[hidden email]>napísal/a:


On 16 May 2014, at 09:31, H. Hirzel <[hidden email]> wrote:

> http://requirejs.org/docs/api.html#config-shim
>
> shim: Configure the dependencies, exports, and custom initialization
> for older, traditional "browser globals" scripts that do not use
> define() to declare the dependencies and set a module value.

Shim is only usrful if thete are actual dependencies or exports to shim, it is not needed. Non-AMD modules can be used as is in the list of packages to load.

>
> On 5/16/14, H. Hirzel <[hidden email]> wrote:
>> You may put them in the shim part of requirejs.config.
>>
>> irejs.org/docs/api.html#config-shim


Thanks, Hannes!

And wrt the component itself -- would you use git submodules? I'm interested best practices & experiences..


Well, of course use
  bower install git://github.com/.../leviroutes.git --save

-- Siemen

--
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.