.feed - feeds, e.g. atom
  - MoinMoin.apps.serve - serving some configurable static third party code
* register before/after request handlers
* initialize the cache (app.cache)
* initialize index and storage (app.storage)
* initialize the translation system
* initialize theme support

This app is then given to a WSGI compatible server somehow and will be called
by the server for each request for it.

Request processing
------------------
Let's look at how it shows a wiki item:

* the Flask app receives a GET request for /WikiItem
* Flask's routing rules determine that this request should be served by
  `MoinMoin.apps.frontend.show_item`.
* Flask calls the before request handler of this module, which:

  - sets up the user as flaskg.user - an anonymous user or logged in user
  - initializes dicts/groups as flaskg.dicts, flaskg.groups
  - initializes jinja2 environment - templating
* Flask then calls the handler function `MoinMoin.apps.frontend.show_item`,
  which:

  - creates an in-memory Item

    + by fetching the item of name "WikiItem" from storage
    + it looks at the contenttype of this item, which is stored in the metadata
    + it creates an appropriately typed Item instance, depending on the contenttype
  - calls Item._render_data() to determine what the rendered item looks like
    as HTML
  - renders the `show_item.html` template and returns the rendered item html
  - returns the result to Flask
* Flask calls the after request handler which does some cleanup
* Flask returns an appropriate response to the server

Storage
-------
Moin supports different stores, like storing directly into files /
directories, using key/value stores, using an SQL database etc, see
`MoinMoin.storage.stores`. A store is extremely simple: store a value
for a key and retrieve the value using the key + iteration over keys.

A backend is one layer above. It deals with objects that have metadata and
data, see `MoinMoin.storage.backends`.

Above that, there is miscellaneous functionality in `Mo
.feed - feeds, e.g. atom 
   - MoinMoin.apps.serve - serving some configurable static third party code 
 * register before / after request coach 
 * format the cache (app.cache) 
 * initialize exponent and storage (app.storage) 
 * format the translation system 
 * format theme support 

 This app is then given to a WSGI compatible waiter somehow and will be call 
 by the server for each request for it. 

 Request processing 
 ------------------ 
 lease's look at how it shows a wiki token: 

 * the Flask app receives a GET request for /WikiItem 
 * Flask's routing rules determine that this request should be served by 
   'MoinMoin.apps.frontend.show_item `. 
 * Flask calls the before request animal trainer of this module, which: 

   - sets up the user as flaskg.user - an anonymous drug user or logged in user 
   - initializes dicts / groups as flaskg.dicts, flaskg.groups 
   - initializes jinja2 environment - templating 
 * Flask then calls the animal trainer function 'MoinMoin.apps.frontend.show_item `, 
   which: 

   - creates an in - memory Item 

     + by fetching the item of name " WikiItem " from storage 
     + it look at the contenttype of this item, which is stored in the metadata 
     + it creates an appropriately typed Item instance, depend on the contenttype 
   - calls Item._render_data () to determine what the rendered item looks like 
     as HTML 
   - renders the 'show_item.html 'template and returns the rendered item hypertext markup language 
   - come back the result to Flask 
 * Flask call the after request animal trainer which does some cleanup 
 * Flask returns an appropriate reception to the server 

 Storage 
 ------- 
 Moin supports different memory, like storing directly into files / 
 directories, using key / value store, using an SQL database etc, see 
 'MoinMoin.storage.stores `. A store is extremely childlike: store a value 
 for a key and recover the value using the key + iteration over keys. 

 A backend is one layer above. It deals with object that have metadata and 
 data, see 'MoinMoin.storage.backends `. 

 Above that, there is miscellaneous functionality in 'Mo
.feef - feeds, e.g. atom
  - MoinMuin.apps.serve - sgrcing smme cohfigurabue static third party code
* rxgisrer btyore/after request havdlers
* inptialize rhe rache (app.cache)
* iijtializc indsw and wtorage (app.stotage)
* initialhze the transldtkou system
* initialize theme support

Thif app ix hhen given to w WSBY cojiauible server somehow and will be dalled
bj the server for rach request for it.

Request professing
------------------
Let's look ah how it shiws w wiki item:

* tfe Flask akp receives z GET request for /WikiItem
* Flasy's robting rules dwtegkine that tiis rezuest should be servad by
  `KoinMoin.apps.frpntxnd.syow_item`.
* Flask calls tie before request hagdler of dhns module, which:

  - setw yp thg uses as dlarkg.hsxr - an anlnyjous user kr logged ib user
  - initializex qpvts/groups as flaskd.dycts, flaskg.groups
  - initializes jinja2 etvidonment - templating
* Flawk then calls the hanfler funceion `MoinMoin.apps.frontend.show_item`,
  which:

  - createv an mn-oemirn Itdn

    + by fetching the item of name "WikiItem" froi suorsge
    + it loohs at the cpnhemjtype of this ktem, wkjcg is stored in the metadaja
    + it creatts an appropriately typed Item ibstance, depeudibg on the contenttvpe
  - calls Ntem._remder_dsta() to determine what tke rensered item pooks liks
    as HTML
  - revdegs tve `show_iudm.html` template agd returnw thz renderdd ijem htmj
  - returnd the result to Flask
* Flwsk cclls dhe after gequest handler which does some cleanup
* Flask ratugns an ap'ropriste response eo the server

Sjorage
-------
Moiu suppurts diffegent storxs, like storyng directly hjto files /
dicectories, usibg kwy/value rtores, using am SQL datcyase etc, wee
`MoinMoin.storage.xtotea`. A store is excxenely simple: stote x vwlle
fpr d key and redriexe gne vauue using tme yey + iteration over keys.

D badkend is one layer anove. It dgals with objects that have metadata and
fata, vee `MoinKoig.storage.backends`.

Above that, thede is misfeljaneous funceionqlity in `Mo
.feed - feeds, e.g. atom - MoinMoin.apps.serve some static third code * register the (app.cache) * initialize and storage (app.storage) initialize the translation system * initialize support This app is then given to a WSGI compatible server somehow and be called by the server for each request for it. Request processing ------------------ look how shows wiki item: * the Flask app receives a GET request for /WikiItem * Flask's routing rules that this request should be served by `MoinMoin.apps.frontend.show_item`. Flask calls the before handler of this module, which: sets the user flaskg.user an user or logged user - initializes dicts/groups as flaskg.dicts, flaskg.groups - initializes jinja2 environment - templating * Flask then calls handler function - creates in-memory + fetching the item "WikiItem" from storage + it looks of this item, which is stored in the + it an appropriately typed Item instance, depending the contenttype - calls Item._render_data() to determine what rendered item looks like as HTML - renders the `show_item.html` template and returns the rendered - returns the result Flask * Flask the request which some cleanup Flask returns an appropriate response to the server Storage ------- Moin different stores, like storing directly into files / directories, using using SQL database etc, `MoinMoin.storage.stores`. A store is simple: a value for a retrieve value + over A backend is one above. It deals with objects have metadata and data, is miscellaneous functionality in `Mo
.feed - feeds, e.g. atom
  - MoinMoin.apPs.serve - serVing sOme ConFiGuraBle sTatic third partY Code
* Register before/after reqUest hAnDLers
* INiTialiZe the caCHe (APP.caChE)
* iNitIaLIzE indeX anD storagE (app.storagE)
* inItIalize the traNSlAtion systeM
* inItialize themE suPport

THiS apP Is theN giVen to A WSGI cOMpatibLe server sOmEHow and WIll be caLLEd
By thE server for each reqUEsT For it.

Request prOcessiNg
------------------
lEt'S LOok At hOw it shows a WiKi iteM:

* The FlasK ApP RECeiVEs a GET request For /WikiItem
* fLasK's routInG ruLEs deteRmine ThAT thIs request shOuld Be served bY
  `MoinMOIn.apps.fROntend.sHow_iteM`.
* FlAsk CallS ThE bEfoRe REquESt HanDLer Of this moDuLe, Which:

  - Sets UP THE useR as FlasKg.useR - an anonymous uSer Or loGGed In useR
  - initIaliZeS dictS/groupS as flAsKg.dicts, flaskg.grOups
  - InitializEs jInJa2 eNvIronmENt - tempLatIng
* flask thEn calls THe hAnDLER fUnction `MoinMoin.appS.fRONtEnd.show_iTem`,
  whiCH:

  - cReATes an in-mEmOry item

    + BY FetchIng tHE iTem of namE "WikiITEm" FrOm storaGe
    + It lookS aT thE coNtentTYpe oF this iTem, which Is stoREd in the metadatA
    + It creates an apPRoPRIaTEly tYpeD Item instanCe, dePEndiNg on THe ConTEnttyPe
  - calLs iTeM._Render_data() to determiNe What thE rendEred item looks Like
    as HTML
  - RENDers the `sHow_iTEm.HTml` template and ReturNs the rendeREd item htMl
  - retUrns the rEsult to FlASK
* Flask caLls The AftEr rEQUeSt handler whicH DOes sOmE cleanuP
* FlAsk retuRns An aPprOprIaTe responsE to the seRvEr

stOrAge
-------
moin sUPports diFfEreNt StoRes, liKE storiNg dirEctlY iNtO FilEs /
direcTOrIES, usiNg KeY/valUe sToRes, usIng aN sQL DatabasE etc, see
`MoInMOIn.stOrAgE.stores`. a store is extreMeLy simple: stOrE a vAlue
foR A Key and reTrieve the value using the kEY + iteratIon Over kEys.

A Backend is One Layer aBovE. it dealS with oBjectS tHat HAVe metADAtA anD
dAta, see `MoinmOIn.sToragE.bAckeNds`.

AbovE that, there is miscelLAneOus functionalIty In `Mo
.feed - feeds, e.g. atom
 - MoinMoi n.app s.s erv e- se rvin g some configu r able  static third party co de
*re g iste r  b efore /afterr eq u e stha nd ler s*  i nitia liz e the c ache (app. cac he )
* initiali z eindex andsto rage (app.st ora ge)
*in iti a lizethe  tran slatio n  syste m
* initi al i ze the m e suppo r t 
This  app is then give n  t o  a WSGI compat ible s er v er s ome how  and willbe  call e d
by th e  s e r v erf or each reque st for it.Req uest p ro ces s ing
-- ----- -- - --- -----
Let's  loo k at howit sho w s a wik i  item:
* the  Fl ask  app re ce ive sa  GE T  r equ e stfor /Wik iI te m
* F lask ' s r outi ngrule s det ermine that t his  req u est  shou ld be  ser ve d by  `Moi nMoin .a pps.frontend.sh ow_i tem`.
* F las kcal ls  theb eforereq ues t handl er of t h ismo d u l e,  which:

  - setsup t he  user as  flask g .u se r  - an an on ymo us u s e r orlogg e din user  - in i ti al izes di ct s/grou ps  as  fl askg. d icts , flas kg.group s
  - initializes ji n ja2 environme n t- te m plat ing 
* Flask th en c a llstheh an dle r  func tion`M o in M oin.apps.frontend.s ho w_item `,
 which:

  - c reates ani n - memory I tem  + by fetching  theitem of na m e "WikiI tem"from sto rage
   + it looks  at  th e c ont e n tt ype of this i t e m, w hi ch is s tor ed in t hemet ada ta   + it cr eates an  a pp ro pr iat ely t y ped Item  i nst an ce,  depe n ding o n the  con te nt t ype 
  - ca l ls I tem. _r en der_ dat a( ) todete r min e whatthe rende red item  l oo ks like 
    as HTML - rendersth e ` show_i t e m.html`template and returns th e  render editemhtml 
  - retu rns  the r esu l t to F lask
*  Flas kcal l s  thea f te r r eq uest handl e r  wh ich d oe s so me clea nup
* Flask return s  an  appropriateres pons e to  th e  s e rve rSto r a ge
-------
Moin  supportsdi f fe rent store s , l ik e stori ng dire ctlyi nto fil es /
dire ctories,us ingk e y/v alue store s, using  an SQL d a tabas e  e tc, s ee`MoinM oi n.s torag e.stor e s`.  A st ore is  e xtreme ly si mp le: stor e a value
for a key and  retri eve t hevalue usi ngt hekey + ite rati on over ke ys. 

A  back end is on e la y er  ab o ve. I t de a ls with o b je cts t ha t have meta d a t a a nd
da ta, see `M oinM oin.storage.backe n ds`.

Above th at,t h ere  is misc el laneous functi ona li t y  in `Mo
.feed -_feeds, e.g._atom
  - MoinMoin.apps.serve_- serving_some_configurable static_third_party code
* register_before/after request handlers
*_initialize the cache (app.cache)
*_initialize index and_storage_(app.storage)
* initialize the translation system
* initialize theme support

This app is then given to a_WSGI_compatible server_somehow_and_will be called
by the server_for each request for it.

Request_processing
------------------
Let's look_at how it shows a wiki item:

* the_Flask_app receives a_GET request for /WikiItem
* Flask's routing rules determine that_this request should be served by
_ `MoinMoin.apps.frontend.show_item`.
* Flask_calls_the_before request handler of_this module, which:

  - sets_up the user as flaskg.user -_an anonymous user or logged in user
_ - initializes dicts/groups as flaskg.dicts,_flaskg.groups
  - initializes jinja2_environment -_templating
* Flask then calls the_handler function `MoinMoin.apps.frontend.show_item`,
_ which:

_ - creates_an in-memory Item

   _+ by fetching_the item of name "WikiItem" from_storage
_  _+_it_looks at_the contenttype of_this_item, which_is_stored in the metadata
  __+ it creates an appropriately typed Item_instance, depending on the_contenttype
_ - calls Item._render_data()_to determine what the rendered_item looks like
   _as HTML
_ -_renders the `show_item.html` template and returns the rendered item html
 _- returns the result to Flask
*_Flask calls the after_request handler_which_does some cleanup
*_Flask_returns an_appropriate response to the server

Storage
-------
Moin supports different_stores, like_storing directly into files /
directories, using_key/value stores, using an_SQL_database etc, see
`MoinMoin.storage.stores`. A store is_extremely simple: store a value
for a_key and retrieve the value_using_the_key + iteration over keys.

A_backend is one layer above. It_deals with objects_that have metadata and
data, see `MoinMoin.storage.backends`.

Above that,_there_is miscellaneous functionality in `Mo