<?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: cekvenich</title>
    <description>The latest articles on DEV Community by cekvenich (@cekvenich).</description>
    <link>https://dev.to/cekvenich</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%2F167208%2F5b43ce92-5d44-49fa-bab0-01862d491921.png</url>
      <title>DEV Community: cekvenich</title>
      <link>https://dev.to/cekvenich</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cekvenich"/>
    <language>en</language>
    <item>
      <title>Java ecosystem's 10 New Best Practices for the 2020s </title>
      <dc:creator>cekvenich</dc:creator>
      <pubDate>Sat, 15 Feb 2020 13:10:13 +0000</pubDate>
      <link>https://dev.to/cekvenich/java-ecosystem-s-10-new-best-practices-for-the-2020s-dd4</link>
      <guid>https://dev.to/cekvenich/java-ecosystem-s-10-new-best-practices-for-the-2020s-dd4</guid>
      <description>&lt;p&gt;I (Vic Cekvenich) published a 4 page article 'Java ecosystem's 10 New Best Practices for the 2020s',&lt;br&gt;
 the full 4 page article is here: &lt;a href="https://intuition-dev.github.io/SNX/#/README"&gt;https://intuition-dev.github.io/SNX/#/README&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Summary: There are some radical differences in today's Java ecosystem relative to the prior decade. The listed difference add up to a difference in kind, not a difference in degree. We have achieved an order of magnitude improvement with the new adjustments in our development. The list has 10 points in 4 pages, including code examples.
&lt;/h6&gt;

&lt;p&gt;Here is the TOC:&lt;/p&gt;

&lt;p&gt;1: Starter enterprise cloud software architecture&lt;br&gt;&lt;/p&gt;

&lt;p&gt;2: Scala, Kotlin, Groovy&lt;br&gt;&lt;/p&gt;

&lt;p&gt;3: Cloud, eg.: S3&lt;br&gt;&lt;/p&gt;

&lt;p&gt;4: DB in RAM Memory&lt;br&gt;&lt;/p&gt;

&lt;p&gt;5: Tools: Gradle.build, Jitpack, Jitpack CI/CD, Cloud IDE &lt;br&gt;&lt;/p&gt;

&lt;p&gt;6: JAR for Services/'REST', with Reactive Streams &lt;br&gt;&lt;/p&gt;

&lt;p&gt;7: Stress/Load testing &lt;br&gt;&lt;/p&gt;

&lt;p&gt;8: Client side API, Client side ViewModel &lt;br&gt;&lt;/p&gt;

&lt;p&gt;9: Switch testing focus to: E2E testing &lt;br&gt;&lt;/p&gt;

&lt;p&gt;10 SSR (Server Side Rendering) with Pug&lt;br&gt;&lt;/p&gt;

&lt;p&gt;I you'd like to read the entire article, please click &lt;a href="https://intuition-dev.github.io/SNX/#/README"&gt;https://intuition-dev.github.io/SNX/#/README&lt;/a&gt; &lt;/p&gt;

</description>
      <category>java</category>
      <category>backend</category>
      <category>server</category>
      <category>database</category>
    </item>
    <item>
      <title>Advanced Front End Development with JAMStack that leverage ExpressJS's built in Pug markup; plus hands on examples</title>
      <dc:creator>cekvenich</dc:creator>
      <pubDate>Thu, 02 Jan 2020 17:59:36 +0000</pubDate>
      <link>https://dev.to/cekvenich/advanced-front-end-development-with-jamstack-that-leverage-expressjs-s-built-in-pug-markup-plus-hands-on-examples-dh9</link>
      <guid>https://dev.to/cekvenich/advanced-front-end-development-with-jamstack-that-leverage-expressjs-s-built-in-pug-markup-plus-hands-on-examples-dh9</guid>
      <description>&lt;h3&gt;
  
  
  Markdown
&lt;/h3&gt;

&lt;p&gt;If you use Github, you know README.md markdown. I use Marker editor &lt;a href="http://fabiocolacio.github.io/Marker"&gt;http://fabiocolacio.github.io/Marker&lt;/a&gt;, it is one of my favorite tools. Also, everyone (and every project) should use Github pages. &lt;/p&gt;

&lt;h4&gt;
  
  
  Required Lab 1:
&lt;/h4&gt;

&lt;p&gt;If you are not familiar with github pages, then set that up now before proceeding. One easy way is with &lt;a href="http://docsify.js.org"&gt;http://docsify.js.org&lt;/a&gt;. This way you practice markdown.&lt;/p&gt;

&lt;p&gt;Ex. Github pages, source for _sidebar.md:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   * [Home Page](README.md)
   * [Page1](pg1.md)
   * [Page2](pg2.md)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now create those 3 files, and use the index.html file that you get from Docsify's website.&lt;/p&gt;

&lt;p&gt;Above helps you learn markdown, before we get into markup and static generation. &lt;/p&gt;

&lt;p&gt;Aside: You can do charts and slides in markdown.&lt;/p&gt;

&lt;h3&gt;
  
  
  SASS to CSS
&lt;/h3&gt;

&lt;p&gt;CSS is the most important and most powerful tool for Front End Developers/Designers. But we no longer write CSS by hand, we now generate CSS from SASS (or Scss) files. We likely download a SASS(or Scss) library from WWW (eg: &lt;a href="http://github.com/owenversteeg/min/tree/gh-pages/sass"&gt;http://github.com/owenversteeg/min/tree/gh-pages/sass&lt;/a&gt; ), edit the SASS files and generate CSS files.&lt;br&gt;
To generate the CSS, we can use Grunt, Gulp, PrePros.IO or write a new shell command via a script in node.js. &lt;/p&gt;

&lt;p&gt;If you have never generated CSS, install the free &lt;a href="http://www.PrePros.IO"&gt;http://www.PrePros.IO&lt;/a&gt; and try it. &lt;/p&gt;

&lt;h1&gt;
  
  
  Quick Intro to Pug:
&lt;/h1&gt;

&lt;p&gt;You have heard of NodeJS, and even NodesJS http server: ExpressJS. A &lt;em&gt;rendering engine used by ExpressJS template engine is **Pug&lt;/em&gt;*!:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://expressjs.com/en/guide/using-template-engines.html"&gt;ExpressJS Pug&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And here is what Pug looks like, click around a bit: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://html2pug.now.sh"&gt;http://html2pug.now.sh&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But Pug is also used with &lt;em&gt;all&lt;/em&gt; the other popular tech stacks, for example &lt;a href="http://github.com/BKWLD/laravel-pug"&gt;Laravel Pug&lt;/a&gt;, and others as well.&lt;/p&gt;

&lt;p&gt;Alternatives/similar to Pug include Haml and Ebay's MarkoJS concise syntax.&lt;/p&gt;

&lt;h2&gt;
  
  
  mbake CLI
&lt;/h2&gt;




&lt;p&gt;You can use Grunt, Gulp, Prepros.IO or write a script in node.js to convert Pug to HTML. The later is most flexible, I wrote a script to convert Pug to HTML, and I named that command mbake. We will use &lt;em&gt;mbake&lt;/em&gt; CLI to generate html from the Pug language: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.npmjs.com/package/mbake"&gt;mbake CLI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can install that if you want to follow along.&lt;/p&gt;

&lt;h4&gt;
  
  
  Optional Lab 2:
&lt;/h4&gt;

&lt;p&gt;Install &lt;a href="http://www.npmjs.com/package/mbake"&gt;http://www.npmjs.com/package/mbake&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then you should extract a the example we will use by running&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;mbake --pug&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
, and then&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;cd pugIntro&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
.&lt;/p&gt;

&lt;p&gt;Just from fun run&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;mbake -s .&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 in that folder.&lt;/p&gt;

&lt;p&gt;That converts SASS/SCSS files and makes .css.&lt;/p&gt;

&lt;p&gt;But we are here for Pug, run&lt;br&gt;
&lt;br&gt;
 `&lt;code&gt;mbake .&lt;/code&gt;, and it will make html file from the Pug file!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Now you know how to statically generate html from markup!&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Using Pug with static data from yaml
&lt;/h1&gt;

&lt;p&gt;(if you don't know yaml, think of it as JSON).&lt;/p&gt;

&lt;p&gt;Notice that there is a dat.yaml file tehre. The mbake CLI has code that extends the standard Pug compiler to provide the data in the yaml file statically&lt;br&gt;
at compile time.&lt;/p&gt;

&lt;p&gt;For example if the Pug file has:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

    p Hello #{key1}


&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;and dat.yaml has&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

    key1: World


&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;and you run &lt;code&gt;&lt;br&gt;
&lt;br&gt;
mbake .&lt;br&gt;
&lt;br&gt;
&lt;/code&gt; you will get the expect result :-).&lt;/p&gt;

&lt;p&gt;This makes it easier for example to do any SEO, where things like  #{title} is repetitive code.&lt;br&gt;
Done!&lt;/p&gt;

&lt;p&gt;Note there is one &lt;em&gt;on purpose&lt;/em&gt; limitation in mbake CLI: it must start w/ index.pug (and must have dat.yaml). You can of course still&lt;br&gt;
use include and extends (include and extends are Pug keywords) as you wish.&lt;br&gt;
So to make a new page/screen you must create a new folder. This helps organize the code and the hyperlinks.&lt;/p&gt;

&lt;p&gt;And since it is static: you can serve from the edge via a CDN (my CDN supports http3/QUIC/udp) for a lower cost and higher performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dynamic Data Binding
&lt;/h2&gt;

&lt;p&gt;Above was all statically generated data, great for SEO.&lt;br&gt;
For dynamic you would write fetch .js code to get the dynamic results. And here is one example of how to do dynamic binding, in this case using MustacheJS&lt;/p&gt;

&lt;h1&gt;
  
  
  Extending DOM tags w/ Custom Elements
&lt;/h1&gt;

&lt;p&gt;Html and Pug have elements like div, article, etc. that Pug and browsers know. We can create additional&lt;br&gt;
custom elements using native api of a browser: no need to download any .js library. Well, you do need polyfill for IE11. &lt;/p&gt;

&lt;p&gt;Here is an example of defining a custom element 'c-custel':&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

   var cTemp = document.createElement('template')
   cTemp.innerHTML = `
      &amp;lt;b&amp;gt;I'm Comp DOM!&amp;lt;/b&amp;gt;
      &amp;lt;slot&amp;gt;&amp;lt;/slot&amp;gt;
   `
   window.customElements.define('c-custel', class extends HTMLElement {
      sr 
      constructor() {
         super()
         this.sr = this.attachShadow({mode: 'closed'})
         this.sr.appendChild(cTemp.content.cloneNode(true))
      }//cons
   })


&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And now you can use 'c-custel' like any other tag in Pug!&lt;br&gt;
You can continue to a full Custom Element tutorial here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://custel1.metabake.net"&gt;http://custel1.metabake.net&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With the custom elements you can add more attributes, functionality, events, etc. because it is all standard.&lt;br&gt;
It is important to write custom elements for the purpose of more DOM and less .js. &lt;/p&gt;

&lt;p&gt;Also, sometimes a custom element has dynamic data binding inside of it. &lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced: Leveraging Pug for cross-platform development.
&lt;/h2&gt;

&lt;p&gt;You can statically generate any kind of a web app, PWA, or if you make an SPA app you can have the same app run not only as&lt;br&gt;
a web app, but same code can run Electron. JAMStack is just HTML, css and .js.&lt;/p&gt;

&lt;h4&gt;
  
  
  Recommended Lab 3:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Write a Pug page that does a fetch from a public API and dynamically binds data.&lt;/li&gt;
&lt;li&gt;Write an Electron app around above Pug page.&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  Cross platform development continued:
&lt;/h4&gt;

&lt;p&gt;You can also use Cordova or PhoneGap: to make Android or IOS app.  I use &lt;a href="http://build.PhoneGap.com"&gt;http://build.PhoneGap.com&lt;/a&gt; so there is no Android, IOS, or Cordova to install. It is all done in the cloud.&lt;/p&gt;

&lt;p&gt;Here is an example cross platform app: (&lt;a href="http://github.com/INTUITION-dev/mbMobile"&gt;http://github.com/INTUITION-dev/mbMobile&lt;/a&gt;), for 3 platforms. Notice that the web app, electron app and phonegap app all use a symbolic link to the same directory: &lt;strong&gt;same code base&lt;/strong&gt;. We won't spend more time on this, you can look at the code but just a point is: you can make a cross platform app in Pug.&lt;/p&gt;

&lt;h1&gt;
  
  
  Future and Low-code
&lt;/h1&gt;

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

&lt;p&gt;One example of DOM-centric, eschew imperative ECMAScript is &lt;a href="http://MAVO.io"&gt;http://MAVO.io&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here is an example of MAVO w/ Pug:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

   head      
      script(src='http://get.mavo.io/mavo.js')
      link(rel='stylesheet' href='http://get.mavo.io/mavo.css')

   body
      div(mv-app='mavoTest' mv-storage='local') My first Mavo app!


&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;(full example is here: &lt;a href="http://github.com/intuition-dev/mbCLI/tree/master/more_examples/mavo"&gt;http://github.com/intuition-dev/mbCLI/tree/master/more_examples/mavo&lt;/a&gt; ) &lt;/p&gt;

&lt;h3&gt;
  
  
  Low Code
&lt;/h3&gt;

&lt;p&gt;In the future, Low-Code tools will further increase productivity. You can use a search engine to find low code tools, one of them is my own &lt;a href="http://www.intuition.DEV"&gt;http://www.intuition.DEV&lt;/a&gt;. Basically the idea is to allow regular users and developers maintain Web Applications. &lt;/p&gt;

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

&lt;p&gt;You can start by using markdown, and then learn how to generate web apps using markup. Some can go further and extend the markup DOM or even do cross-platform development.&lt;/p&gt;

&lt;h1&gt;
  
  
  Other
&lt;/h1&gt;

&lt;p&gt;A back end basics article by the author:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://medium.com/@cekvneich/short-review-of-basics-of-full-stack-big-data-scalability-and-clusters-of-distributed-data-bcc8e3a8abd3"&gt;http://medium.com/@cekvneich/short-review-of-basics-of-full-stack-big-data-scalability-and-clusters-of-distributed-data-bcc8e3a8abd3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Hiring
&lt;/h4&gt;

&lt;p&gt;A good place to find developers that will be successful as advanced front end developers is Dribble. If your candidate is eager for imperative programming, they may be a better fit for full-stack/back end role.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
