GithubHelp home page GithubHelp logo

cljwtang's People

Contributors

itang avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

cljwtang's Issues

defhandler重构

  • 支持自动生成路由
  • 支持自动生成功能点
  • 支持route-one/defroute
  • 验证逻辑
  • validates-fn , failture 支持引用handle参数
  • with-routes 支持 context-path

功能点定义重构?

{:fp-name "sss"}

{:fp true}
fp-name 来自 handler name

{:fp "功能点"}

fp-perm 来自 {:perm }

defhandler 路由定义重构

支持
{:method :get :path "/about"}

{:get "/about"}
{:post "/about"}

{:method :get} ; :path (str "/" handler-name)

wrap-anti-forgery custom-error-response

(defdynamic custom-error-response
{:status 403
:headers {"Content-Type" "text/html"}
:body "

Missing anti-forgery token

"})

(def app
(-> handler
(wrap-anti-forgery {:error-response custom-error-response})
(wrap-session)))

validate 重构

1 引入noir.validation

2 defhandler , validate meta

 {:path "/"
  :validate '(validate-rule (has-value? username)  [:username "用户名输入错误"])
  :on-validate-error   (do )
  }

3 flash

整合friend

1 融入 defhandler, with-routes

(defhandler xxx
{:perm "admin"
:auth true}
[])

(with-routes xxxx {:perm "admin" :auth true}

(defhandler )

)

2 friend依赖的功能可插拔

3 401 403 页面可定制

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.