ivan tsai
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Symfony framework 是一個 PHP 的網頁應用程式框架 基本上,一個框架包括: - 工具箱 - 一組預製的、可快速集成的軟體組件。這意味著你將不得不編寫更少的code,進而降低出錯的風險。這也意味著更高的生產力和投入更多時間可以做那些提供更大附加值的事情的,例如管理指南原則、side effect等。 - 方法論 — 應用程式的“組裝圖”。結構化方法一開始可能會受到限制。但實際上,它允許開發人員在任務的最複雜的地方有效地工作,並且最佳實踐的保證了您開發的應用程式的穩定性、可維護性和可升級性。 <br> 屬於MVC架構 --- - Model - Doctrine 對資料庫做管理 - database abstraction - database access - View - Twig 樣板顯示頁面 - view - template - layout - Controller - 結合從 Doctrine 取到的資料傳送給相對應的 Twig 頁面進行顯示 - front controller - action ![](https://i.imgur.com/3sV9D7c.png) MVC可增加系統的擴充性與彈性,並降低邏輯與介面之間的耦合 與傳統的網頁設計相比,採用框架來進行開發可以有助於減輕網頁開發時共通性活動的工作負荷,例如許多框架提供資料庫存取介面、標準模板以及會話管理等,可提昇程式碼的可再用性。 利用MVC架構,可以將各級之間的分功能有明確的定義,增加整個系統的閱讀性,並可減少系統的複雜度。 整個系統的前端後端可以明確的分離,可以讓開發人員作有效的開發。 symfony特色 === - 易於在大多數平台安裝和配置(保證能在*nix ,windows平台上執行) - 獨立的資料庫引擎 - 在大多數情況下能夠簡單使用,也能夠靈活的適應複雜的情況 - 基於常規配置的前提,開發者只要配置非常規的部份 - 符合大多數Web最佳實踐與設計模式 - Enterprise-ready(企業就緒)適用於現有的IT政策與架構,並且能對長期項目提供足夠穩定的支援 - 非常易讀的程式碼,帶有phpDocumentor注釋,以利於維護程式碼 - 易於擴展,允許與其他供應商(vendor)的函式庫集成 >所謂的vendor所有application/framework都依賴於使用者使用composer管理,可以再這當中找到所有應用程式的依賴關係(libraries) 實現了多數web自動化的功能 === Web 項目的大部分常見功能在 symfony 中都是自動化的,如下所示: - 內建的internationalization layer允許資料和界面轉譯,以及內容localiztion。 - 展示層面使用的模板和layout可以由 HTML 設計人員構建,無需任何framework知識。helper透過將大部分code封裝在簡單的函數,來減少要編寫的code。 - 表單(form)支持自動驗證和重新填充功能,這確保了資料庫中數據的良好品質和更好的使用者體驗。 - 輸出轉譯保護應用程式免受損壞資料的攻擊。 - 緩存(cache)管理功能可減少bandwidth使用和server負載。 - 身份驗證和credential features有助於創建受限的sections和用戶安全管理。 - 路由(rounting)和smart URL 使頁面地址成為界面和搜索引擎友好的一部分。 - 内建的電子郵件和 API 管理功能允許 Web 應用程式超越經典的瀏覽器互動。 - lists 是對使用者更友善的,感謝自動化的pagination,排序,filtering - factoris、插件(plug-ins)和事件(events)提供了高度的可擴展性 開發環境和工具 === 為了滿足企業有自己的code指南和項目管理規則的要求,symfony 可以完全客製化。 預設情況下,它提供了多種開發環境,並與多種工具捆綁在一起,可以自動執行常見的軟體工程任務: - code生成工具非常適合原型設計(prototyping)和一鍵式後端管理。 - 內建的單元和功能測試框架提供了允許測試驅動開發的完美工具。 - debug面板透過在他正在處理的頁面上顯示開發人員需要的所有資訊,來加速debug速度。 - 命令行界面(command-line)可在兩台服務器之間自動部署應用程序。 - 即時的配置更改是可能且有效的。 - 日誌記錄(log)功能為管理員提供有關應用程式活動的完整詳細信息。 配置symfony === 配置內容保存於yaml格式編寫的文件中,也可以選用其他格式 配置文件在任何計劃、應用程式、模組中會放在目錄結構的層級 可以定義多組配置,在symfony中一組設置稱為環境 配置文件中定義的值可從php code取得,symfony授權的yaml文件中的php code和技巧,可以使配置更加有彈性 配置系統方面,多數web都有共同特徵,某些部份可以可以限制為用戶的子集,葉面可以由佈局(layout)裝飾,或者驗證失敗後可以用戶透過表單來重新驗證身分。 框架(framework)所定義的結構可以用來模擬這些特徵,開發人員可以透過更改配置來進一步作調整。 這種策略節省了大量的開發時間,即便配置背後很多多程式碼,使用此策略甚至不用改動到一行程式碼。用此方法配置會更有效率,因為他可以確保這些資訊能保存在一個更容易識別的位置。 然而此方法有兩個很嚴重的缺點: * 開發者還是要編修無止盡且複雜的XML檔案 * 在php架構下,每個請求(request)都是一個很長的過程(process) 考慮到這些缺點,Symfony只在他們最擅長的地方使用配置文件,事實上symfony中配置的目標是: * 強大(powerful) 使用配置文件來管理幾乎可以涵蓋所有面向 * 簡單(simple) 配置的許多面向沒有呈現在應用程式中,因為他們不太需要更改 * easy(容易)配置文件對開發者而言是易讀,易於修改及易於創造的 * customizable(客製化)預設的配置文件語言是YAML也可以是INI, XML或者任何開發者所偏好的語言 * fast(快速)配置文件不由應用程序處理,而是由配置系統處理,透過PHP server編譯fast-processing chunk of code(快速處理代碼塊)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully