• úvod
  • témata
  • události
  • tržiště
  • diskuze
  • nástěnka
  • přihlásit
    registrace
    ztracené heslo?
    KOSTEJArchitektura ASP.NET
    Klub má sloužit k postupnému procházení a shromažďování dokumentačních zdrojů celé architektury ASP.NET, od zpracování requestu IIS-kem přes systém konfiguračních souborů až po životní cyklus ASP.NET stránky. Věnovat se budeme jak Web Forms, tak MVC, ale i technologiím, které s nimi úzce souvisí.
    rozbalit záhlaví
    KOSTEJ
    KOSTEJ --- ---
    JINX: je to všechno .net framework, .net core je hodně nový, ještě ho nemám moc nastudovaný. Ale .net framework pořád běží, .net core je spíš pro multiplatformní věci.

    JINX
    JINX --- ---
    KOSTEJ: sorry za takovy dotaz ale jako javista, ktery obcas pokukuje po .net bych se chtel zeptat je tohle .net core related? nebo to jsou starsi veci?
    KOSTEJ
    KOSTEJ --- ---
    Důležitý pojem: postback

    Postback je událost, která je vyvolaná při http dotazu odeslaného metodou POST. Prvotní stránka se načítá metodou GET. Následné odeslání stránky po zadání nějakých dat, kdy se na základě zadaných dat pozmění a vrátí se v nové podobě se nazývá postback.

    Podrobněji:

    An HTTP request can be any of the HTTP verbs, but the primary two people use are GET and POST. Well, those are the two a programmer uses most frequently. The others all have some purpose, if they're implemented on the server. When you send information to the server, you can do so either through the use of the URL (to request a page) or within the body of the request (POST, PUT, DELETE, for instance).

    When you send the body of the POST (skipping the others for now, you can figure it out from here) with the form elements, you're sending back certain elements. How those elements are defined is up to you and to the environment you're working in. You could post to a server with a JSON element in the body, or with XML, or with form fields. Generally we do posts from a FORM element in the body of the HTML.


    Rozdíl mezi postem a postbackem je ten (kromě toho, že postback je pojem pro ASP.NET prostředí a post se týká obecně http), že lze odeslat žádost o novou stránku metodou post, postback ale vždy pracuje s už získanou stránkou (proto je tam to "back"):

    Now everyone says, "oh, a postback is a subsequent request to a page." But, that's not true. A postback is when you send data via POST -> back to the server. I say this because the difference between a GET request and a POST request is if data is included in the body (and the verb used, but the client usually knows how to deal with that). You could postback to the page on the first time the page is visited, and in fact ASP.NET has tools for doing that in the library. You could certainly have a desktop client POST data to a server (think Twitter) without showing any webpage at all from the server (ok, so twitter is probably not the best concept to use for an example here, but I want to illustrate that you can use a client that doesn't show the webpage, so no request is necessary).

    So really what you should read there in "postback" is "I'm POSTing data BACK to the server for processing". It's presumed that you retrieved the page initially with a GET to show the user the form element that has input fields for them to interact with, and that at the end you're sending data back. But I hope you can see that it doesn't have to be in that order.


    asp.net - What is a postback? - Stack Overflow
    https://stackoverflow.com/questions/4251157/what-is-a-postback
    KOSTEJ
    KOSTEJ --- ---
    Je třeba rozlišovat Application life cycle a Page life cycle. PLC je jen jeden krok v ALC. Application life cycle názorně:



    Page life cycle názorně:



    https://www.codeproject.com/Articles/73728/ASP-NET-Application-and-Page-Life-Cycle
    KOSTEJ
    KOSTEJ --- ---
    Zpracování požadavku v IIS má taky svůj životní cyklus, který může programátor ovlivňovat:



    ASP.NET Application Life Cycle Overview for IIS 7.0
    https://msdn.microsoft.com/en-us/library/bb470252.aspx
    KOSTEJ
    KOSTEJ --- ---
    Začnu od Web Forms, naprostý základ je životní cyklus generované stránky:

    slovní popis:
    https://www.codeproject.com/Articles/667596/ASP-NET-Life-Cycle-Overview

    podrobnější popis:
    ASP.NET Page Life Cycle Overview
    https://msdn.microsoft.com/en-us/library/ms178472.aspx
    KOSTEJ
    KOSTEJ --- ---
    V první fázi bych nashromáždil alespoň nějaké zdroje o nejdůležitějších aspektech ASP.NET. Budu je sem, popř. na nástěnku postupně postovat. Pokud máte nějaký dobře zpracovaný zdroj o něčem neokrajovém (k okrajovým záležitostem se můžeme propracovat), tak sem s ním.
    Kliknutím sem můžete změnit nastavení reklam