This is a migrated thread and some comments may be shown as answers.

Missing Globbing Parameter

3 Answers 62 Views
SPA
This is a migrated thread and some comments may be shown as answers.
mgs
Top achievements
Rank 1
mgs asked on 04 Mar 2013, 09:05 AM
If an optional parameter is missing, it is undefined. However, if a globbing parameter is missing, then it is an empty string.

Wouldn't it be consistent, if a missing globbing parameter would also be undefined?

Michael G. Schneider

3 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 06 Mar 2013, 08:34 AM
Hi Michael,

Thank you for your feedback. I checked how rails behaves - if the part of the url which is supposed to be caught by the globbing parameter is missing, the route is not matched at all. 

In other words, the route "/foo/*bar" is not going to match "/foo" - only "/foo/bar". 

If our current behavior turns out to be inconvenient, we are probably going to update our implementation to match this behavior. 

Greetings,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mgs
Top achievements
Rank 1
answered on 06 Mar 2013, 08:59 AM
Hello Petyo,

I might summarize my complete knowledge about Rails in 5 seconds. So I actually do not care, whether Kendo and Rails behave identical. For me it would be more important that Kendo shows a consistent behaviour. In this case, missing optional and missing globbing parameters should behave the same.

I understand that in Rails a missing globbing parameters makes the route not fire at all. What happens in Rails, if an optional parameter is missing?

Michael G. Schneider
0
Petyo
Telerik team
answered on 08 Mar 2013, 08:01 AM
Hi Michael,

If optional parameters are missing, rails does not put them in the parameters hash property - the equivalent of being undefined, I guess.

As I already mentioned, we are most probably going to strife for implementing the same behavior, as the rails framework was the first (to my knowledge) to introduce the routing conventions, adopted by other frameworks afterwards.  

Once again, thank you for your feedback.

All the best,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
SPA
Asked by
mgs
Top achievements
Rank 1
Answers by
Petyo
Telerik team
mgs
Top achievements
Rank 1
Share this question
or