Default View Namespace Imports

25 views
Skip to first unread message

Corey Kaylor

unread,
Mar 27, 2013, 12:44:47 PM3/27/13
to fubumv...@googlegroups.com
Just thinking out loud. Any reason that we shouldn't by default import the namespaces for any input models and view models the application is aware of into CommonViewNamespaces? This would eliminate ever having to add using statements to your template files. Any drawbacks?

Jeremy D. Miller

unread,
Mar 27, 2013, 12:46:19 PM3/27/13
to fubumv...@googlegroups.com
The only possible thing I can think of is performance, but at first blush I really like this suggestion.

Naming collisions maybe?


On Mar 27, 2013, at 11:44 AM, Corey Kaylor <co...@kaylors.net> wrote:

Just thinking out loud. Any reason that we shouldn't by default import the namespaces for any input models and view models the application is aware of into CommonViewNamespaces? This would eliminate ever having to add using statements to your template files. Any drawbacks?

--
You received this message because you are subscribed to the Google Groups "FubuMVC Development Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fubumvc-deve...@googlegroups.com.
To post to this group, send email to fubumv...@googlegroups.com.
Visit this group at http://groups.google.com/group/fubumvc-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Corey Kaylor

unread,
Mar 27, 2013, 12:51:09 PM3/27/13
to fubumv...@googlegroups.com
Yeah, fully qualifying at that point would fix the problem.

Corey Kaylor

unread,
Mar 27, 2013, 12:52:04 PM3/27/13
to fubumv...@googlegroups.com
Could definitely make it settings driven. .AutoImportModelNamespaces();

Jeremy D. Miller

unread,
Mar 27, 2013, 2:53:23 PM3/27/13
to fubumv...@googlegroups.com
I think I like the idea of making it be "opt out."  Make things easy by default.

Matt S.

unread,
Mar 27, 2013, 4:37:08 PM3/27/13
to fubumv...@googlegroups.com
Wow. Yeah, that would be nice.

RobertTheGrey

unread,
Mar 28, 2013, 8:29:38 AM3/28/13
to fubumv...@googlegroups.com
I like it!
Reply all
Reply to author
Forward
0 new messages