MC Press Online

Sunday, Apr 30th

Last updateFri, 28 Apr 2017 10am

You are here: Home ARTICLES Programming Programming - Other

Programming - Other

TechTip: C# for RPGers: Making Stuff Happen, Part 2 - More Flow Control Structures

Rafael Victoria-Pereira

Last time around, I explained the IF statement. Now it’s time to get to know a couple more C# flow control structures.

Written by Rafael Victória-Pereira

If you read the previous TechTip of this series, you already know that the IF statement in C# is similar to its RPG counterpart. It’s true that there are differences, but in general they’re pretty much alike. Even though I didn’t mention it in the previous TechTip, you can create IF-ELSE-IF structures in C# just like you do in RPG. As you know, abusing this facility usually leads to a stairwell-like structure (if you’re using RPG /free and proper indentation) or a Find-The-Right-EndIf game (similar to Where’s Wally, but not so fun). To avoid these pitfalls, a sensible programmer uses a Select-When structure instead of nested IF-ELSE-IF blocks. There’s also a similar control flow structure in C#, under a different name: Switch-Case.

Read more ...

TechTip: Node.js JoinJS

Aaron Bartell

SQL result sets are flat for joins. That makes it more complex to process both in business logic and UI. JoinJS to the rescue!

Written by Aaron Bartell

I am currently coding a Node.js project for a customer that uses the HapiJS web framework. We had the need to create a JSON result object from DB2 that conveyed a list of employees and their department associations and send it to the browser. In short, the SQL result set looked like the below.

Read more ...

New Features in Visual Studio 2017

Joydip Kanjilal

The latest version of VS offers enhancements for performance, mobile and cloud app dev, and more.

Written by Joydip Kanjilal

Visual Studio is Microsoft's flagship development IDE for software developers wanting to develop applications that they can leverage at the managed environment. The latest version of this IDE is Visual Studio 2017, released to the public on March 7, 2017. You can take advantage of Visual Studio 2017 to build and manage applications for Android, iOS, Windows, Linux, Web, and the cloud.

Read more ...

C# for RPGers: Making Stuff Happen, Part 1 - Introducing Flow Control in C#

Rafael Victória-Pereira

Now that you know a few things about declaring variables and using methods, let’s see how to make decisions in C#, using logical operators and the IF statement.

Written by Rafael Victória-Pereira

It’s time to move to a new topic: decision making. In order to do that, you’ll need to know how to declare variables and use methods in C#. If you’re not entirely sure how to do that, go back a few TechTips to get comfortable with these things.

Read more ...

So Many Languages, So Little Time

Brian May

Believe it or not, there are programming languages on IBM i other than RPG and CL. So which one do you learn next?

Written by Brian May

My last article addressed investing in yourself and your career. That included adding new skills to your toolbelt. Many IBM i developers have yet to venture outside of the world of RPG. In fact, some haven’t even fully explored the world of RPG! As with many things, one of the biggest obstacles that prevents developers from learning is simply indecision.

Read more ...

TechTip: Trees Are Good for Climbing and More

Aaron Bartell

The “tree” command can quickly show you the structure of an IFS directory, but it’s not installed in PASE by default. Learn how to get it.

Written by Aaron Bartell

My days are in large part spent in the PASE environment on IBM i. PASE is based on AIX, and both are Linux-like in their abilities, though PASE does not contain many commands and utilities that I'd consider on the "need" list. Sometimes I'm also doing things on Linux systems and get exposed to utilities and commands that I then desire to have on PASE. Such was the case the other day when I was writing my "PASE Intro" lab for COMMON Spring 2017. I needed to print out a directory listing of parent and child directories, and I knew the Linux “tree” command would foot the bill. Well, I quickly learned it didn't exist in PASE, so this article will convey the steps I took to get it onto PASE.

Read more ...

IBM i Devs Get Some REST with OData!

Adopt the OASIS Open Data Protocol to consistently publish and consume REST services.

Written by Michael Sansoterra

In the article "Implement a Service-Oriented Architecture with REST APIs," I covered some basics about implementing a service-oriented architecture using REST APIs. In general, because the REST methodology doesn't have many standards regarding how to pass parameters, how to format the result data, etc., the implementation of these APIs can vary widely from vendor to vendor and developer to developer.


Originally started by Microsoft, the Open Data Protocol (OData) was devised in part as a means of having a standard input and output so that REST APIs based on OData would be consistent in their implementation.

Read more ...

TechTip: What Is Responsive Web Design?

Responsive Web Design (RWD) is a technique for developing Web pages that automatically re-size themselves based on the device they are being viewed on.

david_shireyWritten by David Shirey

Today, Web sites are the life blood of how we get our message across. And there is certainly no shortage of different types of devices on which to view this information. And therein lies our dilemma.

Read more ...