美文网首页
Phoenix:Guide:Overview

Phoenix:Guide:Overview

作者: bookinstock_ | 来源:发表于2018-06-05 07:18 被阅读13次

    Phoenix

    web framework

    Features

    mvc pattern

    high developer productivity

    high application performance

    channel - real time feature

    precompiled templates

    Learn

    elixir guide

    elixir learning resource

    phoenix learning resource

    my collections

    Phoenix Components

    internal parts (each with its own purpose and role)

    • endpoint: request lifecycle, dispatches request to router

    • router: parses request and dispatches it to controller action

      • pipeline: groups of plugs to a set of routes
    • controller: define action to handle request

      • action: prepare data and render or redirect
    • view: render templates, act as a presenter, define helpers

    • template: structure with dynamic data, precompiled and fast

    • channel: manage sockets for easy realtime communication

    • pub-sub: underlies the channel layer, allow client to subscribes to topics

      • pub-sub adapter: abstract for third-party pub-sub integration

    Phoenix Layers

    multi-layer system designed to be modular and flexible

    • cowboy: web server. guide

    • plug: a specification for constructing reusable modules or functions. guide, doc

      • plugs can be defined and executed in a set order, line pipeline.

      • example: authentication, params pre-processing, rendering, etc.

    • ecto: orm, dsl, database wrapper

      • repo: a connection to an individual database

      • schema: data definition and associations

      • query: retrieve data from repo and cast it into schema

      • changeset: declare transformations action on data

        • includes: type casting, validations, and more

        • postgresql: default database

    来源:Phoenix doc

    相关文章

      网友评论

          本文标题:Phoenix:Guide:Overview

          本文链接:https://www.haomeiwen.com/subject/vcnusftx.html