HappyCoder
HappyCoder

Reputation: 6155

Integrating angular app into Zend Framework 2 or keep it separate?

I have built an angular front end that will be served by a Zend Framework 2 back end. Now I am wondering, do I integrate my angular project into ZF2 OR should I simply keep it as a stand alone entity outside of ZF2?

Originally I was building this as an integrated entity and because my angular developer does not use ZF2, we decided to simply make a vanilla version of the front end APP for ease of use so that he could work on it without having to struggle with ZF2.

Now that the app is mostly built, I am wondering if it is necessary at all to integrate it?

What are the advantages and disadvantages?

Upvotes: 0

Views: 1634

Answers (1)

Thomas Dutrion
Thomas Dutrion

Reputation: 1893

My guess is having completely separated projects allows you to completely rebuild one without touching a line of the other in case an evolution is not possible using either ZF2 or Angular and you need to switch to something else.

If you are hosting on a PAAS, you then have to pay for two instances. Lets say you host on Heroku, you may need to have an environment for your front (lets say 3 dynos) + ssl (£20/months) and the same for the backend (£20 for ssl as well). Additionally, you will need two ssl certificates (£10/year for the cheaper, but can be expensive with EV certificates).

Finally, you may have trouble with CORS with separated projects, which won't exist if both are merged in a single project.

My previous statements lead to say one single project can be good, but I guess it is a very delicate decision!

Upvotes: 3

Related Questions