473,789 Members | 2,706 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Modular approach to .net development for large solution?

Tim
Dear All,

I have been working with VB.NET for the last 5 months or so as a solo
developer for a small business. I have already started developing the
application but have hit a snag with the referencing of one project
within another.

I would like to develop the solution using a modular approach such
that the solution will be made up of several smaller projects being
referenced by a main application project. Some of these smaller
projects may well have to work independently from the main application
so these have been set-up as New Windows Applications.

My problem is that when I try to call a form held within the smaller
project from within the main application project I will require a
reference to the sub-project. However, to create a reference to this
project from within my main project I need to connect to a .dll or a
COM object. Now, I'm not really clear whether or not I should have
created this sub-project as a com object as I want it to be able to
run independently from the main application project as well. I just
can't seem to find a .dll within the sub-project folder, just an
Executable?

So how should I be structuring my solution so that I reference the
smaller projects from within the main project? And Allow some of the
smaller projects to run independently? And do I create the other
smaller projects that will not run independently but that provide
specific functionality as COM objects?

Any help much appreciated!!

Kind Regards,

Tim
Jul 21 '05 #1
5 2268
You should add a Project Reference from the main project to the sub
projects. If you are using .NET, then no need to use COM (except for
interop with legacy code).

-mike
MVP

"Tim" <tp********@pll s.co.uk> wrote in message
news:10******** *************** ***@posting.goo gle.com...
Dear All,

I have been working with VB.NET for the last 5 months or so as a solo
developer for a small business. I have already started developing the
application but have hit a snag with the referencing of one project
within another.

I would like to develop the solution using a modular approach such
that the solution will be made up of several smaller projects being
referenced by a main application project. Some of these smaller
projects may well have to work independently from the main application
so these have been set-up as New Windows Applications.

My problem is that when I try to call a form held within the smaller
project from within the main application project I will require a
reference to the sub-project. However, to create a reference to this
project from within my main project I need to connect to a .dll or a
COM object. Now, I'm not really clear whether or not I should have
created this sub-project as a com object as I want it to be able to
run independently from the main application project as well. I just
can't seem to find a .dll within the sub-project folder, just an
Executable?

So how should I be structuring my solution so that I reference the
smaller projects from within the main project? And Allow some of the
smaller projects to run independently? And do I create the other
smaller projects that will not run independently but that provide
specific functionality as COM objects?

Any help much appreciated!!

Kind Regards,

Tim

Jul 21 '05 #2
Tim
Thanks for you post Mike,

I have tried to create a project reference, however I am retrurned
this error message when I tryed to reference my sub-project from
within my main project.

"A Reference to 'CONTACTS' could not be added. An assembly must have a
'.dll' extension in order to be refenced."

Is there a problem with the way I have setup my sub-project to build?

Regards,

Tim
Jul 21 '05 #3
"Tim" <tp********@pll s.co.uk> wrote in message
news:10******** *************** ***@posting.goo gle.com...
Dear All,

I have been working with VB.NET for the last 5 months or so as a solo
developer for a small business. I have already started developing the
application but have hit a snag with the referencing of one project
within another.


You might like to consider splitting off the user interface code from the
non-visual code, and putting the non-visual stuff into a library project
(dll). Then you could use the shared library from all the Winform projects.

Tim
Where is Borland going?
http://www.itwriting.com/borlandtop.php
Jul 21 '05 #4
Yes, make sure your CONTACTS project is a Class Library, not an Exe. If you
need Contacts to be a separate program in and of itself, then you'll need to
move its core code into a DLL project, which both Contacts (EXE) and your
main EXE can reference.

-mike
MVP

"Tim" <tp********@pll s.co.uk> wrote in message
news:10******** *************** ***@posting.goo gle.com...
Thanks for you post Mike,

I have tried to create a project reference, however I am retrurned
this error message when I tryed to reference my sub-project from
within my main project.

"A Reference to 'CONTACTS' could not be added. An assembly must have a
'.dll' extension in order to be refenced."

Is there a problem with the way I have setup my sub-project to build?

Regards,

Tim

Jul 21 '05 #5
tp********@plls .co.uk (Tim) wrote in news:100ccfa6.0 312020120.34bcc e22
@posting.google .com:
"A Reference to 'CONTACTS' could not be added. An assembly must have a
'.dll' extension in order to be refenced."


VS.NET requires that references (even to projects) be only to class
libraries, not .exe (windows forms or console). This is a limitation of
VS.NET, and not a limitation of VB.NET, C#, the CLR, the framework or
anything else. If you build from the command line, you can do your
references any way you like.

example:
test.cs contains:

public class someclass
{
public static void Main()
{
System.Console. WriteLine("hell o, world");
}
}
user.cs contains:

class otherclass
{
static void Main()
{
System.Console. WriteLine("runn ing someclass.Main( )");
System.Console. Write(" ");
someclass.Main( );
System.Console. WriteLine("done .");
}
}
build test.exe with:
csc /t:exe test.cs
build user.exe with:
csc /t:exe /r:test.exe user.cs

Run user.exe, and see that it uses the class in test.exe

Mark
Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
3778
by: Hayden Kirk | last post by:
Hey guys I am about to write some back end software for my business. I want a system that I can create invoices, clients etc... I can do this no problem. However I want to write it in modules so its extendable in the future. Like someone else can write a module for it and it can plug stright into my system. I can't figure out a good way to do this in php. I was thinking of hooks or something, but PHP does not support this.
5
2903
by: steve | last post by:
Hi, I finally figured out the best way to synch local and remote script folders, containing many php script files. What I used to do before was try to ftp all the changed files, etc. which was tedious and often broke. It was also very slow. What I do now is to pkzip the folder up, ftp the pkzip’ed data to remote, and then unzip it there, which recreates the directories and files.
18
5643
by: Zero | last post by:
Hi, I am calculating an integer to the pwer of a large integer, e.g. 2^5000. It turns out that the result I always get is zero. I am sure that the result is too large to store in such type as u_int64_t and long int etc. My power function is as follows: for(i=0; i<5000; i++) result *= 2;
16
1910
by: Linus | last post by:
Being a ASP developer for a consultant company thinking of starting developing with ASP.NET I have read literally hundreds of web pages and posts in discussion forums on the Internet to get an idea of what we will need to adapt to. I have read Microsoft’s “Team Development with Visual Studio .NET and Visual SourceSafe” and tried to set up a development environment as recommended using the “Isolated model”. However, many questions...
4
2310
by: Nick Goloborodko | last post by:
Hi, I'm in the process of conceptualizing a new ASP.NET application. I'm a relative newbie in ASP.NET / .NET in general, so any comments will be greatly appreciated. Basically i need to make my application as modular as possible, something along the lines of Mambo (PHP CMS System) Drupal (another PHP CMS) or something similar to these. What I'm thinking is to provide the following structure: core of the application includes essential...
12
2216
by: Don Huan | last post by:
Hi my job is to migrate our WinForms application to ASP.NET. This app was build very modular so every peace of code can be replaced by another "modul". There are 1 VS-solution with about 60 projects (dll's) in it. Now I have to design a Web-Client modul (actually the web-interface). To maintain the modularity, I thought of making one ASP.NET-Project inside of the solution and create some projects containing Custom Web Controls. Did...
5
295
by: Tim | last post by:
Dear All, I have been working with VB.NET for the last 5 months or so as a solo developer for a small business. I have already started developing the application but have hit a snag with the referencing of one project within another. I would like to develop the solution using a modular approach such that the solution will be made up of several smaller projects being referenced by a main application project. Some of these smaller
22
2992
by: Wildemar Wildenburger | last post by:
To make it short: Is there something like this already? There seem to loads of python frameworks for Web-Apps, but I have a hard time finding one for desktop-apps. I imagine it wouldn't be too hard (if still time consuming) whipping up something simple myself, but I thought, I'd ask here before diving into it. greets wildemar
2
3482
by: Canice | last post by:
I'm working on a web application where 90% of it is common 'product' code an the other 10% is customer specific. I want some method of separating the customer specific presentation, business and data access layers from the product code as I don't the main product code to be bloated with customer specific code. Ideally I'd like to have one solution for the product and one for each customer. However I haven't found a way to separate the...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10410
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9984
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.