<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Appurist Software on Medium]]></title>
        <description><![CDATA[Stories by Appurist Software on Medium]]></description>
        <link>https://medium.com/@appurist?source=rss-a148f778fd6b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cT2lcOo_vQmyMfGLcR31Wg.png</url>
            <title>Stories by Appurist Software on Medium</title>
            <link>https://medium.com/@appurist?source=rss-a148f778fd6b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 17 May 2026 09:29:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@appurist/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[A Shift In Attitudes 2020]]></title>
            <link>https://medium.com/@appurist/a-shift-in-attitudes-2020-3c7e0c3a7ec?source=rss-a148f778fd6b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c7e0c3a7ec</guid>
            <category><![CDATA[javascript-frameworks]]></category>
            <category><![CDATA[fastify]]></category>
            <category><![CDATA[javascript-development]]></category>
            <category><![CDATA[vue]]></category>
            <category><![CDATA[vuetifyjs]]></category>
            <dc:creator><![CDATA[Appurist Software]]></dc:creator>
            <pubDate>Wed, 19 Aug 2020 06:46:17 GMT</pubDate>
            <atom:updated>2020-08-19T07:25:06.441Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Four years is a long time in the development world, especially if JavaScript is a key part of that world.</strong> I had previously posted an article about settling down a bit, after spending a year or two learning more about the JavaScript web development ecosystem and finally “overcoming” JavaScript Framework Fatigue (JFF) with <a href="https://medium.com/@appurist/the-mech-stack-solving-javascript-framework-fatigue-3585a4cd3d26">my MECH stack posting</a> from 2016. (Yeah, right.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*NzIgVPHKwR8qbDzpfSqQhA.jpeg" /></figure><p>That naivety led to <a href="https://medium.com/@appurist/a-shift-in-attitudes-b3aae9574375">A Shift in Attitudes</a> the following year. While my go-to stack was starting to shape up, the industry was still going through a major upheaval and I was still too new to recognize that there was no settling down.</p><p>Even today, I think we’re still in that state, with major new frameworks, libraries and tools showing up weekly. So this shift recognizes that I have a new <em>current </em>stack: which is just the set of tools I’m currently using while I hide from JFF.</p><p>I wasn’t going to post anything else on Medium and instead, start posting any new articles on <em>dev.to</em>, since Medium has become so commercial with disabling the ability to read some articles <em>completely</em>, unless you’ve paid a membership fee. But I can’t let my most recent posts refer people to tools and frameworks I no longer use.</p><p>Of course, different projects may call for different tools, but most of my projects both at work and at home have similar needs and complexities, and as a result, I have been able to stick with a few core choices. I’ll list those below.</p><p>I’m going to break this into <em>application</em> (client) and <em>back-end </em>(server) stacks.</p><h4>Current 2020 Tools: Application</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/64/1*6Yq7Dk1edJa9Yw2olIzfpQ.png" /></figure><p>I had <a href="https://medium.com/@appurist/a-shift-in-attitudes-b3aae9574375">written about</a> moving to <a href="https://vuejs.org/"><strong>Vue.js</strong></a> in 2017, and the reasons why there, and it has been solid for me every since. There were a couple of things from React I would have liked to have, but overall Vue was still my preferred web app framework anyway. Furthermore, all of those have been added in the imminent release of Vue 3. Vue is fast and easy to get going with, but has some finesse depth that I’m still learning in year 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/64/1*v55v5uqRll2fyEecy-qF6w.png" /></figure><p>For components and styling, if you’re using Vue, nothing really competes with <a href="https://vuetifyjs.com/"><strong>Vuetify</strong></a>. Incredibly deep, flexible and powerful, it makes my applications really <em>look great</em>. And a creator who cares a lot less about the money than about providing useful tools (so please sponsor him and do what you can to help, I’m sponsoring the project both <a href="https://github.com/johnleider">on GitHub</a> as well as <a href="https://opencollective.com/vuetify">on OpenCollective</a>, as well as having purchased one of their themes). I’ve also contributed to the project with some code work. If you use something for a key part of your work, for free, please do what you can to give back. It may not be much in these times, but with enough of us doing it …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/64/1*Has7s3SWXhanTvkHSQHLwQ.png" /></figure><p>I’ve needed to produce desktop applications for Windows and Linux (occasionally Mac OS X), so <a href="https://www.electronjs.org/"><strong>Electron</strong></a> is my go-to tool there. It is really quite powerful and once you figure out your project (build process), it just works and provides installers as well. It may be as easy as “<em>yarn add electron-builder -D</em>”, but that reminds me to give a special shout-out to <a href="https://www.electron.build/"><strong>electron-builder</strong></a> too.</p><p>I’m generally using <a href="https://fontawesome.com/"><strong>font-awesome</strong></a> icons for all projects. While many developers use the free version, I’ve paid for a license for the Pro version, partly for the extra icons, partly to support them, but as of this year, mostly for the wonderful <a href="https://blog.fontawesome.com/desktop-subsetter-beta/">Subsetter</a> tool that allows you to graphically choose only the set of icons you want for your project, save those choices as a reloadable yaml file, and export the set for use in your app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TIElIYumYcWSLAEoM13nrA.png" /><figcaption>Font-Awesome Subsetter</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/64/1*r_uZC7MNYp-8o3flYwx6fQ.png" /></figure><p>Other than JavaScript itself and core tools like Node, the only component from my <a href="https://medium.com/@appurist/the-mech-stack-solving-javascript-framework-fatigue-3585a4cd3d26">2016 MECH stack post</a> that has survived is <a href="https://cordova.apache.org/">Apache Cordova</a>. It, and it’s twin sibling, <a href="https://phonegap.com/">Adobe PhoneGap</a>, remain a dominant force in JavaScript-based multi-platform mobile development. There are some other notables such as Ionic and Quasar, but Cordova remains at the top of my list. For now!</p><p>There are plenty of other web application development tools and frameworks but you’ve already read plenty about these: Webpack, VisualStudio Code, yarn, etc. I use these as well, but it’s time to cover the server-side stack.</p><h4>Current 2020 Tools: Server</h4><p>I try not to mix-n-match languages, unless there’s no appropriate alternative or some other compelling reason. I do like <a href="https://golang.org/"><strong>Go</strong></a> and <a href="https://www.rust-lang.org/"><strong>Rust</strong></a>, but with the simplicity and availability of <a href="https://nodejs.org/en/"><strong>Node</strong></a>-based JavaScript server code, I have the luxury of focusing on a single language for both sides. I addition to the small syntactic differences, there is also the practical side of occasionally being able to share code or stack tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/64/1*57BkMB9oKHmHDFj-Iw85Qw.png" /></figure><p><a href="https://expressjs.com/">Express.js</a> is a reasonable and solid choice here, but I prefer the lighter and faster <a href="https://www.fastify.io/"><strong>Fastify.io</strong></a> for the back-end. Most of my back-end servers do not have high scalability needs, but I want them to be low-latency snappy regardless. Fastify is a simple, easy and rich framework for providing a collection of endpoint routes, such as in a server providing a REST API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/64/1*F20P0yYeGNuoRD_WPJvDdQ.png" /></figure><p>Almost all of my back-end servers are a combination of <strong>REST API</strong> and a <a href="http://websocket.org/"><strong>WebSocket</strong></a> connection providing push notifications. The <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSocket"><strong>API</strong></a> is quite simple, and there’s no polling, just a possible new async REST request when a particular category or item of data changes. This has worked amazingly well in practice in production use, and allows the server to free resources when the user closes a browser tab or an Electron app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/64/1*GNgqu0jXSYlxB0awjLTVEg.png" /></figure><p>For data storage, I do really like <a href="https://fauna.com/"><strong>FaunaDB</strong></a> for scalable, highly-performant document storage, and the free tier is incredibly generous for almost any project. However, their lack of support for storing larger binary files (e.g. user-supplied images or other blob assets), a possible future cost hanging over my head, and the overwhelming desire to simplify away from a separate database server (this one remote) has led me to a much simpler solution for most of my projects, with no translation and relay of requests to a separate data server, not even a local database:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/64/1*MwgoI3hbNbC8wwnQbdhNiQ.png" /></figure><p>I have come up with a scheme for some of my latest server back-end that uses <strong><em>Node’s native async file I/O</em></strong> to provide data on request with a simplified schema where there are only server-side concepts of <em>users</em>, <em>projects</em> and <em>assets</em> (which can be binary/blob). All of these can be accessed with as <em>single disk op</em>, without any indices or overhead other than the actual folder paths and files. The server will be as fast as Fastify can process a route, the server can verify the Authorization: header, and a single Node fs read can fetch it. I call my new generic API server “<strong>SOSSBox</strong>” (Simple Online Storage Server) and I’m clearly going to have to post a separate article on this server/data storage in the future and document how to make a reusable and configurable standalone server for general storage use, for others to use.</p><p>So I don’t even use Mongo or SQL or Fauna or any other database at the server end currently. That might have to change in the future, but my needs are quite simple at this time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c7e0c3a7ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Async/Await and the Ever-Evolving JavaScript Toolbox]]></title>
            <link>https://medium.com/@appurist/async-await-and-the-ever-evolving-toolbox-746c33304250?source=rss-a148f778fd6b------2</link>
            <guid isPermaLink="false">https://medium.com/p/746c33304250</guid>
            <category><![CDATA[koajs]]></category>
            <category><![CDATA[emberjs]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-frameworks]]></category>
            <dc:creator><![CDATA[Appurist Software]]></dc:creator>
            <pubDate>Wed, 24 May 2017 20:01:41 GMT</pubDate>
            <atom:updated>2017-05-24T20:05:24.734Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Plethora of Choice</h3><p>As I try settle down on JavaScript web app tools, libraries, frameworks and template engines, one thing I’m learning is that the frameworks that shield you from the complexities of knowing a lot about the functionality they provide often don’t <em>really</em> shield you from having to learn those things anyway. Yes, they do, when you’re looking at a simpler example app, or taking a course on a subject, but when you go to code up something of your own that is more meaningful, that uses a library or bit of middleware (for example, Passport.js), it isn’t really going to shield you from learning a lot about that third-party code. You still need to understand Passport.js, or promises (or async/await), or sessions, or local storage, or Redis or Mongo or socket.io or EJS or Vue or Ember or Handlebars or whatever… The brutal truth is that JavaScript web developers need to know many of these in depth, and have a general understanding of the rest, as well as many, many other frameworks, middleware, and libraries. And I haven’t even really even included the actual toolchains in that.</p><p>Now what I think these “easy” and opinionated tools and frameworks actually do very well is provide good recommendations for <em>what </em>to use, from the people who have already been down this path. They, and their users, have often developed an ecosystem that is part of the framework, or built around the framework, that represents all the things you’re likely to need, and the most popular add-ons. There is strength in numbers here, so you can be pretty safe choosing to learn about these.</p><p>For example — and this is just an example, I adore the feathers team, and feathers-authentication — but in trying to add feathers-authentication to my REST API server the first time, I had to dig into Passport and other technical details, because the documentation does not attempt to go very far beyond its own scope, which is a nice, unifying convenience/independence layer, around the underlying authentication mechanisms, appropriate for that framework. In other words, it documents <em>that ecosystem element</em>, often very well, but not necessarily the underlying dependent libraries.</p><p>Maybe I’ve outgrown the opinionated frameworks now and just want to know what their opinions <em>are</em>, rather than actually use the framework and learn another wrapper around those suggested dependencies. Or maybe it’s that since I don’t know these dependencies as well as I should, I can’t appreciate the packaged ecosystems as well as a more informed web developer might. (I’ve got almost 35 years under my belt as a full-time professional developer, much of it developing Internet server software, but in that big picture of decades of development I am still relatively new to JavaScript-based web development.)</p><h3>The Changing Landscape — Async/Await</h3><p>I’ve been starting a lot of smaller new projects, and at each new starting point, I tend to first take a good look around and try to determine what has changed in just a few months here or there. In the world of JavaScript web development, I have never encountered such a fast-changing wealth of options.</p><p>This time around however, I feel it’s finally time to update to <a href="https://nodejs.org/">Node.js 7</a> and start using <strong>async/await</strong> to make my code much more linear, readable and maintainable. This async/await functionality is coming to the ES7 version of JavaScript, is already in the Edge browser, and has been a feature of Node.js since version 7.6.0 (and the current version at the time of this writing is 7.10.0).</p><p>Promises are so 2016, amiright? Hmm. (For more, see <a href="http://stackabuse.com/node-js-async-await-in-es7/">this article</a>.)</p><p>I recently answered <a href="https://www.reddit.com/r/node/comments/692w23/express_vs_koa_with_asyncawait/">a question</a> on reddit that was in theory about Koa.js, but I think in reality it was more about comparing some ES7 async/await code with what would be needed without it (i.e. with promises). I highlighted the linear, non-nested, callback/then-free readable nature of the async/await version:</p><blockquote>Try coding this example with promises:</blockquote><blockquote>var result1 = <strong>await </strong>func1();<br>var result2 = <strong>await </strong>func2(result1);</blockquote><blockquote>it’s about as simple as you can get. Now add a parallel processing of several async requests:</blockquote><blockquote>const items = <strong>await </strong>fetchItems();<br>for (let item of items) {<br> const result = <strong>await </strong>processItem(item);<br> console.log(result);<br>}</blockquote><blockquote>Again, it’s linear code. No callback hell. Easy to see the logic here, and much, much shorter code. For error handling, you wrap it in a try/catch and that’s it, you can deploy this readable, maintainable code.</blockquote><p>In this case, they allow a nice <em>async-friendly, non-blocking </em>Node.js application to efficiently schedule potentially lengthy processes, and in the second part of that, schedule them to run in parallel. In very easy-to-understand and maintain (i.e. and thus more likely to be bug-free) code.</p><p>And best of all, there are no calls to promise-related functions, the concept isn’t really even visible (even if that’s how <em>await </em>is implemented).</p><p>But it goes well beyond that, because there may be more than just potentially slow (and known) processing to perform. There’s nesting, and recursion, and who knows what else, much of which would be a real mess to implement with promises. I think what really grabbed my attention was the small bit of code on <a href="http://koajs.com/">the Koa.js home page</a> in the <em>“Cascading”</em> section that accomplished so much in so little:</p><pre>const Koa = require(&#39;koa&#39;);<br>const app = new Koa();<br><br>// x-response-time<br><br>app.use(async function (ctx, next) {      // 0<br>  const start = new Date();               // 1<br>  await next();<br>  const ms = new Date() - start;          // 5<br>  ctx.set(&#39;X-Response-Time&#39;, `${ms}ms`);<br>});<br><br>// logger<br><br>app.use(async function (ctx, next) {     // 0<br>  const start = new Date();              // 2<br>  await next();<br>  const ms = new Date() - start;         // 4<br>  console.log(`${ctx.method} ${ctx.url} - ${ms}`);<br>});<br><br>// response<br><br>app.use(ctx =&gt; {                         // 0<br>  ctx.body = &#39;Hello World&#39;;              // 3<br>});<br><br>app.listen(3000);                        // 0</pre><p>In this case, the code marked (0) runs linearly on startup, then on a web request, the first provided async function grabs a timestamp (1) and waits for the second function, which grabs its own timestamp (2), then waits for the third one, which is the actual handler that returns ‘Hello World’ as the web page body (3). Then it returns to continue the second function where it left off (4), which logs the request… then returns to the first function which adds the elapsed time for all of that to the X-Response-Time: header (5).</p><p>It’s a linear series of functions, each with their own linear code, that run in a predictable, deterministic manner, calling (via <em>await</em>) nested functions of which <em>the caller isn’t even aware</em>. Whoa. In a different perspective, this is the simplest implementation of coroutines that I have seen.</p><h3>Future-Ready Code</h3><p>Much of this is achievable in ES6 code with <em>generator</em> functions and the <em>yield </em>keyword, but I don’t really like the generator syntax (the use of ‘*’ as something other than an operator) and I see it mostly as a stop-gap placeholder syntax for JavaScript until async/await completely finishes the approval process and is an official part of JavaScript in ES7.</p><p>So instead, at least for Node.js projects, I’m going to use async/await as much as possible, and avoid promises and generators. I’m just going to skip that stage and my code will work in Node 7 and be using the most modern and future-ready features right from the start.</p><h3>Keep The Whole Toolbox Handy</h3><p>Two of my new projects start with providing a REST API only. And yes, I’ve decided to use <a href="http://koajs.com/">Koa.js</a> for those, because it’s lean, unopinionated, modern, from the Express.js team, just newer. It’s what they would have designed if they were starting again and didn’t have backwards-compatibility with existing apps to worry about. I already have my own opinions now. Yes, I’m going to use <a href="http://passportjs.org/">Passport.js</a> for authentication, mostly because I want both local auth, OAUTH1 for Twitter authentication, and OAUTH2 for just about everything else. It’s a lean, mean API-only, so I it seems pretty much ideal for Koa.js. I still love Feathers.js, but here’s the thing:</p><p>I think I’m finally starting to really understand that you shouldn’t go into any given project with any preconceived notions of what frameworks, libraries and tools you will be using. Wait until you get there, check out what else is now available, maybe code up a quick test or proof of concept, see that your work flow is something you can feel comfortable with personally, and that you can easily debug the code, etc.</p><p>There will be some times when you will need to work mostly on one end (back-end or front-end), sometimes it’s both. Sometimes webpack or a full-featured framework is going to be overkill; sometimes it may be critical. Sometimes the most important thing will be performance; other times it will be reliability or maintainability by others. And there will be times when there is an existing body of code that will make the trade-offs lean in a completely different direction than would otherwise be the case for a completely new project.</p><p>I’ve spent quite a long time trying to pick favorite frameworks and tools. I love <a href="https://feathersjs.com/">Feathers.js</a> and <a href="http://vuejs.org/">Vue.js</a> but it’s not a commitment. In my latest project, I will be using Koa.js for the back end, because I think it is simple code and I want to keep the implementation simple and minimal, and because I love the async/await features available now. (These aren’t well documented yet in the ecosystem around it, so in the future I may need to blog this project as an example reference for others.)</p><p>And I’ll be using <a href="https://emberjs.com/">Ember.js</a> (or perhaps <a href="https://glimmerjs.com/">Glimmer.js</a> directly) for the front-end, even though I love Vue.js. I’m doing the back-end API first so in the spirit of my comments above, I haven’t completely decided on the front-end and won’t until I have a chance to review things again when the time comes.</p><h3>On The “Best” Frameworks</h3><p>I think what I’ve learned from this process to find and decide on my favorites is that there are actually a lot of very good frameworks and tools out there. <em>Any one of them</em> is probably a reasonable choice. We don’t need framework battles and disputes; there is no “best” framework any more than there is a best operating system. The best depends on the circumstances, and the many trade-offs involved, which are likely to be specific to the situation. There’s no reason to limit ourselves when starting a new project (unless that is one of the constraints of the organization doing the development work, and in that case it is a business decision, not a technical one).</p><p>That said, we all have our favorites and preferences and likes and dislikes. I’m going to try to stick with JavaScript as much as possible as my primary language. I don’t like the Angular syntax much, and (at least for now) I really don’t like mixing HTML with JavaScript as is common with JSX and React projects. I’m a lot happier with EJS however, and I prefer either Handlebars templates or EJS. I prefer to see interface code broken into reusable components, and I prefer Vue.js for that reason, as well as Ember.js and Glimmer.js. I think most back-ends would do nicely with either Koa.js (modern, lean and independent), or Feathers.js (on Express.js) for something rich and full-featured (full-stack). And I’m likely to keep choosing from those as I go forward with projects.</p><p>But I think it’s important to take a good look around at the changing landscape at the start of each project. Don’t be too tied to a given favorite. Remain flexible, as each project may have it’s own choices for most appropriate.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=746c33304250" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Shift in Attitudes]]></title>
            <link>https://medium.com/@appurist/a-shift-in-attitudes-b3aae9574375?source=rss-a148f778fd6b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3aae9574375</guid>
            <category><![CDATA[feathersjs]]></category>
            <category><![CDATA[emberjs]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[javascript-frameworks]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Appurist Software]]></dc:creator>
            <pubDate>Mon, 27 Feb 2017 01:31:20 GMT</pubDate>
            <atom:updated>2020-08-19T06:51:16.384Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>or… Vue.js and Feathers.js FTW!</strong></p><p><em>Update: Years later now, I’ve posted a 2020 update on my preferred stacks for both back-end and web application development: </em><a href="https://medium.com/@appurist/a-shift-in-attitudes-2020-3c7e0c3a7ec"><em>here</em></a><em>.</em></p><p>Previously <a href="https://medium.com/@appurist/the-mech-stack-solving-javascript-framework-fatigue-3585a4cd3d26#.74ktgyir7">I wrote about</a> how I had settled down with <strong>Ember.js</strong> and <strong>Hapi.js</strong> in my battle with JavaScript Framework Fatigue. (Or so I <em>thought</em> I had.) I also spent quite a bit of time developing a prototype of an application with those frameworks, in order to take a more in-depth look.</p><p>But somewhere along the way I became a bit frustrated. Perhaps quite a bit. Neither Hapi.js nor Ember.js really seemed to be the highly-opinionated (i.e. carefully-guided) ecosystems that I thought they were, and I realized eventually that I was spending more time struggling than coding. There were also some worry signs, one of which was that Eran Hammer had already left Wal-Mart Labs, and moved on to new projects. Both Hapi.js and Ember.js are still really great in many ways, and incremental improvements over others that came before, but … if starting from scratch in 2017, neither was really just solving what I wanted them to solve, and providing what I needed. I wasn’t sure exactly what that was… until I found Feathers.js and Vue.js.</p><h4><strong>Feathers.js</strong></h4><p>While skimming through my Twitter feed one day, yet another reference to <a href="http://feathersjs.com/"><strong>Feathers.js</strong></a> came up, and I remembered that I had taken a mental note in the past to investigate that further. When I started reading about Feathers, I found that the website provided <a href="https://docs.feathersjs.com/v/auk/">great documentation</a> on it, both on the web or downloadable in PDF, HTML, ePub and .Mobi formats!</p><p>Note: The “Auk” version is the newer/current development version, and provides significant new improvements in the areas of authentication, making Feathers isomorphic, smaller, more modular, full support for ES6 promises, etc.</p><p>Feathers provides all the functional areas you need to provide a great back-end of web or mobile app. It all seemed so much simpler and logical, especially once you got past a couple of key concepts which weren’t difficult. For example, that everything is a “<a href="https://docs.feathersjs.com/v/auk/services/readme.html">service</a>”. Data storage is also a service, with data storage providers implementing the <em>single common service interface</em>. And Feathers is Express-based, compatible with the many Express middleware add-ons.</p><p>I took a closer look and found that, when used at both ends, it provides simpler methods for a front-end to communicate with a back-end, methods which transparently supported communications via REST APIs or Socket.io, or other transports. It is extensible, swappable, optional support for major pieces, but provides direct implementations for several good choices for major components. The instant <a href="https://docs.feathersjs.com/v/auk/rest/readme.html">REST APIs</a> (that <em>also </em>implement the common service interface), easy built-in <a href="https://docs.feathersjs.com/v/auk/real-time/socket-io.html">real-time communications</a> via simple support for socket.io or <a href="https://docs.feathersjs.com/v/auk/real-time/primus.html">Primus</a>. The simplest implementations I’ve seen for routed web apps that used React, Angular, Vue, etc, with examples and documentation for how those fit together. It was much much simpler and consistent, and the lack of opinion on everything <em>else </em>you used with it meant that I’d be able to use Ember if I wanted, but maybe I should look at the path they had already taken.</p><p>Feathers is well-focused and intent on solving only the problems of providing the server implementation, and optional client-side support for real-time communication with that server, but provides all or at least most of the pieces you will need to do that.</p><p>There also wasn’t really an opinion on which client framework to use… in fact many of the developers used React for the front-end while others used Vue.js or Angular.js. They had good support for <a href="https://docs.feathersjs.com/v/auk/frameworks/readme.html">many frameworks</a>, including examples for how to use them <em>with </em>Feathers.</p><p>And there was Vue.js popping up again. It was time to check that out too.</p><h4>Vue.js</h4><p>Ember.js hadn’t resolved my JavaScript Framework Fatigue after all. The deeper I went, the more it seemed there was so much to learn. Probably because it wasn’t just a client component rendering framework like Vue, but was attempting to be a highly-opinionated ecosystem. It was a lot simpler and more powerful than most, and a clear improvement over some earlier frameworks, but there were still some things I didn’t like about it, personally. And they were starting to add up.</p><p>There were many technical issues as I tried to actually build a deployable app. That is not unexpected, but the trouble I was having was that it was very difficult to figure out what went wrong when something did. It’s okay to be an opinionated framework, but the whole point of that is to help the developer avoid having to make a lot of decisions and learn a lot of indirectly-related services in depth. But Ember wasn’t doing that for me. I was having problems and needing to learn in depth about all the components in the ecosystem anyway. This started to get to the point where I was unable to continue making progress, and I took a bit of a break from it to just read more, about alternatives, which is when I found Feathers above, and then Vue.</p><p>This is picky, but I think one of the things I didn’t like was also very subjective. At times, it was a bit like learning the syntax of a new language:</p><pre>  {{#each model as |scientist|}}<br>    &lt;li&gt;{{scientist}}&lt;/li&gt;<br>  {{/each}}</pre><p>While I do like this much better than earlier approaches to providing complex templates, compare it to Vue.js:</p><pre>&lt;li v-for=&quot;item in items&quot;&gt;<br>  {{ item.message }}<br>&lt;/li&gt;</pre><p>This is at least a <em>little </em>ugly in terms of requiring a <em>v-for</em>, but that compares to Ember requiring a {{#each}} and {{/each}} which doesn’t seem any more intuitive. The Vue alternative also retains the HTML tag at the level it would be, <em>&lt;li&gt;</em> in this case, as well simpler and easier to read “<em>item in items</em>” syntax for the actual list iterator. I’m also partial to the handlebars-style syntax so the for loop body works for me. It just feels less technical to me to say <em>v-for=”item in items” </em>rather than <em>{{#each model as |scientist|}}</em>. And it doesn’t require anything special at the end of the loop, just close the &lt;/li&gt; as you would expect. I know this is very subjective, and this wasn’t a roadblock, but the Vue alternatives work better for me, and I suspect it would work better for many other web developers too.</p><p>Plus Vue has almost all of the benefits of other choices (like React) without the negative. There’s a better, much faster, and even <em>faster </em>virtual DOM. (Vue is much faster than either React or Ember, and even outperforms Ember by a fair margin after the latest Glimmer engine update in Ember 2.x.)</p><p>There are also fabulous options for making <a href="https://vuejs.org/v2/guide/components.html"><strong>components</strong></a>. The components implementation is the best I’ve seen; Vue components are the easiest to provide and use; simple syntax like:</p><pre>&lt;div id=&quot;example&quot;&gt;</pre><pre>&lt;my-component&gt;&lt;/my-component&gt;</pre><pre>&lt;/div&gt;</pre><p>and:</p><pre>// register<br>Vue.component(&#39;my-component&#39;, {<br>  template: &#39;&lt;div&gt;A custom component!&lt;/div&gt;&#39;<br>})</pre><p>So your whole page can actually read like it makes sense (imagine that!):</p><pre>&lt;div id=&quot;app&quot;&gt;<br>  &lt;chat-app v-if=&quot;user.authenticated&quot;&gt;<br>    &lt;user-list&gt;&lt;/user-list&gt;<br>    &lt;message-list&gt;<br>      &lt;compose-message&gt;&lt;/compose-message&gt;<br>    &lt;/message-list&gt;<br>  &lt;/chat-app&gt;<br>&lt;/div&gt;</pre><p>And as if that wasn’t enough, then you discover Vue’s (optional, of course) <a href="https://vuejs.org/v2/guide/single-file-components.html"><strong>single-file components</strong></a>, with their clear and readable syntax, in .vue files, with easy import syntax, and with &lt;template&gt; &lt;script&gt; and &lt;style&gt; sections:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8b30THk3WPyFdnJEBgFJhg.png" /><figcaption>Vue.js single-file component</figcaption></figure><p>Note also the “scoped” keyword in the &lt;style&gt; section, preventing those styles from being applied globally. They can be scoped to this component, with a single additional keyword!</p><p>There are also <a href="https://vuejs.org/v2/guide/custom-directive.html">custom directives and hooks</a>, Flux-like <a href="https://vuejs.org/v2/guide/state-management.html">state management</a>, <a href="https://vuejs.org/v2/guide/conditional.html">conditional rendering</a>, and just about anything else you’ve come to expect from the best.</p><h4>Summary</h4><p>If you haven’t checked out either Vue.js or Feathers.js, do yourself a favor and please do so. I haven’t been this excited and optimistic about development in quite some time.</p><p>It’s not just me saying this. In the Best of JavaScript <a href="http://bestof.js.org">http://bestof.js.org</a> Rising Stars 2016 comparison (which uses actual GitHub stars to measure), Vue.js won first place in the <strong>most popular front-end framework</strong> category <a href="https://risingstars2016.js.org/#framework">here</a>, as well as <strong>most popular project overall</strong>, <a href="https://risingstars2016.js.org/#all">here</a>. Feathers.js (a further refinement of Express.js) came third for <strong>most popular node.js framework</strong> <a href="https://risingstars2016.js.org/#nodejs-framework">here</a>, behind Express itself, and Koa.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3aae9574375" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The MECH Stack — Solving JavaScript Framework Fatigue]]></title>
            <link>https://medium.com/@appurist/the-mech-stack-solving-javascript-framework-fatigue-3585a4cd3d26?source=rss-a148f778fd6b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3585a4cd3d26</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[hapi]]></category>
            <category><![CDATA[ember]]></category>
            <dc:creator><![CDATA[Appurist Software]]></dc:creator>
            <pubDate>Fri, 01 Apr 2016 05:08:30 GMT</pubDate>
            <atom:updated>2020-08-19T06:52:22.707Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Update for 2020: It was perhaps optimistic naivety that allowed this posting; since it was written in 2016 I have moved on” from 3 of the 4 tools in the MECH name. The only survivor being Cordova for mobile, mostly because I haven’t done much with mobile to influence that — most of my work has been desktop apps. Years later now, I’ve posted a 2020 update on my preferred stacks for both back-end and web application development: </em><a href="https://medium.com/@appurist/a-shift-in-attitudes-2020-3c7e0c3a7ec"><em>here</em></a><em>.</em></p><p>This article introduces the results of my year-long quest for <strong>the ideal server/client JavaScript stack</strong>. I’ve spent months exploring available options, finding some products, libraries and services that I really like, almost reaching the conclusion that each was the best choice for my projects, only to find a fairly big “gotcha” each time.</p><p><em>Edit/Update: It seems that some folks are reading more into this article than I intended. The key words above are “the best choice for </em><strong><em>my </em></strong><em>projects”. That said, the purpose of my writing this is to </em><strong><em>share </em></strong><em>that experience with web developers in case others find it useful or at least slightly informative. I’m not “proposing” anything. I’m not “introducing” anything. I’m documenting where my journey led, </em><strong><em>after</em></strong><em> I had already eliminated Angular, React, and some of the other popular web platforms and libraries. I have nothing against them; I will probably eventually use them all, but not for my projects in the near-future. Settling on a small number of core platforms and libraries has eased my JavaScript Framework Fatigue. It may add to yours, if you have not yet heard much about Hapi.js or Ember.js.</em></p><p>I’ve been experiencing <strong>JavaScript Framework Fatigue</strong> on an almost daily basis, and told myself repeatedly “just pick <em>something</em>”, only to see something the next day that might be revealing how tragic my earlier choice would have been. It’s a never-ending process, that fortunately, for me, seems to finally be settling down. A couple of key JavaScript technologies have been holding as the best choice, for some time now. Actually it’s been a few months and my mind (and my book budget) are finally getting a well-deserved break from new things.</p><p>Beyond being written in <strong>JavaScript</strong>, my requirements were fairly easy, mostly just that <em>if </em>it was a full-stack end-to-end implementation (like <strong>Meteor </strong>or <strong>Sails.js</strong>), that it be a rich environment that just worked with direct support or add-ons for a variety of services such as back-end storage and authentication that I’d eventually need. If it included its own view support, it would need to be easy-to-read and maintainable. Ideally it would be capable of providing individual independent components, and if it did not satisfy my end-to-end needs, it needed to be the opposite: solving a specific portion of those needs while not imposing use of certain other frameworks and libraries (or at least not too many). A JavaScript library with narrower focus would need to solve a specific responsibility well, without ruling out the use of different libraries or tools for other tasks for other pieces of the equation. And there needed to be a solution for all of this that enabled mobile development as well as website app.</p><p>What did I look at? Well I started with <strong>MEAN</strong>… <strong>Node.js</strong> to enable a server-side solution written in JavaScript; and of course learned <strong>Angular</strong>, <strong>Express</strong>, <strong>Sane</strong>, <strong>Koa</strong>, <strong>Meteor</strong>, <strong>Sail.js</strong>, services like <strong>Firebase</strong>, <strong>Parse</strong>, <strong>Syncano</strong>, <strong>Appgyver</strong>, <strong>Appery</strong>, <strong>Monaca</strong>, <strong>Serverless </strong>and others, Apache <strong>Cordova</strong>, <strong>Ionic</strong>, <strong>Vue.js</strong> and <em>numerous</em> other frameworks.</p><p>In this article, I’m not going to get into the “<strong>Bootstrap </strong>vs <strong>Material Design</strong> vs. others” discussion, other than to say that I find Google’s Material Design elements to be far less intuitive than alternatives: mostly attractive graphic design, but at the expense of intuitive functionality. I won’t be using it.</p><p>But let’s cut to my conclusions here:</p><p><strong>MECH = MongoDB + Ember.js + Cordova + Hapi.js</strong></p><p>Obviously any server-side JavaScript solution is probably also based on <strong>Node.js</strong>. The <strong>core</strong> frameworks I’ve decided on are are: <strong>Hapi.js</strong> on <strong>Node.js</strong> plus<strong> storage</strong> (currently Mongo because of wide support, easy of deployment and reasonable storage and pricing).</p><p>Then on the client side, <strong>Ember.js</strong> provides a full-featured app experience with the rapid and flexible user interfaces that I expect, with the addition of <strong>Cordova</strong> or <strong>Electron </strong>depending on the non-browser target platform. The <strong>Cordova </strong>part solves the cross-platform mobile app portion, and similarly I could add <strong>Electron </strong>for turning it into a desktop app.</p><p>So to me, the JavaScript technologies that really shine here are:</p><p><strong>Node.js + Hapi.js + Ember.js</strong></p><p>Unfortunately that doesn’t make for a very useful acronym.</p><h4>Hapi.js + Ember.js = a lean, mean app machine</h4><p>Let’s look at these more closely.</p><h4>Hapi.js</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*QBconyyjwei88DMS_2GPtA.png" /><figcaption>hapi.js</figcaption></figure><p>Among the many server-side and full-stack frameworks, <a href="http://hapijs.com/"><strong>Hapi.js</strong></a><strong> </strong>stood out. First, it was small and fast, but more than that, it is really really easy and intuitive to use. It <em>feels like</em> a smaller project even though it is a very rich and fairly complete server-side framework. But it has been a critical part of the deployment to many of the world’s largest sites, including its primary developer, Walmart Labs, and <a href="http://hapijs.com/community">many others</a>. It’s extremely simple to use, and just handles many of the mundane things that computers should handle, such as setting the MIME type on HTTP requests according to the type of data returned in the reply. It’s capable of handling all of Walmart’s mobile app requests on Black Friday; so I’m reasonably confident it won’t be the weak link in my app.</p><p>And it’s easy to use. The following JavaScript code is the full source for a Node.js REST application which listens on a GET handler for a ‘/’ route and echos the HTTP headers supplied on the call back to the caller as a JSON response. (Yeah, it’s almost entirely automatic.) Does coding up a whole server get any easier than this?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*QK4ddLIG7amUDsLjxE5X5Q.png" /></figure><h4>Ember.js</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*mRjoWn8aKMeLSEw0y-iFeQ.png" /></figure><p>As someone who has been a professional software developer since January 1984, I clearly remember the initial excitement I had the first time I started understanding what I was reading about <strong>Angular.js</strong>. Oh how far the world of JavaScript development had come in such a few short years. One of my colleagues was also very keen on <strong>React.js</strong>, so I also needed to investigate the state of things there. What I found in both cases were fine projects, yet there were a few things that nagged me about Angular, and I wondered if it couldn’t just be done better. And a few things about React that really made me feel like it might be a step backwards.</p><p>One of the biggest lessons of my three decades as a professional software developer was the importance of <em>maintainability</em>, and <em>readability</em>. The code needed to be very readable, and easy and most importantly <em>obvious</em>. Put bluntly, <em>obvious code</em> has very little chance of being buggy. But if there is a problem, it’s typically a lot simpler to identify and fix.</p><p>An Angular project was simply not as readable and maintainable as Ember code. And React went well beyond that and failed my “obvious test” in significant ways. Ember “just works”.</p><p><a href="http://emberjs.com/"><strong>Ember.js</strong></a> gives me a very readable user interface (view), detached from the data being represented (model), and the core logic that determines how that data will be used (controller). While Ember is famous for its extremely easy-to-use two-way binding, recent versions of Ember also provide the reactive programming model of one-way binding pushing down and events and actions bubbling back up. In fact, Ember <em>components</em> (rather than controllers) are now the recommended approach. It is a complete client package with a CLI with built-in generators for views, routes, components, etc.</p><p>I think the thing I like most about Ember is that it makes it easy to look at both logic code and presentation templates and understand almost immediately exactly what is going on, and what the structure of the app would look like when rendered.</p><p>Here’s an example from the Ember home page, which does something fairly complex. This code below displays the three most recent pull requests from the Ember.js project on GitHub. The controller in this case is automatic (implied), so all that is needed is first the model, then the actual HTMLBars template for the view:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*w8lzDS0hmjCk-FjoAz_dYQ.png" /><figcaption>app.js defining model</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*m1GDfiUu1xSvcEmheaXTQQ.png" /><figcaption>application.hbs — HTMLBars template for view</figcaption></figure><p>That’s not a lot of code for an application that displays the most recent three pull requests from a live GitHub project. Here is the output at the time of this article:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*ViCyyI4yiNEWtrLU3qfcxQ.png" /></figure><p>I think that’s pretty impressive for such a small amount of code. Yes there’s some CSS too (not included). See the <a href="http://emberjs.com/"><strong>Ember.js</strong></a> site for this and other examples.</p><p>I’m not going to make this article longer by writing too much about MongoDB or Apache Cordova. There are far too many articles and books that are much more appropriate out there, and the topics have been covered extensively. What I will say however is that Mongo’s use is so wide that it is a de facto storage mechanism now and the default in many cases, and it makes for an obvious choice if sticking with the majority appeals.</p><p>I’m a bit concerned by<a href="https://aphyr.com/posts/322-call-me-maybe-mongodb-stale-reads"> the reports a couple of years ago regarding its ability to fetch stale data on reads</a>; some movement on that but it does not yet look resolved. However, that seems to only be an issue in cases in a fairly complex case where there is a cluster of Mongo servers and a master fails, in a particular combination of events, something we’ll all say “It will never affect my use case” and then be proven wrong when the application is a big hit and scaling up into the world of high-availability. For most of us, we’ll never get there and if we do, we can afford to assign someone to that problem then.</p><h4>Honorable Mentions</h4><p>Honorable mention to <a href="http://gun.js.org/"><strong>gun.js</strong></a> for data storage. I really like the design and approach but it just seemed too new and evolving to be used for a serious production project (yet). It’s incomplete in terms of background replication, but the design looks good and I think it’s a matter of time before it starts making serious waves. It’s something I’m going to be keeping a close eye on though. I think that’s a project that some corporate interests should come along and fund as full-time work with a full-time QA/doc/support team. Perhaps someone like Joyent, Mozilla or the Apache Software Foundation.</p><p>Although almost the complete opposite, I also really like the <a href="https://www.firebase.com/"><strong>Firebase</strong></a> product. But have serious concerns about them following the Parse path with a mega-corporation buying them (in this case Google rather than Facebook) and then having other corporate needs that force changes. This has already been realized in the example of Firebase doing away with <em>Firebase accounts</em>, instead forcing login via Google accounts. (Not for the actually end-users of Firebase, just for the developers with accounts on Firebase. Er, not on Firebase. Anymore.)</p><h3>Hapi.js + Ember.js = a lean, mean app machine</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3585a4cd3d26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Open Letter to Online Course Schools]]></title>
            <link>https://medium.com/@appurist/an-open-letter-to-online-course-schools-d68a6ff0c303?source=rss-a148f778fd6b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d68a6ff0c303</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[pricing-strategy]]></category>
            <category><![CDATA[online-courses]]></category>
            <dc:creator><![CDATA[Appurist Software]]></dc:creator>
            <pubDate>Wed, 30 Mar 2016 22:32:23 GMT</pubDate>
            <atom:updated>2016-03-30T22:45:41.650Z</atom:updated>
            <content:encoded><![CDATA[<p>This is not a review. It’s a plea to recognize the time constraints of software developers.</p><p>I have taken a couple of online courses in the past, and found them mostly horrible or bland and did not really learn from them, until one day I tried <a href="https://www.codeschool.com/">CodeSchool</a> and the “<a href="https://www.codeschool.com/courses/shaping-up-with-angular-js">Shaping Up With Angular</a>” course, which I found educational and informative. Then I tried the “<a href="https://www.codeschool.com/courses/warming-up-with-ember-js">Warming Up With Ember</a>” course, which was a bit dated, but unquestionably the best learning experience I’ve ever had online. (That course has since been replaced with a newer updated course.) In both cases, either of these courses was well worth the $29 I paid for a monthly subscription.</p><p>I’m actually signed up with five online course providers, but since I don’t really have anything (as positive or negative) to say about some of the other online services I’ve used, I won’t name those here. That’s not the point of this article; this is <em>not</em> a review of this service or other online course providers, or a comparison article. It’s my recognition that the monthly subscription model that most of them use may be causing them to lose income from customers that actually <em>love</em> their service.</p><h4>It’s a Matter of Time</h4><p>I canceled my monthly subscription today, both because I’m too busy (this month at least), and because the cost is high enough that if I’m not actively using it, it’s time to suspend those monthly fees.</p><p>I’m doing too much to pay $29 US (which is more like $40 Canadian) for learning that I can’t take advantage of this month (and perhaps next).</p><p>That made me consider what problem was causing me to cancel a service that I really liked and would strongly recommend…</p><h4>Time for Another Option (Literally)</h4><p>While the free courses and flat-rate monthly subscription is a good model for <em>new signups</em>, as subscribers complete courses of interest, and those remaining courses become of less interest, I think ex-subscribers might appreciate some kind of <em>per-course</em> fee option, or at least <em>on-demand</em> fee, once they are familiar with the quality and service and courses. I suspect the flat rate is more appealing to new signups, and to the course providers, but it is difficult to justify the ongoing expense if it goes unused or little-used for many of the months. Of course, you don’t want to confuse customers with too many choices either, but offering free, per-use pay, and all-inclusive monthly rates isn’t overwhelming either.</p><p>So, for example, I’d love to see an option to pay for a specific course with no end date, or perhaps an option to pay for actual online course usage, such as $5–10/hour, or even better: some amount per-day (which is considerably lower than the per-month rate). I think for a service that costs $29 per month for an unlimited number of courses and usage, something like $10 per day might be good (and is something to encourage users to move beyond free that could also lead to an upgrade to monthly).</p><p>In my case, now that I know how good this particular course provider is, I would certainly pay $10 <em>on the day that I find I have some time</em> to continue my courses. Or $10–20 for a specific course with no end date. Or to draw in more people, $10 to start a course and another $10 when I start the second half of the course.</p><p>These kinds of options allow the user to take the course of interest while not being pressured into completing it <em>that </em>month, or paying per month just to have the opportunity *perhaps* continue it next chance they get some time.</p><h4>This Sucks</h4><p>You see… I have a problem. I like this service and yet I felt I needed to cancel. That bugs me. And it was certainly <em>not</em> due to dissatisfaction of any kind; the courses have been wonderful; perhaps the best learning experience I’ve ever had. Keep up the good work folks, but give me an option to give you more money!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d68a6ff0c303" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>