Boring technical post about FT-next

Stem your excitement! Time for an extremely boring technical post about the next version of Form Tools. Caffeine pills on standby!

I’ve dubbed it FT-Next partly to sound cool, and partly because I’m no longer sure if it’s going to be a 2.3 or 3.0.

High-level stuff

So… I’ve been making a fair bit of progress the last couple of weeks. Currently I’m working on updating the core code. I have no estimates on how long it’s going to take, and the joy of not working for The Man is that I don’t have to provide one. Mwahah.

With FT-Next there will be two small functional improvements over previous versions:

  • All language files will be included with the core. I really don’t know why I didn’t always do this; not including the language files has no benefit and it just adds an extra chore for non-English speakers having to manually install the language files. This’ll also allow me to simplify the custom build page.
  • The install/ folder will no longer need to be manually deleted after installation. Again, there was no real technical reason the folder had to be deleted – it can be solved perfectly well via code, and that’s what FT-Next will do.

Technical stuff

Whenever I find myself revisiting old code I find I have to resist the temptation to rewrite everything at once. (“Well I just have to change that… and that…. and that….”). With a codebase the size of FT that’s just not possible so I’m trying to focus on the essentials. My #1 goal right now is PHP 7 support but I’m finding I still have to do more changes that I anticipated.

  • Smarty upgrade.
    In order to support PHP 7 I need to update Smarty. This is the change that concerns me the most: Smarty underpins the entire Form Tools script – it’s not just used for the rendering of the HTML, but a lot of the internals – so I’m really going to have to confirm everything’s backward compatible and find a way to patch the pieces that aren’t. Because Form Tools allows customization of the Smarty logic in various places this will brook a great deal more thought.
  • Composer.
    The next version of Form Tools will use Composer for dependency management. Initially it’ll probably just be used to include Smarty, but down the road I may even use it for including the Form Tools modules, themes and API too. But to be clear: there will be no extra steps for installations: you’ll continue to download the single Form Tools package from the site and install in one go.
  • Codebase being moved to OO.
    Years ago I made a judgement call to write the application functionally, not object-oriented. I think it was the right call at the time (simple = good) but today I find there are too many benefits to object-oriented code. PHP grew up and has pretty decent support for all sorts of OO features and making use of them will simplify a great deal. This is something I’ve had on the docket for years and now’s the time. It will be a gradual upgrade.
  • Backward compatibility.
    This is my primary concern for the next release. I want it to be as backward compatible as possible. But I am requiring PDO with the PDO-MySQL extension installed for all installations. This has come standard with PHP installations for years so it’ll only affect a small minority of users. The minimum PHP version will be 5.3.

Misc other stuff

  • I’m dumping global/library.php in favour of a global/code/Core.class.php file. That’ll contain all the various available application-wide settings like before, only no more globals. Now only the settings that can be overridden will actually be overridden. Sheesh, no more wild west…!
  • The config.php content will change; I’m leaning towards using define() for all the various DB settings, etc. just to clean things up. But again, backward-compatibility is the name of the game so your old config.php file content will continue to work.
  • Converting the database over to use PDO has gone pretty well so far. The one addition that needs to be tracked for the DB info is port. Seems like 3306 is the standard – so upgrading will give you that value by default. But depending on how things go – i.e. how extreme the changes are going to be – this may become a 3.0 release and I’ll release a pre-upgrade script to verify your system, verify settings etc. before you actually upgrade. Just to be safe.
  • I may convert all language files to JSON… haven’t decided yet… that may be in a later version.

Anyway, things are plodding on. More posts to come, no doubt.  🙂



This entry was posted in News. Bookmark the permalink.

5 Responses to Boring technical post about FT-next

  1. Gelo says:

    Can’t wait for this! Thanks Ben!

  2. Brandon says:

    LOL< disregard my comment on your previous post. Backwards compatibility is clearly already in the forefront of your goals 🙂

  3. admin says:

    haha yup 🙂

  4. Bill says:

    Can’t wait to get the upgrades. Thanks for coming back.

  5. Davis Rogers says:

    I did not read all of the post because I did not have my caffeine, nodos and etc ready, lol. But from what I did read you may want to re-write the code using DART. It’s a simple open source language and I would love to help you make it happen if interested. I say that as a student, not a teacher, lol

Leave a Reply