<?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[Codaxy - Medium]]></title>
        <description><![CDATA[Company blog - Medium]]></description>
        <link>https://medium.com/codaxy?source=rss----bd88c3bbe53d---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Codaxy - Medium</title>
            <link>https://medium.com/codaxy?source=rss----bd88c3bbe53d---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 01:22:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/codaxy" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Forging Genuine Partnerships]]></title>
            <link>https://medium.com/codaxy/forging-genuine-partnerships-e3d7e9d4eedf?source=rss----bd88c3bbe53d---4</link>
            <guid isPermaLink="false">https://medium.com/p/e3d7e9d4eedf</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[client-relationship]]></category>
            <dc:creator><![CDATA[Marko Stijak]]></dc:creator>
            <pubDate>Mon, 14 Aug 2023 12:35:59 GMT</pubDate>
            <atom:updated>2023-08-14T12:35:59.185Z</atom:updated>
            <content:encoded><![CDATA[<p>When trying to explain what sets you apart from anyone else in the industry, the first impulse is to list skills, size, completed projects, and other achievements in an attempt to provide proof of expertise. While that is, of course, an important part, it rarely provides the whole picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*IIewSLd43ruALmcKuFSpKw.png" /></figure><p>Explaining what makes Codaxy different from other software development companies out there by just showing off our badges doesn’t tell the whole story, as what truly sets us apart goes beyond our technical skills and expertise.</p><p>Our defining factor is a deep commitment to fostering genuine, lasting relationships with both our clients and team members. Our entire philosophy is centered on strengthening these connections. It takes time to form a winning team and build an outstanding product. This is a gradual process that demands time and patience.</p><p>The real progress begins around six months into the project, when the team has comprehensively understood the problem, established an efficient way of working, and laid down major technical infrastructure elements. This is the time when new product features are shipped weekly if not daily, leading to clients who are not just content but truly satisfied.</p><p>Reaching this state feels great for everyone involved, but substantial knowledge and effort are required to actually get there.</p><h3>Let’s first get to know each other</h3><p>Partnerships, like any other relationship, are built on a foundation of trust and mutual understanding. That is not given in the early stages, where neither side is familiar with the other.</p><p>Understandably, clients are hesitant to put not only their trust but also extensive resources, into a venture that they are not familiar with. That’s why we like to kick off our collaborations with a proof of concept (PoC) phase. Setting a limited time frame, budget, and scope, helps alleviate some of the pressure and provides a safe space to get to know each other, understand how our communication works, and explore what each party can bring to the table.</p><p>This approach has proven successful time and again, as evidenced by our work with VodafoneZiggo for example, where 5 out of 7 PoCs evolved into projects which are extensive and have been ongoing for years.</p><p>At times, the POC phase reveals that the project may not be sustainable or that we and the clients may not be the right fit for each other. Recognizing these issues early on, without delving too deeply into the project, is crucial for both parties involved.</p><p>While the PoC phase is commonly the first step in our partnerships, it’s not the only approach. We are more than capable of launching large-scale projects right from the outset.</p><p>And yes, here we’ll tell you about our expertise because one of the key values we bring to the table is our extensive experience and knowledge accrued from developing complex applications and the internal libraries we developed along the way.</p><h3>Let’s talk about expertise</h3><p>We have been up and running for over 13 years, so experience is a given. What is, however, noteworthy is the type of projects we have worked on — or rather their complexity.</p><p>We have successfully tackled a diverse portfolio of products, including:</p><ul><li>automated provisioning and orchestration of telco services</li><li>telco e-commerce platforms</li><li>engineering and end-customer portals</li><li>legal budget and expense tracking systems</li><li>real-time stock market trading platforms</li><li>brokerage CRMs</li><li>financial accounting systems</li><li>satellite communications and GPS solutions</li><li>Bitcoin-related projects</li></ul><p>and <a href="https://www.codaxy.com/work">more</a>.</p><p>This hands-on experience with intricate use cases is not only quite rare in the industry, but also a major factor that helps us build stronger relationships with new clients. How? Well, it allows us to provide our clients with a degree of security and risk reduction from the get-go, which — you will agree — is a great starting point for any relationship. Our software architects can construct robust foundations, foresee potential roadblocks, and steer partners toward the most suitable path during the beginning stages of a project.</p><p>We take pride in our flexibility during these early stages of a project. With our smaller team size and direct communication lines, we can quickly progress, unlike larger corporations where planning can sometimes feel endless.</p><h3>Creating our competitive advantages</h3><p>Being able to quickly assemble projects is a significant priority for us and one of the reasons why we developed our very own JavaScript UI framework — CxJS.</p><p>This powerful framework boasts an extensive collection of commonly used components, allowing us to reduce development time and expedite product launches drastically.</p><p>CxJS excels in handling large, complex UIs that feature numerous tables, forms, and charts — a perfect fit for financial and administrative applications where data visualization and user interaction are paramount. The framework allows visual customization, enabling unique and vibrant appearances that conform to the client’s particular visual and branding requirements.</p><p>In line with our spirit of openness and collaboration, we are proud to highlight that CxJS is an open-source platform.</p><h3>Collaboration with Clients</h3><p>There are plenty of ways in which we ensure our partnerships start on the right foot — but how do we maintain them? For starters, we believe in regular and meaningful interactions, preferably on a daily or weekly basis.</p><p>Whenever possible, we encourage in-person meetings, either by hosting clients at our office or organizing visits to their locations. These face-to-face interactions have proven invaluable, as they allow both teams to better understand each other and the project at hand and serve as a solid foundation for building long-lasting relationships.</p><h3>Preference for Scrum</h3><p>Although our team is experienced in a variety of project management methodologies, and we are open to any approach, we do have a preference for Scrum.</p><p>In our approach, the client acts as the product owner, while the scrum master and the rest of the team come from Codaxy. This ensures clear ownership and allows us to keep communication open throughout the development process, but also ties back to our last point about regular and meaningful interactions. By actively involving our customers in the planning and preparation of each sprint, we can consistently meet their expectations, leading to long-term satisfaction.</p><p>The other technical side of our agile approach is our adoption of Continuous Integration and Continuous Deployment (CI/CD) tools. This method allows us to continually publish and release the work results at the end of each sprint.</p><p>This approach promotes transparency, providing our clients with uninterrupted and unhindered insight into the development processes.</p><h3>Seamless Team Member Onboarding</h3><p>Many of our projects are intricate and dynamic, sometimes extending over several years. As the projects grow, due to new initiatives, or changes in team composition, we often require additional team members. Incorporating new members into ongoing projects can pose challenges for both the existing team members and the clients.</p><p>To address this, we have designed a specialized onboarding program with individual training sessions covering project management methodologies, developer tools, coding principles, architecture, technologies specific to the project, and domain knowledge.</p><p>To infuse fresh perspectives and further promote knowledge sharing, we adopt a strategic rotation approach. This means that existing team members are occasionally assigned to new challenging projects, and at the same time, new members are introduced to established projects.</p><p>This cross-pollination of ideas enriches the overall team experience and cultivates a learning and collaboration environment. We take immense pride in our work culture, which encourages professional growth and fosters a sense of belonging among our team members.</p><p>As a result, we maintain high employee satisfaction, reflected in our impressive Net Promoter Score, and welcome new talent to grow together with us.</p><h3>Consistency and Evolution</h3><p>After completing projects, it’s common for our clients to return, not necessarily seeking the same team, but rather valuing our consistent approach. This speaks volumes about the trust they have in us and the relationships we’ve built together.</p><p>It’s these robust alliances that allow us to elevate our services, exceed expectations, and fortify our position as a reliable partner in the industry.</p><p>With each project, we improve our service quality, performance, timeliness, and communication. We keep growing, not only in numbers but also in the quality and breadth of our services.</p><p>We believe this is the measure of true partners — putting in the time to understand the needs on a deeper level and working together to ensure mutual success.</p><p>This is the Codaxy way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3d7e9d4eedf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codaxy/forging-genuine-partnerships-e3d7e9d4eedf">Forging Genuine Partnerships</a> was originally published in <a href="https://medium.com/codaxy">Codaxy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CxJS Goes Open Source]]></title>
            <link>https://medium.com/codaxy/cxjs-goes-open-source-f52fee2a8214?source=rss----bd88c3bbe53d---4</link>
            <guid isPermaLink="false">https://medium.com/p/f52fee2a8214</guid>
            <category><![CDATA[cxjs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Marko Stijak]]></dc:creator>
            <pubDate>Mon, 27 Sep 2021 11:24:54 GMT</pubDate>
            <atom:updated>2021-09-24T13:36:17.658Z</atom:updated>
            <content:encoded><![CDATA[<p>After 5 years of development, more than 2200 commits, and 400 releases, <a href="https://cxjs.io/">CxJS</a> is becoming free software. The whole set of widgets, charts, themes, demo applications, documentation, and tools is from now on available under the MIT license.</p><h4>What is CxJS?</h4><p>CxJS is a batteries-included JavaScript framework for single-page applications. CxJS is built on top of React and features a large collection of widget and chart components, alongside state management, client-side routing, theming, localization, and other application-level concepts. The goal of CxJS is to be a one-stop shop for projects such as admin applications and dashboards.</p><h4>Motivation for License Change</h4><p>It was clear from the beginning that maintaining a large JavaScript framework will be a difficult task. We chose a commercial licensing model hoping to directly fund development and support from sales, but we never got enough traction. Even without funding, CxJS continued to evolve. Here at <a href="https://www.codaxy.com/">Codaxy</a>, we’re working on many consulting projects and we’re constantly adding new features based on the requirements we encounter. After five years of development, CxJS matured into a comprehensive battle-tested solution, but commercial offering simply does not make sense anymore.</p><p>Let’s go back and see some of the most challenging projects that influenced the development of the framework over the years.</p><h4>TurboTrack (2017)</h4><p>TurboTrack was the first big CxJS project. The application is used for real-time GPS vehicle tracking and reporting on top of the collected data. This was an opportunity to complete the Material theme support in CxJS and develop a library for Google Maps integration. It’s interesting that the application layout is fully responsive, meaning it can be used on large desktop screens and mobile phones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i8XrAg0NxabGj1YkZckqXA.png" /><figcaption>Screenshot of TurboTrack</figcaption></figure><h4>Assetmax (2018)</h4><p>Special thanks go to Assetmax, who is one of the first adopters of CxJS for their online wealth-management platform. Assetmax UI proved to be a big challenge with features such as configurable dashboards, configurable navigation, light/dark visual themes, custom reporting, PDF exports, printing, configurable admin tables with a large number of columns and rows, advanced sorting/filtering options, and other UX requirements. There are a lot of improvements added to CxJS related to this project, but most changes were related to the Grid (data table) widget with features such as row and cell editing, column resizing and reordering, buffered rendering, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6iAO2__oxH6hVct-GYiOaA.png" /><figcaption>Screenshot of Assetmax</figcaption></figure><h4>Rise Wallet (2019)</h4><p>Rise Wallet allows purchasing small amounts of Bitcoin using gift cards. Developing a web application wrapped in a mobile web view is not usually the best approach, but the proof of concept was so good that we decided to go all the way. Except for buttons and charts, most of the components had to be developed within the application, but this was an excellent opportunity to work out CxJS features related to touch event handling, hash-based routing, and ironing out Safari quirks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*W48LDcE6cLMifxhNBk1NMQ.png" /><figcaption>Screens from the Rise Wallet mobile application</figcaption></figure><h4>The Future</h4><p>Now when CxJS is completely free, the biggest hope we have is that it will be used more. It would be nice to see CxJS used within other open-source products and especially to see contributions from the community. There are many open opportunities. <a href="https://docs.cxjs.io/">The CxJS documentation application</a> is pretty nice and could be extracted into a reusable documentation project template. It is time for a new visual theme. Google-like calendar widget? Maybe pgAdmin could be rewritten in CxJS!? It would be great to see application templates for different backends, i.e. Node.js, .NET, Java, or PHP. That’s something that we always wanted but never had time to deliver. There is an application template for integration with Tailwind CSS, but we could use one for Bootstrap too.</p><h4>Try it out and become a member of the CxJS community</h4><p>You can quickly try out CxJS by setting up a new project using <a href="https://cxjs.io/get-started">CxJS CLI tools</a>. In our previous post, we presented <a href="https://blog.codaxy.com/cxjs-and-tailwind-css-ffd02f099445">how CxJS and Tailwind CSS play nicely</a> and that might be a good starting point.</p><p>If you like CxJS, give it a star on <a href="https://github.com/codaxy/cxjs">GitHub</a>. If you need help, ask a question on <a href="https://stackoverflow.com/questions/tagged/cxjs">StackOverflow</a>. If you find a bug, please <a href="https://github.com/codaxy/cxjs/issues">raise an issue</a>. <a href="https://cxjs.io/support">Request an invite to our Slack channel</a> and become a member of the CxJS community.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f52fee2a8214" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codaxy/cxjs-goes-open-source-f52fee2a8214">CxJS Goes Open Source</a> was originally published in <a href="https://medium.com/codaxy">Codaxy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CxJS and Tailwind CSS]]></title>
            <link>https://medium.com/codaxy/cxjs-and-tailwind-css-ffd02f099445?source=rss----bd88c3bbe53d---4</link>
            <guid isPermaLink="false">https://medium.com/p/ffd02f099445</guid>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[cxjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Marko Stijak]]></dc:creator>
            <pubDate>Mon, 19 Jul 2021 10:22:58 GMT</pubDate>
            <atom:updated>2021-07-19T10:22:58.609Z</atom:updated>
            <content:encoded><![CDATA[<p>Tailwind CSS is a utility-first CSS framework packed with classes like <strong>flex</strong>, <strong>pt-4</strong>, <strong>text-center</strong> and <strong>rotate-90</strong> that can be composed to build any design, directly in your markup.</p><p>CxJS is a JavaScript framework designed for building large single-page applications such as administration consoles and dashboards. CxJS can be easily combined with CSS frameworks such as Bootstrap or Tailwind CSS as all CSS classes generated by the framework are prefixed. This post is about Tailwind CSS and how it nicely complements CxJS.</p><h4>Tailwind CSS</h4><p>There are many benefits that <a href="https://tailwindcss.com/">Tailwind CSS</a> brings. For me, number one is the productivity gain achieved by not having to come up with names for CSS classes and separately edit .css and .js files. Large projects have too many files already, and CSS always feels disconnected from the rest of the code. The same question always pops up — where should CSS files be located? Should they be at a completely separate location or colocated with the application components? How do you find a CSS class in a large project and how can you be sure that making a small change will not break things somewhere else.</p><p>With Tailwind CSS, you don’t have to come up with names for CSS classes, in most cases you don’t even need to write any CSS at all. You simply apply bits and pieces from an extremely large pool of predefined utility classes.</p><h4>CxJS</h4><p>This philosophy is very similar to <a href="https://cxjs.io/">CxJS</a>. CxJS offers a large set of ready-to-use JavaScript components, such as widgets and charts, which are glued together using application-level utilities for state management, routing, push-state navigation, form validation, localization, etc. Everything is there, you just combine bits and pieces. In CxJS, you are encouraged not to give names to routes and controllers. Why? Simply, in large-scale applications dealing with so many names becomes extremely tedious. Not having names makes things easier to refactor and move from one place to another.</p><p>Let’s go now into some practical pieces.</p><h4>Sample App</h4><p>To make things easier for fellow CxJS developers, we built a sample <a href="https://twapp.cxjs.io/">Demo application</a> with source code available on <a href="https://github.com/codaxy/cxjs-tailwindcss-template">GitHub</a>. The application has the tooling preconfigured, so it’s a good starting point if you wish to play with CxJS and Tailwind CSS together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pTiJ4TWvsBmBqJfbgPm6LQ.png" /><figcaption>Screenshot of the sample application</figcaption></figure><p>Full disclosure, the inspiration for the layout and the dashboard page came from this amazing <a href="https://dribbble.com/shots/6695550-Sales-Dashboard-App">Dribbble</a>.</p><h4>Sidebar Navigation</h4><figure><img alt="Navigation menu" src="https://cdn-images-1.medium.com/max/252/1*e-Xqv1kF7cPLdOQfboQZow.png" /></figure><p>Let’s start with an example of the navigation menu. The most interesting part is how navigation items are implemented. Items are links pointing to various application parts. Each item is visually represented with an icon and text. If the browser’s URL matches the <strong>href </strong>attribute, the item is in the active state and changes appearance. Besides that, nav items can have small badges and allow expanding/collapsing. These functionalities are implemented in the component below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/395e6cb70018e60392495b50d2f89a5e/href">https://medium.com/media/395e6cb70018e60392495b50d2f89a5e/href</a></iframe><p>You can see here Tailwind CSS at work. The class attribute is strikingly long. It cannot fit the screen and that’s very common. People sometimes get scared, but that is actually an advantage as it’s easy to learn about the appearance of the component without leaving the file. The nav item is implemented using the flex layout, the text is gray and semi-bold, the background changes to light gray color on hover and there is a left border of 3px that is initially transparent. When active, the item changes its background to light blue, also the left border and text become blue. Similar to the container, you can see how the icon and text are positioned. It’s all there and in your sight. You are literally seconds away from a new version and changes you make are immediately applied and presented in the browser.</p><blockquote>You’ll notice that active classes start with an exclamation mark. That’s Tailwind’s way of adding !important modifier which comes really handy here as active classes need to override default appearance.</blockquote><h4>Dashboard KPI Widgets</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*u1CJgiCQSlJfyOUYI8-vLw.png" /></figure><p>Let’s see another example — a dashboard KPI component. This component consists of an icon, a title, a numeric value, and a percentage change indicator.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/705791e1de275b6573e51338e57fbfe0/href">https://medium.com/media/705791e1de275b6573e51338e57fbfe0/href</a></iframe><p>We can see that this is a padded white box with a rounded border. Inside the box, the first element is an icon. Curiously, it has both class and className properties defined. CxJS supports both and this comes in handy here as the positioning and size of the icon is predefined, and the rest can be passed externally i.e. colors. The title and value parts are pretty straightforward. It’s just positioning, text color, and size. The change part is interesting. If the change is positive, the text is displayed in green and the icon is pointing up. If the change is negative, the text is displayed in red and the icon is pointing down. Since the change prop can be a binding, an expression, or a constant value, DataProxy is used to resolve the value and bring it into the store under the alias <em>$change</em>. With that available, the appearance logic can be easily implemented using expressions and computable values.</p><h3>Conclusion</h3><p><strong>CxJS stops with components and Tailwind CSS continues right there. It allows components to be easily arranged into higher-order visual elements such as widgets, sections, toolbars, layouts, etc.</strong></p><p>Predefined utilities for margins, colors, shadows, gradients, and other things, are really useful and save precious development time. On top of that excellent documentation, VS Code extensions, and JIT mode make using Tailwind CSS a great development experience. With all that, it’s easy to conclude that Tailwind CSS is a great companion and complements CxJS really well.</p><p><a href="https://github.com/codaxy/cxjs-tailwindcss-template">The provided application template</a> can be used as a starting point, as all the tooling has been preconfigured. It can be used for experiments or as a template for new projects. If you wish to try it out, the easiest way to set up a new project is using <a href="https://cxjs.io/get-started">CxJS CLI tools</a>.</p><p>Stay tuned. There is some exciting news coming soon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffd02f099445" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codaxy/cxjs-and-tailwind-css-ffd02f099445">CxJS and Tailwind CSS</a> was originally published in <a href="https://medium.com/codaxy">Codaxy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upgrade from Webpack 4 to Webpack 5]]></title>
            <link>https://medium.com/codaxy/upgrade-from-webpack-4-to-webpack-5-952bebddd39e?source=rss----bd88c3bbe53d---4</link>
            <guid isPermaLink="false">https://medium.com/p/952bebddd39e</guid>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[babel]]></category>
            <dc:creator><![CDATA[Ognjen Stefanović]]></dc:creator>
            <pubDate>Thu, 08 Apr 2021 06:14:02 GMT</pubDate>
            <atom:updated>2021-04-09T08:26:10.234Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UTIPRq56cpZkjI_0HlRDSQ.png" /></figure><p>So, you are working on some updates on your app, and you find out that one feature you need requires webpack 5, but you still have not updated. Or you are just starting a new app, and wonder, why webpack 5?</p><p>Webpack 5 offers improved compilation performance with persistent caching and other improvements. Playing with webpack configuration is a tricky task and that is why we’re offering this small guide.</p><p>You can find a short step-by-step guide here on how to update, explaining everything along the way. We will be focusing on upgrading CxJS projects specifically but for all intents and purposes, you can use this as a guideline for any JavaScript project based on webpack.</p><p>Step by step, we will go through:</p><ol><li>Updating webpack</li><li>Updating additional plugins</li><li>Changing webpack configuration</li><li>Persistent caching</li></ol><h4>Step 1: Updating webpack</h4><p>First, let’s check that you are actually on an old version of webpack. For this, you can use your package manager of choice (e.g. npm, yarn) and ‘list’ the version and the package that you are interested in.</p><p><strong>npm list webpack<br>yarn list webpack</strong></p><p>This will give you the basic information about the package, and the version number. If this says 5.0 or higher, you are good to go. Otherwise, you will need to update, with the following:</p><p><strong>yarn add webpack<br>npm install webpack</strong></p><p>After the installation is done, you can check the version with the ‘list’. With that, the first step is done.</p><h4>Step 2: Updating additional plugins</h4><p>Plugins are an essential part of the webpack, as they provide important improvements as well as some creature comforts. You will most likely use at least one plugin, if not many on almost every single one of your projects. You can check the whole list of available plugins <a href="https://webpack.js.org/plugins/">here</a>.</p><p>When you update the webpack, you might need to update a few additional plugins. Some will work out-of-the-box, but the others, you will have to update for them to work properly. An example of one of those is the <strong>html-webpack-plugin</strong>. In our project, we had a 4.3.0 version, but now we need to update it. The process is the same as for the webpack update, with a different package name.</p><p><strong>yarn add html-webpack-plugin<br>npm install html-webpack-plugin</strong></p><p>Another plugin that needs updating is the postcss-loader (if you are using it). You might need to update a few more loaders, like css-loader and sass-loader, depending on the version.</p><p>You might need to update more plugins (mostly loaders, like sass-loader), depending on what you are using in your project, but the process is the same.</p><h4>Step 3: Changing webpack configuration</h4><p>Once you have updated the webpack package, you will need to update the configuration, because there are slight differences between the two versions.</p><p>Our webpack configuration is split between 3 different files, the first of which is common settings, the second being the development configuration, and finally the production configuration.</p><p>Three-file webpack configuration is common for our CxJS apps. We have separated the production from the development configuration but extracted common settings in a separate file. This is so we don&#39;t have code repetition, which makes maintaining code easier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/309/1*B4gKGvaYFqLwRQVgI9NxKQ.png" /><figcaption>Three-file webpack configuration</figcaption></figure><p>We will need to update all of them to the latest spec.</p><p>Let’s start!</p><p>In the <strong>webpack.config.js</strong> file, you will need to change the following:</p><p>In the rules section, you will have to change the loader for each rule, from ‘<strong>loader</strong>’ to ‘<strong>use</strong>’ key, where you can then specify the loader and the options if you have them. For example, we will change the Babel rule, with a dedicated configuration file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*0niHuSXuaNkWvjJ3hfwg8A.png" /><figcaption>Example of old configuration</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*b-12yge7RmiDV8Igr9goWA.png" /><figcaption>Example of new configuration</figcaption></figure><p>And that’s it. You are done with the general configuration file. Do the same for development and production file as well.</p><p><em>* If you are using </em><strong><em>tailwindcss</em></strong><em>, you need to specify the SCSS / CSS loader as the ‘postcss-loader’, with the tailwind as a plugin. This will ensure that the tailwind is properly loaded. More on this will be covered in the next post.</em></p><p><em>** If you get an error trying to start the project, regarding the postcss-loader, you might not have the package installed. So, just add it:</em></p><p><strong>yarn add postcss-loader<br>npm install postcss-loader</strong></p><h4>Step 4: Persistent caching</h4><p>Caching is a very useful feature of webpack which makes build times faster. Instead of building the whole app over and over again, only the changed parts will be built, while reusing the unchanged ones from the cache (temporary storage). And when something changes in the global configuration, the webpack needs to invalidate the whole cache. While this works great for directly project-related files, such as html, CSS / SCSS files, images etc, there is a problem with reloading packages, when you, for example, upgrade a plugin or change a configuration file. Webpack just cannot handle all of that out-of-the-box.</p><p>For that reason, there is a new option for caching, called ‘buildDependencies’, which allows you to specify code dependencies of the build process. This means, whenever there is a change in the files that you have specified, which are critical for the build, webpack will invalidate the cache.</p><p>Why is this not enabled straight away, I can hear you asking? Well, the thing with the cache is, it works 95% of the time as it should, but there is a small chance that this might break your application building or workflow. If something is cached that shouldn’t be, that might lead to problems down the road. That’s why you need to configure it correctly. And webpack prefers stability and safety over performance, hence they disable this feature by default. But if you configure persistent caching correctly, there should be no problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*t5wq_7Yiw_KLFkqvtEVM8w.png" /><figcaption>Cache configuration</figcaption></figure><p>Type ‘filesystem’ enables the filesystem cache, and puts in-memory cache to second place. This enables the persistent cache. The program will still look for in-memory cache first, but it will fall-back to the filesystem. In ‘config’ add files that will invalidate the cache if they are changed (you should put your configuration files here).</p><h4>Internet Explorer 11</h4><p>If your app needs to work on IE 11, you will have to add a target key in your webpack configuration file, like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*47vx9d15KCwp25ZiECKxOg.png" /><figcaption>Internet Explorer 11 support</figcaption></figure><p>By default, webpack’s runtime code uses ES2015 syntax to build smaller bundles. If your build targets environments that don’t support this syntax <strong>(like IE11)</strong>, you’ll need to set target: [&#39;web&#39;, &#39;es5&#39;] to revert to ES5 syntax. You can find out more about this <a href="https://webpack.js.org/migrate/5/#need-to-support-an-older-browser-like-ie-11">here</a>.</p><h4><strong>Conclusion</strong></h4><p>It takes around 10 minutes to finish the update process. This will bring all the benefits that webpack 5 brings to the table, such as improved performance by leveraging persistent caching and long-term caching, improved algorithm defaults, improved bundle sizes using better Tree Shaking, Code generation and much more. Now there is no excuse to run an old webpack in your project!</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=952bebddd39e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codaxy/upgrade-from-webpack-4-to-webpack-5-952bebddd39e">Upgrade from Webpack 4 to Webpack 5</a> was originally published in <a href="https://medium.com/codaxy">Codaxy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Office Syndrome]]></title>
            <link>https://medium.com/codaxy/the-office-sindrome-80a23bd04478?source=rss----bd88c3bbe53d---4</link>
            <guid isPermaLink="false">https://medium.com/p/80a23bd04478</guid>
            <category><![CDATA[health]]></category>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[sitting]]></category>
            <category><![CDATA[office]]></category>
            <category><![CDATA[activity]]></category>
            <dc:creator><![CDATA[Karadža Vladimir]]></dc:creator>
            <pubDate>Tue, 22 Sep 2020 08:54:31 GMT</pubDate>
            <atom:updated>2021-03-16T14:51:49.762Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nd/4.0/</cc:license>
            <content:encoded><![CDATA[<h3>The office Syndrome</h3><h4>You sit a lot. And that’s not good. — So how do you stay fit and healthy?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cEzBxfswdynb-LYCiBEfVw.jpeg" /></figure><h3>Why I’m writing this</h3><p>You sit a lot. I sit a lot, we all sit too much. Most of the sitting happens at work. And you’re probably not going to quit your job because of it. Fortunately such drastic measures are not needed. What is the alternative?</p><p>A lot of online guides recommend getting up and squating every 20 minutes. Or walking around your office.</p><p>Instead I will try to describe some more realistic ways of improving a sedentary lifestyle.</p><p>But first I want to give you some context:</p><h4>My usual habits from Monday to Friday:</h4><p>My routine from Monday to Friday consists of:</p><ul><li>Getting ready and going to work,</li><li>working (read: sitting) for 2,5 hours,</li><li>sitting and having breakfast for approximately half an hour,</li><li>working for 5 hours,</li><li>and going home to sit for a few hours more.</li></ul><p>I have other errands to do, sometimes fewer, sometimes more. But having lunch/dinner, and just being at home will likely consists of sitting one way or the other.</p><p>Most of the people I talked with have a similar schedule.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*4lYLdPudOAPZKLlM25US6A.jpeg" /><figcaption>Lancelot’s cousing, sir Sit-a-lot</figcaption></figure><h3>Why this is a problem</h3><p>That is <strong>10 hours</strong> of sitting at the bare <strong>minimum</strong>.</p><p>And humans are not made to sit. The cardiovascular system and bowels function much more efficiently when standing upright. Our <a href="https://www.amjmed.com/article/S0002-9343(10)00463-8/pdf">hunter-gatherer ancestors</a> could not outsprint a wild animal, but they could chase it down eventually. We evolved these capabilities and requirements over vast periods of time and we haven’t changed in the past 100 years.</p><p>Moving and Exercising affects <a href="https://www.medicalnewstoday.com/articles/322906#Metabolism-and-exercise">our hormone levels</a>: <a href="https://www.wellandgood.com/how-exercise-affects-hormones-overall-health/">Cortisol, Testosterone and Estrogen</a> among others. This affects both directly and indirectly our mood, health and health predispositions.</p><blockquote>We advanced, and now have the world and its information on the palm of our hand. But that hand hurts us if we only twist it a bit.</blockquote><p>Sitting on it’s own leads to few ailments, but it adds up. There’s genetics, the food we eat and probably a very large list of other smaller factors.</p><p>With that said, prolonged inactivity can in some cases lead to (brace yourself): <a href="https://www.hopkinsmedicine.org/health/conditions-and-diseases/varicose-veins">Varicose veins</a>, <a href="https://www.health.qld.gov.au/news-events/news/deep-vein-thrombosis-DVT-blood-clot-risks-how-to-avoid">deep vein thrombosis</a>, <a href="https://www.betterhealth.vic.gov.au/health/conditionsandtreatments/back-pain-disc-problems">back and disc problems</a>, <a href="https://www.startstanding.org/sitting-and-cardiovascular-disease/#the">heart disease</a>, <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2752478/">anxiety and depression</a> and etc. (I have put links in their respective disorders for more detailed explanations on what they are and how prolonged sitting can contribute to them.)</p><h3>So what can you do?</h3><p>Since we established movement is necessary, the next step is to add activity to both your lifestyle and office.</p><p>And becoming active isn’t as demanding as it may seem. Taking it slow is fine, and even baby steps count. Every step (literally) towards making a difference is good.</p><h4>Your lifestyle</h4><p>The first and obvious way is to introduce proper activity in your life. It is important that this activity isn’t something you have to force yourself to do everytime. That isn’t sustainable.</p><p>Perhaps you wanted to try out new things for a while but didn’t commit to it. Maybe you wanted to hike, swim or do archery. If you are starting out, find local clubs to have guidance and have an easier time as a beginner.</p><p>Some of the things I’d suggest are:</p><ul><li><strong>Fencing</strong>/<strong>Archery </strong>— While fencing is agility and reflex focused and more intense, archery is about control and precision. My colleague and I found both exciting. As soon as we heard an archery club was nearby we signed up, and loved it!</li><li><strong>Martial arts</strong> — From ancient arts to modern ones, they are all great workouts. Count on improving your endurance, strength, weight and even <a href="https://thriveglobal.com/stories/how-martial-arts-benefits-mental-health/">mental health</a>.</li><li><strong>Fitness</strong>/<strong>gym </strong>— Obvious and probably the first choice for most. As a beginner consider hiring a coach or teaming up with an experienced friend. Figuring out workouts on your own can be confusing.</li><li><strong>Swimming</strong> — One of the most all-around sports for physical development. This is the easiest way to get a full-body workout. Plus, you can cool off in the summer.</li><li><strong>Yoga</strong>/<strong>Pilates </strong>—This is great against those tightened muscles, and a lot of exercises aren’t nearly as easy as they might seem to some.</li><li><strong>Indoor rock climbing</strong> — Combine the excitement of climbing a mountian, but take away the risk of plummeting down a thousand feet. What’s not to love? I tried this in college and wholeheartedly recommend it!</li><li><strong>Hiking </strong>— Besides improving your shape, it’s a very rewarding experience.</li></ul><p>On one side you’re combating inactivity, and on the other you found yourself a new hobby (Let’s assume you will). I call that a win!</p><p>But you’ve just won the battle, not the war.</p><p>Sometimes I go swimming, to the gym, and occasionally hiking. I considered myself as being reasonably active, considering I spend most of the day sitting.</p><p>But once you sit ~10 hours per day you can’t help but shift your perception of what active is. My activity equals less than 10% of my time awake (If I did this everyday, which I don’t, of course. It’s even less than that).</p><p>So apparently I’m what is called an <strong>active couch potato</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*k3_72ojetIxDHm-Uuti16A.jpeg" /><figcaption>Hi, nice to meet you</figcaption></figure><p>I tricked myself into thinking I’m fully countering the bad effects of inactivity. It’s all nice and well, but I’m just as static for the rest of the time as I was before.</p><h4>At the office</h4><p>We need to break that apart and include movement into the workday where possible. This isn’t as simple as saying stand up every hour or so. In practice it’s easy to forget or get carried away with your project/assignment. It takes work.</p><p>So here goes the list:</p><p>Consider getting a better <strong>Chair </strong>— investing in a proper ergonomic chair is a good move regardless of this text. Proper posture and lumbar support is something your back will immediately be thankful for.</p><p><strong>Walk</strong> — If possible walk to work, or cycle. Use the opportunity to climb the stairs to your office when arriving to work, going to lunch, coffee etc. Even small things like moving the rubbish bin further away, so you need to stand up and walk to it. Instead of sending a cold e-mail walk over to your colleague.</p><p>Standing desks have seen more usage recently. My colleague in the office next door uses an adjustable desk and alternates between standing and sitting. Even some big names like Facebook, Twitter and Google are including them in their workspaces.</p><p>If this isn’t an option for you, you can always just stand up for a bit and stretch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*nuzS0tNbp-ZO-BH2_vlMJQ.jpeg" /></figure><p>Work on your <strong>posture </strong>— Set your chair so that you sit upright. Your upper back should be straight and your lower back supported. If the chair doesn’t provide that lower support you can use a pillow.</p><p>Your arms should be in a resting position, at a 90 degrees angle.</p><p>So should your legs. Crossing them or tucking behind the chair’s legs can reduce the bloodflow.</p><h4>Bottom line</h4><p>We sit a lot, because we have a sitting routine.</p><p>And our body isn’t made to sit.</p><p>So change your lifestyle and working habits.</p><p>We can’t get away from sitting. And we sometimes like it. Dr. James Levine said: “Sitting is the new smoking”.</p><p>But for the sake of our health, any exercise is better than none. It’s each individual’s challenge to find a fitting lifehack to becoming more active throughout the day.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80a23bd04478" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codaxy/the-office-sindrome-80a23bd04478">The Office Syndrome</a> was originally published in <a href="https://medium.com/codaxy">Codaxy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Workshop log: publishing Worldoscope to Google Cloud]]></title>
            <link>https://medium.com/codaxy/deploy-app-to-google-cloud-537306069eb5?source=rss----bd88c3bbe53d---4</link>
            <guid isPermaLink="false">https://medium.com/p/537306069eb5</guid>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[certbot]]></category>
            <category><![CDATA[application]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Karadža Vladimir]]></dc:creator>
            <pubDate>Tue, 25 Aug 2020 09:48:53 GMT</pubDate>
            <atom:updated>2020-08-25T09:48:53.430Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*afZUCqsL-nk4Nshxdbps4w.png" /></figure><p>This Blog is a result of an internal workshop we organized at our company.</p><p>A quick <strong>heads-up</strong> before you begin: deploying an app to Google Cloud requires you to set up a billing profile in Google Cloud Platform (check the pricing <a href="https://cloud.google.com/compute/all-pricing?_ga=2.128567052.-1681417677.1594732683">here</a>), though you can try it for free for a limited time. You also need a domain to host your app.</p><p>Now that we’ve got that out of the way, you have several options from Google Cloud when it comes to app deployment:</p><ul><li>Virtual machines with <a href="https://cloud.google.com/compute/">Google Compute Engine</a></li><li>Containers in Kubernetes with <a href="https://cloud.google.com/kubernetes-engine/">Google Kubernetes Engine</a></li><li>Platform as a Service with <a href="https://cloud.google.com/appengine/">Google App Engine</a></li></ul><p>I will describe the way we did it via Virtual Machine.</p><h3>Setting things up</h3><p>Once you’ve set up the Google Cloud profile head over to <a href="https://console.cloud.google.com/">https://console.cloud.google.com</a>. From the navigation menu choose <strong>Compute Engine, VM Instances,</strong> and create your project<strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*wPIn7fg96oEZJhFkCT_Jog.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*4_f5L7czozTrLWkLg4ncQQ.jpeg" /></figure><p>Select <em>create instance </em>and <em>new VM instance</em> and set the following:</p><ul><li>Machine configuration, Machine type as f1-micro</li><li>Boot disk as CentOS 7</li><li>Under Firewall check both HTTP and HTTPs and hit Create.</li></ul><p>Now your virtual instance is set. Click on SSH to access it and see your username in the shell, or type whoami and it will print out your username.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*0DFs5HAW_XV68sywTP57Hg.jpeg" /></figure><p>Now what you need to do is upload your built app to the VM. We used Putty and WinSCP for this.</p><p>So open PuTTY Key Generator and generate a key (It uses mouse movements for randomness so you must move the mouse around a bit). Set the username(“key comment” in PuTTY), optionally a password, and save the private key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*oLKJDNt8QqG7jOHvWL-ldw.png" /></figure><p>Copy and paste the public key in the VM instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*ikZhBIgz8Leuzs5aLG-EKA.png" /></figure><p>Then open WinSCP and enter your hostname and credentials, click on <strong>Advanced</strong> to add your private key and you’re connected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*BsAFOlBTABFp9lYlAFvhfw.png" /></figure><p>Now to the <strong>slightly</strong> more fun part.</p><h3>Building the app</h3><p>This is done on a development machine and you’ll need Yarn and Node.js to build it. Download those if you don’t already have them. Go ahead and clone the app from <a href="https://github.com/codaxy/worldoscope.git">https://github.com/codaxy/worldoscope.git</a>.</p><p>To check if the app is running enter:</p><pre>yarn install </pre><pre>yarn start </pre><p>If node-sass is missing run:</p><pre>yarn add node-sass</pre><p>Then build the application:</p><pre>git checkout feat/master/worldbank-proxy</pre><pre>yarn build</pre><p>It’s necessary that you checkout to worldbank-proxy, otherwise the API calls won’t work, which is explained later in the text.</p><p>The <em>dist</em> folder should now be visible inside the root folder.</p><h3>Deploying the app on the Google Cloud instance</h3><p>Now switch to the VM’s SSH. Install Nginx and configure it to run at the machine’s system startup</p><pre>sudo yum install nginx</pre><pre>sudo systemctl enable nginx</pre><p>Drag the dist folder over to the home/vm-instance-name directory in WinSCP.</p><p>Create the application folder</p><pre>sudo mkdir -p /var/www/worldoscope</pre><p>Though it doesn’t have to be <em>var/www/worldoscope</em>, you can set a different path, e.g. <em>user/share/{name}</em> or something else.</p><p>Copy application builds to the newly made folder</p><pre>sudo cp -R /home/{vm-instance-name}/dist/* /var/www/worldoscope/</pre><p>And set proper folder ownership</p><pre>sudo chown -R nginx.nginx /var/www/* </pre><pre>sudo chcon -Rt httpd_sys_content_t /var/www/*</pre><p>The basic Nginx configuration is placed inside /etc/nginx/nginx.conf file. To edit the file execute:</p><pre>sudo vim /etc/nginx/nginx.conf</pre><p>You can use whichever editor suits you.</p><p>The basic configuration is shown in the image below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*HW1VJEiQnib1oymkgZ5MwA.png" /></figure><p>The<strong> root </strong>directive specifies the root directory used to search for a file. To get the requested file’s path, NGINX appends the request URI to the path specified by the root directive. In the example above, the root directive is defined for a virtual server. The first step is to change the default root location to <strong><em>/var/www/worldoscope</em></strong>.</p><p>The <strong>try_files </strong>directive can be used to check if the specified file or directory exists. NGINX makes an internal redirect if it does, or returns a specified status code if it doesn’t.</p><p>The file is specified in the URI form, which is processed using the root or alias directives set in the context of the current location or virtual server. In this case, if the file corresponding to the original URI doesn’t exist, NGINX makes an internal redirect to the URI specified by the last parameter.</p><p>Copy this line to the config:</p><pre>location /{try_files $uri $uri/ /index.html?/$request_uri;}</pre><h4>Reverse proxy</h4><p>Proxying is typically used to distribute the load among several servers, seamlessly show content from different websites, or pass requests for processing to application servers over protocols other than HTTP.</p><p>To pass a request to an HTTPS proxied server, the <strong>proxy_pass </strong>directive is specified inside a <strong>location</strong>. For example, in the Worldoscope application all requests to the worldbank API go to /worlbank. Setting a proxy_pass /worldbank will be resolved to the <a href="https://api.worldbank.org/v2.">https://api.worldbank.org/v2.</a></p><pre>location /worldbank {proxy_pass <a href="https://api.worldbank.org/v2;">https://api.worldbank.org/v2;</a>}</pre><p>The final configuration should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*U98WZe2tLqpBzoi_OTDMDA.png" /></figure><h3>Create the certificates</h3><p>And to do that you will use Certbot. Install it on the machine by running</p><pre>sudo yum install certbot python2-certbot-nginx</pre><p>Now you can run Certbot in two ways.</p><p>It can either create a certificate and we need to manually configure Nginx, by running</p><pre>sudo certbot certonly --nginx</pre><p>Or, it creates a certificate, automatically configures Nginx and turns on HTTPS in a single step.</p><pre>sudo certbot --nginx</pre><p>For Certbot to complete the setup you will need to define a few of its preset configuration settings, such as the domain name.</p><p>If you let Certbot configure Nginx automatically, then the <em>nginx.conf</em> will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*M5yVzJnxK4EnykZ70g7E0w.png" /></figure><p>If you run the first command, Certbot will only create a certificate and a key, but you will still need to edit nginx.conf on your own.</p><p>Inside the configuration, uncomment the section “Settings for TLS enabled server” and change the predefined locations for the SSL certificate and key.</p><p>And in order to set up automatic renewal, run</p><pre>echo &quot;0 0,12 * * * root python -c &#39;import random; import time; time.sleep(random.random() * 3600)&#39; &amp;&amp; certbot renew&quot; | sudo tee -a /etc/crontab &gt; /dev/null</pre><p>The command adds a cron job to the default crontab. This crontab configuration file drives <strong>cron </strong>which is a time-based job scheduler in Unix-like systems.</p><p>After running the command your <em>/etc/crontab</em> file will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*bCiVWZzj6LiizB7GXtWDQQ.png" /><figcaption>crontab file after adding cron job</figcaption></figure><blockquote>This wraps it up. Your Worldoscope app is now live and ready to go!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=537306069eb5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codaxy/deploy-app-to-google-cloud-537306069eb5">Workshop log: publishing Worldoscope to Google Cloud</a> was originally published in <a href="https://medium.com/codaxy">Codaxy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dark mode]]></title>
            <link>https://medium.com/codaxy/dark-mode-b79ea79493eb?source=rss----bd88c3bbe53d---4</link>
            <guid isPermaLink="false">https://medium.com/p/b79ea79493eb</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[dark-mode]]></category>
            <category><![CDATA[cxjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Karadža Vladimir]]></dc:creator>
            <pubDate>Thu, 17 Oct 2019 13:54:10 GMT</pubDate>
            <atom:updated>2021-02-04T07:05:32.022Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nd/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LRiuAGjZQ_A5hYIPYv4iFg.jpeg" /></figure><h3>All about dark mode</h3><h3>The trend</h3><p>Dark mode — so what? Both <a href="https://about.google/">Google</a> and <a href="https://www.apple.com/">Apple</a> are marketing their newest product features, among which dark mode takes the spotlight. Google’s newest mobile OS, <a href="https://www.android.com/android-10/">Android 10</a> is revolving around it, as does Apple’s <a href="https://www.apple.com/ios/ios-13/">iOS 13</a>. Apple’s <a href="https://support.apple.com/macos/mojave">Mojave OS</a> for its Mac lineup even displays dark mode as the system’s main feature. A flurry of articles and studies is emerging, concerning dark mode’s health benefits. A lot of talk was made recently about possible benefits of dark mode due to a harmful <a href="http://www.bluelightexposed.com/#where-is-the-increased-exposure-to-blue-light-coming-from">blue light</a> emanating from our displays. So why is it all of a sudden such a big deal? Dianna wondered the same question; the answer was brief.</p><h3>Z 🕷 A 🕸 I 🎃 D on Twitter</h3><p>Night is dark, Screen is bright, Eyes hurt Night is dark, Screen is dark, Eyes not hurt https://t.co/IuR2FBUmxM</p><p>But dark mode demand was introduced before Google and Apple embraced it. Companies like Twitter, Facebook Messenger, Slack, Reddit, Viber, and others have previously adopted it, and Instagram is following. The <a href="https://www.toptal.com/designers/ui/dark-ui-design">dark mode</a> is becoming all-encompassing, on the web and on our smartphones on which the average user is spending ever more time. Dark mode is becoming a norm, and the modern app developer needs to adjust.</p><h4>Its beginning</h4><p>We had dark mode before and advanced to the black on white, paper-like style. Kind of. Originally, computers used monochrome <a href="https://en.wikipedia.org/wiki/Cathode-ray_tube">CRT displays</a> (Cathode Ray Tube). And phosphor, used for lighting the display, was dark in color until hit by an accelerated electron, emitting a green glow (depending on the phosphor type used) on a usually black background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*nNguhgmzfG01Zc9i53cQEg.jpeg" /><figcaption>a monochrome phosphor CRT display</figcaption></figure><p>RGB displays followed a similar route, but setting all the beams to “on” instead to form white color. After teletext’s arrival, a color palette was needed to represent this new medium.</p><p>Research shows that light colors like cyan or yellow on black were typically found to be optimal from a palette of black, red, green, yellow, blue, magenta, cyan, and white. Opposite to that is the dark-on-light color scheme, introduced in <a href="https://en.wikipedia.org/wiki/WYSIWYG">WYSIWYG</a> (What You See Is What You Get), word processors, to simulate ink on paper.</p><p>Even then debates sparked whether text was more readable on a dark or light background. In the meantime, studies have been conducted stating that light text on a dark background is harder and slower to read, though marginally and not sufficiently enough to matter unless we’re talking about large amounts of text.</p><h4>Its benefits and negatives</h4><p>Some people suffer from conditions such as <a href="https://www.webmd.com/eye-health/photophobia-facts#1">photophobia</a>, a symptom of abnormal intolerance to light. They can experience discomfort, pain, and even migraines when reading dark on white for longer periods of time. Dark mode can be helpful for them. Then there is the blue light emitted from all displays.</p><p>You know, the blue light that had large media coverage due to numerous studies covering the matter. And for a good reason, since the on-screen time average is 3 hours and 15 minutes, with the top 20% smartphone users over 4.5 hours. I’d rather not disclose my average, it’s bad.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ZWtKUbqRsJXFdDTMlUp3Q.jpeg" /><figcaption>No Bueno</figcaption></figure><p>Blue light or the blue wavelength spectrum may be beneficial in the daytime since it can boost our attention, hence the increased usage in car dashboards. But it can also have negative effects on our sleeping rhythm.</p><p>Dark mode decreases blue light exposure, in varying degrees depending on the screen technology. In the case of OLED technology, black color emits no light, and can therefore, decrease battery consumption. OLED technology is not yet widely adopted by the industry but phone makers are including it in more devices, possibly future-proofing some of dark mode’s benefits.</p><p><a href="https://en.wikipedia.org/wiki/OLED">OLED</a> tech is also known for providing much higher contrast ratios than LCDs which are widely used. But a higher contrast doesn’t need to be hardware-based. As already made clear by Teletext’s arrival, a dark background makes content stand out.</p><blockquote>Increasingly wider use of OLED technology will probably lead to further adoption of dark themes.</blockquote><figure><img alt="light-on-dark color scheme contrast" src="https://cdn-images-1.medium.com/max/615/1*ZjHlD6IBtgnsMx7SmwoAgA.jpeg" /><figcaption>light-on-dark color scheme contrast</figcaption></figure><p>When most products go for a bland institutional white look, going dark can go leaps and bounds for your content to appear different. The extra pop achieved by the darker background is particularly useful when displaying graphical content like pictures or dashboards with chart data. The picture above demonstrates how a dark background can make other colors universally stand out.</p><h4>Switching to the dark side</h4><p>Any conscientious developer should indulge his users and create a dark mode for his apps and websites if he hasn’t already. That means you too. If you haven’t already created a dark theme for your apps and websites, you might reconsider to reap its benefits.</p><p>If it’s a webpage you are looking to “darkify” here is an appropriately named “cheap-ass” solution I found on <a href="https://news.ycombinator.com/item?id=19970052">Hacker News</a>: Open the developer tools and apply the following style filter: invert(95%) hue-rotate(190deg) to the&lt;body&gt; element. There you go, you have yourself a dark mode. A cheap-ass dark mode. Isn’t it lovely? Don’t answer that. Moving on.</p><p>But what about adapting apps for mobile dark mode. Fret not, I’ve got you covered. Let’s start with <strong>iOS</strong>. Firstly, the app must be built and released using <a href="https://developer.apple.com/xcode/">Xcode 11</a> and running on iOS 13.0 or later. Your app will support dark mode automatically and switch appearance automatically, hey it’s free work done! However, it can look weird in some cases since it’s automatic.</p><p>Apple implemented this really new neat trick called trait collection. About, like 5 years ago. It provides information like device type, screen size class, etc., but <strong>now, </strong>it gets a new property — userInterfaceStyle, to determine the view’s appearance style.</p><pre><strong>enum</strong> <strong>UIUserInterfaceStyle</strong>: <strong>Int</strong> {</pre><pre><strong>case</strong> unspecified</pre><pre><strong>case</strong> light</pre><pre><strong>case</strong> dark</pre><pre>}</pre><p>That allows you to override system appearance:</p><pre><em>// Always light.</em></pre><pre><strong>let</strong> lightView <strong>=</strong> <strong>UIView</strong>()</pre><pre>lightView<strong>.</strong>overrideUserInterfaceStyle <strong>=</strong> <strong>.</strong>light</pre><p>You should go through your in-app images to make sure they look good in both view modes. Apple also introduced SF symbols, 1500 of them for use in app development which automatically adjust to the system’s appearance.</p><p>And as for <strong>Android</strong>, it had a dark mode in its previous OS, just not at this level. Now it supports system-controlled theming like iOS by setting the app’s theme to inherit from the system:</p><pre>&lt;style name=&quot;AppTheme&quot; parent=&quot;Theme.AppCompat.DayNight&quot;&gt;</pre><p>It is better to avoid hard-coded colors and icons, instead opt for themed ones, e.g. use android:attr/colorBackground for the background.</p><p>There are many optimizations and tips on getting dark mode just right in your app, in the end, it is worth it and your users will be grateful.</p><h4>Notable examples</h4><p>Larger well-known sites and apps have used dark mode for great gain and brought a seemingly new user experience and improved overall usability. <strong>Youtube’s </strong>implementation felt like a breath of fresh air when it arrived.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iqHSPB79kBh2kaopaT4J1Q.png" /><figcaption>YouTube’s dark mode view</figcaption></figure><p>Its combination of dark gray colors with material design doesn’t strain the eyes with too much contrast yet makes both text and icons pop.</p><p>Media being its main content, dark mode cuts away unnecessary distractions and creates a fitting cinematic look, allowing you to focus purely on the content.</p><p><strong>Visual Studio Code</strong>, a developer’s environment, has had a dark theme for years now. The same rule applies here as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qsRupgHpiG-Mnzw8_DR5cg.png" /><figcaption>Visual Studio’s default dark view</figcaption></figure><p>In heaps of code, coloring different elements is key for differentiating code and navigating it. The default theme is a dark one, but it does give you the option to select a theme by clicking control+shift+p.</p><p>Everyone in my office is of the opinion that the dark themes are better because darker colors on a lighter background aren’t visually distinctive enough. And lighter colors on a light background like the <a href="https://en.wikipedia.org/wiki/Solarized_(color_scheme)"><em>solarized light</em></a><em> </em>theme look like a Starbucks pumpkin spice frappuccino with extra cream had spilled over the screen. In cases like this, contrast and a dark background are almost mandatory, because it is much less strenuous to code in such an environment.</p><blockquote>Today’s competitive market demands constant refresh and update, dark mode provides that. But adapting a complex site or app can be no easy feat.</blockquote><h4>How we do it</h4><p>I will share a few of our projects my colleagues at <a href="https://www.codaxy.com/">Codaxy</a>, and I worked on recently. We included dark themes in all of them but it was actually a must have requirement for a project called Assetmax.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z5gLhvK8Zwb5c2gLHLjf3w.jpeg" /><figcaption>Assetmax’ light theme</figcaption></figure><p><strong>Assetmax</strong>, an asset management application, supports a dark mode theme among several others, but incorporeated it without restructuring the site since it uses the CxJS framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YPQ5xd4t3WXmADGBMwFdBw.jpeg" /><figcaption>And its dark theme</figcaption></figure><p>It benefited greatly from dark mode since it is suited for professional data display, where every bit of information is relevant. There’s a reason traders at Wall street also use light-on-dark color schemes. Bright colors might be good when drawing attention to something but results in a counter-effect when a lot of (especially important) information is displayed. It can sometimes make a mess. Dark color brings attention to only the necessary elements on a page, and information is easier to pick out.</p><p><a href="http://cxjs.io/"><strong>CxJS </strong></a>is a React-based framework developed by Codaxy. It was intended for building advanced user interfaces and large enterprise apps for the finance sector, transportation, cloud management, you name it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b5c9L4fke8vMlZOykzArsg.jpeg" /></figure><blockquote>Focus on solving the puzzle, instead of searching for the pieces.</blockquote><p>But developing an advanced user interface for such projects, would usually require combining components from several other sources. <a href="https://cxjs.io/">CxJS</a> rectifies that and merges everything into one package, simplifying development, project complexity and saving time. It uses declarative data-binding and JSX allowing you to use HTML and XML like structures. You can read further about it in the official <a href="https://docs.cxjs.io/intro/welcome">CxJS documentation</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CNaoCxPKcYZx7AXFT3cQcA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kUW-hoU05DGTQMzMQrfBPA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ev5qIqfnT9HtfAwjGW_jPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hphMQew805mODeCdCRZzBA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jpkOdT_FYDA8haytzdtfrQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7FHrUO8beArvyuwlKpaEKw.png" /><figcaption>A preview of Cx Gallery’s several widgets and dark themes</figcaption></figure><p>CxJS currently offers three dark themes that you can check in Cx Gallery. <a href="https://gallery.cxjs.io/material-dark/grid/basic"><strong>Cx Gallery</strong></a> is another prime example of dark mode and theme application. Its purpose is to display potential Cx widget implementation and their theming. Feel free to browse the site and check out all the different widget types, functions and prebuilt themes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-jspeag66SK3HM9JgPHzbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BrhAtcPXx7DQ6gCRbBhqIA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0HjprwyBFrb4PaOJvyhJJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XBJx4VhpNfu89CkbuHJZsQ.jpeg" /><figcaption>Tdo’s customization feature in action</figcaption></figure><p><a href="http://tdoapp.com/"><strong>Tdo</strong> </a>is an app written with CxJS and is visually similar to Visual Studio Code. Since it is a utilitarian one it follows the same guidelines, concentrating on its content. That means a dark background and distinctive text. Its purpose is that of a to-do list and for note-taking, but with a few twists and turns. Like, being completely operable on a keyboard, or supporting CSS and Markdown for visualizing and editing text and headers.</p><p>Dark mode might be here to stay or it might be just a fad, we’ll need to wait and see how that unfolds. Its benefits certainly outweigh the drawbacks, and its characteristics coincide with the current trend in technology, e.g. OLED displays. Anyway i highly recommend you look more into the matter yourself, and try to find your own conclusions. Let me know about your opinions down in the comments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*VMHQ4p9D8wiSt5Z-mhlKgw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b79ea79493eb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codaxy/dark-mode-b79ea79493eb">Dark mode</a> was originally published in <a href="https://medium.com/codaxy">Codaxy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to publish your CxJS application on Netlify]]></title>
            <link>https://medium.com/codaxy/how-to-publish-your-cxjs-application-on-netlify-5df357c043d3?source=rss----bd88c3bbe53d---4</link>
            <guid isPermaLink="false">https://medium.com/p/5df357c043d3</guid>
            <category><![CDATA[single-page-applications]]></category>
            <category><![CDATA[cxjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[netlify]]></category>
            <dc:creator><![CDATA[Marko Stijak]]></dc:creator>
            <pubDate>Thu, 25 Oct 2018 10:38:17 GMT</pubDate>
            <atom:updated>2018-10-29T08:26:43.217Z</atom:updated>
            <content:encoded><![CDATA[<p>First, let me say that Netlify is an incredibly useful tool. They provide an all-in-one workflow that combines global deployment, continuous integration, and automatic HTTPS. That makes it a perfect place for hosting <a href="https://cxjs.io/">CxJS</a> based applications. Let’s see how we can publish a Single Page Application (SPA) on Netlify and configure URL rewriting.</p><p>I’ll use the <a href="https://starter.cxjs.io/">CxJS Starter Kit</a> as an example. The project <a href="https://github.com/codaxy/cx-starter-kit">is located on GitHub</a>. You can follow the steps using your own project located on GitHub, GitLab or BitBucket or <a href="https://github.com/codaxy/cx-starter-kit">fork Starter Kit</a> and use it as your own project.</p><h4>Setting up a new project on Netlify</h4><p>Once you sign in you’ll see the list of your sites. Since you are reading this post the list will probably be empty, so just hit <strong>New site from Git </strong>in the top-right corner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AWdg3gtnTMbf1a4Q4gSYhA.png" /></figure><p>You will be asked to allow Netlify to access your GitHub account. Once you do that you will be able to pick a repository from a list of your repositories retrieved from GitHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*osMKN0FioPzG5GzKRapBVw.png" /></figure><p>After selecting the project, let’s configure the build step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bbHIE_d_cYZvlroMBEIYug.png" /></figure><p>We need to instruct Netlify to build the project using the <strong>npm run build </strong>command and to publish the contents of the <strong>dist</strong> folder if the build is successful.</p><p><em>It’s not required to run npm install. Netlify will detect package.json and automatically install NPM packages. Yarn will be used for installing packages if yarn.lock is detected.</em></p><p>That’s almost it. You’ll now see that a new site deployment is in progress.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gYHm8pPQOIqf4TVTxlMLsw.png" /></figure><p>Netlify will assign a random name to your site and deploy it on <strong>{name}.netlify.com </strong>domain. You can easily change the name in <strong>Site settings</strong> or configure your own <strong>Domain settings</strong>.</p><p>After approximately one minute, the site is live.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o6VINzztZPzPezHszao5-g.png" /></figure><p>Can it be simpler than that? I don’t think so.</p><h4>URL Rewriting</h4><p>For single-page applications all the routing and content rendering is done client-side. If you try to directly access any other page except the homepage, you’ll encounter an error — <strong>404 — Page not found</strong>.</p><p>Since the application is handling routing and rendering, the trick is to serve the same content for all URL paths and let the application do its job. This technique is called URL rewriting.</p><p>Netlify provides an easy way to configure URL rewriting by putting a file called <strong>_redirects</strong> alongside other published resources. For our use case, the contents of the file should be just this one line.</p><pre>/*    /index.html   200</pre><p>In Starter Kit, I created a file called <strong>netlify.redirects</strong> in the <strong>config </strong>folder and added the following snippet in webpack’s production configuration (<strong>webpack.prod.js).</strong></p><pre><strong>new </strong>CopyWebpackPlugin([{<br>    from: path.resolve(__dirname, &#39;./netlify.redirects&#39;),<br>    to: &#39;_redirects&#39;,<br>    toType: &#39;file&#39;<br>}])</pre><p>Now everything works as expected.</p><h4>Conclusion</h4><p>As you see, it takes less than ten minutes to get your application up and running. Besides that, Netlify provides a myriad of features that are great for testing and production purposes.</p><p>In the next post, I’ll explain how to configure webpack and Netlify for <strong>optimal long-term caching</strong>. Stay tuned.</p><p><a href="https://cxjs.io/"><em>CxJS</em></a><em> allows you to easily build enterprise-grade JavaScript applications. Form widgets, advanced data tables, charts, client-side routing, advanced layouts, beautiful visual themes, and many other features are </em><a href="https://gallery.cxjs.io/"><em>available in CxJS out of the box</em></a><em>. There is no better tool for the job, </em><a href="https://cxjs.io/pricing"><em>now completely free for small teams and startups</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5df357c043d3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codaxy/how-to-publish-your-cxjs-application-on-netlify-5df357c043d3">How to publish your CxJS application on Netlify</a> was originally published in <a href="https://medium.com/codaxy">Codaxy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Seven Advanced CxJS Grid Features]]></title>
            <link>https://medium.com/codaxy/seven-advanced-cxjs-grid-features-abaebf75f17f?source=rss----bd88c3bbe53d---4</link>
            <guid isPermaLink="false">https://medium.com/p/abaebf75f17f</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[enterprise-technology]]></category>
            <dc:creator><![CDATA[Marko Stijak]]></dc:creator>
            <pubDate>Fri, 09 Feb 2018 11:50:02 GMT</pubDate>
            <atom:updated>2018-02-10T09:14:53.110Z</atom:updated>
            <content:encoded><![CDATA[<p>Grid (data-table) widget is a very important building block of enterprise applications. CxJS includes a versatile grid control which beside standard grid operations such as selection, sorting, paging, and filtering, offers more advanced features out of the box.</p><h4>1. Rich Content</h4><p>CxJS grids allow super simple date, number, and currency formatting. On top of that it’s possible to use <a href="https://gallery.cxjs.io/material/grid/dashboard-grid">other CxJS widgets inside the grid, such as sliders, number fields or even charts and other grids</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A7qS9EKoG2qr0KKD5WyJbw.png" /></figure><h4>2. Drag &amp; Drop</h4><p>Grid <a href="https://gallery.cxjs.io/material/grid/drag-drop">supports dragging &amp; droping of rows</a>. This can be used to reorder records within a grid or to move records between multiple collections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ckIYzYfS5UXLZpjx8eU41Q.png" /></figure><h4>3. Grouping &amp; Aggregates</h4><p>Data in the grid <a href="https://gallery.cxjs.io/material/grid/dynamic-grouping">can be easily aggregated (grouped) by any column</a>. Group-level headers and footers display aggregated values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WwX4G8gwP8otrIIYyeC5Og.png" /></figure><h4>4. Row Editing</h4><p>In some scenarios, the easisest way to edit the data is to <a href="https://gallery.cxjs.io/material/grid/row-editing">do it directly inside the grid</a>. Each grid row is a separate validation group which makes row editing very simple.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X-Begv2B7uisXfenzFkFqw.png" /></figure><h4>5. Row Expanding</h4><p>Grids can display a lot of data, but sometimes it’s required to <a href="https://gallery.cxjs.io/material/grid/row-expanding">display even more data on demand</a>. This is easily implemented by expanding rows into additional lines with their own unique content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Ne3pJIjhJgZx0oSvYujag.png" /></figure><h4>6. Trees</h4><p>Did you know that a grid can be easily <a href="https://gallery.cxjs.io/material/grid/tree-grid">converted into a tree</a> by indenting and rendering tree icons in the first column? CxJS offers TreeNode and TreeAdapter components which makes this task very straightforward.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dY9MtVzPO3d5QLoCd2taeg.png" /></figure><h4>7. Buffering &amp; Infinite Scrolling</h4><p>Dealing with large data collections can cause UI performance problems. When <a href="https://gallery.cxjs.io/material/grid/buffering">grid buffering</a> is enabled, only visible rows are rendered. Instead of rendering all 5000 rows, only 10–20 currently visible rows are rendered. Grid tracks scroll position and re-renders new rows when necessary and optionally loads more data (a.k.a infinite scrolling).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZtBMNrjnh17jiG1khwTq5g.png" /></figure><h4>Conclusion</h4><p>Grids are extensively used in many different ways. Instead of building multiple widgets, the Grid widget in CxJS is packed with features that cover the most common use-cases. I believe we managed to struck the balance between customization options, performance and user experience. Feel free to comment and suggest new features or enhancements in the comments.</p><p><a href="https://cxjs.io/"><em>CxJS</em></a><em> allows you to easily build enterprise JavaScript applications. There is no better tool for the job, </em><a href="https://cxjs.io/pricing"><em>now completely free for small teams and startups</em></a><em>. Form widgets, tables, charts, client-side routing, advanced layouts, themes, and many other features are </em><a href="https://gallery.cxjs.io/"><em>available out of the box</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abaebf75f17f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codaxy/seven-advanced-cxjs-grid-features-abaebf75f17f">Seven Advanced CxJS Grid Features</a> was originally published in <a href="https://medium.com/codaxy">Codaxy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Squeeze your webpack bundles even more by extracting Babel helpers]]></title>
            <link>https://medium.com/codaxy/squeeze-your-webpack-bundles-even-more-by-extracting-babel-helpers-402b880c95a2?source=rss----bd88c3bbe53d---4</link>
            <guid isPermaLink="false">https://medium.com/p/402b880c95a2</guid>
            <category><![CDATA[babel]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Marko Stijak]]></dc:creator>
            <pubDate>Wed, 23 Aug 2017 14:03:20 GMT</pubDate>
            <atom:updated>2017-08-29T07:55:45.115Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re using webpack, Babel and React (or <a href="https://cxjs.io/">CxJS</a> or Angular), you probably deal with a large number of classes. ES6 brings a nice class syntax, but it comes with a cost. In order to make things work in older browsers you’re probably using Babel to compile the code, so let’s see what Babel does.</p><p>ES6:</p><pre>class MyComponent extends React.Component {<br> <br>}</pre><p>ES5:</p><pre>“use strict”;</pre><pre>function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(“Cannot call a class as a function”); } } </pre><pre>function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(“this hasn’t been initialised — super() hasn’t been called”); } return call &amp;&amp; (typeof call === “object” || typeof call === “function”) ? call : self; } </pre><pre>function _inherits(subClass, superClass) { if (typeof superClass !== “function” &amp;&amp; superClass !== null) { throw new TypeError(“Super expression must either be null or a function, not “ + typeof superClass); } subClass.prototype = Object.create(superClass &amp;&amp; superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } </pre><pre>var MyComponent = function (_React$Component) {<br> _inherits(MyComponent, _React$Component); </pre><pre>function MyComponent() {<br> _classCallCheck(this, MyComponent); <br>return _possibleConstructorReturn(this, (MyComponent.__proto__ || Object.getPrototypeOf(MyComponent)).apply(this, arguments));<br> } <br>return MyComponent;<br>}(React.Component);</pre><p>Yes, you’re seeing it right. Test it <a href="https://babeljs.io/repl/#?babili=false&amp;evaluate=true&amp;lineWrap=false&amp;presets=es2015%2Creact%2Cstage-2&amp;targets=&amp;browsers=&amp;builtIns=false&amp;debug=false&amp;code_lz=MYGwhgzhAECyCeBhA9gWwA7IHYFMsBdocAPfPAExgCUcxh8A6FDbPQgbwChppOBfIA">here</a>. To make things even worse, Babel works on individual files which means that each file containing a class will be polluted like this.</p><blockquote>Babel has a few helper functions that’ll be placed at the top of the generated code if needed so it’s not inlined multiple times throughout that file. This may become an issue if you have multiple files, especially when you’re sending them to the browser. gzip alleviates most of this concern but it’s still not ideal.</blockquote><p><strong>babel-plugin-external-helpers</strong></p><p>Fortunately, Babel offers a plugin that helps with this problem. It is called <strong>babel-plugin-external-helpers</strong>. If you use this plugin, the helper functions will be accessed from a global variable called babelHelpers, instead of being added the generated code.</p><pre>var MyComponent = function (_React$Component) {<br> babelHelpers.inherits(MyComponent, _React$Component);</pre><pre>function MyComponent() {<br> babelHelpers.classCallCheck(this, MyComponent); <br>return babelHelpers.possibleConstructorReturn(this, (MyComponent.__proto__ || Object.getPrototypeOf(MyComponent)).apply(this, arguments));<br> } <br>return MyComponent;<br>}(React.Component);</pre><p>This is not perfect, but it’s much better. We can get a nice size reduction if we define a global variable called babelHelpers and use babel-plugin-external-helpers. Babel <a href="https://babeljs.io/docs/plugins/external-helpers/">offers a way to automatically generate helpers </a>in your application, but the proposed way doesn’t work well with Webpack. To overcome this problem, I simply made a new file and put all required helpers inside. Here is the <a href="https://gist.github.com/mstijak/c219562b162b8d8b8d751203d83f661f"><strong>babelHelpers.js</strong></a> file that I ended up with.</p><p>We still need to tweak the webpack configuration. Two changes are required here:</p><ol><li>Load <strong>babelHelpers.js</strong> before the rest of the code:</li></ol><pre>entry: {<br>    app: [<br>        __dirname + &#39;/babelHelpers.js&#39;<br>        __dirname + &#39;/index.js&#39;<br>    ]<br>},</pre><p>If you’re using a file to load polyfills, that might be a good place to include babelHelpers.js too.</p><p>2. Make sure babelHelpers.js is not processed by Babel:</p><pre>{<br>    test: /\.js$/,<br>    loader: &#39;babel-loader&#39;,<br>   <strong> exclude: /(babelHelpers)/,<br>    ...<br></strong>}   </pre><p>That’s it. Your application bundles should be slightly smaller now. For <a href="https://docs.cxjs.io/">CxJS Docs</a>, savings are between 5% and 10%, or around 100 kB across all bundles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*fJ0arnh0TWYVjSang82Txg.png" /></figure><p>Not bad for a small change like this.</p><p><em>If you’re a developer, you should definitely check out </em><a href="https://cxjs.io/"><em>CxJS</em></a><em>. There is no better tool for the job if you’re building an </em><a href="https://starter.cxjs.io/"><em>advanced JavaScript business application</em></a><em>. Form widgets, data tables, charts, client-side routing, advanced layouts, themes, and many other features are </em><a href="https://gallery.cxjs.io/"><em>available out of the box</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=402b880c95a2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codaxy/squeeze-your-webpack-bundles-even-more-by-extracting-babel-helpers-402b880c95a2">Squeeze your webpack bundles even more by extracting Babel helpers</a> was originally published in <a href="https://medium.com/codaxy">Codaxy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>