I've recently started to support a PowerBuilder 9 app which is finally being upgraded to PowerBuilder 12. I'm trying to figure out whether I should be looking at migrating to PowerBuilder Classic or .NET. It seems to me that going with PB.NET would give me more flexibility going forward, but reading the documentation doesn't give me a clear picture of what the benefits would be. Obviously, I'd be able to take advantage of WPF forms, and I'd be using the Visual Studio Shell, but I don't know if those are good enough reasons to change.
问题:
回答1:
Good question, and not a trivial one.
On the plus side, you get WPF controls and layout control. If you're a developer that isn't planning to go too far afield, that will get you pretty, shiny controls, skinability, and resize/scaling built into the painter. If you're an uber-geek, you can start doing things like embedding controls (think a progress bar inside a control button to represent a count-down timer on the button that will be the default action when time runs out on a timed dialog), although when both you and PB are trying to do fancy things with your XML, I'm guessing that you might step on each others' toes from time to time.
Also, you get easy access to the vast .NET library of functions, in addition to PowerScript. Again, the easy-going developer may not get much advantage out of that, but the nose-to-the-screen type will get a kick out of easily building SMTP functionality into their app.
On the down side, you can probably count on the migration going not quite as smoothly as a PB to PB migration. If you need it working tomorrow, starting on a PB to PB.NET migration today probably isn't the way to go. Some things will break and need fixing, and every window will need hands on to at least take advantage of the resizing.
The other down side that I found was performance, particularly app start up (and I hear this is a common complaint among WPF developers, not just PB.NET developers). I was expecting everything to run faster, but found it to be a mixed bag.
One other point: The latest PB (at time of writing) is 12.6, which is a maintenance patch of 12.5. If you buy 12.0, you won't be able to upgrade for free; the jump between 12.0 and 12.5 is a "major" release that requires a priced upgrade. Maybe you want the n-1 version, but if not, target buying 12.5.
Good luck.
@Matt Balent indirectly brought up another good point in the comments. Moving from PB9 to PB12, if you're an experienced PB developer, you can probably be productive the same day without missing a beat. Moving to PB.NET will entail a non-trivial learning curve. The IDE is significantly different, so even setting a Default attribute on a CommandButton on the first day may be frustrating (... not impossible, but if that's your first task, I'd plan 30 minutes instead of 30 seconds).