cypher256's blog

Pleiades とか作った

FW

  • LL 思考、非 OO フレームワーク
  • 高度なレイヤ分け、抽象化、集中管理はなし
  • M
    • Service (POJO Domain Object)
    • Service 全メソッド Dao、他Service 可変 (DDI)
      • +reset()
      • +authorize() throws UnauthorizedException
      • +xxx()
    • Process method Annotation
      • @PreProcess(enum...)
        • NOT_CALL_AUTHORIZE_METHOD
        • NO_VALIDATION
        • CALL_RESET_METHOD_BEFORE_SET - ×:v
    • Fieild
      • String, List, Map, Date, Bean など
      • IFile: uploaded file.
      • ContentOutputStream, ContentWriter
        • +setContentType :def. IE=application/octet-stream-dummy, 非IE=application/octet-stream
        • +setInline :def. false. toggle attachment or inline.
        • +setFileName
    • Converter with Validator (+ for bean) Annotation
      • デフォルトで Service クラス定義, type base.
      • ユーザ定義 BaseService でアノテーションオーバーライド, type + name base.
      • 各サブでもオーバーライド, type + name base.
      • @Validation(.class, propertyName=)
        • StringValidator, min[byte]=, max=, enum...[HANKAKU,ZENKAKU,,,]
        • NumberValidator, min=, max=
        • FuzzyDateValidator
        • PatternValidator, pattern=""
        • DatabaseValidator
    • MessageException
      • -status def:error
      • -List messages
      • +(messageKey, args...)
      • +addMessage() - exists check
      • Message
        • -messageKey
        • -args[]
    • UnauthorizedException extends MessageException
      • -status def:unauthorized
      • リダイレクト後、復元
  • V
    • HTML 非隠蔽
    • Service, Dao, ViewHelper DDI
    • ViewHelper - session remove.
    • param: 暗号化, キー自動生成(オプション)
    • param: service: (組織preffix略)Class#Method service or VTL
    • param: forward:
    • ex.
      • 戻る: service = "/employee/list.htm"
      • 削除: service = "EmployeeService#delete"
      • 登録: service = "EmployeeService#regist"
      • status.success = "/employee/list.htm"
      • status.error = "/employee/input.htm"
    • デフォルト xml escape
    • sample list
      • <#list itemService.items as item>
      • name="items[item_index].bar" value="${item.bar}"
    • @select
    • @checkbox - reset support (multiple 同様)
    • Tool
      • $format / unescape($hoge), date($registDate, "yyyy/MM/dd"), replaceToBR($hoge)
      • $messageProperty / get("employy.regist.success",,,)
      • $context.path / ex. "/xxx"
    • MessageException
      • #foreach ($message in $messageException.messages)
  • C
    • mode base : log, 暗号化
    • POST RIDIRECT GET パターン
    • Open session in view パターン
    • AOP - log のみ
    • State Management
      • Session のみ, ViewState 非サポート
      • 複数ウィンドウ: , キーは cookie 保持
      • 拡張同期トークン: cookie 保持, 初回レスポンス復元 (overridable for db)
    • Servlet
      • #init
      • - FieldMethodizer
      • #handleRequest
      • #preProcess
      • - 新しい windowId 作成し、SerializationUtils
      • #processService
      • - service.authorize
      • - validation
      • - service.xxx
      • - process exception
      • - view setting
      • - commit or rollback
      • #postProcess
  • setting properties
    • mode
    • status.unauthorized = index.htm
    • status.home = index.htm