VB到Python的迁移 [英] VB to Python migration

查看:102
本文介绍了VB到Python的迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个用VB6编写的程序(超过100,000行代码和230 UI

屏幕),我们希望从VB中获得更好的语言。

计划已超过10年,已经从VB3移植到

VB6,这项工作耗时超过两年。我们想把它移植到
Python,但我们需要继续提供升级和修复

当前的VB6版本。有没有人知道我们可以采用的方式

一次重写这个,一次一个屏幕,用Python,并从现有程序调用屏幕




我们也在寻找一个可供使用的图形工具包。 IronPython带有它'

..NET绑定和与Visual Studio集成的能力看起来不错,

但是在口中留下了不好的MS味道。


我们目前使用MS Access后端,需要迁移到正确的
SQL服务器。我们需要为SQL Server保留选项(对于想要使用现有基础架构的客户

)以及类似MySQL或

PostgreSQL的选项。但与此同时,我们需要能够从Python访问一个

MSAccess(Jet)数据库。


任何答案/建议/指针都很大赞赏。


谢谢,


Josh Isted

We have a program written in VB6 (over 100,000 lines of code and 230 UI
screens) that we want to get out of VB and into a better language. The
program is over 10 years old and has already been ported from VB3 to
VB6, a job which took over two years. We would like to port it to
Python, but we need to continue to offer upgrades and fixes to the
current VB6 version. Does anybody know of ways we could go about
rewriting this, one screen at a time, in Python, and calling the screens
from the existing program?

We are also looking for a graphics toolkit to use. IronPython with it''s
..NET bindings and ability to integrate with Visual Studio looks good,
but leaves that bad MS taste in the mouth.

We currently use a MS Access back end and need to migrate to a proper
SQL server. We need to leave options open for SQL Server (for customers
who want to use existing infrastructure) and something like MySQL or
PostgreSQL. But in the mean time, we need to be able to access an
MSAccess (Jet) database from Python.

Any answers/suggestions/pointers are greatly appreciated.

Thanks,

Josh Isted

推荐答案

Josh写道:
Josh wrote:
我们有一个用VB6编写的程序(超过100,000行代码和230个UI屏幕),我们希望从VB中获得更好的代码
语言。该程序已有10多年的历史,已经从VB3移植到VB6,这项工作耗时超过两年。我们希望将它移植到Python,但我们需要继续为当前的VB6版本提供升级和修复。有没有人知道我们可以怎样重写这个,一次一个屏幕,用Python,并从现有程序调用屏幕?

我们也在寻找用于图形工具包。 IronPython具有.NET绑定和与Visual Studio集成的能力
看起来不错,但在口中留下了不好的MS味道。

我们目前使用MS访问后端并需要迁移到正确的SQL服务器。我们需要为SQL Server打开选项(对于想要使用现有基础架构的客户)以及像MySQL或PostgreSQL这样的东西。但与此同时,我们需要能够从Python访问MSAccess(Jet)数据库。

任何答案/建议/指针都非常感谢。

谢谢,

Josh Isted
We have a program written in VB6 (over 100,000 lines of code and
230 UI screens) that we want to get out of VB and into a better
language. The program is over 10 years old and has already been
ported from VB3 to VB6, a job which took over two years. We would
like to port it to Python, but we need to continue to offer
upgrades and fixes to the current VB6 version. Does anybody know of
ways we could go about rewriting this, one screen at a time, in
Python, and calling the screens from the existing program?

We are also looking for a graphics toolkit to use. IronPython with
it''s .NET bindings and ability to integrate with Visual Studio
looks good, but leaves that bad MS taste in the mouth.

We currently use a MS Access back end and need to migrate to a
proper SQL server. We need to leave options open for SQL Server
(for customers who want to use existing infrastructure) and
something like MySQL or PostgreSQL. But in the mean time, we need
to be able to access an MSAccess (Jet) database from Python.

Any answers/suggestions/pointers are greatly appreciated.

Thanks,

Josh Isted




对于数据库,您应该使用SQLObject(sqlobject.org)模块。


Nic



For the Database, you should use the SQLObject(sqlobject.org) module.

Nic


230个UI屏幕很多。这种性质的应用程序不是人们通常用Python做的事情(虽然我很乐意看到有人给我看好

错误)。您正在构建一个可能无需在任何地方运行的GUI应用程序

除了在Windows上,可能大部分内容都是编辑和

报告数据库中的数据。这是一个非常有用的任务4GL工具,比如

Visual Basic是为它创建的。


VB6在很久以前肯定已经过时了你现在和你一起>
应该可以进行切换,但不要打折

专门用于这个领域的工具,如Visual Studio.NET和Delphi。

Python是一个很棒的通用语言,但上面的工具是在这个非常特定的b $ b特定域中可用于Python的工具之前的跳跃式界限。此外,您的团队已经熟悉了

RAD范例。就像Python一样简单,需要一段时间来开发新语言的专业知识和它的范例(特别是当它是这样一个飞跃时--BB和Python几乎处于

频谱的两端。


IronPython有很多承诺,但还不够成熟,不能打赌

项目足够大,需要2年(或更长时间)才能开发。在那个

项目大小的情况下,除非你有足够的资金在出现问题时有足够的资金来缓冲,否则尝试任何冒险都是不明智的。我不是建议反对Python的b $ b,只是非常仔细地计划你开始使用什么



开始使用Python逐渐在你的发展中。将一些

功能重构为COM组件,以便初学者简化你的VB

代码。当Python正在做很多繁重的工作时,你已经准备好了b $ b进行更改。当你准备好完全切换时,你会知道



就个人而言,对于这样的项目,我会选择Borland Studio (它是
有ECO,这对于数据驱动的GUI来说是一个巨大的优势)和

用Boo(一种类似.NET的.NET语言)补充它。

230 UI screens is a lot. An app of that nature is not something people
commonly do in Python (although I would be happy to see people show me
wrong). You are building a GUI app that likely need not run anywhere
except on Windows and perhaps most what of what is does is edit and
report on data from the database. This is the very task 4GL tools like
Visual Basic were created for.

VB6 has certainly been outdated for quite a while ago now and you
should probably make the switch but don''t discount the tools that
exactly specialize in this domain such as Visual Studio.NET and Delphi.
Python is a great general purpose language but the above tools are
leaps and bounds ahead of the tools available to Python in this very
specific domain. Additionally your team already is familiar with the
RAD paradigm. As easy as Python is, it takes a while to develop
expertise in a new language and it''s paradigms (especially when it is
such a leap - VB and Python are almost at the opposite ends of the
spectrum).

IronPython has a lot of promise but is not mature enough yet to bet a
project large enough to take 2 years (or more) to develop. At that
project size, it is not sane to attempt anything adventurous unless you
have have enough funds to buffer when things go wrong. I am not
recommending against Python, just to plan VERY VERY carefully on what
you embark on.

Start using Python gradually in your development. Refactor some
functionality into COM components for starters to simplify your VB
code. When Python is doing much of the heavy lifting, you are ready to
make the change. By the time you are ready to make the full switch, you
will know.

Personally, for a project like this, I would go with Borland Studio (it
has ECO which is a tremenduous advantage for data driven GUIs) and
supplement it with Boo (a Python like language for .NET).


在星期五,2006年1月27日23:48:51 +0000,Josh写道:
On Fri, 27 Jan 2006 23:48:51 +0000, Josh wrote:
我们有一个用VB6编写的程序(超过100,000行代码和230 UI
屏幕)我们希望从VB中获得更好的语言。
程序已有10多年的历史,已经从VB3移植到了VB6,这项工作耗时超过两年。我们想将它移植到Python,但我们需要继续为当前的VB6版本提供升级和修复。有没有人知道我们可以用什么方式来重写这个,一次一个屏幕,用Python,并从现有程序调用屏幕



我对VB知之甚少,但是如果它可以调用外部程序,那么它可以从命令行调用Python程序。 b。 br />

[snip]

非常感谢任何答案/建议/指示。
We have a program written in VB6 (over 100,000 lines of code and 230 UI
screens) that we want to get out of VB and into a better language. The
program is over 10 years old and has already been ported from VB3 to
VB6, a job which took over two years. We would like to port it to
Python, but we need to continue to offer upgrades and fixes to the
current VB6 version. Does anybody know of ways we could go about
rewriting this, one screen at a time, in Python, and calling the screens
from the existing program?
I know little about VB, but if it can call external programs, then it
should be able to call a Python program from the command line.

[snip]
Any answers/suggestions/pointers are greatly appreciated.



我建议你雇一对经验丰富的Python开发人员,选择半个b
十几个屏幕,说三个简单的屏幕和三个复杂的屏幕,并用Python构建它们b
。这将让你知道涉及多少工作。

不要让你的VB开发人员尝试自己移植它,这是一个食谱

for灾难:他们将尝试学习Python,最终将用Python编写
VB代码,这肯定是缓慢,低效,笨重和错误。


您可能还想考虑使用Web前端。如果您的GUI应用程序

只使用简单的控件,如文本字段和按钮,那么Web前端
可能会简化很多事情。


祝你好运。


-

史蒂文。


I suggest you hire a couple of experienced Python developers, pick half a
dozen screens, say three simple screens and three complex ones, and build
them in Python. That will give you an idea of how much work is involved.
Don''t get your VB developers to try to port it themselves, that''s a recipe
for disaster: they will be trying to learn Python, and will end up writing
VB code in Python, which is sure to be slow, inefficient, bulky and buggy.

You may also like to think about using a web front end. If your GUI app
only uses simple controls like text fields and push buttons, a web front
end might simplify things a lot.

Good luck.

--
Steven.


这篇关于VB到Python的迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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