![]() /humans.txt -> The people behind a website./robots.txt -> Tells search engine crawlers which URLs on your site they can access./sitemap.txt -> Sitemap (Yes, a Sitemap can also be in txt).Security: Cross-site request forgery protection over WebSockets. ![]() Get information from an API and render it (comments from jsonplaceholder).Navigator whose active button changes dynamically.Broadcast: Sending information to all customers in Real-time (□□ □□□□□).Update item from the database (□□□).Add a new item in the database (□□□).Switch to a dynamic page (List of cats □□□□□□).Real-time notification message or "flash message" (Feline notifications □□).Server-Side Rendering (SSR) of pages for SEO (Using views.py).URL dynamic update in Browser (Front-End).Navigation Real-time without loads similar to SPA.This framework contains an example of the most common cases of cat management. JavaScript draws the received HTML in the indicated selector. JavaScript sends a text, not a request, via WebSockets to the Server (in our case Django).ĭjango interprets the text and renders the HTML of the article through the template system and the database.ĭjango sends the HTML to JavaScript via the channel and tells it which selector to embed it in. I want to render article number 2.Ī WebSockets connection, a channel, is established between the client and the server. One technology provides a secure, stable and low-delay connection for real-time web applications. This means you can create pages without reloading the page, without AJAX, APIs or requests. It allows JavaScript to request actions, its only responsibility is to handle events, and the backend handles the business logic as well as rendering HTML. HTML over WebSockets is a strategy for creating real-time SPAs by creating a WebSockets connection between a client and a server. Every components can produce and consume actions, allowing asynchronous and decoupled communication. System components communicate through realtime events, where events represent important actions. If you know Python, you know how to use Django LiveView. You can still use all of Django's native tools, such as its ORM, forms, plugins, etc.The logic is not split between the backend and the frontend, it all stays in Python.Uses Django's template system to render the frontend (Without JavaScript).Django LiveView Framework for creating a complete HTML over the Wire site or LiveView
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |