-
Notifications
You must be signed in to change notification settings - Fork 61
Split front-end (website) and backend (API endpoints) #18
Comments
Sorry, but what exactly you mean by that? Currently Jarbas serves the site at If you reach $ curl http://jarbas.datasciencebr.com/api/document/\?document_id\=5925678
{"count":1,"next":null,"previous":null,"results":[{"id":32782,"document_id":5925678,"congressperson_name":"CARMEN ZANOTTO","congressperson_id":164360,"congressperson_document":477,"term":2015,"state":"SC","party":"PPS","term_id":55,"subquota_number":5,"subquota_description":"Publicity of parliamentary activity","subquota_group_id":0,"subquota_group_description":"","supplier":"SIONEI RICARDO LEÃO DE ARAÚJO - MÍDIAS E IDENTIDADE","cnpj_cpf":"23782893000170","document_number":"0002","document_type":0,"issue_date":"2016-03-01T00:00:00","document_value":"5400.000","remark_value":"0.000","net_value":"5400.000","month":2,"year":2016,"installment":0,"passenger":"","leg_of_the_trip":"","batch_number":1267747,"reimbursement_number":5363,"reimbursement_value":"0.000","applicant_id":2433,"receipt_url":null,"receipt_fetched":false}]} Yet the Jarbas itself is split in three apps:
As the front-end is backend agnostic it could have its own repository and its own compile & deploy isolated from Django. But I think that as we're deploying to the same server, and as we already miss a devops to look after it, keeping it (by now) in this repo is a good choice. But I'm still not sure what was your point was about — would you mind expanding on it so we figure out how to improve Jarbas? Many thanks, |
Oh wow, I had created this issue without a description. I then typed the whole description and probably forgot to submit/save 😂 Sorry for the totally unclear question 😑 Yeah, I meant breaking Jarbas into 2 (but as you now highlighted 3) repositories to make it easier to maintain. Following up on your comment, I think it makes more sense to keep it all as a single repo for now, as there're no DevOps strategies in place. But to eventually break them up could be nice. Lastly, I believe some of the server side rendering for the front-end is handled by Django/Python, correct? Would there be any motivation for adding some React on the front-end and maybe handling the data changes through AJAX or even server-side JS. At least for the React part, I believe it could make things easier when we came across into adding new functionality(eg, some advanced filtering of data) or even just improving bandwidth (sending across only JSON rather than full page markup after first page load). That's more or less what I had in mind. Happy to keep the discussion going 🙂 |
1. Split backend & front-end Yes, in the future it makes sense. Now I'm afraid just adding nginx configs, shell scripts, instructions and git hooks to Just a minor detail: no need to split in three. Backend and front-end is enough. It is a merely a Django architecture decision to keep some stuff in the core ( 2. Front-end
No. Python backend is merely compiling files (from
100% of the data changes is managed in the front-end already (no UI rendering in the backend, no JS in the server-side).
All that is currently handled through Elm. We are literally just sending across only JSON rather than full page markup after first page load already : ) |
Closed by inactivity |
No description provided.
The text was updated successfully, but these errors were encountered: