MC Press Online

Sunday, Mar 26th

Last updateFri, 17 Mar 2017 12pm

You are here: Home ARTICLES Programming Scripting

Programming / Scripting

TechTip: Node.js Unit Testing

Aaron Bartell

You made a change. Did it break anything else? Not sure, unless you have automated testing.

Written by Aaron Bartell

Have you ever fixed one thing in your software only to find that you broke something else in the process? No? Me neither. So this article is for those "other people." OK, if I'm completely honest, I have bugs and I don't do a good job of automating my integration tests.

Read more ...

TechTip: DB2 Access for PHP

David Shirey

Last month, we looked at three ways you can access data files in PHP: mysql_*, mysqli_*, and the PDO API set. But there is one more option. Bet you can’t wait to see what it is.

Written by Dave Shirey  

One of the primary reasons for involving PHP in our otherwise pure RPG ILE /free world is to allow us to develop apps that have a GUI interface yet access data from our DB2 (or whatever) database.

Database access in PHP is done via an API set that contains the commands necessary to connect to your database (remember, PHP runs on the server while your database is probably local or at the very least not on the same server as PHP is running in) and then access and return the required information to the PHP program.

Read more ...

TechTip: CNX Valence for PHP

PHP help tools. That’s what we’re looking at. And this month, we are looking at the CNX Valence product.

david shireyWritten by Dave Shirey

Part of getting familiar with PHP is getting familiar with the way in which PHP relates to the IBM i. Over the past year, we have looked at different options for creating PHP scripts that we might use with the i.

Read more ...

The JavaScript Event Loop for IBM i Developers

Understanding the Event Loop is critical to JavaScript development both in the browser and in Node.js.

brian mayWritten by Brian May

In my day-to-day work, I switch between RPG and JavaScript development constantly. While I do not consider myself the ultimate authority on JavaScript, I do have a solid working knowledge of the language. There was a time when JavaScript was only used for browser manipulation at runtime, but with the rise of Node.js, which is now available on IBM i, JavaScript is becoming a major player for server-side development as well.

Read more ...

TechTip: Debugging Remote PHP Scripts

So far, we’ve looked at how to debug only local scripts. But what happens when your program moves to production? Is there even the slightest possibility that you will have to debug it someday?

david shireyWritten by David Shirey  

If you someday have to debug a script that’s in production, you’ll discover pretty quickly that the debug techniques we’ve looked at so far do not work. They’re for local scripts only, and once you put them beyond the bounds of your PC, you need to use something else, something called “remote debugging,” if you want to play with them.

Read more ...

TechTip: DB2 Adapter for Shells

aaron bartellIf you're anything like me, you want to participate in the open-source community but don't want to screw things up. I invite you to participate in a safer side of open source.

Written by Aaron Bartell

In the past couple of articles (1 and 2), I've focused on higher-level community musings. I did this to encourage engagement and convey where engagement is already taking place. In short, open source on IBM i is growing significantly faster than it has in the past.

 

Now it's time to dive back into some geekier topics.

Read more ...

TechTip: Setting Up PHP Scripts on the IBM i

So far, we have sort of assumed that our scripts are all kept on your PC, and that was all well and good. But we live in the i world, so it’s reasonable to expect that’s where we’ll keep our scripts.

david shireyWritten by David Shirey  

Up to this point, all of the scripts that we have written and debugged and otherwise fooled around with have been kept on your PC in a folder that your browser could access, and that depended on your operating system.

Read more ...

TechTip: Debugging PHP in Studio

We started through Zend Studio debugging a month or so ago. Now it’s time to pick up that thread and continue.

david shireyWritten by David Shirey

You haven’t worked on this (using Zend Studio to debug your scripts) at all in the last two months, have you?

 

No. Don’t try to explain. I’ve heard it all by now: “I was busy.” “I was tired.” “My dog ate my homework.” Yeah, whatever. Let’s just get going.

Read more ...