Shortened PHP Support Cycles

Hello community,

like Java also PHP has shortened its update and support cycles. So within two years a version is not supported anymore for free and is only supported for extra costs (“Extended Support” programm). My provider has adapted this model and only allows me to either use the most current PHP version or to pay for this “Extended Support”.

For the time being, I assume to get along with the PHP version 7.3. But at the end of 2020 it is considered to be unvalid as well and so is unsupported then.

So is it possible to maintain the haxe-php target in shorter cycles as well?

How much effort does it take to adapt the changes of the PHP classes for each version?

I do not only see the trouble caused by this new situation. I also see the chance for the HAXE community:

This could be a major argument for using HAXE. If there are update patches for each current php version, a HAXE programmer in most cases would probably not even realize, that a version leap has occured. Or at least he/ she could easily identify the points to take care of.

So what do you think?

Kind regards
Arnim

PHP team is very good at maintaining backward compatibility. It’s unlikely we will see any major Haxe/PHP issues related to newer PHP versions until PHP 8.
Can you provide an example of changes in PHP, which you think should be adopted in Haxe as soon as PHP update is released?

Hello Alexsandr,

thank you for your answer.

No, there is nothing concrete to tell. It was just a general thaught because of my provider trying to put his customers under pressure.

But as HAXE is a safe solution, couldn’t it be promoted as such more offensively?

I assume, this could be another good reason to work with HAXE.

Kind regards
Arnim

IMO, before offensively promoting Haxe to php devs, Haxe/PHP needs this:

  • Extern generator
  • Easy way (preferably automatic) to integrate php ecosystem into Haxe/PHP (composer)
  • Interactive debugger using Haxe sources instead of generated php
5 Likes

IMO, before offensively promoting Haxe to php devs, Haxe/PHP needs this:

  • Extern generator
  • Easy way (preferably automatic) to integrate php ecosystem into Haxe/PHP (composer)
  • Interactive debugger using Haxe sources instead of generated php

Agreed. PHP as a runtime is acceptable and also very convenient due to cheap hosting, availability of libraries, but PHP as a language, not so much.

There are a lot of famous and widely used applications written in PHP that, in my opinion, would benefit from a Haxe makeover or at least a way to write plugins or parts of them in Haxe (Wordpress, Mautic, OSCommerce, Drupal, etc).

3 Likes

May I ask you two a stupid question?

Once we have an extern generator wouldn’t it be applyable for the other two points (integrating a PHP ecosystem and an interactive debugger using HAXE sources) as well?

Or am I getting your point wrong?

For me, it sounds like systematic adaption (which I am working on at the moment). Maybe there are some synergetic effects…

Sorry, I can’t understand this question. Probably because of my English :slight_smile:
Could you please rephrase it?

It’s definitely possible to write Joomla or Wordpress plugins in Haxe. You don’t need full externs to do so. A small number of helper functions can get you started pretty quick.

e.g. for Wordpress most of the time you simply need a way to add a shortcode to register a static Haxe function, so you can put [myHaxePlugin] into your pages.
There are some small hurdles when including your Haxe plugin into Wordpress, but they can be worked around.

@RealyUniqueName

No problem. Maybe I did get you wrong as well (because of my mediocre english :laughing:).

With an ‘extern generator’ you mean a generator for extern classes for HAXE, right?
(instead of a generator for what ever, working externally)

My thaught is, that this could be utilized as a larger concept (and I assume your thaught goes into the same direction):

An algorithm could be used for systematic adaption. Imagine the flexibility of XML but the safety of object oriented programming.

The algorithm could be told to adapt a specific syntax, e.g. PHP, and convert it into HAXE syntax (extern classes). But of cause it could adapt an API for plug-ins or target specific libraries and translate them to HAXE extern classes as well.

And this could be embedded into a web-development tool, that does not compile single webpages but manages the compilation process for the whole domain.

… for example by storing EACH compilation task parallel to each other and then switching back to any compilation task that has to be repeated.

This also includes synchronizing directories and differing between shared classes (php-lib) and page specific classes. Of cause, this could be used to have a regular update routine for keeping the PHP code of older pages uptodate. And of cause, the compilation of javaScript should be managed as well, to handle the huge complexity of a webpage, without to get into the trouble of loosing the overview.

This is, what I am thinking about the topic. And I understood your answer to go into the same direction.

Did I get you right?

Right. These: Externs - Haxe - The Cross-platform Toolkit

This is a neat concept.
And yes, I’m going for something like this, but separately for Haxe/PHP. And that could later be used as a part of a bigger process like you describe.

As I said, I already work on this.

The management unit for the compile process is already done. But it still neads a lot of tweaking.

But at the moment it works quite well for my purposes. It works with an xml schema (.xsd) to limit the opportunities of entering the correct elements to describe the management process and to have code completion with your IDE.

What does not work at the moment:

The synchronization tool, that is supposed to be embedded soon. The trouble of C++ utf8 chars and the not working workarounds broke its functionality. I hope for HAXE 4 to solve this.

And the algorithm of the logic representation of high complexe structures is on its way, as well. At the moment I have to solve some tasks for an order-theoretical based display and layout generator. This has shown to be necessary to display nested structures and also to fill some gabs classical layout libraries leave open.

So I can’t promise a soon delivery of the complete bunch of tools. But I hope to be able to publish the display and layout generator within this summer, and maybe other tools until the end of this year.

My vision for the future is to have HAXE as the center of workflow based libraries and tools, that are even attractive for developers outside the HAXE community and either to win them for our community or at least make them be aware that they can profit of integrating our tools into their workflow, even if they still don’t work with HAXE.

1 Like

There are some small hurdles when including your Haxe plugin into Wordpress, but they can be worked around.

Interesting. Do you know if these issues are documented somewhere? Maybe some old google group posts?

Thanks!

Not that I am aware of. I might find the time to write something though.

Which of the ideas to improve Haxe generation of PHP can ALSO be applied to other Haxe generated programming languages ?

I’ve made a small demo project for a very simple Wordpress plugin: GitHub - AlexHaxe/haxe-wordpress-plugin-demo: A Haxe Wordpress Plugin Demo

2 Likes

For all pragmatists who do not care so much for innovative development philosophies:

Here is another usecase of a managed compilation:

When you develop apps for mobile devices, the compilation tasks could become a bit compllicated. You have to consider the processor type, the OS version and the target itself.

So I also consider this to be organized more systematically.

Even if only the different project.xml files are bundled in a meta file that directs all compilation processes of one project, it would be a gain.

But of cause there are even more possibilities to improve systematics this way…

But if you DO CARE about innovative software development philosophies:

Once the tools, I have conceptioned, are implemented, they can be developed further on also to display the class structure of your application. And I am looking forward to visualize it.

And maybe they also can be used for a new concept of debugging and code analysation. I imagine a server, running parallel to an application, collecting data of the usage of classes, blocks and maybe even down to variables.

So debugging and analysing code and bunnymarks in future could mean, that you evaluate the data AFTER you have used the developed software for testing purposes. So for example you could create heat maps to get a visual impression of the amount of usages per function or you see what code blocks costs you the most time when they are executed.

If this method will have a sufficient performance, I can’t tell yet. We will see.

I can’t tell, if the concepts of #newDebugging, I imagine at the moment, will work the way I am thinking or if I will have to find other ways. But I can tell, that the classic understanding of debugging, unit- and integration tests, we use nower days, are stoneage. We need a broader understanding of development and testing cycles. We need to conception the process of devoloping, debugging and testing, to be more fluent to each other and to be considered as ONE workflow, even if it is shared by different persons or groups.

And to give you one more vision for the (far) future: One day, the devolopement process will be seen as a process mastered by a cooperative network. This network is supported and granted by decentralized social media tools that are created especially for this purpose. So new working and cooperation models will arise.

Consider a world, where everything is connected to anything. And borders are only meant to give you a structure but NOT to give you limitations.

In general I think, that there is a lot of potential of rethinking software- and web-development especially because of the great possibilities HAXE offers.

So let’s raise the treasure and put the world upside down!

And let’s propagate HAXE as the most powerfull tool of a new software development philosophy!

1 Like