Reputation: 65
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.
Upvotes: 0
Views: 1846
Reputation: 67080
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
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.
Upvotes: 2
Reputation: 14
I guess you want to add Java package functionality to MS VS package system, but actually Visual studio supply NAMESPACE to manage your class as well as package (well, not quite similar, java package will show detailed directory path). Please try NAMESpace in your project and find the most benefit be yourself, enjoy it :)
Upvotes: 0