How to upgrade?

Now while the new version is under test it's time to prepare....

Now while the new version is under test in our lab, it's time for you to prepare.... New features like enhanced grids, nested grids, drag/drop lanes, and a lot of enhancements/improvements in the components and IDE. But what about the consequences for your current projects? Will they still run? What if you get some error messages you didn't got before?

First of all, don't worry. I'll come back to that later. But first some honest answers on questions we get from our (potential) user pool regarding upwards compatibility, support of latest libraries etc.

Obviously we do everything that is in our power to make your life as a developer as easy as possible. If we can create a compatibility layer around changes we will. That way we managed a fluid migration between Bootstrap 3 to Bootstrap 4 and that's why the panel component now generates a card object. Renaming the component would have broken projectcode.

But this is a major point. Afterall, as we are using external libraties like Bootstrap, PDO and more, we are depending on the changes that the devs of those components apply. It might look like a simple change that Bootstrap 5 has removed dependencies on JQuery, but for PHsPeed that is a major change as all code around Bootstrap currently is build upon JQuery. That means that when we release a version with support for BS5 that you will have some work to do to change the JavaScript libraries. So far we managed to keep those changes minimal, but we haven't finished developing yet. We try, but cannot guarantee.

Some users replied that they didn't see the need of migrating to BS5 as long as the old application works well under BS4. That's an interesting point IMHO, and I agree. You can keep maintaining your older apps under BS4 and build new ones on BS5 (when it is ready). But if you want to migrate due to some features that is missing in BS4 there needs to be a migration path, right?

So how do you refresh a JavaScript event? That's a valid question as developers will hardly need to write JavaScript. As you build your application, a lot of JavaScript is generated, and implemented into your application. Actually it is quite easy to do. On the JavaScript event tab of the property editor, you can click the edit button and then use the Wizzard to refresh the JavaScript event code. Done!

Alhough most developers want to avoid JavaScript, the build-in JavaScript debugger can provide very interesting information if your application does not run, or provide blank screens. Clicking on the JS debugger icon of the IDE will open the debugger that will show any JavaScript issues. Clicking on the red error message will show you what the debugger is complaining about. In many cases you will see which event went wrong and needs to be incorporated or refreshed.

So to come back to the question, what to do if you run into issues after upgrading?

Well first of all perform a full generate of your project. Then test your application. If you run into issues then it is most likely that you have to refresh some JavaScript events. In general that is the onDocumentReady of your form. As the new release will bring a redesign of the grid, the onDocumentReady of your grid is also advised if you want to make use of the new features. And if you still run into issues, please use your support channel for help, or use our forum.

As always: happy coding!

10 Jul 2021 Blog None