<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jerng</title>
    <description>The latest articles on DEV Community by Jerng (@jerng).</description>
    <link>https://dev.to/jerng</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F223008%2F6b885e2c-7eaf-4477-a036-702c72467e57.jpeg</url>
      <title>DEV Community: Jerng</title>
      <link>https://dev.to/jerng</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jerng"/>
    <language>en</language>
    <item>
      <title>Decoupling Web Application Eventing from the DOM</title>
      <dc:creator>Jerng</dc:creator>
      <pubDate>Wed, 04 Sep 2019 17:56:18 +0000</pubDate>
      <link>https://dev.to/jerng/decoupling-web-application-eventing-from-the-dom-5g4h</link>
      <guid>https://dev.to/jerng/decoupling-web-application-eventing-from-the-dom-5g4h</guid>
      <description>&lt;p&gt;&lt;i&gt;Sometimes I think, I write things which make no sense at all. Then I frame them up for farther consideration.&lt;/i&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  
&lt;/h2&gt;

&lt;p&gt;TL;DR: Can you guys tell me about programs which:&lt;/p&gt;


&lt;blockquote&gt;

&lt;ol&gt;
&lt;li&gt;implement "events" and "event listeners" ...&lt;/li&gt;
&lt;li&gt;... on web clients... (not servers)&lt;/li&gt;
&lt;li&gt;... outside of the the DOM (events are not attached to DOM elements)
&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;? 




&lt;p&gt;I just found a bug in common web applications. This has been bugging me for some time, and I'm relieved to have nailed it finally (I think). Caveat emptor: this is an architectural bug that is expansive throughout the web application ecosystem, so it may not be easily viewed as a bug.&lt;/p&gt;

&lt;p&gt;The DOM is supposed to be a document, not a business processor. But for quite a few years now, people have been using DOM events &amp;amp; event-handlers as business processors, instead of as mere documents. This has royally fucked up the separation of concerns between the DOM tree, Web Application APIs (Javascript), and Rendering (CSS, etc.).&lt;/p&gt;

&lt;p&gt;It just so happens that usually, the only place to plant event listeners, and the only place to trigger events, is on DOM elements. So what happened is that in pursuit of writing event-driven business processes into code, people have been writing event-driven business processes into the DOM. &lt;/p&gt;

&lt;p&gt;The data structure of a web application is NOT supposed to depend on a DOM tree. Therefore close-coupling between {data models in a web application} (read in 2019 as "stores"), and {specific node trees in a DOM} is an anti-pattern.&lt;/p&gt;

&lt;p&gt;But isn't the DOM supposed to mediate such user-interface actions as receiving input from the user, and sending feedback to the user, you might ask? Yes, of course, these can be modelled as events, and the DOM provides us data structures pertaining to those events, as well as ways to operate on those structures (listeners). &lt;/p&gt;

&lt;p&gt;But that does NOT mean that the DOM is also supposed to handle traffic control for events throughout an entire web application. A web application should have an eventable control centre which lies OUTSIDE the DOM. (That is, outside any light, shadow, or virtual DOM, in case it wasn't clear). We generally know how to do this on the server, since NodeJS lit the rage on this. But web applications are not always supposed to run on the server - often times we want a web application to run robustly on the client side, and to depend on servers only for federated data stores. So how do we go about writing web application CLIENTS that have EVENT-driven traffic control OUTSIDE the DOM?&lt;/p&gt;

&lt;p&gt;With that in mind, I searched for implementations of event listeners outside the DOM, and was pointed to the &lt;a href="https://subscription.packtpub.com/book/web_development/9781783287314/1/ch01lvl1sec09/the-reactor-pattern"&gt;Reactor pattern&lt;/a&gt; by this &lt;a href="https://stackoverflow.com/questions/15308371/custom-events-model-without-using-dom-events-in-javascript"&gt;thread&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I look forward to examining it more closely, perhaps with your input.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My Limited Experiences in Machine Computation / FFWD: Web Dev in 2019
</title>
      <dc:creator>Jerng</dc:creator>
      <pubDate>Tue, 03 Sep 2019 19:39:45 +0000</pubDate>
      <link>https://dev.to/jerng/my-limited-experiences-in-machine-computation-ffwd-web-dev-in-2019-2lfg</link>
      <guid>https://dev.to/jerng/my-limited-experiences-in-machine-computation-ffwd-web-dev-in-2019-2lfg</guid>
      <description>&lt;h1&gt;
  
  
  Past
&lt;/h1&gt;

&lt;p&gt;In the 1990s, I used to play games on a monochrome XT. It also ran QBasic, but I never learnt how to use that properly. I first got involved in website development in secondary school, on voluntary projects.&lt;/p&gt;

&lt;p&gt;In the summer of 2004, if memory serves me right, I developed websites industrially at an internship. This was a mix of design and development work, involving HTML, CSS, and Flash/ActionScript. We used Windows machines.&lt;/p&gt;

&lt;p&gt;In 2006, I learnt how to use spreadsheets at a management consulting firm. In 2007, I learnt how to write scripts in Excel.&lt;/p&gt;

&lt;p&gt;In early 2009 I found myself helping an entrepreneur to assemble, from untrained talent, a small web development product, in CakePHP on LAMP, and jQuery. Here I also learnt how to use Vim, VirtualBox, and SSH.&lt;/p&gt;

&lt;p&gt;In 2012, I took some time off to study Git, MongoDB, Erlang, and Haskell, among other things. I developed a superficial understanding of these things, and their related fields of technology.&lt;/p&gt;

&lt;p&gt;In 2014, I worked in a few software development operations, none of which could be called robust. I practiced quite a bit of responsive web design, and learnt how to work very superficially on cloud infrastructure.&lt;/p&gt;

&lt;p&gt;In 2015, I got around to starting work on AWS.&lt;/p&gt;

&lt;p&gt;It is now 2019. Web standards were a mess ten years ago, and they appear to remain a mess now, albeit somewhat cleaner.&lt;/p&gt;




&lt;h1&gt;
  
  
  Present
&lt;/h1&gt;

&lt;p&gt;In preparation for web development at work, I've been reading to catch up on lost time.&lt;/p&gt;

&lt;p&gt;In terms of separation of concerns, the dichotomy of HTML for content and CSS for presentation... seems to be continually abused.&lt;/p&gt;

&lt;p&gt;Fortunately, with the advent of Custom Elements v1, we can now officially rant at people who redefine vanilla HTML elements to do absurdly irrelevant things - not that this is going to stop everyone from trying to distort the semantics of the given tags.&lt;/p&gt;

&lt;p&gt;There remains no standard [data storage model] for [web applications].&lt;/p&gt;

&lt;p&gt;There remains no standard [application architecture] for [web applications].&lt;/p&gt;

&lt;p&gt;In the debates on UX, web developers seem obsessed with web rendering performance, and little else.&lt;/p&gt;

&lt;p&gt;In the debates on DX, web developers seem obsessed with workflow ergonomics, to the detriment of considerations on what the standards should be.&lt;/p&gt;

&lt;p&gt;In short, little has changed. I look forward to reviewing this all tomorrow when I get back to work on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Legalistic View
&lt;/h2&gt;

&lt;p&gt;I accept that many people will not agree with me on the following point, and I think that's perfectly reasonable for them.&lt;/p&gt;

&lt;p&gt;First and foremost, I think a web developer needs to forget about commercial concerns when embarking upon the selection of tools for developing a web site or a web application. The domain of web development is politically governed by commercial implementations of renderers, i.e. browser implementations - and the only thing holding that Mexican standoff in place is the good old W3C. When the limitations of browser implementations become the primary concern of web developers, it is then that web developers lose sight of the end-game... which is an eventual redundancy of such war and the eventual emergence of a boringly staid technology stack. However, given the way technology works, that's probably only going to happen when the stack has been tooled down to the molecules. So for the time being, I guess we're stuck in this decades long race to be first to grasp at infinitely durable design patterns.&lt;/p&gt;

&lt;p&gt;That being said, I think that at this time I want to approach web development with a modular lens. A web development framework should bridge... the standard semantics of the media, with the availability of innovative programs that enable the standard media to do various things. I think an explicit plumbing skeleton which lets users plug in their preferred data store, state management rules, router, node differ, renderer, etc. is in order. (Poor old Project Ara comes to mind.) All of this should explicitly warn users of the framework, where and when standards endorsed architectural patterns are being either encouraged or denied.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>standards</category>
      <category>frameworks</category>
    </item>
  </channel>
</rss>
