473,659 Members | 2,685 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple Projects Desing Question

Hello,

Up to this point, I've been using C# to create simple applications that only use on Project to store Windows Forms and other Files. The project has been complied into an EXE. The exe file that is generated has balooned to about 500kb, which is something I don't want to happen!

Although this has approach has been ok for the small applications I've built so far I'd like to move to using the "One Solution with Multiple Projects" method to help me with building the application. However I have some questions as to how I should divide the projects.

My initial idea was to create a project for the GUI and one for the DB Access Logic (such as connection to and getting data from a Access Database). However, the GUI will consist of about 7 Windows Forms which leads me to this question: Should I create one project for each Windows form? If I do this, I am thinking of compiling the projects to DLL files and then just reference them in my start up project?

I also want to be able to organize my projects so that I can seperate the different components of the application (presentation layer, data access layer, etc.). Here is a structure of what I am thinking I should use, your feedback/advice is welcomed:

Solution Name (ComputerTracke r)
1. Project1 - GUI
MainWindow.cs (Windows Form)
CreateComputer. cs (Windows Form)
SearchComputers .cs (Windows Form)
etc...
2. Project2 - DataAccess
Database.cs

Project1 Will be Compiled to an EXE file and will be the start up project
Project 2 Will be compiled to a DLL File.

Again, any feedback/advice will be welcomed. One of the reasons why I wish to do this is so that the EXE that will be generated will be small, but to also see if this can help out with performance with the application. And also to improve the overall desing of the application.

One last thing to ask, if anyone can point to any resources on the net or any examples of C# applications that use the "One Solution and Many Projects" method will be greatly appreciated! I've tried but have not been successful in finding anything on the net, and since I am new to this I don't really know what to look for specifically!

Thanks,

Ed_P.
Nov 16 '05 #1
2 1720
Generating your presentation layer in the .exe and your data access in a
separate .dll is generally a reasonable design, but there is a lot more to
good design than this simple step and there's no way I can explain it all in
a simple e-mail. You really ought to read some books on software engineering
or check out some of the sites on application design. There are tons of them
out there.

Why are you so concerned with the size of the .exe? Breaking the application
into a .EXE and .DLL is just going to create two files that together, are
probably going to be larger than the original .EXE. It's unlikely you'll see
a performance increase simply from separating your data access from the
presentation layer. If you're having performance problems, it probably has
to do with the current design of your algorithms, and maybe that's what you
need to be looking at. It could also be with the design of your database.
Maybe they're not indexed properly. Maybe the design isn't properly
normalized. These are things you probably want to research first.

7 forms is not that many for an application.

I'm not trying to discourage you from making the design change, I just don't
want you to get your hopes up that suddenly your application is going to run
a lot faster because of it, if that's your real goal. If it is, then you
really need to look at other possible probelms. You may find an application
profiler will help you determine where the bottlenecks are in your app. Do a
search on google. There are a few for .NET apps.

Pete

"Ed_P." <Ed_P.@discussi ons.microsoft.c om> wrote in message
news:AC******** *************** ***********@mic rosoft.com...
Hello,

Up to this point, I've been using C# to create simple applications that only use on Project to store Windows Forms and other Files. The project has
been complied into an EXE. The exe file that is generated has balooned to
about 500kb, which is something I don't want to happen!
Although this has approach has been ok for the small applications I've built so far I'd like to move to using the "One Solution with Multiple
Projects" method to help me with building the application. However I have
some questions as to how I should divide the projects.
My initial idea was to create a project for the GUI and one for the DB Access Logic (such as connection to and getting data from a Access
Database). However, the GUI will consist of about 7 Windows Forms which
leads me to this question: Should I create one project for each Windows
form? If I do this, I am thinking of compiling the projects to DLL files and
then just reference them in my start up project?
I also want to be able to organize my projects so that I can seperate the different components of the application (presentation layer, data access
layer, etc.). Here is a structure of what I am thinking I should use, your
feedback/advice is welcomed:
Solution Name (ComputerTracke r)
1. Project1 - GUI
MainWindow.cs (Windows Form)
CreateComputer. cs (Windows Form)
SearchComputers .cs (Windows Form)
etc...
2. Project2 - DataAccess
Database.cs

Project1 Will be Compiled to an EXE file and will be the start up project
Project 2 Will be compiled to a DLL File.

Again, any feedback/advice will be welcomed. One of the reasons why I wish to do this is so that the EXE that will be generated will be small, but
to also see if this can help out with performance with the application. And
also to improve the overall desing of the application.
One last thing to ask, if anyone can point to any resources on the net or any examples of C# applications that use the "One Solution and Many
Projects" method will be greatly appreciated! I've tried but have not been
successful in finding anything on the net, and since I am new to this I
don't really know what to look for specifically!
Thanks,

Ed_P.

Nov 16 '05 #2
Generating your presentation layer in the .exe and your data access in a
separate .dll is generally a reasonable design, but there is a lot more to
good design than this simple step and there's no way I can explain it all in
a simple e-mail. You really ought to read some books on software engineering
or check out some of the sites on application design. There are tons of them
out there.

Why are you so concerned with the size of the .exe? Breaking the application
into a .EXE and .DLL is just going to create two files that together, are
probably going to be larger than the original .EXE. It's unlikely you'll see
a performance increase simply from separating your data access from the
presentation layer. If you're having performance problems, it probably has
to do with the current design of your algorithms, and maybe that's what you
need to be looking at. It could also be with the design of your database.
Maybe they're not indexed properly. Maybe the design isn't properly
normalized. These are things you probably want to research first.

7 forms is not that many for an application.

I'm not trying to discourage you from making the design change, I just don't
want you to get your hopes up that suddenly your application is going to run
a lot faster because of it, if that's your real goal. If it is, then you
really need to look at other possible probelms. You may find an application
profiler will help you determine where the bottlenecks are in your app. Do a
search on google. There are a few for .NET apps.

Pete

"Ed_P." <Ed_P.@discussi ons.microsoft.c om> wrote in message
news:AC******** *************** ***********@mic rosoft.com...
Hello,

Up to this point, I've been using C# to create simple applications that only use on Project to store Windows Forms and other Files. The project has
been complied into an EXE. The exe file that is generated has balooned to
about 500kb, which is something I don't want to happen!
Although this has approach has been ok for the small applications I've built so far I'd like to move to using the "One Solution with Multiple
Projects" method to help me with building the application. However I have
some questions as to how I should divide the projects.
My initial idea was to create a project for the GUI and one for the DB Access Logic (such as connection to and getting data from a Access
Database). However, the GUI will consist of about 7 Windows Forms which
leads me to this question: Should I create one project for each Windows
form? If I do this, I am thinking of compiling the projects to DLL files and
then just reference them in my start up project?
I also want to be able to organize my projects so that I can seperate the different components of the application (presentation layer, data access
layer, etc.). Here is a structure of what I am thinking I should use, your
feedback/advice is welcomed:
Solution Name (ComputerTracke r)
1. Project1 - GUI
MainWindow.cs (Windows Form)
CreateComputer. cs (Windows Form)
SearchComputers .cs (Windows Form)
etc...
2. Project2 - DataAccess
Database.cs

Project1 Will be Compiled to an EXE file and will be the start up project
Project 2 Will be compiled to a DLL File.

Again, any feedback/advice will be welcomed. One of the reasons why I wish to do this is so that the EXE that will be generated will be small, but
to also see if this can help out with performance with the application. And
also to improve the overall desing of the application.
One last thing to ask, if anyone can point to any resources on the net or any examples of C# applications that use the "One Solution and Many
Projects" method will be greatly appreciated! I've tried but have not been
successful in finding anything on the net, and since I am new to this I
don't really know what to look for specifically!
Thanks,

Ed_P.

Nov 16 '05 #3

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

Similar topics

0
1422
by: lanbo | last post by:
Hi all! I'm beginner in MySQL. Actually, I've developed a couple of very simple Php-WEB-Mysql interfaces but the one I'm working on now is a bit more difficult. Take a building company (BUILDINGCO) that has different PROJECTS in different places where each project includes PRODUCTS as flat apartments, shops, parking spots, etc.
1
2023
by: TIBM | last post by:
Hi. I have a VisualStudio.NET solution composed of multiple projects. Each project gets compiled into its own dll. How can I compile 2 or more projects into a single dll I don't want to do a manual compile, but use the capabilities of VS.NET (if it is possible, of course) Thank TM
22
23347
by: Matthew Louden | last post by:
I want to know why C# doesnt support multiple inheritance? But why we can inherit multiple interfaces instead? I know this is the rule, but I dont understand why. Can anyone give me some concrete examples?
3
1419
by: ahaupt | last post by:
Hi all, At the moment we use static methods for retrieving data: Ex. DataTable supplierDT = DAC.Supplier.GetAll(); DataTable customerDT = DAC.Customer.GetAll(); The reason we use static methods is that it's not really worth the
1
1668
by: David L?pez | last post by:
Hi, I'm designing a new website and I'm starting to think about code organization. Until now I've worked in projects that had one solution and one project for the whole website. The question is żis there any advantage using multiple projects inside the solution? Thanks a lot!!
3
2786
by: Shikari Shambu | last post by:
Hi All, I have a situation where multiple applications are sharing some pages/ controls. So, I have a separate common project that has the common pages/ controls. My question is how do I reference these pages/ controls from my ASP.NET web projects WEbApp1 url http://localhost/app1 C:\Apps\App1
10
3748
by: eswanson | last post by:
I have broken up my web site into smaller web site projects. When I look at the precompiled files, it always has the virtual directory in them ie: <preserve resultType="3" virtualPath="/Security/DefaultLogin.aspx" hash="fde4916e6" filehash="ffffe84d717a4765" flags="110000" assembly="App_Web_-xo1n4yg" type="ASP.defaultlogin_aspx"> <filedeps> <filedep name="/Security/DefaultLogin.aspx" /> </filedeps> </preserve>
3
2072
by: Claudio Pacciarini | last post by:
Hi everyone, I have a question about .NET code sharing and reuse, and also about application design best practices / guidelines. Currently, we have many different .NET projects in source depot. Although they are different, in some of them we share C# code by referencing source files that are external (not part of the projects) on each project. For instance, some of our projects have the typical “sources” file with:
6
1859
by: Howard | last post by:
Hi, I have a function in three unrelated but similar classes. The code in the member functions is identical for all three classes. What I want is to make a template which defines the function, implemented as a non-static member of each class. Aside from this function, there is no reason the three classes should inherit from a common base class, which is why I thought a template would be good. But I can't figure out the syntax for a...
0
8330
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
8746
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
8523
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
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
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.