2019-03-30 Sat

I attended at PHPerKaigi 2019 day one.

I have listented to:

  • PHPの現場 公開収録
  • たった1人のAPI開発 BEAR.Sundayで解決した課題たち
  • RESTの力
  • サーバーレスPHP
  • Swooleでフレームワークを高速化 - もう動作が遅いなんて言わせない!
  • PHPerのための計算量入門
  • Today's update

"RESTの力" was the most interesting talk in the conference.

I can't say I could understand about thoughts of REST but the talk has given me some hints or ideas about it.

Before I listen the talk, I understood that REST was an only design of URLs.

But It was not a REST at all!

I'd say about REST what I understood without care of misunderstood.

The core concept of REST is that the response is including the URLs to resources.

The user agent can communicate with server following the URLs.

That means the user agent is not required already to know the resource URL to access.

It's contrastive very much against the URL for HTML documents.

You must be knowing to the URL to access a HTML before that you want.

You can access a HTML before you don't know in case of REST.

Because you can track the URL by dynamically responded.

I can feel spreading the world to infinite.

2019-03-29 Fri

I had coding at Gusto.

I tried to apply new concept of my library.

I expected to be easier for mapping but it's not.

New concept requires tag structure.

In simple case of HTMLs, it works that tag structure is following data structure.

But in complex cases, the concept makes just annoying to mapping.

I need some another mapping method.

I have to figure out the essence about data tag mapping in many use cases.

2019-03-28 Thr

I had coding at Saizeriya.

I struggled to introduce new concept into my library as an experimental.

The new concept is data mapping method.

Current concept was mapping by property name vs class of element.

For example, the value of an_object.prop will map to the element that has "prop" in class attribute.

an_object.prop

<div>
    <div class="prop"></div>
</div>

This concept is very simple and easy to understand.

But cons is unexpected mapping to many elements.

For example, You want to map only element under the element that has "first" in class.

But the an_object.prop will map to all elements that has "prop" in class attribute.

an_object.prop

<div class="first">
    <div class="prop"></div>
</div>
<div class="second">
    <div class="prop"></div>
</div>

Thus new concept is considering data structure.

If there is an object like below,

first.prop

It produces a selector like,

".first .prop"

In the case of below tags, the prop is mapped to only element under the element that has "first" in class.

<div class="first">
    <div class="prop"></div>
</div>
<div class="second">
    <div class="prop"></div>
</div>