オブジェクト型(Developer Conference 2018より)

オブジェクト型(Developer Conference 2018より)

Ee9211db17426c7e8dafce314bef3399?s=128

Keisuke Miyako

January 04, 2019
Tweet

Transcript

  1. Object is not JSON by Laurent Esnault JSON JSON !?

  2. JSON != is not

  3. / 好 理由 Inspired 不要 類別 名前 追加

  4. 対 制約 •OB Get (object ; propertyName {; type}) •object.propertyName

    •object[propertyName] •WP GET ATTRIBUTES
  5. 4D Write Pro 4 ⽅法 Four Different ways to Use

    Objects with 4D Write Pro! https://blog.4d.com/four-different-ways-to-use-objects-with-4d-write-pro/
  6. C_OBJECT 変数  変数 値 変数 値 値 $myObject $myObject reference

    != is not
  7. 参照 $myObject:=$otherObject $myObject:=New object $otherObject:=New object $myObject reference1 $otherObject reference2

    $myObject reference2 $otherObject reference2 変数 代⼊ 参照
  8. BLOB TO VARIABLE ($blob ; a.b.c) ->a.b.c  変数 != is

    not × ×
  9. OB SET 特殊性 •OB SET ($myObject ; "code" ; 1)

    変数 •OB SET (myGetObject() ; "code" ; 1) 値 reference reference OB SET 新規 $myObject.code:=1
  10. Null Undefined Undefined 存4 Undefined Null 存4 値 知 C_OBJECT,

    C_COLLECTION C_POINTER Null • : Undefined Null Undefined • If (a.b = Null) Null 状態 値 ,数
  11. 未定義 怖 良 理由 Don’t be Afraid of Undefined Values

    https://blog.4d.com/object-notation-improvement-after-customer-feedback/
  12. 循環

  13. 循環 / v16# BLOB v17# BLOB v17#

  14. / Null Undefined $0.value:=$1.value+$2.value $0->:=$1->+$2->

  15. Non-JSON znƒ BLOB# Integer# Date# 16R6 String type with time

    zone:1 String type without time zone:0 Date type:2 !2018-10-22! "2018-10-22" "2018-10-21T15:00:00.000Z" "2018-10-22T00:00:00.000Z" Stringify:
  16. Non-JSON znƒ BLOB# Integer# Date# 16R6 Time# v17 Pointer# Stringify:

    Image# Stringify: [object Picture] ORDA# Stringify: [object DataStore] [object Entity] [object EntityCollection] Write Pro View Pro# Stringify:
  17. JSON εΩʔϚ JSON Parse JSON Validate DTD XSD SET ARRAY/OB

    GET ARRAY
  18. C_COLLECTION OB SET ARRAY/OB GET ARRAY

  19. 配列 એݴͱఆٛ ARRAY TEXT($arr;n) C_COLLECTION($col) $col:=New collection λΠϓ ⼀律 混4

    ୅ೖ $arr{$i}:="hello" $col[$i]:="hello" αΠζ Size of array($arr) $col.length ఴࣈ 0 ·ͨ͸ 1 ͔ΒSize of array ·Ͱ 0 length-1 C_COLLECTION
  20. Inspired copy concat combine count clear query reduce orderByMethod pop

    remove push sum sort unshift some slice reverse shift resize map join min max orderBy lastIndexOf indices indexOf find filter insert findIndex extract every distinct equal fill countValues average
  21. 追加# 削除# 並 替 # 計算# ⽐較# 複製 挿⼊# 検索#

    取 出 # ⽂字列変換# Inspired extract map some every indices indexOf find filter query join Split string copy concat combine slice distinct equal count sum average min max reduce orderBy orderByMethod sort reverse pop shift remove clear push insert unshift resize fill countValues lastIndexOf findIndex
  22. ⼤幅 拡張 管理 https://blog.4d.com/a-wide-range-of-possibilities-to-manage-your-collections/ A Wide Range of Possibilities to

    Manage your Collections
  23. For each = For ($i;0;$collection.length-1) MESSAGE($collection[$i]) End for

  24. For each = For each ($element;$collection) MESSAGE($element) End for each

    For ($i;0;$collection.length-1) MESSAGE($collection[$i]) End for
  25. For each = = For each ($propertyName;$object) MESSAGE($propertyName) End for

    each
  26. For each = = = For each ($entity;$entitySelection) MESSAGE($entity.name) End

    for each
  27. For each = = = For each ($element;$collection) While($element#"") MESSAGE($element)

    End for each
  28. For each = = = For each ($element;$collection) Until($element="") MESSAGE($element)

    End for each