Hi,
I hope this is in the right forum. Couldn't find one that really seemed exactly appropriate.
My question is how to learn about php application deployment "best practices". I've got a few nice little, and even somewhat sophisticated, apps running on my local network. I even "deploy" the apps to multiple servers. However I'm now taking the first steps towards writing and deploying apps for other people.
So, I now realize that some of my code inadvertently is dependent on my environment. Furthermore, I realize that I've "made up" the whole file structure architecture of my apps -- I have reasonably logical reasons for putting stuff in certain places, but this makes my problem even more complex. I now have several different kinds of runtime objects that I need to locate in different locations, and all of them need to be made "environment independent".
Let me give a specific example. I've coded some database libraries that I intend to use across several different apps. I deploy these libraries to a shared location, then use "require" statements to include them in my various apps.
Anyway, I know I can design solutions for these problems, but I figured that most professional developers must have run into the same issues, and there must be some "best practices" about how to set things up. I guess I'm asking things like:
- where do you locate such "shared libraries"?
- how do you make your code environment-independent (i.e., the same code that runs in your development and testing environments runs, unchanged, when deployed at a customer site)?
- what kind of deployment tools, if any, do you use to assist with this?
- is this covered in some classic php development literature somewhere?
Hope these questions make some sense and some of you can either offer suggestions, or offer pointers to where I can read up on this stuff (googling and looking in the usual places didn't seem to turn much up).
Thanks,
John