Web Applications – Migrating Web-Based Projects from Java to PHP

codeigniterjavaPHPweb-applicationsweb-framework

At our work place after hours of coding, testing and QA we have successfully added a couple of software tools in our product line. We specialize in web based software solutions so in order to tap on more users we are now considering putting our developed solutions online for hosting and providing online access to all our clients for their products.

But what is coming in our way is that we have developed all these solutions in Java and compared to PHP Java hosting is very expensive. So we are now planing to migrate all these solutions to PHP while also maintaining their Java counterpart.

How we should start with these migration task?

We used AJAX in all our Java based solutions. Tech specs are

  1. Front end web pages in JSP

  2. Back end server side in Java using Apache Struts2

  3. Database in MySQL

  4. PDF report generation using iText PDF lib. for Java

NB: We have started a little with Code Igniter Framework in PHP.

Best Answer

1) First and foremost understand this is not an easier way to approach any problem. PHP has a bad reputation for being nasty and tangled but I feel it has been made that way over the years because of its leniency. It is very easy to get lost in that "damn it's so easy" mentality and lose hold of your standards.

2) Read accepted and respected standards from the developers that drive both PHP, and the community. Fig is a good place to start (http://www.php-fig.org/)

3) Frameworks come in all flavors, pick the one that is both attractive in terms of features and appropriate for your companies needs. CodeIgniter is a start but explore CakePHP or Laravel if you fancy Rails, Zend or Symfony if you want to slap that "enterprise" sticker on there for your boss, and finally if you find those to be cumbersome it couldn't hurt to look at something like Slim. In the end there are literally thousands of frameworks, find the one you feel both comfortable with using and will scale for your businesses needs. The list I provided is short, you should be able to find more on your own with no trouble.

4) Don't be afraid to try new things. CodeIgniter is loved for being lightweight and powerful, however it also is the easiest option in most cases. CodeIgniter simplifies some aspects of your workflow, but forces you to look at the MVC paradigm in a certain way and transitioning after spending time with CodeIgniter to something else can be difficult.

Related Topic