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.
The first way is the low-tech method of using a simple text editor and MAMP/WAMP/LAMP to generate the server-side environment that we needed with the text editor PHP script. This is great for getting started but does not have much in the way of embellishments.
The second is Zend Studio from Zend. We spent a number of tips on this, getting a feel for it and learning how to navigate our way around it. In essence, Zend Studio gave us an interactive development environment where we could create and test PHP scripts. It interfaced with the Zend Server, but it can also function on its own with built-in facilities. It interfaced seamlessly with the Zend Frameworks. But everything you built you had to build from scratch (or else copy from something you had created previously).
The third thing we looked at was BCD Software’s offerings. There is a charge for these, of course, but then there is also a charge for Zend unless you want to do without support and updates after the first year. What BCD has to offer is twofold: an IDE similar to Zend Studio, and a set of templates or models that you can use to quickly create PHP scripts.
But we’re not quite done with our review of what’s out there.
CNX Valence PHP
Originally, you could describe Valence as an RPG development environment, but over the years that has changed as Valence has grown and matured. Today, it can best be described as a server-side, language-agnostic development environment that is based on HTML5 and Ext JS Using this format, developers can relatively easily create Rest-ful, modern apps.
Historically, RPG was the language of choice for the business logic, and you can certainly still do that. But now, CNX has added a PHP capability.
What Does It Look Like?
There are two things that make the CNX offering interesting.
The second part of this is that CNX offers a unique way of doing these PHP apps. Valence does provide models to build applications. The Nitro AutoCode application generator and Nitro Inquiry module are designed to provide “quick wins” by creating maintenance and dashboard/inquiry functions very quickly. This gives developers a chance to learn the full power of Valence and still deliver something almost immediately.
At the same time, however, Valence does not just throw you into an IDE and hope for the best. What they do have is a PHP Toolkit. This is different from the Zend Toolkit, which is designed to allow you to interface between the i and the Zend Server environment. It is similar in a way to the RPG Toolkit that comes with Valence. The RPG Toolkit, for example, is a set of web services that you can embed in your RPG program to perform complex tasks. This includes formatting JSON data, sending email, determining whether a given user is authorized to a given method, performing actions on the IFS, creating charts, etc.
Now there is also a PHP Toolkit that consists of a series of scripts that can do really neat stuff. This includes things like executing an SQL statement or a stored procedure. Or retrieving or posting a string or array from/to the browser. Each of these scripts contains the data structures and the methods required to perform the action described. And that can save you a lot of development time. For example, if you want to execute an SQL statement using PHP statements, you need several separate statements to do this. But with the script in the Toolkit, it can be done in one. Could you write this yourself? Sure, but with the Toolkit you don’t have to.
What Does It Cost?
Of course, everyone wants to know how much a piece of software costs. And, as with most products, there are a couple of options.
To start, I should mention that the Valence software is loaded only on your i. There is no component that goes on your PC unless you choose to use the Sencha Architect product to create your UI. I believe you get a certain number of licenses for this with Valance.
First, and this is what you are waiting for, there is a free version of the product, the Community Edition. This has limited (but still robust) functionality, and you can use it to create apps. It does not, however, include the Nitro components, and that is a significant fact. Once the app is created, you can distribute it to at most five users at an installation. While it is primarily oriented around allowing a developer to learn about Valence, you could use it for all your production work if that work is limited enough. The downside is that there is no support, and no updates are available to what you downloaded.
Second, the next step up is the Enterprise Edition. This is a full-function version of the product, and it comes with support and updates. The cost is per partition, in the sense that you pay one price for one partition, another price for two partitions (not double), and then a third price for three or more. The default value listed on the CNX website is $14,495 for one partition, but that’s for an unlimited number of developers (on one partition) and includes the Sencha Ext JS Developer 5 Pack (which is worth about $6K by itself) plus the Nitro apps (AutoCode, Query, iAdmin, source editor, file editor, and Instance Manager, which, of course, manages instances).
Third, the final step is the Commercial Edition that’s for software companies that are going to be using Valence to develop commercial products for sale. You have to contact CNX to get a price on this, but I am sure it is very reasonable.
To see the different versions and what they offer, you can refer to this handy chart thing.
The Bottom Line
CNX Valence is a modern, technologically advanced product that gives you a middle ground between doing everything from scratch and using standard templates that can be modified. The Toolkit offered allows you to roll your own using standard PHP classes. And for a lot of people, that’s a very comfortable way of doing things. For more information on Valence, check out the website.