Archive

Archive for the ‘WebSmart’ Category

Zend DBi announcement is good news for WebSmart and Clover users

October 17th, 2011 No comments

For those of you using WebSmart or Clover to access MySQL on IBM i you may have been concerned about Oracle’s announcement earlier this year that they would no longer support MySQL on IBM i. Although we believe this would have had a minimal short term impact we are very pleased by Zend Technologies’ recent announcement of a December release of an IBM i-specific version of the MySQL database that they will develop, maintain and support.

The Zend Server 5.5 for IBM i release will include Zend DBi, which has been described as a ‘drop in replacement’ for MySQL. This is good news for IBM i shops who deploy pre-packaged or already develop PHP and MySQL applications.

Since last December, when Oracle announced plans to drop support for MySQL on many operating systems including i5/OS, IBM i PHP developers have been left wondering who, if anyone, will maintain the database.  The MySQL project is open source, so developers could download and create binaries, but that’s much easier said than done!  With this announcement Zend has moved into this space with the upcoming release of Zend DBi.

Changes that Zend makes to the code base will be posted back to the MySQL open source project.  Zend has no immediate plans to make the Zend DBi project open source though.  The initial release of Zend DBi will be functionally identical to the current release of MySQL shipped with Zend Server 5.1.  Moving forward there is the potential for some divergence as the code base is maintained and features added. We’ll be keeping an eye on these developments.

WebSmart and Clover clients can now have a greater degree of confidence that the classic PHP and iAMP stack will be supported on IBM i although we may have to rename the stack iADP.

More good news is that IBM will continue to support the IBMDB2i storage engine, which enables MySQL data to be stored in DB2/400 and accessed using traditional DB2 functions. For those of you interested in IBMDB2i we’ve developed a free utility called DB2iToMySQL to help you create MYSQL tables with that engine.

If you weren’t aware that you can create web reports over MySQL with Clover Query that’s probably because we just released a new version with that feature last week. You can read more details on the Clover new features page.

Read the full Zend DBi announcement in IT Jungle >>

WebSmart 8.9 is now available for download

September 28th, 2011 No comments

Some of the features and fixes are:

New Features
  • PHP debugger; same feature set as the ILE debugger
  • Clover job scheduler
  • Clover can access non-iSeries databases
  • PHP license keys: site license, limited seat license, stand-alone (no iSeries needed)
  • PHP now has a ‘getparm’ function (actually called xl_get_parameter).
  • Formatting changes to the PHP templates to make them easier to read
  • New PML functions for hashing
  • New PML function ‘addheader’; write any http header you want
  • Support for calculated fields in SQL templates
  • Support for creating record filter in some PHP templates
Enhancements
  • Download generator files upon first defining a system (for new installs)
  • An optional ‘FOR FETCH ONLY’ clause can be appended to Clover queries
  • XSS protection code added to the PHP templates
  • Reduce the number of messages appear after a failed compile
  • Improved the default toolbar positioning
  • Updated the trial banner
  • User-customizable extensions; if you want your .zork files to be color coded as PHP (for example)
  • Database reconciliation now works with JDBC as well as PHWs
  • FTP now supports ascii transmission
  • setcookie/dltcookie performance improvements
Fixes
  • TIMExxx functions now work correctly
  • Removed an incorrect “Object names cannot be blank” message box
  • PHP validation improvement for quoted strings
  • SQL utility should work better when varying length fields are involved
  • Visual HTML editor plays nice with JavaScript
  • Update the ‘Info’ tab
  • Fix memory leak in XML code
  • Made the html more consistent with the declared doctype

The new version is available from our client portal myBCDSoftware or from our public site.

Categories: WebSmart Tags: ,

Debugging a WebService response

May 27th, 2011 No comments

When running the posturl command a response is sent to the web server.  This response includes both the post data and the http headers.

At times it is necessary to view and debug what is sent in the header since some web servers require specialized headers.

If you need to figure out what is being returned in the header of a request when running posturl follow these steps:

  • Add a folder named ‘zztemp’ to the root directory in your IFS.
  • Run your webservice.
  • Look for the file httpapi_debug.log in zztemp. It will contain the last posturl that was run.

This is a back door debugging tool added by the developers.

Categories: WebSmart Tags:

Recent WebSmart examples and last call for upcoming web training

May 11th, 2011 No comments

Here are a few WebSmart example programs that may be useful to you, as well as a last call for next week’s training! If you have other ideas for code examples please email us or post a comment here.

Example Programs

We have published a few new example programs recently, including:

  • This WebSmart ILE example includes the necessary files needed to use jQuery UI and how and where to put them within your HTML. It also shows an example usage of jQuery UI by using the datepicker function to allow picking a date using a visual calendar. Use this as a primer towards implementing more complex jQuery UI features in your applications.
  • WebSmart PHP example program showing the steps needed to upload a CSV file, extract its contents, and insert them into a database file.
  • How to design a Clover-based Excel spread sheet that includes formulas for both a sum of a column and for a product of two values. The formulas are dynamic and the values in the formula based fields will change to reflect any editing that takes place in any relevant cells.
  • Finally, this brand new WebSmart ILE example illustrates one technique you can use to add a ‘Loading…’ image to web pages that for some reason take a while to come up.

As always, if you have ideas of examples you’d like to see us create, please let us  know!

Last call for WebSmart PHP Online Training

Registration for next week’s WebSmart PHP online training courses ends this Friday. You can attend these 2 hour courses from the convenience of your office at the low cost of $149 per course. You can register for individual courses or for all of the following topics: WebSmart Templates, Intro to PHP, Getting User Input and Validating the Data, Stateless Programming and Security. Enroll or learn more >>.

Categories: Clover, WebSmart, WebSmart PHP Tags:

WebSmart online training – $99 first week offer

April 20th, 2011 No comments

If you are new to WebSmart or need a refresher on a specific topic be sure to register for our upcoming 2 hour online WebSmart PHP and ILE training sessions that start in May and June. It’s convenient and the price is great, and it’s even better if you enroll by April 29th to take advantage of our $99 promo (regular price is $149).

This is a great way to speed up the learning curve. The courses are conducted online in real-time with an instructor that you can interact with and ask questions. You will be given hands-on lab material that you can complete at your convenience after each course.

View courses or register now.

Categories: WebSmart, WebSmart PHP Tags:

Improve performance with gzip

March 17th, 2011 1 comment

I spend a fair amount of time worrying about performance. Within the Professional Services group I work with one of our clients, MedAxiom, developing an increasingly large and complex web application. Yet at the same I want to improve the user experience by speeding things up. One of the simpler ways to make a site faster is enabling gzip compression.

Gzipping components is one of ySlow’s recommendations and Steve Souders also recommends it in his book “High Performance Web Sites”. It’s an Apache module that applies gzip compression to certain output before sending it to the client. Once at the client, the browser unzips the content and displays it to the user. The end result is we’re sending less bytes which takes less time.

I set up a few benchmarks before enabling gzip so I could get an idea of the effect it has. I used Firebug’s Net panel to load each page five times and record the total size of the page and load time, I then took the average of the five loads.  Here are the results:

Page Before After Improvement
Size (kb) Time (ms) Size (kb) Time (ms) Size Time
Nexus home page 1,870 29100 536 14465 71% 50%
Nexus dev home page 2,382 31714 535 17060 77% 46%
Bar graph 633 9885 280 8405 55% 15%
Line graph 619 11450 280 7497 55% 34%

I was blown away by the improvement in load times!  MedAxiom has some pretty heavy Nexus pages so that’s where we saw the greatest improvement.  Yet even on smaller pages we still saw an improvement of 15%-34% in page load times.

Setting up gzip in Apache is pretty easy, you can do it by adding these directives to your Apache config in the appropriate place.

# Load the module that performs the compression.
LoadModule deflate_module /QSYS.LIB/QHTTPSVR.LIB/QZSRCORE.SRVPGM

# Compress all output by default.
SetOutputFilter DEFLATE

# Disable gzipping for images and pdf documents.
# Gzip compression has no effect on these types.
SetEnvIfNoCase Request_URI (gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary

Webinar Today: 5 reasons RPG Pros succeed at developing web apps with WebSmart

February 10th, 2011 No comments

It’s the last call to sign up for today’s webinar that starts at 1:30 EST on 5 reasons why RPG pros succeed at developing web apps with WebSmart ILE.

RPG programmers should be your go-to people for developing web applications on the IBM i. They know your system and your business rules inside out. Unfortunately, due to a lack of web experience or time, web development projects often get assigned to other IT staff or get outsourced. This doesn’t have to be the case.

With WebSmart ILE RPG programmers produce IBM i web applications very quickly, even if they have no prior web experience. Attend this webinar to learn about the 5 reasons why RPG programmers succeed with WebSmart ILE.

Categories: WebSmart Tags:

The new PHP stack on IBM i Improves Performance and Configuration

February 8th, 2011 No comments

The introduction of Zend Core to the IBM i opened a new world of possibilities for IBM i developers trying to create web applications that would make use of their existing DB2 files while hosting them on the same system. Zend Core was the first step on porting a reliable PHP stack to the IBM i world and while it was indeed a great first step, there was also room for improvement.

The Zend Core distribution made use of an Apache instance that ran in the PASE environment, leaving the IBM HTTP Server Powered by Apache working as a reverse proxy mainly passing the requests to the instance in the PASE environment. As more advanced PHP applications were developed, developers and administrators began to struggle with more complex Apache directives and configuration that were needed because of the reverse proxy. Zend and IBM worked on a solution to eliminate this problem: The new Zend Server for IBM i. In addition to eliminating the Apache server in PASE, new and improved caching algorithms were introduced that have the capability to deliver great performance improvements depending on the nature of the applications.

Mike Pavlak goes into further detail explaining Zend Server’s packaging, new architecture, installation and server versions (Community Edition and Commercial Edition) on the “What’s New with PHP on IBM i?” article hosted at SystemiNetwork.

For those of you that are currently using Zend Core, we recommend the upgrade to Zend Server CE. You can read our KB article “Using WebSmart PHP with Zend Server CE” to get information on how to download and setup Zend Server CE.

New WebSmart 8.8 Updates, and 8.9 PML Help you can use now!

February 2nd, 2011 No comments

We recently published a new WebSmart 8.8 IDE update, and I also have a preview version of the WebSmart 8.9 online help (with lots of improvements!) that you can use with your version 8.8 IDE. The new help has tons of new UI features, and incorporates dozens of additions and corrections to actual PML reference material.

Recent WebSmart 8.8 Updates
The latest WebSmart 8.8 IDE (build 5983-9211) includes these changes:

  • Resolved issue where OBDC definitions always show the ‘*’ in the tab name.
  • Added an option to suppress Clover’s automatic SQL validation. This feature is useful if you frequently use the wizard to build new programs over files with many thousands (or millions) of records, where the wizard’s dynamic SQL validation can slow down the design process. You can disable the SQL validation using the new checkbox at Tools -> Options -> ILE/PML. The option is named ‘Validate Clover SQL’.
  • Changed the default IDE font for new installs. The new default is Consolas 12pt.

The WebSmart update history page has a complete list of the recent fixes and enhancements.

Updated WebSmart 8.9 PML Help You Can Use Now
We have also been working hard on the WebSmart 8.9 documentation. I hope to post PDF versions of these guides to myBCDSoftware.com later this week, but if you are at version 8.8, with a simple change you can use the new online PML help right now. Read more…

Categories: WebSmart Tags:

How To Create a WebSmart Template that Converts Data from DB2 to MySQL

February 1st, 2011 No comments

This post shows some of the features in the intelligent templates in WebSmart, and how to use those features to write your own powerful customized templates.

Recently, I wanted to convert the data in DB2 physical files to MySQL tables, so that I could easily take advantage of the IBMDB2i database engine for MySQL. I already have a nifty DB2 to MySQL code generator, which you can download for free from our website.  However, I didn’t have an easy way to import data from files.  So I decided to write a WebSmart program to do it. Using phpMyAdmin, I can then cut and paste the output from this program into the SQL text area, and run it. The output needs to look something like this (for a fictitious file):

INSERT into `CUSTOMERS` (`custno`, `custname`, `crtdate`, `crttime`)
VALUES (1, 'Acme Bolts', '2010-06-02', '15:35:12'),
(2, 'Superior Widgets', '2010-06-03', '16:04:35');

You can import tables into MySQL using the phpMyAdmin interface or a command line interface from the PASE environment on the IBM i. In phpMyAdmin, you choose the ‘Import’ option and select a plaintext file with a .sql extension from somewhere locally. So if I save the above code in a text file called customer.sql, I go to phpMyAdmin, choose my database, click the Import link, select the file customer.sql and voila! I have a customer MySQL table, complete with 2 rows of data. Read more…