<?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[Econify - Medium]]></title>
        <description><![CDATA[Crafting Software Products at Econify - Medium]]></description>
        <link>https://medium.com/econify?source=rss----a3dd7af440e9---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Econify - Medium</title>
            <link>https://medium.com/econify?source=rss----a3dd7af440e9---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 02:50:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/econify" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Leveraging Next.js 13/14 in Enterprise Development]]></title>
            <link>https://medium.com/econify/leveraging-next-js-13-14-in-enterprise-development-edd45a74c78d?source=rss----a3dd7af440e9---4</link>
            <guid isPermaLink="false">https://medium.com/p/edd45a74c78d</guid>
            <category><![CDATA[seo]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[enterprise-technology]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[John Kaufmann]]></dc:creator>
            <pubDate>Thu, 22 Feb 2024 15:37:34 GMT</pubDate>
            <atom:updated>2024-02-22T15:37:34.118Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JTt4WXSWFkc2Jr1-gx3BBQ.png" /></figure><p>The Next.js app router, a powerful tool for building enterprise-level applications, offers scalability, performance, and flexibility. Understanding and preparing for its potential challenges allows teams to fully harness Next.js&#39;s power, pushing web development boundaries. As the digital landscape evolves, adopting and adapting to technologies like the Next.js app router is key to staying competitive in the enterprise arena.</p><p>In enterprise web development, where I&#39;ve spent most of my career, I often assist large organizations in selecting the right technology for new projects or product refreshes.</p><h3>Current State of Enterprise Web Dev</h3><p>Given React.js’s prevalence, usually this means that now the decision is on metaframeworks (Next.js, Gatsby, CRA, etc.), which provide additional features and abstractions, making it easier and more efficient to build complex applications. In fact, the React team even recommends doing so in their documentation (see below). Creating the right technology soup when starting can be the difference between success and stagnation.</p><p>Next.js, a metaframework built on React, has stood out particularly for the past few years. Most of our enterprise clients use it as the goto for new projects and it’s become a bit of an industry standard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_9uyVtkjGrgm7fW2afxfjQ.png" /><figcaption>From the <a href="http://react.dev/">react.dev</a> official website.</figcaption></figure><h4>The Release of Next13 / App Router</h4><p>The recent release of Next.js versions 13 and 14 introduces a paradigm shift with its app router and the adoption of React Server Components (RSC). These versions are designed for modern businesses and address previous versions&#39; pitfalls, particularly in hydration (a client-side rendering pattern).</p><p>The real question for each software release, when are they ready for enterprise development teams?</p><p>Software is ready for enterprise when:</p><ul><li>It’s built for large development teams meaning they scale across a codebase well, and have good foundational documentation</li><li>It supports non-standard use cases that are non-negotiable to the larger business</li><li>It is secure and has resources for vulnerability detection and patching</li></ul><p>So with those guidelines, let’s take a look at some of the good and bad of Next.js app router.</p><h3>The Good</h3><ol><li><strong>App Router Stability:</strong> Next.js 13.4 marks the App Router as stable, ready for production with React Server Components, Nested Routes, and more.</li><li><strong>Zero Setup:</strong> The filesystem as an API for effortless routing setup. This saves a lot of time and mental energy for teams as compared to a react router implementation in the past, with plenty of configuration options out of the box.</li><li><strong>Nested Routes, Layouts, Loading States &amp; Error Boundaries:</strong> Enhanced support for defining layouts and nesting UI components pushes developers to build applications that are both performant and cover all states. First class support for layouts and nested ui means less code written, easier maintenance, and optimizations from a rendering perspective on page routing. An example can be seen below of our application using a loading.tsx component before the data is streamed over to the client.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HYSR9sqMl9hujzTlKc3eSg.png" /><figcaption>A timelapse of <a href="https://econify.com/performance">https://econify.com/performance</a> loading from PSI</figcaption></figure><ol><li><strong>Simplified Data Fetching:</strong> Streamlines how data is fetched and managed within applications. Server actions, built in support for native form submissions, and built in caching means a better, faster, stronger data fetching strategy from anywhere in your application.</li><li><strong>Streaming &amp; Suspense:</strong> Offers improved loading performance through streaming and React Suspense as opposed to hydration strategies in previous versions. This is a major upgrade for improvement to important metrics such as <a href="https://web.dev/articles/ttfb">Time To First Byte (TTFB)</a>, <a href="https://web.dev/articles/fcp">First Contentful Paint (FCP)</a>, and <a href="https://web.dev/articles/tti">Time to Interactive (TTI)</a>, which are all tracked and judged by Google.</li><li><strong>First class SEO Support:</strong> Enhances visibility and searchability of web applications without extra effort. Less Javascript means that SEO, a historical downfall of React, is now a superpower of Next.js. Adding SEO support is easy, simply add a type safe named export called metadata to the layout component or any route like the example below</li></ol><pre>// SEO.ts<br>const title = &#39;Econiscore: Web Performance Rankings and Analysis&#39;;<br>const description =<br>  &quot;Discover top-performing companies and vendors in web performance, ranked daily based on Google&#39;s Lighthouse Scores.&quot;;<br>export const defaultMetadata: Metadata = {<br>  title,<br>  description,<br>  openGraph: {<br>    url: &#39;&lt;https://www.econify.com/performance&gt;&#39;,<br>    title,<br>    description,<br>    images: [<br>      {<br>        url: &#39;&lt;https://www.econify.com/images/share-image.png&gt;&#39;,<br>        alt: &#39;Econiscore Thumbnail&#39;,<br>      },<br>    ],<br>    siteName: &#39;Econiscore&#39;,<br>  },<br>  twitter: {<br>    site: &#39;@econify&#39;,<br>    card: &#39;summary_large_image&#39;,<br>  },<br>};<br><br>// layout.tsx<br>import { defaultMetadata } from &#39;components/SEO/SEO&#39;;<br><br>export const metadata: Metadata = defaultMetadata;</pre><ol><li><strong>Turbopack:</strong> Provides a faster, more stable development server experience. Streamlines and caches builds, which means quicker builds (for development velocity), and less build time which can save you thousands if not hundreds of thousands over time.</li><li><strong>Automatic Code Splitting:</strong> Ensures efficient loading by splitting code based on routes automatically. This means smaller application bundles, quicker load times, less page bounces and an improved Google Lighthouse score (SEO), and UX for your users.</li><li><strong>CSS Support Enhancements:</strong> This was one of the bigger problems I personally have encountered in Next.js migrations. <a href="https://nextjs.org/docs/app/building-your-application/styling/css-in-js"><strong>CSS-in-JS is not well supported.</strong></a> Recent improvements allow for more flexible and colocated CSS imports, improving styling and developer experience.</li></ol><h3>Navigating the Challenges: Potential Pitfalls and Gotchas</h3><p>While the newer versions of Next.js offer significant advantages, it&#39;s essential to be aware of potential challenges. Despite the <a href="https://nextjs.org/docs/app/building-your-application/upgrading/app-router-migration#migrating-from-pages-to-app">Next.js documentation suggesting progressive adoption</a>, my experience indicates several scenarios that may complicate this process</p><ul><li><strong>Complex State Management:</strong> For large-scale applications, managing state across numerous routes can become cumbersome. With the split between server and client code being more pronounced, typical solutions (Redux for example) become more complicated to manage.</li><li><strong>Search Parameters:</strong> While this may seem like a non-issue simple things what server components can and cannot access, such as search parameters on a route, is important. Our <a href="https://econify.com/performance">Econiscore dashboard</a> for example used this state management pattern across the app to provide deep linking, and was a major overhaul.</li><li><strong>SEO:</strong> While Next.js is SEO-friendly, dynamic routing can introduce SEO challenges. Proper implementation and understanding of server-side rendering and static generation are crucial to avoid pitfalls.</li><li><strong>Learning Curve:</strong> For teams new to Next.js or React, there&#39;s a learning curve involved in mastering the newer framework. React Server Components, while a powerful tool, introduce new complexity that even season developers will need time to understand. Investing time in training and practice is essential for leveraging its full potential.</li><li><strong>Caching Strategies:</strong> There’s now more options for rendering, caching, data fetching to manage in your head. You have a server side cache that aims at speeding up server side data fetching in memory and then a client-side cache that stores data of previously navigated routes to make navigation feel instant. <em>Important:</em> If you have a custom cache strategy or use something like Varnish, at the time of writing, Next.js does not allow easy access to those headers. Same goes for Cloudfront where headers may be stripped from the request due to Next.js internals.</li><li><strong>Custom Server Configuration:</strong> Utilizing a custom server with Next.js for specific routing requirements can complicate deployment and scaling. It&#39;s important to evaluate whether the benefits outweigh the complexities.</li></ul><h3>Frequently Asked Questions:</h3><ol><li><strong>Is Next.js suitable for small projects or only enterprise applications?</strong> Next.js is incredibly versatile, making it suitable for projects of all sizes. Its scalability means it can grow with your project, from a small MVP to a large-scale enterprise application.</li><li><strong>How does Next.js app router compare to traditional React routing?</strong> Next.js app router offers more out-of-the-box features, such as automatic code splitting, server-side rendering, and static generation, which can enhance performance and SEO, making it a strong choice for complex applications. <em>Important:</em> The same route in app router will conflict with a page router file or folder name, make sure to avoid conflicting routing structures while migrating or developing using both strategies.</li><li><strong>Can Next.js 13+ support a custom server for out-of-framework cases?</strong> Yes, Next.js the ultimate escape hatch is a custom server function which is <a href="https://github.com/vercel/next.js/discussions/55283">supported by app router</a>.</li></ol><h3>Conclusion</h3><p>In essence, the latest updates in Next.js, particularly versions 13 and 14, represent a significant leap forward in enterprise web development, offering enhanced performance, scalability, and SEO capabilities while also presenting new challenges in state management and learning curves. Despite these complexities, Next.js stands out as a robust and versatile choice for enterprises aiming to build efficient and high-performing web applications. As we navigate the rapidly evolving digital landscape, adopting and mastering Next.js can be a strategic move for businesses looking to thrive in the digital age, encouraging developers and decision-makers alike to explore its potential in revolutionizing their web development strategies.</p><p><strong>Let&#39;s Connect!</strong></p><p>Interested in diving deeper into Next.js for your enterprise application? Feel free to reach out or leave a comment below. Let&#39;s explore how Next.js can transform your web development strategy and help your business thrive in the digital age.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edd45a74c78d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/econify/leveraging-next-js-13-14-in-enterprise-development-edd45a74c78d">Leveraging Next.js 13/14 in Enterprise Development</a> was originally published in <a href="https://medium.com/econify">Econify</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(1/2) E2E Testing Android Apps With ADB]]></title>
            <link>https://medium.com/econify/e2e-testing-android-apps-with-adb-b0d667cfe44b?source=rss----a3dd7af440e9---4</link>
            <guid isPermaLink="false">https://medium.com/p/b0d667cfe44b</guid>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[adb]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Phil Blenkinsop]]></dc:creator>
            <pubDate>Fri, 08 Dec 2023 12:26:16 GMT</pubDate>
            <atom:updated>2023-12-20T15:19:32.037Z</atom:updated>
            <content:encoded><![CDATA[<p>Testing your main user journeys to find any issues before they reach your end users is a critical requirement of any release cycle. These can include sign in and sign up flows or purchasing a product. Automating these journeys reduces the burden of manual testing on your team, increases the repeatability and minimises the risk of human error.</p><p>In order to test user journeys, you need to run the app on a device. To avoid the overhead of managing a fleet of real devices to test on, the <a href="https://developer.android.com/studio/run/emulator">Android Emulator</a> provides access to a range of virtual devices which can be run locally as well as in CI pipelines.</p><p><a href="https://adbshell.com/">ADB</a> (Android Debug Bridge) is a great utility for communicating with the emulated device and allows installing APKs and simulating user input such as typing and screen presses.</p><p>Using both of these tools in tandem creates a platform to run android apps and simulate user journeys in a repeatable and automated manner. Running your tests in this way is considered <a href="https://www.geeksforgeeks.org/difference-between-black-box-vs-white-vs-grey-box-testing/">black box testing</a>. In my opinion this is the best way to run your E2E tests, as it means the test interacts with the app in exactly the same way a user would.</p><p>This guide will walk through the process of automating a Sign In journey using ADB for the <a href="https://zoom.us/">Zoom</a> app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*InfBetmAHVwVe7uzal1hgg.png" /><figcaption>Zoom app welcome screen</figcaption></figure><p><strong>Table of Contents:</strong></p><ol><li>Installing and running the app</li><li>Simulating user input</li><li>Example sign in test</li><li>Wrap up and next steps</li></ol><p>— — —</p><p><em>If you want to skip straight to the sample repository there is a link at the bottom!</em></p><ol><li><strong>Installing and running the app</strong></li></ol><p><em>(This guide assumes you already have the Android Emulator configured and a virtual device created. Setup steps can be found for the Emulator </em><a href="https://developer.android.com/studio/run/emulator"><em>here</em></a><em> if needed. This guide was created using a Nexus 5X using Android 13 Playstore SDK </em><em>system-images;android-33;google_apis_playstore;arm64-v8a )</em></p><p>Installing your app is a simple process thanks to <a href="https://adbshell.com/commands/adb-install">adb install</a> . Simply provide the path to the APK file(s) saved locally. In our case, the Zoom app utilises <a href="https://developer.android.com/build/configure-apk-splits">split APKs</a> so we need to use adb install-multiple to install all parts of the split APK. We pass the path of the folder where the APK files are installed, and add a wilcard to pick up all of the files in one install command:</p><p>adb install-multiple ./zoom-apk/*.apk</p><p>Normally to run an app on a phone, you’d find it by scrolling around on the screen and tapping on the icon to open it. This wouldn’t be an ideal approach for automated tests as you can’t guarantee the screen’s state at any given moment which could result in flakey tests. Therefore we need to be able to open the app using ADB commands.</p><p>We can use adb shell and the <a href="https://developer.android.com/tools/adb#am">Android Activity manager</a> to start the app with adb shell am start , which starts an activity on the device. In order to know what activity to start, we need find the ‘Launcher’ activity of the Zoom app which can be done using adb shell cmd package resolve-activity . Combining both together, we can launch the app in a single command where us.zoom.videomeetings is the package name of the app.</p><p>adb shell am start &quot;us.zoom.videomeetings/$(adb shell cmd package resolve-activity -c android.intent.category.LAUNCHER us.zoom.videomeetings | sed -n &#39;/name=/s/^.*name=//p&#39;)&quot;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BNtT2FfcWxPFBLI-_MCSnQ.gif" /><figcaption>Launching Zoom app with one CLI command</figcaption></figure><p>2.<strong> Simulating user input</strong></p><p>Using adb shell input there are a few options for simulating user input including text and touching coordinates on screen:</p><ul><li>adb shell input tap x y (where x &amp; y are coordinates on the screen)</li><li>adb shell input type &quot;z” (where z is a word or phrase)</li></ul><p>In order to execute these reliably, we first need to find the elements on screen we want to target.</p><p>For example, to press a button on screen we ideally want to find it by text as a user would with their eyes, and then find it’s coordinates on screen to tap. This is a preferable method over hardcoding fixed coordinates so that the test doesn’t break when the layout changes on different screen sizes.</p><p>To find an element, we can use the <a href="https://developer.android.com/training/testing/other-components/ui-automator">Android UI Automator</a> together with adb exec-out which executes a command on the device and returns the output to our stdout. The UI Automater provides a dump command which will return an XML tree of all the elements on screen. This normally outputs to a file, so instead dumping to/dev/tty will return it to our stdout .</p><p>adb exec-out uiautomator dump /dev/tty</p><p>This also includes a string to say the UI was dumped to our requested location. We can pipe the output into awk to remove it, so that we are left with valid XML to crawl.</p><p>adb exec-out uiautomator dump /dev/tty | awk &#39;{gsub(&quot;UI hierchary dumped to: /dev/tty&quot;, &quot;&quot;);print}&#39;</p><p>We can then use a utility such as <a href="https://linuxcommandlibrary.com/man/xmllint">xmllint</a> to crawl the outputted XML and find elements. <em>Another option is converting the XML to JSON and crawling that, which is what I do in the sample repo (link at bottom).</em></p><p>We want to find elements by their text as a user would, so we have to search the XML elements where the node’s text property is what we are looking for, in this case the ‘Sign In’ button.</p><p>adb exec-out uiautomator dump /dev/tty | awk &#39;{gsub(&quot;UI hierchary dumped to: /dev/tty&quot;, &quot;&quot;);print}&#39; | xmllint --xpath &#39;//*[@text=&quot;Sign In&quot;]&#39; -</p><p>From the above command, we get the following XML node:</p><pre>&lt;node index=&quot;1&quot; text=&quot;Sign In&quot; resource-id=&quot;us.zoom.videomeetings:id/btnLogin&quot; class=&quot;android.widget.Button&quot; package=&quot;us.zoom.videomeetings&quot; content-desc=&quot;&quot; checkable=&quot;false&quot; checked=&quot;false&quot; clickable=&quot;true&quot; enabled=&quot;true&quot; focusable=&quot;true&quot; focused=&quot;false&quot; scrollable=&quot;false&quot; long-clickable=&quot;false&quot; password=&quot;false&quot; selected=&quot;false&quot; bounds=&quot;[63,1626][1017,1752]&quot;/&gt;</pre><p>Each of the nodes have a bounds property in the format bounds=[minX, minY][maxX, maxY] . Using these values we can calculate the centre of the button. In the above case it would be</p><pre>bounds=&quot;[63,1626][1017,1752]&quot;<br><br>centerXCoordinate -&gt; (63 + 1017) / 2 = 540<br>centerYCoordinate -&gt; (1626 + 1752) / 2 = 1689</pre><p>Then using the adb shell input tap 540 1689 , we can press the centre of that button. Similarly for text inputs, we can find and tap it in the same way, and then once it’s focused we can type an email address adb shell input type example@email.com.</p><p>3. <strong>Example sign in test</strong></p><p>Combining the commands from sections 1 and 2, we can create a automated test to install and sign in to the Zoom app in a reliable manner, with an assertion to ensure we are signed in and directed to the home screen.</p><p><em>The below code is written in Javascript and uses some simple utility functions which can be found in the sample repo link at the bottom of the article. They provide some basic abstraction and retry-ability of the adb commands described in sections 1 &amp; 2.</em></p><pre>import { assertScreenContains, clickOnElement, execCommand } from &quot;./util.mjs&quot;;<br><br>const ZOOM_PACKAGE_NAME = &quot;us.zoom.videomeetings&quot;;<br>const EMAIL = &quot;&quot; // add your zoom email here<br>const PASSWORD = &quot;&quot; // add your zoom password here<br><br>// Assumes emulator is already running<br><br>console.log(&quot;Installing APK...&quot;);<br>await execCommand(&quot;adb install-multiple ./zoom-apk/*.apk&quot;);<br>console.log(&quot;APK Installed!&quot;);<br>console.log(&quot;Launching APK...&quot;);<br>await execCommand(<br>  `adb shell am start &quot;${ZOOM_PACKAGE_NAME}/$(adb shell cmd package resolve-activity -c android.intent.category.LAUNCHER ${ZOOM_PACKAGE_NAME} | sed -n &#39;/name=/s/^.*name=//p&#39;)&quot;`<br>);<br>console.log(&quot;APK Launched!&quot;);<br><br>await clickOnElement(&quot;Sign In&quot;)<br>await clickOnElement(&quot;Email&quot;)<br>await execCommand(`adb shell input text &quot;${EMAIL}&quot;`)<br>await clickOnElement(&quot;Password&quot;)<br>await execCommand(`adb shell input text &quot;${PASSWORD}&quot;`)<br>await clickOnElement(&quot;Sign In&quot;)<br><br>await assertScreenContains(`Meetings`)<br><br>console.log(&quot;Uninstalling APK...&quot;);<br>await execCommand(`adb uninstall ${ZOOM_PACKAGE_NAME}`);<br>console.log(&quot;APK Uninstalled!&quot;);<br></pre><p>Running the above script results in an automated test that starts the Zoom app, signs in with a username and password and then asserts the content on the home screen is correct.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UyJr956KirGTjl5LhyZxFA.gif" /><figcaption>Testing the Zoom app Sign In</figcaption></figure><p>4. <strong>Wrap up and next steps</strong></p><p>Running these tests locally is the easy part, but being able to run them during CI or in the cloud without manual intervention is where the real value will be gained.</p><p>For CI, the script can be easily reworked to fit in a <a href="https://devcenter.bitrise.io/en/steps-and-workflows/workflow-recipes-for-android-apps/-android--run-tests-using-the-emulator.html">Bitrise pipeline</a> which allows you to run tests against an Android emulator. Similarly, CircleCI <a href="https://support.circleci.com/hc/en-us/articles/360000028928-Testing-with-the-Android-emulator-on-CircleCI">also supports android emulators</a>, and ADB can be configured to communicate with a device anywhere through <a href="https://adbshell.com/commands/adb-connect">adb connect</a> .</p><p>Another possibility is using <a href="https://www.genymotion.com/">Genymotion</a> virtual devices which provide a virtual android device in the cloud on a pay per use basis. Feel free to read the second part of this series detailing how to run the tests against a Genymotion Device Image instance in AWS!</p><p><a href="https://medium.com/@philblenk6/android-automated-testing-in-the-cloud-using-genymotion-device-image-359f1024aece">Read part two here!</a></p><p>Thanks for reading and please check out the sample repo for the whole code including the utility functions, which can be found in the part-one-local-emulator folder.</p><p><a href="https://github.com/blenky36/adb-automated-testing">https://github.com/blenky36/adb-automated-testing</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0d667cfe44b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/econify/e2e-testing-android-apps-with-adb-b0d667cfe44b">(1/2) E2E Testing Android Apps With ADB</a> was originally published in <a href="https://medium.com/econify">Econify</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>