Solution Navigator in Productivity Power Tools Update
When starting a new project in Visual Studio, there are standard ways to layout your solution. For instance, every tier in your n* tier architecture has its own project. When you get down to the feature level, sometimes it becomes more complex. For example, I've worked on older projects based on classic ASP.NET (as opposed to ASP.NET MVC), where all the files related to a feature were grouped together. Under the features/widgets/widgetA folder you'd find the user control for the widgetA, the javascript file for widgetA, it's css file, it's images and any other resources it needed.
Now I am working in ASP.NET MVC where, if done correctly, there are some serious separations of concerns. Now, my widgetA ViewModel is in the "ViewModel" folder tree, the associated View.ascx file is the "Views" folder, javascript, css and images all in separate folders under a "Content" folder.
When I am working on the widgetA feature, it's a little annoying to have to walk through the whole tree to find everything I need. I considered creating a solution folder called widgetA and then adding all related files to that solution folder. That seemed too hard to maintain and would take a long time to get to widgetZ.
Enter the Solution Navigator, part of the latest Productivity Power
Tools Update extension for Visual Studio. It has a great Filter feature
which allows you to filter your entire solution based on a string. If
you follow the MVC "convention over configuration" paradigm and name all
your related files similarly, the Filter will find them for you no
matter where they are in your solution. Note this works across all the projects in your solution.
The Solution Navigator makes working on a big MVC project much simpler for me and I am now able to group files by function rather than feature.
Let me know what you think; maybe there are better ways to organize files or structure a solution. I tried to to look for ways to automate creating Solution Folders for this specific scenario, but the effort didn't seem worth it. Has anyone come up with something easier?