[dba-VB] Projects vs Solutions

Charlotte Foust cfoust at infostatsystems.com
Wed Nov 18 12:16:55 CST 2009


That's where references and "Imports" come in.   You need to be careful about project level references to avoid circular messes, so our UI and Data projects have references to the Configuration project, but not the other way around, and the UI has a reference to the Data project but not the other way around.  

You can always fully reference a class in another project in code starting with the Namespace, so if I need to use something in a project that isn't referenced in the current one, I can use Infostat.RIMDrill.Configuration.RIMConstants (for example) and have access to the methods and properties of RIMConstants even without a reference in the current project.  Alternatively, I could use Imports Infostat.RIMDrill.Configuration in the declarations above my current class and get the same thing.

Charlotte Foust

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Wednesday, November 18, 2009 9:58 AM
To: Discussion concerning Visual Basic and related programming issues.
Subject: Re: [dba-VB] Projects vs Solutions

OK, this immediately causes issues referencing objects in another project.  For example I have a "main" project, and a "CSVRepair" project.  The Main project form opens when I run the project but I then need to be able to open a form in the other project where I gather information about the file to fix.

The objects in that other project aren't visible in intellisense.

"Normal" opening of a form is done with something like

MyFormName Somename = new MyFormNname(); SomeName.Show();

Well... MyFormName is not valid in project main.

While we are on the subject, what happens if I just need to dimension a class used in project CSVRepair?

John W. Colby
www.ColbyConsulting.com


Charlotte Foust wrote:
> Think of the solution as the application.  The projects within the solution can be shared with other applications.  We use the projects primarily to group parts of our apps, like UI, Reports, Data, Configuration, Security, etc., but it really is up to the architect of the app.
> 
> Charlotte Foust
> 
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com 
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
> Sent: Wednesday, November 18, 2009 5:07 AM
> To: VBA
> Subject: [dba-VB] Projects vs Solutions
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com





More information about the dba-VB mailing list