OpenImporter / openimporter

Development workspace for the open Importer engine.
BSD 3-Clause "New" or "Revised" License
21 stars 14 forks source link

2.0 goals #80

Open emanuele45 opened 9 years ago

emanuele45 commented 9 years ago

Since there is no tracking issue for 2.0, let's add it here.

In my mind, for 2.0 to become final, there is still to:

At the moment this seems all, if you have any other idea feel free to suggest!

margarett commented 9 years ago

Seems good to me. I can really only help with the testing :tongue: But to remove superglobals (especially $_SESSION) you need to implement another way to pass values from page to page...

'ya know, all of that should probably force a rewrite of 50% of the code again :grinning: My honest 2 cents, knowing that I can hardly contribute to most of this, is that you should focus more in the issues around the conversion itself (eg, data flow from source to destination). Of course I understand your desire to have the coding as good as possible, but I can't really help you with that :(

emanuele45 commented 9 years ago

Well, the point is not that we don't have to use $_SESSION (or the other superglobals) at all, but that is bad practice use it all over the places (and for most of them to change their values). The solution is: you read them in one place into a variable (or more than one :P or wrap it into a class) and then you are done with $_SESSION, you use your variable. Then, before existing the script you save everything back.

Same goes (mostly) for the others. ;)

$_SESSION in particular is currently used in 22 places, 8 of which are legit, so to clean that up it just means drop 14 uses. Not that much! :smiley_cat:

I'm more worried about $_GET/POST/REQUEST that are frequently written to, this is usually more difficult to fix without breaking stuff... :confounded:

but I can't really help you with that :(

Do you want to know a secret? I don't really know what I'm doing. xD Anyway, this is part of that flow as well, because apply better coding standards is a way to simplify development, making it more robust. And rewrite over and over and over again the code is where fun is! :tada: