in a Java class library I can divide my classes into packages to make them easy to manage under one root and several ‘branch’ namespaces, but in VB there is no sub-category in a project, all the class files are in there by alphabetical order, when the library gets big it’s a mess. Is there a better way to manage class library in VB? I use visual basic 2010 express.
Share
Of course you can! Using Visual Studio you can set up your project with many folders, moving code files where it’s more suitable for you. Usually sub-folders are used as namespaces but it’s not a rule but, for example:
Root namespace: MyCompany.MyApplication
Directory structure:
Project root
-Model namespace MyCompany.MyApplication.Model
-Ui namespace MyCompany.MyApplication.Ui
–Controls namespace MyCompany.MyApplication.Ui.Controls
–Forms namespace MyCompany.MyApplication.Ui.Forms
-Helpers namespace MyCompany.MyApplication.Helpers
Links
Introduction to Solutions, Projects, and Items : start here to understand how Visual Studio works with projects and solutions.
Item Management in Projects: brief introduction to how a project manage its contents.
How To: Structure Your Source Control Folders in Team Foundation Server: it talks about TFS but it’s valid as general discussion/example.