I actually have been thinking more and more about it and this
functionality could easily be done with a Helper method.
And we can also do minification + combine.
Eg.
Views/global.js
Jquery.Validation.js
/MyArea/myareascript1.js
myareascript2.js
/MyArea/MyController/mycontrolerscript1.js
mycontrolerscript2.js
/MyController2/mycontroler2script1.js
mycontroler2script2.js
/MyController2/MyAction1/myactionscript1.js
myactionscript2.js
So if we rendering /MyController2/MyAction1 , we would generate 3
script tags (minified + combined):
- global.js + Jquery.Validation.js
- mycontroler2script1.js + mycontroler2script2.js
- myactionscript1.js + myactionscript2.js
Cheers
John
On Nov 22, 10:55 am, Henry Conceição <[email protected]>
wrote:
> This is a nice thing to have. About the soc & internal details
> exposure it isn't really a issue: first, it's a matter of taste, and
> if you don't like, a override on default location option for scripts
> and styles would tackle it.
>
> Cheers,
> Henry Conceição
>
> On Sun, Nov 21, 2010 at 10:44 AM, c.sokun <[email protected]> wrote:
> > too smart & it defeat SOC cuz you placing files everwhere
>
> > On Nov 21, 7:33 pm, James Curran <[email protected]> wrote:
> >> Wouldhttp://example.com/Customers/Action.rails
>
> >> include a reference to:
>
> >> http://example.com/Customers/Action.js
>
> >> or
>
> >> http://example.com/Views/Customers/Action.js
>
> >> The former keeps the same structure,but requires redirection, while the
> >> latter use the phyiscal address, but reveals internal details.
>
> >> Truth,
> >> James
>
> >> On Sun, Nov 21, 2010 at 3:54 AM, Symon Rottem <[email protected]> wrote:
> >> > I like it.
>
> >> > Symon Rottem
> >> >http://blog.symbiotic-development.com
>
> >> > On Sun, Nov 21, 2010 at 6:18 AM, John Simons
> >> > <[email protected]>wrote:
>
> >> >> Wouldn't it be nice to have the Action include automatically js + css
> >> >> if in the same location as view?
>
> >> >> Eg.
> >> >> ~/Views/Customers/Action.cshtml
> >> >> Action.js
> >> >> Action.css
>
> >> >> So in this case the js + css files would automatically be included for
> >> >> the Action
> >> >> And then we can even play with Areas and Controllers js + css files.
>
> >> >> Cheers
> >> >> John
>
> >> >> --
> >> >> You received this message because you are subscribed to the Google
> >> >> Groups
> >> >> "Castle Project Development List" group.
> >> >> To post to this group, send email to
> >> >> [email protected].
> >> >> To unsubscribe from this group, send email to
> >> >> [email protected]<castle-project-devel%[email protected]>
> >> >> .
> >> >> For more options, visit this group at
> >> >>http://groups.google.com/group/castle-project-devel?hl=en.
>
> >> > --
> >> > You received this message because you are subscribed to the Google Groups
> >> > "Castle Project Development List" group.
> >> > To post to this group, send email to
> >> > [email protected]
> >> > .
> >> > To unsubscribe from this group, send email to
> >> > [email protected]<castle-project-devel%[email protected]>
> >> > .
> >> > For more options, visit this group at
> >> >http://groups.google.com/group/castle-project-devel?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Castle Project Development List" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group
> > athttp://groups.google.com/group/castle-project-devel?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-devel?hl=en.