Missing Globbing Parameter

4 posts, 0 answers
  1. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 04 Mar 2013 Link to this post

    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
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 06 Mar 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 06 Mar 2013 Link to this post

    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
  5. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 08 Mar 2013 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready