A
A
Alex2018-06-05 14:21:36
Data processing
Alex, 2018-06-05 14:21:36

How to build a site architecture and take into account all the subtleties?

The architecture may sound loud, but I will try to convey the essence. There is an xml file with a bunch of objects (apartments) pulled from a third-party site (about 1500 objects). Accordingly, each object has a lot of properties (20-30 pieces), as a result, such a good-sized document is obtained. This file is constantly updated. It is necessary to implement a site in which there will be an LCD plan on the main page, click on a specific house, an ajax request leaves - an image of the house appears, click on the floor, the ajax request flies away again, the ajax request appears on the floor plan, click on the layout, a layout appears with a bunch of characteristics for this apartment. It is necessary to implement all this on wp and here a lot of questions appear.
How to store data and process it?
1. Make the house plan a taxonomy since there aren't many houses. Make floor plans a custom post type and store layouts in it (well, let's do it through an acf repeater). Once a day, you need to update the layouts (suddenly they sold something), and then the problem is how to check inside the layout posts and delete it if it is not in the file?
2. I like the second option more, but in part. A house plan is a taxonomy, a floor plan is also a taxonomy. Apartments are a custom post type. then it will be easier to update, but since their darkness and id from the apartment file does not match the id of the post, it will be problematic to update this heap all the time.
3. The last thing that occurred to me was to save this file to the server and constantly refer to it when searching for the desired layout. Let's create a house plan taxonomy, a custom post type is a floor plan and additionally a file with layouts. Then time will not be wasted on daily updating of layouts in the admin panel, that is, there will be no load. BUT how efficient will it be to ajax to the server, using php to convert xml into an object, select the one you need and send it to the client
4. is there any other way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Sokolov, 2018-06-05
@Harley347

I made a similar site like this:
There was also a bunch of simpler sites, where the JSON structure is the same, but the layouts were displayed in one list

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question