Question

I am building a web application in javascript with a PHP/MySQL backend. The entire UI is Javascript based, except the index.php which only contains a few PHP lines. Out of that, it all works with AJAX calls. Then I have a PHP backend answering the AJAX calls with JSON.

I have a few questions on how to create a "clean" deployment process. My process should contain:

  • CI Running Javascript & PHP unit tests, backend JSON tests
  • JS compression
  • Deployment to a test server
  • UI/Acceptance testing
  • Eventual deployment to a prod server

What tools should I use to do that? I see many CI servers, but which one can do Javascript testing and compression and PHP unit testing?

How can I do staging in Javascript and PHP? I don't want my Javascript on the test instance to connect to the prod backend, neither the test backend to connect to the prod database. How should I implement this switch ?

Moreover, would it be better if I split my project in 2 parts - front-end and back-end or is it OK to deploy/test the whole javascript/php thing as one package?

Thank you a lot for you help

Was it helpful?

Solution

You can do CI of heterogeneous projects using Jenkins Aside of unit tests you can set there coverage, mess detection and even selenium by simple plugins. You can do simple deployment using any version control software just don't hardcode your javascript urls and dont user absolute urls. Instead base your your config on environmental variables on your staging and production. IDE's like PhpStorm also have deployment systems if you are interested in something more advanced.

OTHER TIPS

CodeShip (www.codeship.com) can do this. It has the ability to run tools like Grunt or Gulp, Bower, NPM and Composer. And it can run phpunit, selenium, qunit etc. and it can deploy.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top