472,363 Members | 2,007 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,363 software developers and data experts.

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 (ComputerTracker)
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 1652
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.@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.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 (ComputerTracker)
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.@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.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 (ComputerTracker)
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
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...
1
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...
22
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...
3
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...
1
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...
3
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...
10
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"...
3
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...
6
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,...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

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.