Skip to content

Instantly share code, notes, and snippets.

@bobbyjam99-zz
Created February 15, 2016 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobbyjam99-zz/608be5f4a6f065680978 to your computer and use it in GitHub Desktop.
Save bobbyjam99-zz/608be5f4a6f065680978 to your computer and use it in GitHub Desktop.

CQ Development - Guidelines and Best Practices を自分理解用のために意訳。

ガイドライン、ベストプラクティス

テンプレートやコンポーネントを使用する際のガイドライン

  • ページの新しいタイプを作るために存在しているテンプレートを再利用する。
  • 新しいページには paragraph system (parsys/iparsys) を使う。
  • アクセス権を定義します。paragraph systems のデザインモード。権限が割り当てられた人のみ編集できるように。
  • Define the components allowed in the given paragraph system so that editors can then place the required components ont he page. In our case it could be a list component, which can traverse a subtree of pages and extract the information according to predefined rules.
  • Editors add and configure the allowed components, on the pages they are responsible for, to deliver the requested functionality (information) to the business.

CQ をベースにした開発者たちは使うべきだ。

  • 均一性や商標保護のための paragraph system 設計へのテンプレートやアクセスコントロール
  • 柔軟性に対する設定オンションを含めた paragraph system

以下に記載する開発者への一般的なルールは、通常のプロジェクト大部分で意味を成す。

  • テンプレート数を少なくする - Webサイト上で根本的に異なるページ構造を少なくする
  • カスタムコンポーネントに必要な柔軟性と構成機能を提供すること
  • CQ paragraph system (the parsys & iparsys components) のパワーと柔軟性を最大限に活用

コンポーネントのカスタマイズと他の要素

注意

/libs の中は何も 変更してはいけません。

設定や他の変更を行うためには

  1. /libs のアイテムを /apps にコピーする
  2. /apps 内で任意の変更を行う

JCR クエリを使う場面、使わない場面

JCR クエリは

  • コンテント上のフルテキスト検索のようなエンドユーザの実際の検索

セキュリティ考慮事項

セキュリティチェックリストも合わせて見る価値があります。

JCR (repository) セッション

ユーザセッションを使うべきで、管理セッションを使うべきではない。

クロスサイトスクリプティングに対する防御

機密情報に対するセキュリティ保護通信

  • トラフィックは SSL を利用して暗号化する
  • 可能ならば HTTP POST を利用する

明確な開発課題

エラーページのカスタマイズ

エラーページはカスタマイズ出来る。インターナルサーバエラーのトレイスを明らかにしてはいけない。

Java プロセス内でのファイルオープン

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment