use pagename as a namespace for javascript and models

  • 2
  • Idea
  • Updated 3 months ago
  • Under Consideration
To keep things from getting improperly referenced between pages via page includes.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 4 years ago

  • 2
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Interesting thinking.  We do know there are occasional troubles when you rename models...   We also really should solve for model uniqueness accross pages.  Its complicated stuff, but considering the number of times that theme emerges in the forum,  the need is certainly out there. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Just remembering this post when writing up some best practices. Is this still under consideration?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
With my push to simplify my org, I'm noticing this issue again. Is this under consideration or planned?

My use case for this is leveraging the Page Include component for almost all pages. This, in certain instances cause the same page include to be on the same page twice, which causes an issue. Wouldn't be an issue if Models had a namespace. Or that very least enable models to respect and their components to respect the "_parentPageId" property.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
The need to include the same page in more than one location on a complex page has come up several times. I've found myself cloning pages to give them unique names (and updating all the model names) just so I can include the same content in two different places...

which is just silly.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Yup. Agreed.

At least I'm not the only one.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
You're not alone!
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Not only is it silly, it's contrary to the skuid vibe.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Exactly. I want to leverage all pages, models and components as much as possible.

I'm even considering making a detail page controller using js inline to max out how it's used. View, New, Clone, and Edit. As well as taking in a adoptive row so as to not need to query for it. All about uber fast UX.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Please tell me this is going to happen.