Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve data.loader.php and aru.php #133

Open
Obihoernchen opened this issue Jan 6, 2017 · 4 comments
Open

Improve data.loader.php and aru.php #133

Obihoernchen opened this issue Jan 6, 2017 · 4 comments

Comments

@Obihoernchen
Copy link
Collaborator

Obihoernchen commented Jan 6, 2017

Right now there is a lot of duplicate code.
We should improve this.

  • Don't build html content in aru.php but pass json and replace content with JS
  • use templates
@SiteEffect
Copy link
Contributor

SiteEffect commented Jan 7, 2017

I also don't fully understand aru.php. On the one hand it gets called every few seconds and re-writes variables initially written in in data.loader.php - so there has to be a lot of duplicate code!? On the other hand, I see that it is partly called by .js Scripts/Functions for updating on the fly. What is the procedure's cycle exactly?

@Obihoernchen
Copy link
Collaborator Author

Yes it's exactly as you described.
But we can avoid a lot of duplicate code if we will make one file for initial loading and updates. Or make another php class with functions we can import in both files. Something like this.

Writing the same SQL statement or HTML code twice in two different files is bad :/

@SiteEffect
Copy link
Contributor

I am in for a mix of those because we have a better overview what happens on what page because of the cases in one load+update file while we have update-functions stored somewhere else - so inside each of those cases we should load first and then call an update function in the desired interval.

@AL-dot-debug
Copy link
Collaborator

ARU should be called only by AJAX request ( ARU = Ajax Return Unit )

@Obihoernchen Obihoernchen changed the title Unify data.loader.php and aru.php Improve data.loader.php and aru.php Apr 30, 2017
@Obihoernchen Obihoernchen added this to the OOP implementation milestone Jun 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants