Tag Archives: PowerScript

Part 1: Xcode and Swift for PowerBuilder developers


via Xcode and Swift for PowerBuilder developers – P… | SCN.

I’ve been a developer most of my career, and I’ve worked with a number of different programming languages.  I spent most of the 90’s and early 00’s working in PowerBuilder.  I still think it’s one of the cleanest, easiest to understand Object-Oriented programming environments available today.  (And, yes, it’s still available and has a bright future with Appeon.)

But with all of PowerBuilder’s strengths, it never really did mobile all that well, and it remains a Windows-only IDE to this day.  That rules it out for Mac or iOS development.  If you’re targeting those platforms, there’s really only one game in town, and it comes from Apple.  The IDE is called Xcode, and (until recently), you programmed in a language called Objective-C.

In my opinion, Objective-C is just about the exact opposite of the PowerScript language.  It’s a variant of the C language (which I never used all that much), so I find it extremely difficult to read and even more challenging to learn.  But, if you wanted to write iOS apps, this was a hill you had to climb…

In 2014, Apple introduced the Swift programming language as a second option for development in Xcode, and believe me, it’s a VAST improvement.  Simpler syntax rules, cleaner code structures, and much easier to read and understand.

So I thought I’d start a quick series of blog posts that compare and contrast Xcode and Swift with PowerBuilder and PowerScript.  We’ll start with the basics, like variable and function declarations, and work our way up to the more complex topics like delegates, protocols, and closures.

Part 2: Xcode and Swift for PowerBuilder developers


via Xcode and Swift for PowerBuilder developers: Pa… | SCN.

This installment of the series will look exclusively at the structure and format of the code within Swift and PowerScript.  We’ll talk about the basic differences in the way code is organized in Swift vs. PowerBuilder, and we’ll look at specific examples of code blocks, IF/THEN/ELSE statements, and CASE vs. SWITCH statements.  Part 1 can be found here.

Here’s a typical (although rather boring) block of Swift code, shown in an Xcode playground.