Week 12 - 2020
The weeknote for 3/16 - 3/22.
MyProject
Tententen
https://github.com/monoidcc/Tententen
- Continued working on Tententen. This week I felt I almost finished the prototyping. I continue working on it next week to approach further to the end of the work.
capsid
https://github.com/capsidjs/capsid
-
Continued working on it. This week I added
@pub
,@sub
, and@innerHTML
decorators.@innerHTML
is the syntax sugar for the next pattern:@component('foo') class Foo { __mount__() { this.el.innerHTML = ` <p><span>Hello, world!</span></p> ` } ... }
The above very frequent pattern of initializing innerHTML at mount lifecycle becomes like the below using
@innerHTML
decorator:@component('foo') @innerHTML(` <p><span>Hello, world!</span></p> `) class Foo { ... }
@pub
and@sub
are, as their name suggest, the decorators for building pub/sub pattern in capsid components.@pub
publishes event to the elements which havesub:{event}
class. For example:@component("foo") class Foo { @pub("bar") bar() {} }
The above bar method publishes
bar
event to the elements which havesub:bar
class. In this case, the class namesub:bar
means that the element is the subscriber ofbar
event.On the other hand,
@sub
decorator adds classsub:{event}
to the element:@component("baz") @sub("bar") class Baz { @on("bar") bar() {} }
In the above example,
baz
component automatically hassub:bar
and therefore it becomes the subscriber ofbar
event. It catches the event from the corresponding@pub
decorator 👍 Because we have@is
decorator already,@sub(event)
decorator is the simple syntax sugar for@is('sub:' + event)
.The addition of
@pub
and@sub
significantly simplifies the communication between components and they replaces the usages of@notifies
decorator. So I removed@notifies
in the latest version of capsid.js.
Event
#denosawa_tokyo
-
I met with @sadnessOjisan and @imbsky in a restaurant in Yotsuya. I met with @imbsky for the first time.
ワイン #denosawa_tokyo pic.twitter.com/O1ujAwu2MO
— Yoshiya/肩/Deno澤 (@kt3k) March 17, 2020
UIT meetup vol.8
- I talked about deno at the event UIT meetup vol.8 in a VR space provided by cluster. The prepation is a little bit tougher than usual conferences because I couldn't use web browser during my talk. I was also unable to show my terminal, so I need to prepare the movie files for the demo sequences which I wanted to show during the talk. The slides are available here.