You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Carlos Rovira <ca...@apache.org> on 2020/07/19 18:00:43 UTC
Routing revisted
Hi,
I'm looking to add routing to a royale app embedded in a web page.
I remember Harbs added HashRouter and BrowserRouter.
1.- Router is finally deprecated? If so, I think it should be removed to
avoid confusions.
2.- Could this page [1] be updated to reflect the new classes?
3.- For apps embedded in a web page, it's possible to use BrowserRouter? or
is it mandatory to use HashRouter?
I think this example [2] (TodoMVC-Crux) that is using Router, could be
updated to BrowserRouter, but I guess that will only work if I change
.htaccess rewrite rules like Josh said right?
The config will be the same just changing "Router" to "BrowserRouter"? :
<js:BrowserRouter>
<js:RouteToState component="{footer}"/>
<js:RouteTitleLookup lookup="{getTitleLookup()}"/>
</js:BrowserRouter>
[1] https://apache.github.io/royale-docs/features/routing
[2]
https://github.com/apache/royale-asjs/tree/develop/examples/crux/todomvc-jewel-crux/src/main/royale/jewel/todomvc
--
Carlos Rovira
http://about.me/carlosrovira
Re: Routing revisted
Posted by Andrew Wetmore <co...@gmail.com>.
@Harbs <ha...@gmail.com> could you let me know when you have updated
that page? I will do a doofus check for grammar and suchlike. Very grateful
for this help, as I would not be sure what to say about this feature.
Once that is in place, I will try to populate the related page in the
tutorial.
a
On Mon, Jul 20, 2020 at 5:16 AM Carlos Rovira <ca...@apache.org>
wrote:
> Hi Harbs,
>
> I think Deprecated could be used in both parts since you can deprecate the
> entire class or just some methods or properties. In this case maybe just
> using at class level should be enough. Apart from that, since we're still
> not in 1.0, I think we could remove it directly if you want, since it is
> better to reach 1.0 as clean as possible. That means few people using it
> should get an error and looking a bit will make them find what happens if
> they are not following us. Then after 1.0 I think we should be very
> careful with it. Just my opinion.
>
> About docs, could you update it? I'll be using it to implement in a new
> application.
>
> I updated the TodoMVC example to use HashRouter, but will want to update to
> BrowserRouter when I know how to use it.
>
> Thanks
>
>
>
> El dom., 19 jul. 2020 a las 21:29, Harbs (<ha...@gmail.com>)
> escribió:
>
> > I added [Deprecated] meta tags for Router. I’m not sure if that goes on
> > the class or the constructor. I added it to both...
> >
> > > On Jul 19, 2020, at 9:08 PM, Harbs <ha...@gmail.com> wrote:
> > >
> > >
> > >
> > >> On Jul 19, 2020, at 9:00 PM, Carlos Rovira <ca...@apache.org>
> > wrote:
> > >>
> > >> Hi,
> > >>
> > >> I'm looking to add routing to a royale app embedded in a web page.
> > >> I remember Harbs added HashRouter and BrowserRouter.
> > >>
> > >> 1.- Router is finally deprecated? If so, I think it should be removed
> to
> > >> avoid confusions.
> > >
> > > Yes. It’s deprecated. We can probably remove it. I doubt it’s being
> used.
> > >
> > >> 2.- Could this page [1] be updated to reflect the new classes?
> > > Yes. It should.
> > >
> > >> 3.- For apps embedded in a web page, it's possible to use
> > BrowserRouter? or
> > >> is it mandatory to use HashRouter?
> > >
> > > Either will work.
> > >
> > >> I think this example [2] (TodoMVC-Crux) that is using Router, could be
> > >> updated to BrowserRouter, but I guess that will only work if I change
> > >> .htaccess rewrite rules like Josh said right?
> > >
> > > Correct.
> > >
> > >> The config will be the same just changing "Router" to
> "BrowserRouter"? :
> > >>
> > >> <js:BrowserRouter>
> > >> <js:RouteToState component="{footer}"/>
> > >> <js:RouteTitleLookup lookup="{getTitleLookup()}"/>
> > >> </js:BrowserRouter>
> > >>
> > >> [1] https://apache.github.io/royale-docs/features/routing
> > >> [2]
> > >>
> >
> https://github.com/apache/royale-asjs/tree/develop/examples/crux/todomvc-jewel-crux/src/main/royale/jewel/todomvc
> > >> --
> > >> Carlos Rovira
> > >> http://about.me/carlosrovira
> > >
> >
> >
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
--
Andrew Wetmore
http://cottage14.blogspot.com/
Re: Routing revisted
Posted by Carlos Rovira <ca...@apache.org>.
Hi Harbs,
I think Deprecated could be used in both parts since you can deprecate the
entire class or just some methods or properties. In this case maybe just
using at class level should be enough. Apart from that, since we're still
not in 1.0, I think we could remove it directly if you want, since it is
better to reach 1.0 as clean as possible. That means few people using it
should get an error and looking a bit will make them find what happens if
they are not following us. Then after 1.0 I think we should be very
careful with it. Just my opinion.
About docs, could you update it? I'll be using it to implement in a new
application.
I updated the TodoMVC example to use HashRouter, but will want to update to
BrowserRouter when I know how to use it.
Thanks
El dom., 19 jul. 2020 a las 21:29, Harbs (<ha...@gmail.com>) escribió:
> I added [Deprecated] meta tags for Router. I’m not sure if that goes on
> the class or the constructor. I added it to both...
>
> > On Jul 19, 2020, at 9:08 PM, Harbs <ha...@gmail.com> wrote:
> >
> >
> >
> >> On Jul 19, 2020, at 9:00 PM, Carlos Rovira <ca...@apache.org>
> wrote:
> >>
> >> Hi,
> >>
> >> I'm looking to add routing to a royale app embedded in a web page.
> >> I remember Harbs added HashRouter and BrowserRouter.
> >>
> >> 1.- Router is finally deprecated? If so, I think it should be removed to
> >> avoid confusions.
> >
> > Yes. It’s deprecated. We can probably remove it. I doubt it’s being used.
> >
> >> 2.- Could this page [1] be updated to reflect the new classes?
> > Yes. It should.
> >
> >> 3.- For apps embedded in a web page, it's possible to use
> BrowserRouter? or
> >> is it mandatory to use HashRouter?
> >
> > Either will work.
> >
> >> I think this example [2] (TodoMVC-Crux) that is using Router, could be
> >> updated to BrowserRouter, but I guess that will only work if I change
> >> .htaccess rewrite rules like Josh said right?
> >
> > Correct.
> >
> >> The config will be the same just changing "Router" to "BrowserRouter"? :
> >>
> >> <js:BrowserRouter>
> >> <js:RouteToState component="{footer}"/>
> >> <js:RouteTitleLookup lookup="{getTitleLookup()}"/>
> >> </js:BrowserRouter>
> >>
> >> [1] https://apache.github.io/royale-docs/features/routing
> >> [2]
> >>
> https://github.com/apache/royale-asjs/tree/develop/examples/crux/todomvc-jewel-crux/src/main/royale/jewel/todomvc
> >> --
> >> Carlos Rovira
> >> http://about.me/carlosrovira
> >
>
>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Routing revisted
Posted by Harbs <ha...@gmail.com>.
I added [Deprecated] meta tags for Router. I’m not sure if that goes on the class or the constructor. I added it to both...
> On Jul 19, 2020, at 9:08 PM, Harbs <ha...@gmail.com> wrote:
>
>
>
>> On Jul 19, 2020, at 9:00 PM, Carlos Rovira <ca...@apache.org> wrote:
>>
>> Hi,
>>
>> I'm looking to add routing to a royale app embedded in a web page.
>> I remember Harbs added HashRouter and BrowserRouter.
>>
>> 1.- Router is finally deprecated? If so, I think it should be removed to
>> avoid confusions.
>
> Yes. It’s deprecated. We can probably remove it. I doubt it’s being used.
>
>> 2.- Could this page [1] be updated to reflect the new classes?
> Yes. It should.
>
>> 3.- For apps embedded in a web page, it's possible to use BrowserRouter? or
>> is it mandatory to use HashRouter?
>
> Either will work.
>
>> I think this example [2] (TodoMVC-Crux) that is using Router, could be
>> updated to BrowserRouter, but I guess that will only work if I change
>> .htaccess rewrite rules like Josh said right?
>
> Correct.
>
>> The config will be the same just changing "Router" to "BrowserRouter"? :
>>
>> <js:BrowserRouter>
>> <js:RouteToState component="{footer}"/>
>> <js:RouteTitleLookup lookup="{getTitleLookup()}"/>
>> </js:BrowserRouter>
>>
>> [1] https://apache.github.io/royale-docs/features/routing
>> [2]
>> https://github.com/apache/royale-asjs/tree/develop/examples/crux/todomvc-jewel-crux/src/main/royale/jewel/todomvc
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>
Re: Routing revisted
Posted by Harbs <ha...@gmail.com>.
> On Jul 19, 2020, at 9:00 PM, Carlos Rovira <ca...@apache.org> wrote:
>
> Hi,
>
> I'm looking to add routing to a royale app embedded in a web page.
> I remember Harbs added HashRouter and BrowserRouter.
>
> 1.- Router is finally deprecated? If so, I think it should be removed to
> avoid confusions.
Yes. It’s deprecated. We can probably remove it. I doubt it’s being used.
> 2.- Could this page [1] be updated to reflect the new classes?
Yes. It should.
> 3.- For apps embedded in a web page, it's possible to use BrowserRouter? or
> is it mandatory to use HashRouter?
Either will work.
> I think this example [2] (TodoMVC-Crux) that is using Router, could be
> updated to BrowserRouter, but I guess that will only work if I change
> .htaccess rewrite rules like Josh said right?
Correct.
> The config will be the same just changing "Router" to "BrowserRouter"? :
>
> <js:BrowserRouter>
> <js:RouteToState component="{footer}"/>
> <js:RouteTitleLookup lookup="{getTitleLookup()}"/>
> </js:BrowserRouter>
>
> [1] https://apache.github.io/royale-docs/features/routing
> [2]
> https://github.com/apache/royale-asjs/tree/develop/examples/crux/todomvc-jewel-crux/src/main/royale/jewel/todomvc
> --
> Carlos Rovira
> http://about.me/carlosrovira