帮助设计模块化ASP.NET体系结构 [英] Help on designing a modular ASP.NET architecture

查看:73
本文介绍了帮助设计模块化ASP.NET体系结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我的工作是将我们的WinForms应用程序迁移到ASP.NET。这个应用程序是

构建非常模块化,所以每个代码的安宁可以被另一个代替

modul。有一个VS解决方案,其中包含约60个项目(dll')。

现在我必须设计一个Web客户端模块(实际上是Web界面)。为了保证模块化,我想在解决方案中创建一个ASP.NET-Project并创建一些包含自定义Web控件的项目。

有人有类似的设计要求吗?有没有

更好/替代解决方案(链接)?你有什么建议吗?


Don

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

推荐答案

60个项目?哇......那要么是一个庞大的系统,要么是过度设计的。无论如何,如果你的系统真的是模块化的,那么
比你的网络项目要好

非常薄。它应该是你的表示层(aspx,html,css,

..js)和非常薄的表示逻辑层(代码隐藏和自定义服务器

控件)。 />

最多我怀疑你有3个项目......如果你的

应用程序是真正不同的网站,可能会更多。就我个人而言,我会选择2,你的b $ b应该有你的原始表示层(aspx / html / css / .js和代码隐藏)

和另一个项目您的演示实体(例如Tab对象

)和您的自定义服务器控制 - 就是它。


看看 http://code.communityserver.org/ 了解社区服务器如何

是有组织的。请记住,这是整个演示文稿,业务

和数据层......在60个现有的
项目中,您应该已经拥有80%以上的成本。 />

Karl


-

我的ASP.Net教程
http://www.openmymind.net/ - 新增和改进(是的,弹出窗口是

烦人)
http://www.openmymind.net/faq.aspx - 非官方新闻组常见问题解答(更多内容

来了!)

Don Huan < do*@kostik.de>在消息中写道

新闻:Oj ************** @ TK2MSFTNGP10.phx.gbl ...
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...


我的工作是将我们的WinForms应用程序迁移到ASP.NET。这个应用程序是非常模块化的,因此每个代码的安静可以被另一个
modul替换。有一个VS解决方案,其中包含大约60个项目(dll')。
现在我必须设计一个Web客户端模块(实际上是Web界面)。为了保持模块化,我想在解决方案中创建一个ASP.NET项目并创建一些包含自定义Web控件的项目。
是否有人有类似的设计要求?有没有更好的/替代解决方案(链接)?你有什么建议吗?

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



我认为你发现你的解决方案。

你不一定非必须使用控件,但是如果你想重复使用

的功能,它们会很好。


保持它在同一个解决方案中的好处是,你没有

来继续引用你编译的dll,

当你改变你的项目它将更新项目参考

在Visual Studio中设置。


我有一个项目设置similair到你正在谈论的那个 - 一点点<但是,
虽然 - 但它的作用就像一个魅力。

然而,一个令人烦恼的事情,可能是开发时的编译时间,你可以

ofcourse just rebuild the网络项目本身,但在调试这个

可能会令人沮丧。


Don Huan < do*@kostik.de>在消息中写道

新闻:Oj ************** @ TK2MSFTNGP10.phx.gbl ...
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...


我的工作是将我们的WinForms应用程序迁移到ASP.NET。这个应用程序是非常模块化的,因此每个代码的安静可以被另一个
modul替换。有一个VS解决方案,其中包含大约60个项目(dll')。
现在我必须设计一个Web客户端模块(实际上是Web界面)。为了保持模块化,我想在解决方案中创建一个ASP.NET项目并创建一些包含自定义Web控件的项目。
是否有人有类似的设计要求?有没有更好的/替代解决方案(链接)?你的建议是什么?

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



嗯,这取决于你所说的模块化。如果您正确构建了

WinForms应用程序,则将业务逻辑与UI逻辑分离,即
和代码。如果是这种情况,您可以重新使用您的WinForms应用程序的业务类

(如果它们是托管的),或者将它们重建为托管

类(如果它们不是),或使用Interop来使用它们(这将产生一个

的性能损失和一些复杂性,我不建议随便)。对于您的自定义控件,您使用自定义

控件的WinForms应用程序中的任何位置,创建Custome ASP.Net服务器控件来替换它们。


-

HTH,


Kevin Spencer

Microsoft MVP

..Net开发人员

每个人都会嗤之以鼻,

但有些人擅长隐藏它。


Don Huan ; < do*@kostik.de>在消息中写道

新闻:Oj ************** @ TK2MSFTNGP10.phx.gbl ...
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...


我的工作是将我们的WinForms应用程序迁移到ASP.NET。这个应用程序是非常模块化的,因此每个代码的安静可以被另一个
modul替换。有一个VS解决方案,其中包含大约60个项目(dll')。
现在我必须设计一个Web客户端模块(实际上是Web界面)。为了保持模块化,我想在解决方案中创建一个ASP.NET项目并创建一些包含自定义Web控件的项目。
是否有人有类似的设计要求?有没有更好的/替代解决方案(链接)?你有什么建议吗?

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



这篇关于帮助设计模块化ASP.NET体系结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆