473,499 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help on designing a modular ASP.NET architecture

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 somebody has similar design requirements? Is there any
better/alternative solutions (links)? What is your advice?

Don
Nov 19 '05 #1
12 2178
60 projects? Wow...that's either a huge system or over-engineered. Anyways,
if your system really is "modular" than your web project should be
incredibly thin. It should be your presentation layer (aspx, html, css,
..js) and very thin presentation logic layer (codebehind, and custom server
controls).

At most I'd suspect that you'd have 3 projects...maybe more if your
application is really different sites. Personally, I'd go with 2, you
should have your raw presentation layer (aspx/html/css/.js and codebehind)
and another project that has your presentation entities (say a "Tab" object
for example) and your custom server contorls - that's it.

Take a look at http://code.communityserver.org/ to see how community server
is organized. Keep in mind that this is there entire presentation, business
and data layer...which you should already have 80%+ in your 60-existing
projects.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Don Huan" <do*@kostik.de> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl...
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 somebody has similar design requirements? Is there any
better/alternative solutions (links)? What is your advice?

Don

Nov 19 '05 #2
I think you spot on with your solution.
You don't necessarily have to use controls, but they are nice if there's set
pieces of functionality you want to reuse.

The nice thing about keeping it in the same solution, is that you don't have
to keep referencing your compiled dll's,
as you make changes to your projects it will update the project references
set up in Visual Studio.

I have a project setup similair to the one you are talking - a tad smaller
though - but it works like a charm.
one annoying thing however, may be compile time when developing, you can
ofcourse just rebuild the web project on its own, but when debugging this
may be frustrating.

"Don Huan" <do*@kostik.de> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl...
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 somebody has similar design requirements? Is there any
better/alternative solutions (links)? What is your advice?

Don

Nov 19 '05 #3
Well, Don, it depends on what you mean by "modular." If you constructed your
WinForms application correctly, you separated business logic from UI logic
and code. And if that's the case, you can either re-use the business classes
of your WinForms app (if they are managed), or rebuild them as managed
classes (if they are not), or use Interop to use them (which will engender a
performance hit and some complexity, which I don't recommend offhand). As
for your Custom Controls, anywhere in your WinForms app that you use Custom
Control, create Custome ASP.Net Server Controls to replace them.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.

"Don Huan" <do*@kostik.de> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl...
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 somebody has similar design requirements? Is there any
better/alternative solutions (links)? What is your advice?

Don

Nov 19 '05 #4
Thanks all for quick responce.
Actually every of our modules consists of 3-4 Projects like
- module.buisnesslogic
- module.common
- module.winform

So the requirement is to create one project like
- module.aspnet
for every module.
And that's the reason I can't use UserControls.
My further thoughts are about orginizing css/js and so on in such a big
solution. The aim is to keep web site both modular and simply.

Grant Merwitz wrote:
I think you spot on with your solution.
You don't necessarily have to use controls, but they are nice if there's set
pieces of functionality you want to reuse.

The nice thing about keeping it in the same solution, is that you don't have
to keep referencing your compiled dll's,
as you make changes to your projects it will update the project references
set up in Visual Studio.

I have a project setup similair to the one you are talking - a tad smaller
though - but it works like a charm.
one annoying thing however, may be compile time when developing, you can
ofcourse just rebuild the web project on its own, but when debugging this
may be frustrating.

"Don Huan" <do*@kostik.de> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl...
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 somebody has similar design requirements? Is there any
better/alternative solutions (links)? What is your advice?

Don


Nov 19 '05 #5
How come you can't use UserControls.
It's definately a way to modularise a WebSite (i've found), and you can
compile them, and reference and use them across projects.
Hence you could modularise them.

But this sounds like an awfull amout of work.
Considering they will most likely only be used in one solution - the
website,
why not group them all together under one solutiong, in a folder structure
simulating your current modules.
They are, after all, just a UI to your modules, and shouldn't contain too
much functionality as it will be using the code you already have


"Don Huan" <do*@kostik.de> wrote in message
news:uR****************@tk2msftngp13.phx.gbl...
Thanks all for quick responce.
Actually every of our modules consists of 3-4 Projects like
- module.buisnesslogic
- module.common
- module.winform

So the requirement is to create one project like
- module.aspnet
for every module.
And that's the reason I can't use UserControls.
My further thoughts are about orginizing css/js and so on in such a big
solution. The aim is to keep web site both modular and simply.

Grant Merwitz wrote:
I think you spot on with your solution.
You don't necessarily have to use controls, but they are nice if there's
set pieces of functionality you want to reuse.

The nice thing about keeping it in the same solution, is that you don't
have to keep referencing your compiled dll's,
as you make changes to your projects it will update the project
references set up in Visual Studio.

I have a project setup similair to the one you are talking - a tad
smaller though - but it works like a charm.
one annoying thing however, may be compile time when developing, you can
ofcourse just rebuild the web project on its own, but when debugging this
may be frustrating.

"Don Huan" <do*@kostik.de> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl...
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 somebody has similar design requirements? Is there any
better/alternative solutions (links)? What is your advice?

Don



Nov 19 '05 #6
ASAIK there's no way to compile and reference UserControls across
projects (like custom controls), or is there one? At least, VS doesn't
provide me the ability to create a UserControl inside of a project other
than WebProject (like in a Web Class Library).
I'm relatively new to asp.net, so sorry for dumb question :)

Don

Grant Merwitz wrote:
How come you can't use UserControls.
It's definately a way to modularise a WebSite (i've found), and you can
compile them, and reference and use them across projects.
Hence you could modularise them.

But this sounds like an awfull amout of work.
Considering they will most likely only be used in one solution - the
website,
why not group them all together under one solutiong, in a folder structure
simulating your current modules.
They are, after all, just a UI to your modules, and shouldn't contain too
much functionality as it will be using the code you already have


"Don Huan" <do*@kostik.de> wrote in message
news:uR****************@tk2msftngp13.phx.gbl...
Thanks all for quick responce.
Actually every of our modules consists of 3-4 Projects like
- module.buisnesslogic
- module.common
- module.winform

So the requirement is to create one project like
- module.aspnet
for every module.
And that's the reason I can't use UserControls.
My further thoughts are about orginizing css/js and so on in such a big
solution. The aim is to keep web site both modular and simply.

Grant Merwitz wrote:
I think you spot on with your solution.
You don't necessarily have to use controls, but they are nice if there's
set pieces of functionality you want to reuse.

The nice thing about keeping it in the same solution, is that you don't
have to keep referencing your compiled dll's,
as you make changes to your projects it will update the project
references set up in Visual Studio.

I have a project setup similair to the one you are talking - a tad
smaller though - but it works like a charm.
one annoying thing however, may be compile time when developing, you can
ofcourse just rebuild the web project on its own, but when debugging this
may be frustrating.

"Don Huan" <do*@kostik.de> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl...
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 somebody has similar design requirements? Is there any
better/alternative solutions (links)? What is your advice?

Don

Nov 19 '05 #7
It looks like you've built your original project/solution using VB 6. Are
these truly modules you're using? If so, be aware that Modules in VB.Net are
not a good way to go. Use classes instead. While they may not seem as
"convenient" in the short run, they are truly object-oriented (while Modules
are not), and will save you many headaches in the long run.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.

"Don Huan" <do*@kostik.de> wrote in message
news:uR****************@tk2msftngp13.phx.gbl...
Thanks all for quick responce.
Actually every of our modules consists of 3-4 Projects like
- module.buisnesslogic
- module.common
- module.winform

So the requirement is to create one project like
- module.aspnet
for every module.
And that's the reason I can't use UserControls.
My further thoughts are about orginizing css/js and so on in such a big
solution. The aim is to keep web site both modular and simply.

Grant Merwitz wrote:
I think you spot on with your solution.
You don't necessarily have to use controls, but they are nice if there's
set pieces of functionality you want to reuse.

The nice thing about keeping it in the same solution, is that you don't
have to keep referencing your compiled dll's,
as you make changes to your projects it will update the project
references set up in Visual Studio.

I have a project setup similair to the one you are talking - a tad
smaller though - but it works like a charm.
one annoying thing however, may be compile time when developing, you can
ofcourse just rebuild the web project on its own, but when debugging this
may be frustrating.

"Don Huan" <do*@kostik.de> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl...
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 somebody has similar design requirements? Is there any
better/alternative solutions (links)? What is your advice?

Don



Nov 19 '05 #8
Not sure about that actually.
I know you can compile them into a dll, but not sure if it can be referenced
like a project reference,
but i can't imagine why not.

"Don Huan" <do*@kostik.de> wrote in message
news:OO**************@TK2MSFTNGP10.phx.gbl...
ASAIK there's no way to compile and reference UserControls across projects
(like custom controls), or is there one? At least, VS doesn't provide me
the ability to create a UserControl inside of a project other than
WebProject (like in a Web Class Library).
I'm relatively new to asp.net, so sorry for dumb question :)

Don

Grant Merwitz wrote:
How come you can't use UserControls.
It's definately a way to modularise a WebSite (i've found), and you can
compile them, and reference and use them across projects.
Hence you could modularise them.

But this sounds like an awfull amout of work.
Considering they will most likely only be used in one solution - the
website,
why not group them all together under one solutiong, in a folder
structure simulating your current modules.
They are, after all, just a UI to your modules, and shouldn't contain too
much functionality as it will be using the code you already have


"Don Huan" <do*@kostik.de> wrote in message
news:uR****************@tk2msftngp13.phx.gbl...
Thanks all for quick responce.
Actually every of our modules consists of 3-4 Projects like
- module.buisnesslogic
- module.common
- module.winform

So the requirement is to create one project like
- module.aspnet
for every module.
And that's the reason I can't use UserControls.
My further thoughts are about orginizing css/js and so on in such a big
solution. The aim is to keep web site both modular and simply.

Grant Merwitz wrote:

I think you spot on with your solution.
You don't necessarily have to use controls, but they are nice if there's
set pieces of functionality you want to reuse.

The nice thing about keeping it in the same solution, is that you don't
have to keep referencing your compiled dll's,
as you make changes to your projects it will update the project
references set up in Visual Studio.

I have a project setup similair to the one you are talking - a tad
smaller though - but it works like a charm.
one annoying thing however, may be compile time when developing, you
can ofcourse just rebuild the web project on its own, but when debugging
this may be frustrating.

"Don Huan" <do*@kostik.de> wrote in message
news:Oj**************@TK2MSFTNGP10.phx.gbl.. .
>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 somebody has similar design requirements? Is there any
>better/alternative solutions (links)? What is your advice?
>
>Don

Nov 19 '05 #9
No, we have a "pure" .net (actually C#) OO-solution...

Kevin Spencer wrote:
It looks like you've built your original project/solution using VB 6. Are
these truly modules you're using? If so, be aware that Modules in VB.Net are
not a good way to go. Use classes instead. While they may not seem as
"convenient" in the short run, they are truly object-oriented (while Modules
are not), and will save you many headaches in the long run.

Nov 19 '05 #10
I checked it and there's no way to compile a *UserControl* into a dll
and reference it. That can be done with CustomControls only..


Grant Merwitz wrote:
Not sure about that actually.
I know you can compile them into a dll, but not sure if it can be referenced
like a project reference,
but i can't imagine why not.

"Don Huan" <do*@kostik.de> wrote in message
news:OO**************@TK2MSFTNGP10.phx.gbl...
ASAIK there's no way to compile and reference UserControls across projects
(like custom controls), or is there one? At least, VS doesn't provide me
the ability to create a UserControl inside of a project other than
WebProject (like in a Web Class Library).
I'm relatively new to asp.net, so sorry for dumb question :)

Don

Grant Merwitz wrote:
How come you can't use UserControls.
It's definately a way to modularise a WebSite (i've found), and you can
compile them, and reference and use them across projects.
Hence you could modularise them.

But this sounds like an awfull amout of work.
Considering they will most likely only be used in one solution - the
website,
why not group them all together under one solutiong, in a folder
structure simulating your current modules.
They are, after all, just a UI to your modules, and shouldn't contain too
much functionality as it will be using the code you already have


"Don Huan" <do*@kostik.de> wrote in message
news:uR****************@tk2msftngp13.phx.gbl. ..
Thanks all for quick responce.
Actually every of our modules consists of 3-4 Projects like
- module.buisnesslogic
- module.common
- module.winform

So the requirement is to create one project like
- module.aspnet
for every module.
And that's the reason I can't use UserControls.
My further thoughts are about orginizing css/js and so on in such a big
solution. The aim is to keep web site both modular and simply.

Grant Merwitz wrote:
>I think you spot on with your solution.
>You don't necessarily have to use controls, but they are nice if there's
>set pieces of functionality you want to reuse.
>
>The nice thing about keeping it in the same solution, is that you don't
>have to keep referencing your compiled dll's,
>as you make changes to your projects it will update the project
>references set up in Visual Studio.
>
>I have a project setup similair to the one you are talking - a tad
>smaller though - but it works like a charm.
>one annoying thing however, may be compile time when developing, you
>can ofcourse just rebuild the web project on its own, but when debugging
>this may be frustrating.
>
>"Don Huan" <do*@kostik.de> wrote in message
>news:Oj**************@TK2MSFTNGP10.phx.gbl. ..
>
>
>
>>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 somebody has similar design requirements? Is there any
>>better/alternative solutions (links)? What is your advice?
>>
>>Don
>
>


Nov 19 '05 #11
What is the best way to maintain extern files like CSS, JS and so on? It
would be probably great if they could be placed under their modules
respectively. But how can I then reference them gently from my
CustomControls?

- module_XX
-- CustomControl_xx.cs
-- CustomControl_xy.cs
-- script.js
-- style.css
What are your thoughts about that?

Don

Kevin Spencer wrote:
Well, Don, it depends on what you mean by "modular." If you constructed your
WinForms application correctly, you separated business logic from UI logic
and code. And if that's the case, you can either re-use the business classes
of your WinForms app (if they are managed), or rebuild them as managed
classes (if they are not), or use Interop to use them (which will engender a
performance hit and some complexity, which I don't recommend offhand). As
for your Custom Controls, anywhere in your WinForms app that you use Custom
Control, create Custome ASP.Net Server Controls to replace them.

Nov 19 '05 #12
There are 2 basic ways to approach this. First, an external CSS or JS file,
like a DLL or namespace can be referenced or not in any give page. Second,
CSS can define classes, and is object-oriented. JavaScript is also somewhat
object-oriented, and can be used to define both classes and functions.

We create Custom Controls that are contained in divs. The outer div has a
CSS class, which is used by our graphics designer to design the style and
look of the Control (which has no inline attributes, no tables for layout,
etc, but are "pure" HTML) in any given page context. This allows us to
create Custom Controls that can be "skinned" using CSS classes in external
style sheets.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.

"Don Huan" <do*@kostik.de> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
What is the best way to maintain extern files like CSS, JS and so on? It
would be probably great if they could be placed under their modules
respectively. But how can I then reference them gently from my
CustomControls?

- module_XX
-- CustomControl_xx.cs
-- CustomControl_xy.cs
-- script.js
-- style.css
What are your thoughts about that?

Don

Kevin Spencer wrote:
Well, Don, it depends on what you mean by "modular." If you constructed
your WinForms application correctly, you separated business logic from UI
logic and code. And if that's the case, you can either re-use the
business classes of your WinForms app (if they are managed), or rebuild
them as managed classes (if they are not), or use Interop to use them
(which will engender a performance hit and some complexity, which I don't
recommend offhand). As for your Custom Controls, anywhere in your
WinForms app that you use Custom Control, create Custome ASP.Net Server
Controls to replace them.

Nov 19 '05 #13

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

Similar topics

14
3746
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...
1
1609
by: Naren | last post by:
Hello All, I am presently designing a cleint server architecture. I require some suggestions and help by the experts here. MyServer class conatins a list of Mysock class. class Myserver {...
6
2928
by: Gary James | last post by:
This may not be a direct C# question, but since I'll be using using C# for development, I thought I'd pose the question here. I'll soon be involved in the design of a new software product that...
4
2291
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...
1
1277
by: slonocode | last post by:
I'm wondering if there are certain processes that I could follow to learn to design better classes? Where could I find these processes? Is designing classes more of an art that comes from...
1
2453
by: Silent Ocean | last post by:
Hi 1. I am in process of designing N-Tier Application using ASP.NET. Can anyone guide me the right material or microsoft guidelines document which I can used in designing the N-Tier application....
2
2071
by: Mahesh Kumar.R | last post by:
I'm into designing an application in winforms but in near future my client may request the same thing in webforms. so (1) what are all the design guidelines and ways are there to migrate easily in...
2
3460
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...
1
2325
by: abhijitbkulkarni | last post by:
Hello, I am designing a .NET database application that uses 3 tier architecture. Starting initially, this application will be desktop application but I will convert it into a website later but...
0
7007
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...
0
7220
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...
1
6893
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...
1
4918
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...
0
4599
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...
0
3098
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...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
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 ...
0
295
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...

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.