Java 程序员的 PowerBuilder?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/605619/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 13:02:53  来源:igfitidea点击:

PowerBuilder for a Java programmer?

javapowerbuilder

提问by Olvagor

A friend of mine uses in his company an ERPsoftware written in PowerBuilder. Unfortunately the (one and only) developer is going into retirement soon. My friend really likes the software and wants to keep using it for at least ten more years, so my friend decided to buy the source code.

我的一个朋友在他的公司使用用 PowerBuilder 编写的ERP软件。不幸的是,(唯一的)开发人员很快就要退休了。我朋友很喜欢这个软件,想至少再用十年,所以我朋友决定购买源代码。

He wants to start a business to maintain the software and develop new features. At the moment there are probably about 50 installations of that software out in the wild and he already knows of a bunch of potential buyers.

他想创业来维护软件和开发新功能。目前,该软件的安装量可能约为 50 次,而且他已经知道很多潜在买家。

Now he's searching for a developer and asked me... I did a little C/C++ programming, a bit of VB and a bunch of other languages but in the last years I earned my money by writing Java web applications. From what I read, PowerBuilder looks quite antiquated to me, there are hardly any tutorials out there, no open source frameworks, awkward version control, didn't even read about any test frameworks. People here on StackOverflow say they hope, the language/IDE is dead. Additionally the code I'd maintain is completely undocumented and untested.

现在他正在寻找一名开发人员并问我...我做过一些 C/C++ 编程、一些 VB 和一些其他语言,但在过去的几年里,我通过编写 Java Web 应用程序来赚钱。从我读到的内容来看,PowerBuilder 对我来说看起来很过时,那里几乎没有任何教程,没有开源框架,笨拙的版本控制,甚至没有阅读任何测试框架。StackOverflow 上的人们说他们希望语言/IDE 已经死了。此外,我要维护的代码完全没有记录和未经测试。

Do you think it's possible, for someone who never even heard of PowerBuilder before, to maintain such a software?

对于以前从未听说过 PowerBuilder 的人,您认为有可能维护这样的软件吗?

EDIT: okay, thanks for your answers. We decided to kick the old application completely and re-write it in an up-to-date-language.

编辑:好的,感谢您的回答。我们决定彻底抛弃旧的应用程序并用最新的语言重新编写它。

回答by Colin Pickard

Yes, it's possible. Powerbuilder is not a hard language to pick up, particularly if you have used VB already.

是的,这是可能的。Powerbuilder 不是一门难学的语言,特别是如果您已经使用过 VB。

The Powerbuilder community is far smaller than what you may be used to with e.g. Java, but it does exist. The best place (other than SO!) to ask questions are the sybase.public.powerbuilder.*newsgroups.

Powerbuilder 社区远小于您可能习惯使用的 Java 社区,但它确实存在。提问的最佳地点(除了 SO!)是sybase.public.powerbuilder.*新闻组。

For unit testing, try PowerUnit, and for source control, you can use Subversion via PBSCCProxy, TamTam SVN SCC, or PushOK SVN SCC proxy.

对于单元测试,请尝试PowerUnit,对于源代码控制,您可以通过PBSCCProxyTamTam SVN SCCPushOK SVN SCC 代理使用 Subversion 。

It's been a niche language for a long time now. In my opinion this is due the upfront cost of the tools required, which is essentially blocking anyone new from considering it.

很长一段时间以来,它一直是一种利基语言。在我看来,这是由于所需工具的前期成本,这基本上阻止了任何新人考虑它。

The future is reasonably bright though: Sybase is flourishing, committed to PowerBuilder, and regularly announcing progress towards version 12, which will be a full .NET language like C# and VB.NET, and will ship with an IDE based on VisualStudio. You will be able to directly migrate your code to version 12, no rewrites required.

不过,未来相​​当光明:Sybase 正在蓬勃发展,致力于 PowerBuilder,并定期宣布向第 12 版迈进,这将是一个完整的 .NET 语言,如 C# 和 VB.NET,并将随基于 VisualStudio 的 IDE一起提供。您将能够直接将代码迁移到版本 12,无需重写。

回答by Sam

I started my career as a PowerBuilder developer, but quickly changed to java and python, as soon as I realized PB was almost a dead language.

我的职业生涯始于 PowerBuilder 开发人员,但当我意识到 PB 几乎是一门死语言时,我很快就转向了 Java 和 Python。

Also, even if there are tools that can be used to apply programming "good practices", they are not widely known and somewhat expensive, so I've had to work even without version control (!!), left aside automated testing or continuous integration.

此外,即使有可用于应用编程“良好实践”的工具,它们也不广为人知且有些昂贵,因此即使没有版本控制(!!),我也不得不工作,撇开自动化测试或持续一体化。

It is a language in which almost anyone can start to build usable apps in a short period of time and with little training, and the apps are built really fast, in contrast with java, that demands a period of learning until a developer can be productive, and even then, a webapp takes time to be developed.

这是一种语言,几乎任何人都可以在短时间内开始构建可用的应用程序,并且几乎不需要培训,并且应用程序的构建速度非常快,与 Java 相比,需要一段时间的学习,直到开发人员可以高效工作,即便如此,开发 webapp 也需要时间。

But the payback is with maintenance, that quickly becomes a nightmare. Even a minor change in the database like a type change in a database column can destroy every datawindow (the PB ubiquitous data-access component) that refers to it.

但回报是维护,这很快就变成了一场噩梦。即使是数据库中的微小更改,例如数据库列中的类型更改,也会破坏引用它的每个数据窗口(PB 无处不在的数据访问组件)。

It's pretty much similar to VB, in that as almost anyone can develop applications in it, with very little programming knowledge, the average quality of applications is very low, with unmanageable database coupling and plagued of bad coding practices.

它与 VB 非常相似,因为几乎任何人都可以在其中开发应用程序,编程知识很少,应用程序的平均质量非常低,数据库耦合难以管理,并且受到不良编码实践的困扰。

My advice is not to build a Developer career in such kind of language unless the money justifies it, and in that case, continue training yourself in alternative technologies as a "plan b" to not become obsolete along with the language.

我的建议是,除非资金证明,否则不要用这种语言建立开发人员职业生涯,在这种情况下,继续在替代技术方面培训自己,作为“计划 b”,以免随着语言而过时。

And always work to keep your coding and problem solving skills "in good shape" as this kind of language does not help in that.

并且始终努力使您的编码和解决问题的技能“处于良好状态”,因为这种语言对此无济于事。

回答by Bernard Dy

Yes, any competent programmer, and even some not-so-competent ones can use PowerBuilder. However, I'd disagree somewhat with one of the earlier answers. It is different from pre-.Net VB in one sense: it supports true OO principles (encapsulation, inheritance, and inclusional polymorphism [but not operational polymorphism via Interfaces as in C# and Java]). Classic VB didn't have inheritance.

是的,任何称职的程序员,甚至一些不太称职的程序员都可以使用 PowerBuilder。但是,我有点不同意较早的答案之一。它在某种意义上不同于 .Net VB 之前的版本:它支持真正的 OO 原则(封装、继承和包含多态性[但不是像 C# 和 Java 那样通过接口操作的多态性])。经典 VB 没有继承。

Other answers from Paul Lefebvre and Colin Pickard are correct: PB is still alive though more of a niche language than it used to be, and Sybase is indeed moving it in the direction of .Net. As for source control, PB supports some interfaces (we use it with VSS) but I'm thankful for Colin's nice set of links, which may come in handy in the future.

Paul Lefebvre 和 Colin Pickard 的其他答案是正确的:PB 仍然存在,尽管它比过去更像是一种小众语言,而且 Sybase 确实正在朝着 .Net 的方向发展。至于源代码控制,PB 支持一些接口(我们将它与 VSS 一起使用),但我感谢 Colin 提供的一组不错的链接,这些链接将来可能会派上用场。

Frameworks: the most common one is the PowerBuilder Foundation Class, which Sybase open sourced years ago.

框架:最常见的是 PowerBuilder Foundation Class,它是 Sybase 多年前开源的。

My caveat to you is this: I said above that people didn't have to be particularly strong programmers to write PB. PB is easy to learn but takes time to master. It had its biggest days in the late 90's, when anyone that could double-click on a Windows icon to launch an app thought they were a programmer. Despite truly supporting OO, most PB apps are not well designed and well written apps. They're usually total hack jobs (a criticism of the lack of experienced developers and immaturity of software development at the time, not of PB itself, which is still a very powerful tool). If you are inheriting a code base that is truly easy to maintain and manage, you are in the minority. PB code can nearly always be classified as legacy code. The good news is that there is plenty of challenge. You will have many quick-win refactoring opportunities and plenty of production support.

我对你的警告是:我在上面说过,编写 PB 的人不必是特别强大的程序员。PB 很容易学习,但需要时间来掌握。它在 90 年代末度过了最辉煌的日子,当时任何可以双击 Windows 图标来启动应用程序的人都认为他们是一名程序员。尽管真正支持 OO,但大多数 PB 应用程序都不是精心设计和编写好的应用程序。它们通常完全是黑客工作(批评当时缺乏经验丰富的开发人员和软件开发的不成熟,而不是 PB 本身,它仍然是一个非常强大的工具)。如果您正在继承一个真正易于维护和管理的代码库,那么您就是少数。PB 代码几乎总是可以归类为遗留代码。好消息是有很多挑战。

回答by AndersK

With the risk of sounding biased I think PB is one of the better RAD tools out there and the new version PB12 scheduled next year will make it once again interesting since it uses the VSShell from Visual studio as its new IDE (Intellisense etc). I am currently busy working in the compiler team adding all the .NET goodies to PowerScript that one is used to from C# like delegates, interfaces, attributes etc but still keeping the language simple to use. PB is also one of the few development platforms that provide migration from older to newer versions and the new PB12 is no exception. The applications generated by PB12 will be modern looking using WPF and later Silverlight for post PB12 so I am quite excited. I am not a PB developer per se (C++) but I still think for producing C/S apps fast its hard to beat.

由于听起来有偏见的风险,我认为 PB 是更好的 RAD 工具之一,明年计划的新版本 PB12 将使它再次变得有趣,因为它使用 Visual Studio 的 VSShell 作为其新的 IDE(Intellisense 等)。我目前正忙于在编译器团队中工作,将所有 .NET 好东西添加到 PowerScript 中,人们习惯于从 C# 像委托、接口、属性等,但仍然保持语言易于使用。PB 也是少数提供从旧版本到新版本迁移的开发平台之一,新的 PB12 也不例外。PB12 生成的应用程序将使用 WPF 和后来的 Silverlight 用于 PB12 后的现代外观,所以我很兴奋。我本身不是 PB 开发人员(C++),但我仍然认为快速生成 C/S 应用程序很难被击败。

回答by AndersK

It depends on the technical quality of the original application whether migrate to another language is feasible at all.

迁移到另一种语言是否可行取决于原始应用程序的技术质量。

BEFORE YOU READ MY "PB IS GOOOD": I'm a PowerBuilder developer since '93. PowerBuilder is very much alive and kicking. Yes a lot of people left the language shortly after the millenium but quite a few have returned later. No I don't earn money selling PB!

在您阅读我的“PB 很好”之前:我从 93 年开始成为 PowerBuilder 开发人员。PowerBuilder 非常活跃。是的,很多人在千禧年后不久就离开了该语言,但很多人后来又回来了。不,我卖PB不赚钱!

The biggest differentiator between PowerBuilder applications and any other tool is the DataWindow technology. It is such a strong tool in the hands of an knowledgeable developer. Examples: Dynamic creation of optimal SQL for INSERT/UPDATE/DELETE. Close to every property of everything can be an expression using data in the DW buffers. DropDown DWs are so cool. DW and the rest of PB is truly DBMS independent!

PowerBuilder 应用程序与任何其他工具之间的最大区别在于 DataWindow 技术。在知识渊博的开发人员手中,它是一个如此强大的工具。示例:为 INSERT/UPDATE/DELETE 动态创建最佳 SQL。几乎所有事物的每个属性都可以是使用 DW 缓冲区中的数据的表达式。DropDown DW 非常酷。DW 和 PB 的其余部分真正独立于 DBMS!

How important is code completion when many of my DataWindows only need 4 function calls anyway?

当我的许多 DataWindows 只需要 4 个函数调用时,代码完成有多重要?

  • Define DB connection >> dwData.SetTransObject(SQLCA)
  • Read all data from DB >> dwData.Retrieve()
  • Write data to DB >> dwData.Update(true, false)
  • Reset when committed >> dwData.ResetUpdate( )
  • 定义数据库连接>> dwData.SetTransObject(SQLCA)
  • 从 DB >> dwData.Retrieve() 读取所有数据
  • 将数据写入 DB >> dwData.Update(true, false)
  • 提交时重置>> dwData.ResetUpdate()

My bet: If the original developers knew how to really exploit DataWindows - any estimates you make on migration to Java or C# will not even come close to what will actually happen. If they didn't: The application is just another application that does data binding differently than your new tool.

我敢打赌:如果最初的开发人员知道如何真正利用 DataWindows - 您对迁移到 Java 或 C# 所做的任何估计都不会接近实际发生的情况。如果他们没有:该应用程序只是另一个与您的新工具进行数据绑定不同的应用程序。

What you loose when using PowerBuilder? You need to accept that the 4GL and its VM are designed as they are - no access to the source code of the VM so you can't make your own VM customizations. No turning off the NULL support to increase speed. No changing the event order by rewriting the VM's event manager. 4GL means less lines of code. DataWindow means a lot less LOC. 4GL means less geaky bit tweaking.

使用 PowerBuilder 时会丢失什么?您需要接受 4GL 及其 VM 是按原样设计的 - 无法访问 VM 的源代码,因此您无法进行自己的 VM 自定义。无需关闭 NULL 支持以提高速度。无需通过重写 VM 的事件管理器来更改事件顺序。4GL 意味着更少的代码行。DataWindow 意味着更少的 LOC。4GL 意味着更少的调整。

/MicKr- BTW: PocketBuilder is PB for Windows Mobile - cool idea!

/MicKr- 顺便说一句:PocketBuilder 是 Windows Mobile 的 PB - 好主意!

回答by Paul Lefebvre

Yes, you would certainly be able to learn PowerBuilder. Whether you want to is a question only you can answer, though.

是的,您当然可以学习 PowerBuilder。不过,您是否愿意是一个只有您可以回答的问题。

I used PowerBuilder for many, many years (versions 4 through 9). There were parts I truly liked. It's a great way to build business applications. It's object-oriented and the DataWindow is a wonderful technology.

我使用 PowerBuilder 很多年了(版本 4 到 9)。有些部分我真的很喜欢。这是构建业务应用程序的好方法。它是面向对象的,DataWindow 是一项很棒的技术。

But it has its bad points as well. The IDE is archaic. The code editor is simplistic (no code completion, for example). Integration with source control is annoying and the community is pretty small. And it's Windows-only.

但它也有它的缺点。IDE 是过时的。代码编辑器很简单(例如,没有代码完成)。与源代码控制的集成很烦人,而且社区很小。它仅适用于 Windows。

There is a magazine (PowerBuilder Developer's Journal - SYSCON), but it's pretty thin these days. Sybase does appear to have some neat things up their sleeves for future versions of PowerBuilder, however.

有一本杂志(PowerBuilder Developer's Journal - SYSCON),但现在很薄。然而,Sybase 似乎确实为 PowerBuilder 的未来版本做好了准备。

Personally, I liked it enough that I would go back to it if an opportunity arose.

就我个人而言,我很喜欢它,如果有机会我会回到它。

回答by Dheer

I worked on powerbuilder quite sometime back, version 6.5 Its quite easy to use and one can compare it to VB. I feel it would be quite easy to maintain an application and do small fixes and enhance the system. There are quite a few companies that still use powerbuilder and maintain old application.

很久以前我在 powerbuilder 上工作过,版本 6.5 它非常易于使用,可以将其与 VB 进行比较。我觉得维护一个应用程序、做一些小的修复和增强系统会很容易。有不少公司仍在使用powerbuilder并维护旧应用程序。

回答by Humberto Casta?eda

Powerbuilder is very easy, and you will find datawindows objects very helpfull to make reports, interfaces, forms, etc..

Powerbuilder 非常简单,您会发现 datawindows 对象对于制作报告、界面、表单等非常有帮助。

If you know visual basic, it will be easier

如果你知道visual basic,那会更容易

i learned powerbuilder in 2 months.

我在 2 个月内学会了 powerbuilder。

A disadvantage of powerbuilder is the cost per license.

powerbuilder 的一个缺点是每个许可证的成本。