Site: configuration.php

Site: configuration.php

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Site: configuration.php

Post by Tim Blokdijk »

I'm going to give my own development process a spin as described in https://taspring.clan-sy.com/svn/spring ... tation.pdf

I'm going to propose a small change to the site code that handles database connections. This is not highly critical code nor is there any real difference in vision with me, Fnordia or AF on its implementation. AF has even already made a patch that implemented most of the work. I just like to see how a more structured development process works out in practice.
So bare with me here. :P

--------------------------

Plan: Abstract site configuration details

Description
I like to abstract the way the site sets up configuration details (mainly database connection details) so it's harder to accidentally commit real passwords to svn, to make the code more exchangeable with the production and development environments without accidentally making connections to the wrong database back-end. (e.g. prod. env. connecting to the dev. env. database and visa versa.) and to allow people to make configuration changes to make the code run on other domains and servers. (localhost for example)

This would fit into the requirements of the "Webmasters" (that's the site developers (me, AF) and maintainer (Fnordia)).
But also make it easy for other people to set up a (local) copy of the site for development purposes.

Implementation
Have a general configuration file below www-root contain the database connection details and any other settings that are host specific, this file would be included with each page request.
Last edited by Tim Blokdijk on 17 Jul 2007, 17:50, edited 1 time in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I agree and support this proposal
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

Actually you suggested to make a more general configuration file before (like WikiMedia has) and I "incidentally" left that out of the plan. 8)
Now I'm going to pretend you gave this as feedback so I'm going to update my plan to incorporate this in it.

Yhea, I know it's a bit faked but as a trail run.. it shows we would have our plan feedback and improvement here, you agree so we reach a consensus on it.
Next up is implementation and documentation.
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

Fast forward, I committed the changes and its documentation. (and a few things unrelated to this plan)
See http://spring.clan-sy.com/fisheye/chang ... g/?cs=3995
With this the Do part of the development process is done.

Moving on to Check
Now we have to see if the changes break anything in the dev. env.
For that I need to upload svn head to the dev. env. and have Fnordia make the necessary changes to the configuration.php thing one dir below www-root.
I will get a hold on Fnordia for that.
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

I found a bug with the code on my local machine before I uploaded the changes to the dev. env.
I fixed it and committed it with http://spring.clan-sy.com/fisheye/chang ... te?cs=4015

Side note: This commit also had changes that had to do with the translation system, we don't have a 'plan' for the translation system (like this configuration.php plan) but if it would exist I would have made a similar post about hose changes and the follow-up commit with documentation.
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

I tried to get a hold of Fnordia past day's but he seems to be on vacation stalling the process as nobody has root access to his server. I'm not going to spend time hacking around the problem but focus on other parts of the site for now. Once he pop's up this can move on again.
Fnordia
Former Engine Dev
Posts: 425
Joined: 13 Aug 2004, 16:11

Post by Fnordia »

I've created a configuration.php in the parent folder now, moved the site content to a sub-folder to avoid having to put it in the general wwwdata folder.
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

Yes thank you, I updated the dev. env. with svn head. (http://newspring.clan-sy.com/index.php)
I think that the implementation as it is is working correctly, if everybody is happy with it then this one is done and I can move on to new site plans.

[EDIT]
Presuming this is done and nobody has any remarks about it any more, I think the site development process is working quite alright.
Fnordia was away for a week or two, it did stall the development a small bit but nothing major. The process itself looks to be fine anyway.
I will update the documentation some more to give the processes it's own chapter and some extra information.

AF I know you would like to make some changes to phpbb, maybe you can try to do that now following the dev. process?
[/EDIT]
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

So the phpbb and the phpbb subsilver template in the svn is fine to edit now and all uptodate?
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

Ehh no, the idea is that you start a topic like this yourself detailing the "6 changes" you like to make. As we discussed a bit via e-mail a few weeks ago.
That way everybody can comment on the idea and I can add a few things to the plan to.
Just stick to the development process, you're at "Create awareness that you like to resolve the issue." under "plan".
As you already found something to better meet the requirements of the site users and you also discussed the idea with me.
Starting a topic like this with a "realistic plan with a limited scope on how to resolve the problem" would allow me and others to give "feedback on and support for your plan".

Then you can go to "do" and "Code the feature, update the software, write the text, pimp the graphics or do what
you need to do to implement the plan.
".
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

Ehh wait yes, svn is up to date with the dev. env. I misunderstood.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Great, I didnt want to start my thread unless iminent agreement and implementation within a day or two was possible.
Post Reply

Return to “Engine”