L
L
longBurn2014-03-09 11:58:33
Python
longBurn, 2014-03-09 11:58:33

How to implement a frontend-backend application in C-Python?

Good afternoon!

As part of learning Python and just having fun, I decided to develop some application.
I imagine it like this: there is a main executing mechanism (backend) and a Web server to display information to the user (frontend). The lifetime of processes in the backend is much longer than the duration of the user session with the frontend. Those. the user logs into fronend, runs the procedure, and then periodically checks the execution status of the procedure.

Arguing on this topic, I came to three implementation options:
1) The interaction of the frontend and backend takes place through the database.
2) The interaction between the frontend and the backend takes place directly through XML-RPC
3) Fronend is one of the backend's child processes and uses class methods directly to access shared memory.

What are the "best practices" for organizing such interaction? What are the pros and cons of these implementation options?

I would be grateful for information about the literature on the topic)

Thank you for your help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
traims, 2014-03-18
@traims

The first thing that comes to mind is the "Model-View-Controller" model . In Django it's called "Model-Template-View". How are these applications built?

  • a model that is responsible for working with data (first of all, this is the schema of the database tables);
  • a template (for example, an HTML template) that represents exactly how the output should look like;
  • a controller that is responsible for the application logic: it takes data from the model, does something with it, and displays it in the template.
Many popular web frameworks work on this model (Ruby on Rails, Django, Zend, ASP.NET MVC...)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question