× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



*>But that still doesn't answer the question if understanding the
complexity described in the video is a prerequisite to be able to put
together applications that perform their best.*

I would guess 99% of the people on web400 don't/didn't understand how the
Javascript event loop works, yet we've been using Javascript all along.
Obviously Node.js on the server-side requires more understanding (because
not blocking other requests is more significant), but even then I went a
number of months without fully understanding how it worked and was still
producing Node.js apps.

A lot of the training I do is giving RPG programmers a pattern to follow.
Some of those RPG programmers venture outside of the pattern to learn more
and some stay in the confines. Javascript is not as simple as
PHP/Ruby/Python because it has the added feature of async; which is a first
class citizen of the language and isn't so much in the others. I think the
ECMAScript folks realized the async-ness was creating barriers to entry and
that's why we see things like the "await" keyword coming down the pipe.

Side Note: On the note of Node.js patterns; ExpressJs is much less
opinionated (a lot more decisions to make) and one I've been using on a
larger project is HapiJs (more like RubyOnRails where there are a lot of
plug-n-play components like Lab for unit testing). Coming from a
RubyOnRails background it was kind of nice having HapiJs.

Aaron Bartell
litmis.com - Services for open source on IBM i


On Wed, Sep 14, 2016 at 4:36 PM, Bradley Stone <bvstone@xxxxxxxxx> wrote:

But if you don't understand sync/async and how it works in a specific
language, how do you know to even use promises, callbacks or "await"? :)

I know, you'll figure it out eventually when googling why your function
isn't working how you expect it and enter the whole new world of async
calls.

But that still doesn't answer the question if understanding the complexity
described in the video is a prerequisite to be able to put together
applications that perform their best.


On Wed, Sep 14, 2016 at 4:21 PM, Aaron Bartell <aaronbartell@xxxxxxxxx>
wrote:

Do I need to understand something so complex in order to make my JS
application perform it's best?

Javascript before ES2015 was much more complicated. There are new
features
that either exist or are coming that make Javascript work in a more
"visibly procedural" fashion. Here's an example of the "await" keyword:

var customer = await getCustomer();
var invoices = await getInvoices(customer.id);
var tickets = await getTickets(customer.id);

The above code looks very normal. To accomplish this in traditional
async
fashion would be more busy and harder to understand.


Aaron Bartell
litmis.com - Services for open source on IBM i

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.