将大型 vb6 应用程序移至 Web 或 winform。 你决定!
我正在致力于将大型 vb6 应用程序移植到 .NET。 当前的应用程序是一个桌面应用程序,与一组本地访问数据库进行通信。 应用程序中有大约200个表格和大约100个表。 屏幕大多很复杂。 大多数显示主从关系、嵌入式电子表格中的大量行以及动态生成的编辑控件。
他们会将其移植到.NET。 我不确定他们是否想要基于网络的或 winforms 的。 对我来说,该应用程序似乎更适合 winforms。 值得庆幸的是,无论选择如何,access 数据库都将被 sql server 取代。
我选择 winform 的原因:
- 更丰富的 UI。
- 客户端缓存
- 更快的开发。 Winforms 对我来说非常高效,尽管 ASP.NET 比传统 ASP 的效率高出好几光年。 我还是宁愿在 winform 中工作。
- 可以显示更多数据并花费更少的时间来管理状态。
我计划将业务/数据层分解为一个单独的库。 库中的业务对象将能够由 winforms 或 Web 应用程序使用。
我想,如果我们首先移植到 winforms,并将 UI 和业务逻辑完全分离,我以后就可以在 Web 版本中重用业务逻辑。 鉴于业务/数据层位于独立的库中,没有 UI 依赖项。
最后,这不是我的决定,但我想听听您将大型 Windows 应用程序移动到 ASP.NET 的经验。
将大型桌面应用程序迁移到 ASP.NET 是一种怎样的体验? 您将如何处理这样的项目? 您愿意将此应用程序移植到 winforms 还是 asp.net? 为什么?
谢谢! 史蒂夫
I'm working on porting a large vb6 application to .NET. The current app is a desktop app that communicates with a set of local access databases. There are about 200 forms in the application and about 100 tables. The screens are mostly complex. Most show master-detail relationships, lots of rows in embedded spreadsheet and dynamically generated editing controls.
They will port it to .NET. I'm not sure if they will want it web-based or winforms. To me, it seems that the application is better suited for winforms. Thankfully, the access databases will be replaced with sql server regardless of choice.
My reasons for winforms:
- Richer UI.
- Client caching
- Faster development. Winforms is productive for me even though ASP.NET is light years more productive than classic ASP. I would still rather work in winforms.
- Can display more data and spend less time concerned with managing state.
I plan to breakout the business/data layer into a seperate library. The business objects in the library will be able to be used either by the winforms or web app.
I'm thinking that if we port to winforms first and have a clean seperation of UI and business logic, I will be able to reuse the business logic in a web version at a later date. Given the business/data layer is in a seperate library with no UI dependencies.
In the end, it's not my decision to make but I would like to hear your experience moving large windows apps to asp.net.
What was your experience moving a large desktop app to asp.net? How would you approach a project like this? Would you rather port this app to winforms or asp.net? Why?
Thanks!
Steve
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
移植到新的 ASP.Net Web 应用程序的一个主要优点是您将有更多的机会来清理它。
当转向 winform 时,会有很大的诱惑和压力,只是“将其移植到屏幕上”,而如果转向 Web,你将有机会在更基础的层面上进行重构和改进。
我的公司目前正在将一个相当大的遗留 VB6/Access 应用程序移植到 ASP.Net,并且通过 AJAX(现在是 Silverlight),现在可以在 Web 上的 UI 中获得真正高水平的视觉质量和复杂性。 从用户访问和部署的角度来看,也有明显的优势。
至于如何处理该项目,我使用迭代方法取得了成功——构建一个薄片(实现单个功能)来证明架构,然后根据优先级和复杂性添加功能。
One major advantage of porting to a new ASP.Net Web app would be that you will have a lot more opportunities to clean it up.
When moving to winforms, there will be a great temptation and pressure to just "port it screen for screen", while if you go to web you will have the opportunity to refactor and improve at a more fundamental level.
My company is currently porting a fairly large legacy VB6/Access app to ASP.Net, and with AJAX (and now Silverlight) it's possible to get a really high level of visual quality and complexity in the UI on the web these days. There are obvious advantages from a user access and deployment standpoint as well.
As far as how to approach the project, I have had success using an iterative approach -- build out a thin slice (implementing a single feature) to prove out the architecture, then add in features based on priority and complexity.
我建议您分阶段进行移植,以使过渡更容易。 第一阶段是将 VB6 桌面移植到 .NET 桌面(win 窗体)。
然后,在第二阶段,如果仍然需要,您可以将全部或部分 .NET 桌面移动到 ASP.NET GUI。
无论 GUI 选择如何,从 VB6 到 .NET 的步骤本身对于团队来说是相当大的。 分阶段方法将允许您的团队以更类似于当前应用程序的应用程序风格来掌握 .NET。
因此,将业务逻辑分离到可重用库中的目标对于这种分阶段的工作方法非常重要。 如果采用这种方法,您对所使用的 GUI 类型(或多个类型)拥有更大的灵活性。
例如,您可以在 ASP.NET 网站中提供所有更简单的屏幕,并使用包含用户可以根据需要下载的更复杂屏幕的辅助 WindowsForms 应用程序。 重要的是,这两者都将使用相同的业务逻辑库,它们大多只是同一应用程序的不同接口。
ASP.NET(或一般的 Web 开发)在处理状态、跨浏览器、html/css 等时需要完全不同的开发人员思维方式。
我最近致力于将大型 Delphi 桌面应用程序移植/迁移到 .NET。 目标是转向 ASP.NET,但是这完全失败了,因为现有团队的 Web 开发经验有限,并试图使用 ASP.NET 重新实现桌面应用程序。 我想说,与在 Windows 窗体中重新创建屏幕相比,这是一个更大的风险,至少最终结果是可用的并为最终用户提供一些价值。
虽然 Ajax 和 jQuery 对 Web GUI 的丰富性做出了巨大改进,但听起来您现有的应用程序有一些领域(例如数据的电子表格呈现),在桌面应用程序中更容易有效地实现。
总之,“理想的”是将业务逻辑和规则转移到 .NET,这样您就可以在以后简单地“插入”用户界面。 这可能说起来容易做起来难,但这是我通常追求的目标。
I would suggest that you do your port in stages to make the transition easier. The first stage would be to port from VB6 desktop to .NET desktop (win forms).
Then in the second stage, if still needed, you move all or parts of the .NET desktop to an ASP.NET GUI.
The step from VB6 to .NET is in itself quite large for a team to make, regardless of GUI choice. The staged approach would allow your team to get to grips with .NET in an application style more similar to the current app.
Your goal to separate business logic into re-usable libraries is therefore important for this staged approach to work. If you take this approach, you have much more flexibility about the GUI type (or types) used.
For example you could have all simpler screens provided in an ASP.NET website, with an auxillary WindowsForms app containing more complex screens that users can download as required. Importantly both of these would use the same business logic libraries, they are mostly just different interfaces to the same application.
ASP.NET (or web development in general) requires a quite different developer mindset when dealing with state, cross browser, html/css etc.
I recently worked on a port/migration of a large Delphi desktop app to .NET. The goal was to go to ASP.NET, however this fell over completely because the existing team had limited web development experience and tried to just re-implement the dektop app using ASP.NET. I'd say that this is a much bigger risk when compared to re-creating screens in Windows Forms, at least the end result will be usable and provide end-users some value.
While Ajax and jQuery have made great improvements to the richness of web GUIs, it sounds like your the existing app has some areas such as spreadsheet presentation of data that would be easier to implement efficiently in a desktop app.
In summary, the "ideal" is to move the business logic and rules to .NET in such a way that you can then simply "plug-in" a user interface at a later date. This may be much easier said then done, but that is the goal I normally aim for.
我只能说你不应该不重新开始! 在 StackOverflow 播客中,主题是您是否应该重写应用程序以获得新语言的好处,答案是否定的! Joel Spolsky 给出的例子是 Borland C++ Builder。 他们输给了微软VC++,因为他们从头开始。 然后 Jeff Atwood 继续说道,尽管 WordPress 是用 PHP 编写的(在我看来这不是一种好语言),但总体想法还是可行的。
要点:
不要重新开始,因为您会失去通过建立坚实的基础而获得的所有经验。
All I can say is that you should NOT start over! In one of the StackOverflow Podcast the subject was should you rewrite an application to get the benefits of a new language, the answer is no! The example Joel Spolsky gave was Borland C++ Builder. They lost to Microsoft VC++ because they started over from scratch. Then Jeff Atwood went on to say that even though WordPress is written in PHP (not a good language in my opinion) the overall idea worked out.
Main Point:
Don't start over because you lose all the experience you gained by building on a solid foundation.
首先,Winforms 已死。 当 WPF 已经问世近两年时,我无法理解为什么有人会使用 WinForms 启动新的桌面程序。 为什么要将您的客户从一种非常非常过时的技术(VB6)转移到另一种很快就会过时的技术? 请不要误会这一点,但除非您必须支持比 XP 更旧的 Windows 版本,否则我认为在 2009 年启动 WinForms 项目实际上是不负责任的。以下是与 WPF 相比的缺点:
现在针对 ASP.Net。 听起来您要转换的是一个相当简单的内部应用程序。 ASP.Net 就适合这样的事情。 虽然 ASP.Net MVC 几乎已经结束测试版,但它还没有像 WPF 反对 WinForms 那样反对 ASP.Net。 我们在工作中使用 ASP.Net + jQuery,效果非常好。 我们也在开发 Silverlight,您可能会关注一下。 我真的很喜欢在里面工作。 如果这是一个内部应用程序,您可能可以信赖所有浏览器上都安装了 Silverlight 插件。
现在介绍一下 WPF 与 ASP.Net 的一般优点:
WPF
ASP.Net
祝你的项目好运!
First off, Winforms is dead. Why anyone would start a new desktop program with WinForms is beyond me when WPF has been out for nearly two years. Why move your client from one technology (VB6) that is very, very outdated to another that will be outdated very soon? Please don't take this wrong, but unless you have to support versions of Windows older that XP I think it is actually irresponsible to start a WinForms project in 2009. Here are the downsides vs WPF:
Now for ASP.Net. This sounds like what you are converting is a fairly straightforward, internal app. ASP.Net is suited for just such a thing. While ASP.Net MVC is almost out of beta, it doesn't yet have the arguments against ASP.Net that WPF does have against WinForms. We do ASP.Net + jQuery at work and it works very well. We are also doing Silverlight, which you might look into. I have really enjoyed working in it. If this is an internal app, you can probably count on the Silverlight plugin being installed on all of you browsers.
Now for general pros of going to WPF vs ASP.Net:
WPF
ASP.Net
Good luck on your project!
如果您真的想疯狂,并且不介意使用最新技术,请看看 ASP.NET 和 Silverlight 3。 查看 Mix 09 的视频,有一些很好的例子可以解决这个问题。
此外,Silverlight应用程序可以在浏览器之外运行,因此能够提供桌面体验,但优点是每当您更新代码等时都会更新。我个人认为Windows类型的应用程序(包括Silverlight)是比基于 Web 的应用程序更适合数据输入(尽管使用 Ajax 确实有帮助)
If you really want to go crazy, and don't mind using the latest technologies, have a look at ASP.NET and Silverlight 3 . Looking at the video's of Mix 09, there are some great examples that deal with this.
In addition the Silverlight app can be run out of the browser, thus being able to provide the desktop experience, but with the pros of being updated whenever you update your code etc. And I personally feel that Windows type applications (so including Silverlight) are nicer for data entry purposes then web based apps (although the use of Ajax does help)