R
R
Roman Basharin2017-01-12 00:34:46
PHP
Roman Basharin, 2017-01-12 00:34:46

Optimal architecture for partially connected web applications?

Greetings colleagues. Very interested in the opinion of specialists, the situation is this.
UPDATE1 . In connection with the latest innovations from Google, it is planned to switch to https + a free ssl certificate from letsencrypt on all subdomains. As far as I know, they cannot issue 1 certificate for a domain and its subdomains, which means that a subdomain with statics needs to be transferred to https, with a separate certificate. Here a question arises. Will the browser swear at the fact that several https sites are connected and how much will this ultimately affect the speed? It's probably nonsense to encrypt css, but you can't connect it to the https site in the http link code ...
I have been developing CRM for a company for a year as a full stack web developer. Quite a lot has already been done, and here comes the TOR that you need to make another site on wordpress SEO-shny + landings. And not just a stupid text info site and landing pages, but, for example, for completed orders, automatically load information on completed orders, show this case interactively on a map, or write information to the database for each transition on the pages, etc. In short, strong integration is quite necessary and you don’t want to write the same code several times, etc.
In terms of architecture, it looks something like this:
crm.site.ru - crm
site.ru - wp site
site.ru/lp/... - here are all the landings
On vds:
www/crm
www/main
www/main/lp (nginx has a single entry point to index from this folder, so the VI will never compete with landings)
images. Already now there is a problem that you have to use the same images, icons, etc. Already double work. When I say "change the logo and this", then already in 2-3 places you will need to overwrite the files. - here I'm thinking of moving the whole thing to the "static.site.ru" subdomain, when the loads grow, it will be relatively painless to move this thing to some cdn.
css/js. In many places, you need to keep the overall style, and you don’t want to make it up 3 times, I somehow opened buttons, forms and other things normally, connected styles from one file and manage from one place. For scripts, the same thing, some methods and ui / ux animations are very similar - here I'm also thinking about static. display the subdomain, but I don’t know yet how it can tell on the download speed. For better or for worse? It's not clear if there will be a new difficulty here that I don't know about yet? I think that it will be 3 times less work, but it will turn out the other way around))
php. There are, roughly speaking, some plugins with an API, throw an array into it in the desired format, it will return the data to you. Again, copy-pasting is a lousy business, but it’s not clear how to integrate it into 3 systems at once? While there is a strange idea, to create a certain class that these plugins will pull with their own methods, such as a common API, and work centrally through a certain include ".../www/api/" - but I'm wondering how this can again affect performance affect and how optimal is such an architecture?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2017-01-12
@sim3x

gulp + sass/less
php-common to a separate repo and configure the installation from composer

T
tema_sun, 2017-01-12
@tema_sun

> As far as I know, they cannot issue 1 certificate for a domain and its subdomains
Just yesterday I updated the certificate and added a subdomain to it. It's just that in `letsencrypt certonly` I specified the domains that are needed - it updated and installed everything. Before that, he asked if I want to extend the current certificate, because. there a new subdomain appeared.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question