<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ivan Dimitrijevic on Medium]]></title>
        <description><![CDATA[Stories by Ivan Dimitrijevic on Medium]]></description>
        <link>https://medium.com/@dimi_2011?source=rss-2cb4eab25a09------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*J0Qc92n_4gyQpqKM.jpg</url>
            <title>Stories by Ivan Dimitrijevic on Medium</title>
            <link>https://medium.com/@dimi_2011?source=rss-2cb4eab25a09------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 23:53:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dimi_2011/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Shira: Roadmaps Without the Frustration]]></title>
            <link>https://medium.com/@dimi_2011/shira-roadmaps-without-the-frustration-9d816220d3df?source=rss-2cb4eab25a09------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d816220d3df</guid>
            <category><![CDATA[business-strategy]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[strategy]]></category>
            <category><![CDATA[roadmap-software]]></category>
            <category><![CDATA[saas]]></category>
            <dc:creator><![CDATA[Ivan Dimitrijevic]]></dc:creator>
            <pubDate>Fri, 28 Aug 2026 14:13:11 GMT</pubDate>
            <atom:updated>2026-08-28T14:13:11.881Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Build beautiful roadmaps in the flow of work</em></p><p>I finally built the tool I’ve wanted for years: something made specifically for creating and maintaining roadmaps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-eIW2pdt4vO2EELsJhmObA.png" /><figcaption>Shira roadmap editor</figcaption></figure><p><a href="https://app.shiraroadmap.com/demo">https://app.shiraroadmap.com/demo</a></p><p>Over my last few roles, all strategic positions, I constantly needed to draw and maintain roadmaps. Every time, I’d jump to some tool that promised to help, and every time I’d land on the same conclusion: either overengineered or too heavy for what I actually needed. To be fair, there’s no shortage of options out there, <em>InstaGantt, GanttPro, SmartSheet</em>, and the rest, but they all share the same bottom-up philosophy. You start with a plan broken into tasks, subtasks, milestones, dependencies. Getting to a strategic, bird’s-eye view takes forever up front, and maintaining it afterward becomes a nightmare. Sooner or later, everyone ends up back where they started: manually drawing and updating a PowerPoint slide.</p><h3>What’s Wrong With PowerPoint?</h3><p>On one hand, PowerPoint is a blank canvas that can technically do anything. Add-ins like ThinkCell exist to extend it, but the experience is clunky and the learning curve is brutally slow. Without an add-in, you’re stuck manually placing objects: rectangles, lines, text boxes. First you draw the timeline. Then you add activities and label each one. And then, inevitably, you realize it’d be great to slot in one more activity right between <em>A13</em> and <em>A14</em>, smack in the middle of the roadmap, except there’s no room left. Or you decide to extend the view by another year and shift everything out of the current one. And don’t get me started on activity duration: it’s just a rough visual guess relative to the timeline, and resizing one bar too often quietly throws off the row height for everything around it.</p><h3>Autumn Is Roadmap Season</h3><p>Autumn is when strategic roadmaps get made, and it was last autumn when the idea for this tool clicked. Since then, a lot has improved, but the tool has stayed true to the principles I set from day one.</p><ol><li><strong>Zero learning curve</strong> The roadmap is a canvas. No setup required to get started, no onboarding flow to sit through. One click and you’re adding your first activity.</li><li><strong>Everything works intuitively, with your mouse</strong> No heavy dialogs, no forms, no unnecessary detail to fill in before you can move. The canvas is just there: click to add, grab to move, drag to extend. Need to zoom out to see three years at a glance, or zoom in to a single day? Switch between day, week, month, and quarter views instantly, anywhere from a six-week sprint to a three-year plan. Adding an activity between two existing ones, or stretching the timeline by another year, is the exact frustration PowerPoint never solved, and here it’s just a drag.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TI1dF4WPGSvzbUW4rDNqNA.png" /><figcaption>Build a roadmap the way you’d sketch one — no forms, no training</figcaption></figure><p><strong>2. A free version, available online, with no sign-up required</strong> Nothing in the free version touches a server. Everything lives in your browser.</p><p><strong>3. Saved in an open, JSON-based format</strong> I built a format called <a href="https://www.shiraroadmap.com/shira-file-format/"><em>.shira</em></a>, JSON-based, with a deliberately simple roadmap structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kBOM9XuQxuE6lANXRDZBhQ.png" /><figcaption>Saved to the cloud, and downloadable as a plain open file you’ll always be able to read.</figcaption></figure><p>The whole focus of the tool is <strong>user experience</strong>. The vision was simple: <strong>whatever you need to do with a roadmap and its elements, you should be able to do it while everything stays consistent</strong>. Creating activities, adjusting timing, changing colors, categorizing work, adding milestones, all one click away.</p><p>There’s also a paid tier, which requires creating an account. It lets you <strong>version and save your roadmaps in the cloud</strong>, <strong>share them with a read-only public link</strong> (no account needed on the viewer’s end), and <strong>export to PowerPoint</strong>, not as a flattened image, but as fully editable shapes you can keep tweaking afterward.</p><p>If you’ve ever fought with a PPTX slide to squeeze in one more milestone, give Shira a try: <a href="https://app.shiraroadmap.com/demo/">app.shiraroadmap.com/demo</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d816220d3df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing and Debugging Lambda Functions with DynamoDB locally]]></title>
            <link>https://medium.com/@dimi_2011/developing-and-debugging-lambda-functions-with-dynamodb-locally-e8e1ee35fbb6?source=rss-2cb4eab25a09------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8e1ee35fbb6</guid>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[serverless-architecture]]></category>
            <category><![CDATA[dynamodb]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[Ivan Dimitrijevic]]></dc:creator>
            <pubDate>Wed, 12 Oct 2022 12:56:49 GMT</pubDate>
            <atom:updated>2022-10-16T16:29:35.199Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qluDQqacE42dxME46DrgDw.png" /></figure><p>What I really love about Serverless is that allows you to focus on functionality that you build while AWS will take care for you about hardware, scaling, security, operations, etc. For deploying infrastructure together with functionality that you build you can use different tools like: <em>CloudFormation, SAM or CDK</em>. I am fun of CDK but whatever you choose there is a process of deployment that takes time.</p><p>From infrastructure point of view this time is blazingly fast (1–5 mins depending of project complexity) but from development and debugging point of view waiting for 1–5 minutes to see results for change that you just implemented in your lambda function is not optimal.</p><p>Conclusion is clear. <strong>Developing serverless application while using online -only services for debugging is not optimal option.</strong> There is a need to introduce ability to develop it on local workstation as much as possible.</p><p>AWS is offering some tools that can help you like <strong>sam local invoke</strong> and <strong>sam local start-api</strong> but my experience is that setting up those tools is very much complex, requires a lot of exhausting configuration and at the end results are not satisfying. If you want to go this way, which I do not suggest, check this <a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-test-and-debug.html">article</a>.</p><p>While serverless application might be very complex, consisting of many different services (i.e. <em>S3, Lambda, DynamoDB, API Gateway, Cognito, CloudFront, etc.</em>), I will focus on just one small but very common subset that implies Lambda function and DynamoDB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*zyR5sbXsSFQ_RoT9IwAZEQ.png" /><figcaption>Common use case — Lambda function communicates with DynamoDB</figcaption></figure><h3>The problem statement</h3><p>Let’s imagine you are developing <strong>Lambda </strong>function that communicates with <strong>DynamoDB </strong>(to store or read some data). The goal is to explain how you can develop and debug it locally prior deploying it to AWS.</p><h4>Step#1 — Install DynamoDB locally</h4><p>This sounds complicated but this step is very simple. You need to have JRE 8 or newer installed on you workstation and you just need to visit this <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html">URL</a> and download appropriate version of DynamoDB.</p><p>You should unpack downloaded file and start your local version of DynamoDB by typing the following command.</p><pre>java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb -port 8585</pre><p>In order to test if it works, open a new console and type the next command.</p><pre>aws dynamodb list-tables --endpoint-url http://localhost:8585</pre><p>If it works you should get output like shown bellow.</p><pre>{<br>    &quot;TableNames&quot;: []<br>}</pre><p>There is no any tables created yet which is why <strong>TableNames</strong> array is empty. To create new table you can use <strong>aws dynamodb</strong> commands with — <strong>endpoing-url</strong> argument set as on <strong>list-tables</strong> example or you can download and use <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/workbench.html">NoSQL Workbench Application</a>.</p><h4>Step#2 — Use TypeScript for writing lambda functions</h4><p>I am a big fun of OO mindset and I love <strong>Typescript</strong> because it allows you to structure your code and make it strongly typed. However this step is not mandatory. I am using <strong>Typescript</strong> to write lambda functions. If you prefer more JavaScript ecosystem then you can skip this step.</p><p>The code bellow is entry point for lambda function written in TypeScript.</p><pre>//my-lambda.ts<br>import {APIGatewayProxyEventV2, APIGatewayProxyResultV2} from &#39;aws-lambda&#39;;</pre><pre>export async function handler(event: APIGatewayProxyEventV2): Promise&lt;APIGatewayProxyResultV2&gt;{</pre><pre>}</pre><p>Imagine that this file is named as <strong>my-lambda.ts</strong>. In order to compile it to Javascript you can use <strong>tsc ./my-lambda.ts</strong> command but it is important that CDK deployment does not require compilation to JavaScript. In other words you do not need this build step.</p><p>To setup Lambda function written in TypeScript to be deployed with CDK the code bellow is what you need.</p><pre>import * as nodeLambda from &#39;aws-cdk-lib/aws-lambda-nodejs&#39;;</pre><pre>...</pre><pre>let myLabmda = new nodeLambda.NodejsFunction(this, &quot;MyLambda&quot;, {</pre><pre>  runtime: lambda.Runtime.NODEJS_14_X,<br>  entry: `${__dirname}/../lambda/my-lambda.ts`,<br>  handler: &#39;handler&#39;,<br>  bundling: {<br>    minify: true, externalModules: [&#39;aws-sdk&#39;],<br>}});</pre><h4>Step#3 — Decouple your lambda function</h4><p>This step is crucial. The idea is to decouple lambda function in a way you can execute it either on AWS or on local workstation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qluDQqacE42dxME46DrgDw.png" /><figcaption>Lambda function written with TypeScript decoupled to support local development and debugging</figcaption></figure><p>The idea is simple.</p><p>File <strong>my-lambda.ts</strong> is entry point for lambda function. It will make instance of <strong>MyRequest </strong>class without setting local context. <strong>MyRequest </strong>class implements protected methods <strong>validate()</strong> which checks if all inputs are ok and <strong>inoke()</strong> which is used to run business logic. From <strong>my-lambda.ts</strong> point of view it will just do couple of lines as written bellow. It will make instance of <strong>MyRequest</strong> class passing all required arguments and calls <strong>process() </strong>method. The result of <strong>process()</strong> method will be returned.</p><pre><strong>//my-lambda.ts</strong><br>import {APIGatewayProxyEventV2, APIGatewayProxyResultV2} from &#39;aws-lambda&#39;;</pre><pre>export async function handler(event: APIGatewayProxyEventV2): Promise&lt;APIGatewayProxyResultV2&gt;{</pre><pre>  let tableName = process.env.DYNAMO_DB_RES_TABLE || &quot;&quot;;<br>  let request = new MyRequest(event.body ?? &quot;&quot;, tableName);<br>  let response = await request.process();<br>  return response;<br>}</pre><p>File <strong>my-lambda.debug.ts</strong> is entry point for debugging lambda function locally. It is consist of almost the same lines as <strong>my-lambda.ts</strong> but with different parameters.</p><pre><strong>//my-lambda.debug.ts</strong><br>async function start(){<br>  let tableName = &quot;LOCAL_TABLE_NAME&quot;;<br>  let body = {...};<br>  let request = new MyRequest(JSON.stringify(body), tableName, &#39;<strong>http://localhost:8585&#39;</strong>);<br>  let response = await request.process();<br>  console.log(response);<br>}</pre><pre>start();</pre><p>The main difference is that <strong>my-lambda.debug.ts</strong> passess ‘<strong>http://localhost:8585&#39; </strong>as the last argument of <strong>MyRequest</strong> constructor which means that DynamoDB local instance should be used in this case.</p><p>Getting back to illustration, class <strong>MyDataObject </strong>is a façade for communication with <strong>DynamoDb</strong>. It will receive information in constructor with which DynamoDB to communicate. I created <strong>getDbConnection()</strong> method in parent class <strong>DynamoDbData </strong>so inherited <strong>MyDataObject </strong>class can use it while instancing connection with DynamoDB.</p><pre>import { DynamoDB } from &quot;aws-sdk&quot;;</pre><pre>export abstract class <strong>DynamoDbData</strong>{<br>  constructor(protected tableName: string, <br>              protected localEndpoint?: string){}</pre><pre>  protected getDbConnection(): DynamoDB{<br>    <br>    return this.localEndpoint ? <br>            new DynamoDB({endpoint:this.localEndpoint, region: &#39;local&#39;}): <br>            new DynamoDB();<br>  }<br>}</pre><h4>Step#4 — Debug your lambda function locally</h4><p>For this step you have two options.</p><ol><li>Use ts-nodeto execute your TS code without compilation</li><li>Compile files with tsc and then execute your lambda locally with node.</li></ol><p><strong>Option 1 — Debugging with ts-node</strong></p><p>If you do not have installed ts-node install it with npm by calling the next command.</p><pre>npm install -g ts-node</pre><p>After that you can execute any .ts file locally by calling the following command.</p><pre>ts-node ./my-lambda.debug.ts</pre><p><strong>Option 2 — Debugging with node</strong></p><p>This step will require to compile your solution by calling tsccommand. Do not forget to setup <strong>tsconfig.json</strong> first. The output of compilation would be all files compiled to <strong>d.ts</strong> and <strong>js</strong>.</p><p>To debug your lambda locally after compilation call the following command.</p><pre>node ./my-lambda.debug.js</pre><p><strong>Note:</strong> We are calling compiled <strong>js</strong> version of file (<em>my-lambda.debug.js</em>).</p><p>If you prefer to have compiled files in separated folder you should set <strong>outDir </strong>configuration in your <strong>tsconfig.json</strong> file. To execute lambda locally in that case you have to set <strong>NODE_PATH</strong> in terminal session to point out to your <strong>node_modules</strong> folder since that <strong>tsc</strong> will not copy this folder.</p><h4>Step#5 — Deploy your lambda and test it in the cloud</h4><p>There is nothing extra you need to do in this case. If you use CDK call <strong>cdk synth</strong> and then <strong>cdk deploy</strong> command and your lambda will be deployed on AWS environment communicating with cloud version of DynamoDB.</p><h3>Takeaways and Additional Thoughts</h3><ol><li>In order to be efficient you have to find a way to develop and debug lambda functions locally.</li><li>Accept that you can not do and mock everything locally but try to maximize it.</li><li>Setting up DynamoDB locally is easy job to do.</li><li>There are tools out-of-the-box for testing lambda functions locally provided by AWS but it requires a lot of complex configuration and does not satisfy the need.</li><li>For illustration purpose this article does not focus on unit tests but it is also relevant as enabler for executing local unit tests with Jasmine, Jest or any other framework of your choice.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8e1ee35fbb6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Front End As Should Be — feasb]]></title>
            <link>https://medium.com/@dimi_2011/front-end-as-should-be-feasb-9bc0daee2a82?source=rss-2cb4eab25a09------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bc0daee2a82</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[single-page-applications]]></category>
            <dc:creator><![CDATA[Ivan Dimitrijevic]]></dc:creator>
            <pubDate>Tue, 28 Jun 2022 10:22:31 GMT</pubDate>
            <atom:updated>2022-06-28T10:22:31.052Z</atom:updated>
            <content:encoded><![CDATA[<h3>Front End As Should Be — feasb</h3><p><strong>IMO Front end development is broken these days.</strong><br>It is overcomplicated with no reason.</p><p>I have enough years to remember times when you were able to draw ui element on the screen and double click on it in order to implement its behavior. Compare this with today’s React based application for example. Just count all artifacts that you will find: <em>dispatcher, actions, views, reducer, store,</em> etc. Imagine that you need just to add one button and implement it’s behavior.</p><p>Of course I am aware that things changed since then. For example today’s web apps can be offline-first so there is a lot of stuff to take care but I have a filling that it can be achieved easier.</p><p>In the last couple of PET projects that required delivery of SPA (<em>Single Page Application</em>) I decided to exclude React or any familiar front-end framework. I started with plain <strong>Typescript</strong> and tried to follow this <strong>component base philosophy</strong>. I figured out that I was 5 times more efficient in a sense of developing, testing and debugging.</p><p>Inspired by those PET projects I created a very simple package ~50 lines of code ~7kb. I called it <strong>feasb </strong>as acronym for <strong>Front-End As Should Be</strong>. It is available on <a href="https://github.com/dimi11/feasb"><strong>Github</strong></a> and published as a <a href="https://www.npmjs.com/package/feasb"><strong>npm package</strong></a>. It is not perfect as it requires additional work but it is very much simple and easy to understand. You can apply any concept on top of it if you need (<em>mvp, mvvm, flux, etc.</em>).</p><blockquote>Front-end code finally started to be again easy understandable.</blockquote><p>Look for example code snippet bellow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*LmgRDrBtnSUNbe_S6JzbEw.png" /><figcaption>Code snippet — Example app using feasb package</figcaption></figure><p>I believe that most of readers understands very easy what this code does but let’s go step by step.</p><ul><li>It creates DIV element that holds one button and label “<em>Number of clicks</em>”</li><li>If button is clicked btnIncClicked() method will increment counter and update this information.</li></ul><p>Clean and clear. As simple as that.</p><p>If this make sense to you give it a try.</p><p><a href="https://github.com/dimi11/feasb">github.com/dimi11/feasb</a></p><p>Any feedback is welcome.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bc0daee2a82" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up CSS Modules in Typescript project]]></title>
            <link>https://medium.com/@dimi_2011/setting-up-css-modules-in-typescript-project-52596526d19?source=rss-2cb4eab25a09------2</link>
            <guid isPermaLink="false">https://medium.com/p/52596526d19</guid>
            <category><![CDATA[single-page-applications]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[css-modules]]></category>
            <dc:creator><![CDATA[Ivan Dimitrijevic]]></dc:creator>
            <pubDate>Sun, 10 Apr 2022 11:55:17 GMT</pubDate>
            <atom:updated>2023-03-21T21:29:28.929Z</atom:updated>
            <content:encoded><![CDATA[<p>To be honest I did not expect any problem with this topic but I have to say that I spent a day finding way how to setup CSS modules in typescript project to act as I wanted. There are many articles you can read for this topic but most of them I did not manage to make working. I avoid React these days due to mind-shift required to accept Flux pattern and all other parts that are required like Redux but I will not elaborate any further on that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YPpyfPU_RRXneEnz" /><figcaption>Photo by <a href="https://unsplash.com/@flowforfrank?utm_source=medium&amp;utm_medium=referral">Ferenc Almasi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>My goal was to setup CSS Modules in Typescript project that is built with Webpack while achieving following goals:</p><ul><li>Fast build time for development</li><li>Minimized css in merged to one file for production</li><li>Decoupled CSS to separated files</li><li>Isolated CSS classes for components from CSS common for application</li><li>Autocomplete in VS Code for CSS modules</li></ul><h3>First step — Importing css files in Typescript</h3><p>First goal to be achieved is the ability to import css files in project.</p><pre>import &quot;./src/static/style.css&quot;;</pre><p>In order to do so your webpack configuration must have a loader for css files. I used <strong>css-loader</strong> for such.</p><p>So you need to install it first with the command.</p><pre>npm install --save-dev <strong>css-loader</strong></pre><p>Then you need to specify in you webpack configuration file in section <strong>module -&gt; rules</strong> how CSS files will be loaded.</p><pre>module.exports = {<br>...</pre><pre>module: {<br>  rules: [<br>   <strong>{<br>     test: /\.css$/i,<br>     use: [<br>      {loader: &#39;css-loader&#39;, options:{url: false}}<br>     ]<br>   }</strong><br>  ],</pre><pre>...<br>}</pre><p>With this setup your webpack will load the content of all css files in consequent order imported with syntax:</p><pre>import &quot;<em>filename.css</em>&quot;</pre><p>Weblack build will work but the trouble is that this content except stored in compiled JS file can not be used for anything.</p><p>If you want to embed content of all css files in host page within <strong>&lt;style&gt;</strong> tag you should chain <strong>style-loader</strong>. This option is recommended for development purpose because it is the fastest one. For production purpose you should merge all css files, minimize and create one file that should be loaded in host page. For such scenario you can chain <strong>MiniCssExtractPlugin</strong> to output one file and <strong>CssMinimizerPlugin</strong> for minimization.</p><p>First you need to install those webpack plugins.</p><pre>npm install --save-dev <strong>style-loader</strong> <strong>MiniCssExtractPlugin CssMinimizerPlugin</strong></pre><p><strong>Important: </strong>Execution of loaders is in reverse order.</p><p>So for the first scenario (<em>chaining</em> <strong>css-loader -&gt; style-loader</strong>) the following setup for webpack is needed.</p><pre>module.exports = {<br>...</pre><pre>module: {<br>  rules: [<br>   {<br>     test: /\.css$/i,<br>     use: [<br>       <strong>{loader: &quot;style-loader&quot;},</strong><br>       {loader: &#39;css-loader&#39;, options:{url: false}}<br>     ]<br>   }<br>  ],</pre><pre>...<br>}</pre><p>For production purpose the folowing snapshot of webpack setup is needed.</p><pre>module.exports = {<br>  ...</pre><pre>  <strong>mode: &#39;production&#39;,</strong><br>  module: {</pre><pre>  ...<br>  rules: [<br>    test: /\.css$/i,<br>    use: [<br><strong>      {loader: MiniCssExtractPlugin.loader, options:{}},</strong><br>      {loader: &#39;css-loader&#39;, options:{url: false}}<br>      ]}<br>    ],<br>  },</pre><pre>optimization:{<br>  minimizer: [<br><strong>    new CssMinimizerPlugin(),</strong><br>    new TerserPlugin()<br>  ]<br>},</pre><pre>plugins:[<br>  new MiniCssExtractPlugin({filename: `app.css`,}),<br>  new CleanWebpackPlugin(),<br>  new HtmlWebpackPlugin({<br>     <strong>inject: true,</strong><br>     filename: &quot;index.html&quot;,<br>     template: &quot;src/static/index.template.html&quot;,<br>     minify: false<br>  }),<br>...<br>]<br>};</pre><h3>Where are CSS modules and what about isolation</h3><p>So far we allow splitting css to multiple files and merging it with webpack with two options: one fast for development and one slower but efficient for production. But aside of that one of important goals was to have isolation for css modules (components).</p><p>Imagine the code bellow to work.</p><pre><strong>import css from &quot;./static/style.module.css&quot;;</strong></pre><pre>window.onload = () =&gt; {<br>  let divApp = document.getElementById(&quot;app&quot;);<br>  divApp.classList.add(<strong>css.blueBox</strong>);<br>  divApp.innerHTML = /*html*/`&lt;div&gt;class=&quot;${<strong>css.redLabel</strong>}&quot;&gt;LOADED&lt;/div&gt;`;<br>}</pre><p>Assuming that files <strong>./static/style.module.css</strong> has defined css classes <strong>.blueBox</strong> and <strong>.redLabel</strong> this code will not work because TypeScript does not know how to work with css type of modules. To make it work you can replace <strong>css.blueBox</strong> with <strong>“blueBox”</strong> and <strong>“${css.redLabel}”</strong> with <strong>“redLabel”</strong>. By doing so you will be able to build project but class names of those files will not be isolated.</p><p>The output will be the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*rYO4SIQXl_hnVNs8Dz_eCg.png" /></figure><p>To replace <strong>blueBox </strong>and <strong>redLabel </strong>with some hash that will isolate our module and allow us to run the code above the few steps are needed.</p><p><strong>Step 1<br></strong>We need to define <strong>typings.d.ts</strong> file in root of our project in which we will describe how css module should be threated.</p><pre>declare module &quot;*.module.css&quot;;</pre><p><strong>Step 2<br></strong>We need to install <strong>typescript-plugin-css-modules</strong> with npm.</p><pre>npm install --save-dev <strong>typescript-plugin-css-modules</strong></pre><p><strong>Step 3<br></strong>The last step should connect this plugin with typescript language server and provide us ability to isolate name of css rules. To do so update your <strong>tsconfig.json</strong> file with the following directive.</p><pre>{<br>  &quot;compilerOptions&quot;: {<br>    <strong>&quot;plugins&quot;: [{ &quot;name&quot;: &quot;typescript-plugin-css-modules&quot; }],</strong><br>    ...<br>  },<br>...<br>}</pre><h4>What did we get?</h4><p><strong>First,</strong> the css of our modules are isolated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*sO-byfUz9rY6lya3EToZ8Q.png" /><figcaption><strong>blueBox </strong>is replaced with <strong>f3GRW8HGZoJpx1lbL2Y9 </strong>and <strong>redLabel </strong>is replaced with <strong>YmKJSBG2rQjyw5jmYixv</strong></figcaption></figure><p>For debug purpose you should set <em>source-maps</em> so you can have the reference of source for css rules.</p><p><strong>Second,</strong> <strong>autocomplete</strong> for css modules in VS Code works like a charm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*6UzPiGUo9ycd9nphoBqktQ.png" /><figcaption>VS Code Autocomplete for CSS Module</figcaption></figure><p><strong>Note:</strong> To make <strong>typescript-plugin-css-modules </strong>working you should set VSC to use Workspace version of Type Script as described in plugin manual <a href="https://github.com/mrmckeb/typescript-plugin-css-modules#visual-studio-code">https://github.com/mrmckeb/typescript-plugin-css-modules#visual-studio-code</a></p><p>You can <a href="https://www.buymeacoffee.com/dimi11"><strong>buy me a ☕</strong></a> if you like this content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*bPNzOAAbqd0NQTx2gyIQ9w.png" /></figure><p><a href="https://www.buymeacoffee.com/dimi11"><strong>https://www.buymeacoffee.com/dimi11</strong></a></p><h3>Recap</h3><p>With this setup we are able to to the following with CSS in our Typescript project:</p><ul><li>Split css rules to multiple files and manage order of importing with <strong>import “filename.css”</strong> syntax.</li><li>We have fast build for development but not efficient but also very efficient build for production</li><li>If we need css module that should be isolated from the rest of the CSS rules we can use them as any other module (<strong>import css from “module-name.module.css”</strong>) with autocomplete in VS Code.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52596526d19" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How much of Architecture design is needed up-front]]></title>
            <link>https://medium.com/@dimi_2011/how-much-of-architecture-design-is-needed-up-front-b69408797732?source=rss-2cb4eab25a09------2</link>
            <guid isPermaLink="false">https://medium.com/p/b69408797732</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[agile-architecture]]></category>
            <dc:creator><![CDATA[Ivan Dimitrijevic]]></dc:creator>
            <pubDate>Fri, 08 Apr 2022 07:23:06 GMT</pubDate>
            <atom:updated>2022-04-08T07:23:06.061Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*8ID4MhYJZ6GE0BeHRvSvGg.png" /></figure><p><strong>How much of Architecture design is needed up-front on the scale from no-design at all to fully documented solution?</strong> Of course none of extreme is good but what is the real measure and how to pick the one?</p><p>The point is that with introducing Agile way of work things changed how software is developed so software architecture should follow as well. Making a detailed blueprint up-front while delivering in sprints and embracing the change (<a href="https://agilemanifesto.org/"><em>Agile Manifesto</em></a><em> 4th value</em>) is not the best combination. Some other approach is needed so you might heard for the term Agile Architecture but what is it really and what kind of architecture design it produces?</p><p>Architecture by definition is something that is a good base which should not change. The trouble with software development industry is the fact that context of change is very emphasized. So software architecture can not be seen as architecture in other industries (i.e.. Construction) but rather something that is much more adaptable and agile.</p><h3>Introducing MVA</h3><p><strong>MVP</strong> (<em>Minimum Viable Product</em>) is important artifact for <em>Lean</em> and <em>Agile</em> frameworks. This concept explains how product should be build in increments while leading towards product vision. Since that Agile way of work became <em>de facto</em> standard for software development I believe that Software Architecture has to introduce <strong><em>Minimum Viable Architecture</em></strong> as an artifact — <strong>MVA</strong>.</p><p>So MVA in first iteration, either in 1st sprint or prior to the project start, should contain vision of Software Architecture of Application that will be developed. The level of details should vary based on many criteria and the job of Architect is to make it optimal. For example if domain is the same as the one in which team worked previously most of the stuff are already known, there is a huge learning and some good practices can be recycled. But if domain is completely new much bigger attention is required. Also one of the most obvious criteria is the size and complexity of application so the rule of the thumb should be more complex one requires more architecture design upfront.</p><p>It is not just about the level of details but also where the focus should be? If application requires SLA or high-traffic concurrent use-cases the focus should be on those parts that enable scalability and availability of solution. Or if the risk is about security and privacy the focus of MVA can be front-end part of solution.</p><h3>MVA content</h3><p>Bellow is an example of MVA that can be used as a starting point. This list should be upscaled based on concrete application that will be built.</p><ul><li>Architecture landscape of application (n-tier, microservice, serverless, etc.)</li><li>Envisioned components and their relationship and dependency</li><li>Technology stack and tools</li><li>Build and automation tools and environments</li></ul><p>Never forget that <strong>MVA is a concept where Software Architecture is developed in increments with enough as needed up-front design work.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b69408797732" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TDD — Unit Testing TypeScript project with Jest]]></title>
            <link>https://medium.com/@dimi_2011/tdd-unit-testing-typescript-project-with-jest-2557e8b84414?source=rss-2cb4eab25a09------2</link>
            <guid isPermaLink="false">https://medium.com/p/2557e8b84414</guid>
            <category><![CDATA[tdd]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Ivan Dimitrijevic]]></dc:creator>
            <pubDate>Fri, 31 Dec 2021 10:02:02 GMT</pubDate>
            <atom:updated>2023-03-21T21:15:07.982Z</atom:updated>
            <content:encoded><![CDATA[<h3>TDD — Unit Testing TypeScript project with Jest</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9dMAuWOy2WbCBaDz9zCFXw.png" /></figure><p>After upgrading references for one of mine projects I have a trouble making Jasmine tests to take off. The trouble is in the fact that TypeScript code is transpiled to JavaScript and taking care of all references used in typescript modules.</p><p>I decided to give a try with <a href="https://jestjs.io/"><strong>Jest</strong></a>.</p><p>When you google about Jest you will find that its popularity lies in the fact that requires zero setup.</p><p>The first step, since that Jest is made for JavaScript natively you need to find out how to live with this transpilation. Luckily there is a <a href="https://kulshekhar.github.io/ts-jest/"><strong>ts-jest</strong></a> that you can use for such.</p><p>In order to start, you need to install the following dependencies in your existing TypeScript project.</p><pre>npm install --save-dev jest ts-jest <a href="http://twitter.com/types/jest">@types/jest</a></pre><p>After <strong>npm </strong>finishes installation you need to update your <strong>package.json</strong> configuration file. You should define your test script. So, go to your <strong>scripts </strong>section and add following configuration.</p><pre>&quot;scripts&quot;: {<br>   <strong>&quot;test&quot;: &quot;jest&quot;</strong><br>},</pre><p>You can really use Jest with zero configuration but it is good to initialize its configuration file that you can use for further customization. So go to your terminal and type the following command which will generate your <strong>jest.config.js</strong> file for you.</p><pre>npx ts-jest config:init</pre><p>And you are ready to go.</p><p>To run your test you need to execute the following command.</p><pre>npm run test</pre><h3>But where are tests?</h3><p>Jest automatically recognize all files named either <strong>file-name.test.ts</strong> or <strong>file-name.spec.ts</strong> as tests that should be executed. My suggestion is to create a separated folder that will hold all tests and to exclude such folder as one that is used in your build process.</p><p>So first build your test folder.</p><pre>mkdir test</pre><p>Then open up you <strong>tsconfig.json</strong> file and in your exclude section add your <strong>test</strong> folder.</p><pre>&quot;exclude&quot;: [<br>   &quot;node_modules&quot;,<br>   &quot;public_html&quot;,<br>   <strong>&quot;test&quot;,</strong><br>]</pre><p>If you wanted to put your tests everywhere in your project close to source files you should just add the following items to exclude section instead <strong>test</strong>.</p><pre>&quot;exclude&quot;: [<br>   &quot;node_modules&quot;,<br>   &quot;public_html&quot;,<br>   &quot;test&quot;,<strong><br>   &quot;**/*.spec.ts&quot;,<br>   &quot;**/*.test.ts&quot;,</strong><br>]</pre><p>Now you are ready to write your first test.</p><p>Create file named <strong>Sample.test.ts</strong> and put it in your <strong>test </strong>folder. Insert the following code.</p><pre>test(&quot;Initial test&quot;, () =&gt; {<br>   expect(2).toEqual(3);<br>});</pre><p>Hit Save and type in your terminal the following command.</p><pre>npm run test</pre><p>Since that we followed Uncle Bob’s first rule of doing TDD (<em>You are not allowed to write any production code unless it is to make a failing unit test pass</em>) your test will not pass as expected. You should fix it and re-run it.</p><h3>Testing the real code</h3><p>Imagine that you have created <strong>Sample.ts</strong> file in your project located at <strong>src/Sample.ts </strong>with code written bellow.</p><pre>export class Sample{</pre><pre>   public hello(name: string): string{<br>      return `Hello ${name}`;<br>   }<br>}</pre><p>If you want to test the output of hello method update your <strong>Sample.test.ts</strong> file.</p><pre><strong>import {Sample} from &quot;../src/Sample&quot;;</strong></pre><pre>describe(&quot;Sample test suite&quot;, () =&gt; {<br>  test(&quot;Initial test&quot;, () =&gt; {<br>     expect(2).toEqual(3);<br>  });</pre><pre><strong>  test(&quot;hello world output&quot;, () =&gt; {<br>    let s = new Sample();<br>    expect(s.hello(&quot;Ivan&quot;)).toEqual(&quot;Hello Ivan&quot;);  <br>  });</strong></pre><pre>});</pre><p>First we imported <strong>Sample.ts</strong> reference. Than we wrote test that make an instance of <strong>Sample</strong> class and checked whether calling <strong>hello()</strong> method with given argument will output what we expected. We also wrapped our tests with <strong>describe </strong>directive.</p><p><strong>Now you are ready to rock!</strong></p><p>Always keep in mind three rules of TDD described by Uncle Bob.</p><ol><li>You are not allowed to write any production code unless it is to make a failing unit test pass.</li><li>You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.</li><li>You are not allowed to write any more production code than is sufficient to pass the one failing unit test.</li></ol><p>You can <a href="https://www.buymeacoffee.com/dimi11">buy me a ☕</a> if you like this article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*bPNzOAAbqd0NQTx2gyIQ9w.png" /></figure><p><a href="https://www.buymeacoffee.com/dimi11">https://www.buymeacoffee.com/dimi11</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2557e8b84414" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bubble Pairs — Unexpected development]]></title>
            <link>https://medium.com/@dimi_2011/bubble-pairs-unexpected-development-a26d9858541f?source=rss-2cb4eab25a09------2</link>
            <guid isPermaLink="false">https://medium.com/p/a26d9858541f</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[pwa]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Ivan Dimitrijevic]]></dc:creator>
            <pubDate>Sun, 02 Jun 2019 20:38:32 GMT</pubDate>
            <atom:updated>2019-06-02T22:17:11.190Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bubble Pairs — Unexpected development</h3><p>In October 2017 I wanted to conduct a small experiment with two goals:</p><ol><li>I did not write code for a while and I wanted to start some Pet project in order to test some new stuff at that time: Serverless, Firebase, PWA, TypeScript, Jasmine, etc.</li><li>I wanted to play with my 4 year old daughter. Trying to inspire her, to show her the magic of software development and to see what feedback can be grabbed from kids at that age.</li></ol><p>As a result, my daughter and I spent over a month having a lot of fun. She waited for me every day to come back home from my daily job and to start coding with her. My wife was jealous on us, it was daughter-father time only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*kvqWHg3g4VkY8mK2FIPRfQ.png" /><figcaption>Bubble Pairs Icon</figcaption></figure><p>The result was <a href="https://bubblepairs.apps.in.rs/">Bubble Pairs</a>, a good old memory game with some additional goodies that makes game play interesting.</p><p>You can read more details about <a href="https://medium.com/@dimi_2011/bubble-pairs-building-a-pwa-game-for-training-fun-and-family-joy-683d7cd6ffca">game itself</a> and <a href="https://medium.com/@dimi_2011/tldr-behind-the-scenes-of-bubble-pairs-c7770e66d4a6">how it was made</a>.</p><h4>One night I received unexpected email…</h4><p>I did not promote game anyhow and I did not have any expectations for game success. Usage indicators on both Google Analytics and Google Firebase Console was idle until recently.</p><p>A month ago I received an email from Google Analytics saying that activity on Bubblepairs property is increased for <strong>38,000%</strong> in the last 30 days.</p><blockquote><strong>The thing is that game somehow found its players.</strong></blockquote><p>Something magically happened on 5th of April. Number of Users days before was around 5 and it jumped to 1730 that day. In coming days more and more users played game.</p><blockquote>Bubble Pairs was played so far by <strong>79,429</strong> users.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MAofybeuSElEJJkFNtBq_w.png" /></figure><p>From 1st of April until 31st of May almost <strong>80,000</strong> users played Bubble Pairs. They generated <strong>155,000</strong> sessions. Since than more than <strong>2000 </strong>players are active on daily basis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*-b3iT7ugc-pBzeX0R0P1lg.png" /><figcaption>Audience overview from 1st of April until 31st of May</figcaption></figure><p>You can see that average session duration is around 3 minutes, but have in mind that this is average. There are players who spent hours on playing game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*5bK5ZmNbE2VarLfBF_3xag.png" /><figcaption>Top 10 session duration per client from 1st of April until 31st of May</figcaption></figure><p>Recently I decided to unlock more levels for all users and bounce rate decreased significantly. This action also increased average time spent on page. In the last week, bounce rate was <strong>1.72%</strong> and average time spent on page was around <strong>13</strong> minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bh4wyv9gZbl56KNH91C0QA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zw_6f2_G-WIVCXIycMY_2w.png" /></figure><p>Speaking about traffic sources <strong>99.8%</strong> is direct traffic. More than <strong>25%</strong> of visitors are returning once. Most of players are Android users and of course <strong>97%</strong> of players used their mobile devices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*phYCr7nhFvvHtddVA49lfA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/243/1*WZoAkHYk4UvZKYfehEjHVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*Kn8HtwbYO-riRno7AdZzLA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*Fc3he4sfowFaid6NmSuSzg.png" /></figure><p>Enough statistics. <a href="https://bubblepairs.apps.in.rs/">Bubble Pairs</a> is PWA application. It does not require anything but browser. Give it a try and send me your feedback. Anyway having in mind popularity of the game my daughter (who is 6 yeras now) and I are planning new features.</p><p><strong>Cheers!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a26d9858541f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Development as an Ultimate tool for Digital Transformation]]></title>
            <link>https://medium.com/@dimi_2011/software-development-as-an-ultimate-tool-for-digital-transformation-5c354c328f49?source=rss-2cb4eab25a09------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c354c328f49</guid>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[agile]]></category>
            <dc:creator><![CDATA[Ivan Dimitrijevic]]></dc:creator>
            <pubDate>Thu, 08 Nov 2018 16:15:33 GMT</pubDate>
            <atom:updated>2018-11-09T10:54:24.445Z</atom:updated>
            <content:encoded><![CDATA[<p>Ask yourself if you would like to change your car, what feature upgrade you would like to have? Parking camera, autopilot, better navigation system, better integration with your phone, music on demand from <em>Spotify, Deezer</em> or <em>YouTube</em>?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CE06s4YcasC9keeS.jpg" /></figure><p>I can bet that anything that you would like to improve comes from a Digital world. I took car as an example but you can do this exercise with any item that you have in your life. Wouldn’t be nice if your dishwasher can alert you on your phone that the program is finished? Or if you can setup the exact water temperature on you shower?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/0*MK8rEq1kEmLytMeQ.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/0*bMQXfiB_OsDINuSn.jpg" /></figure><p>Look around you… What is for sure is that digital world is the one that we already live and we will expect more and more from it every day in the future.</p><h3>What companies should do?</h3><p>First, <strong>digital transformation is not the question of choice but the question of survival</strong>. Companies without digital transformation agenda will not be able to catch up in the future or even to survive.</p><p>Second, Digital transformation does not just mean adding digital component of product or even completely new product. <strong>It is a big shift in business model as well.</strong> Business model needs to be adapted or even reinvented. To do so traditional tools that count on certainty and predictability are not on the table but instead there is a need for tools that allow:</p><ul><li>Fast experiments</li><li>Trial and errors</li><li>Deep customer immersion</li><li>Innovation</li></ul><p>There are numerous tools and frameworks that should be applied in digital transformation like: <a href="https://en.wikipedia.org/wiki/Agile_software_development">Agile way of work</a>, <a href="https://en.wikipedia.org/wiki/Design_thinking">Design thinking</a>, <a href="http://theleanstartup.com/">Lean startup</a>, <a href="https://en.wikipedia.org/wiki/Business_Model_Canvas">Business model canvas</a>. All those tolls are designed to help you working with <strong>uncertainty </strong>which is reality of digital world.</p><p>Third, there is no silver bullet for what to do in digital transformation road-map but what is sure is that <strong>Software development is the ultimate tool that should be used</strong>. Without it, companies will not be able to find their place in digital world. Every business must create its software that will differentiate them from the others: bakeries, coffee shops, music shops, house construction companies, health services, schools, etc. Software will be the ultimate differentiation having in mind digital expectations from people. Therefore Software development should not be treated as a support for business or a pure cost of a company that needs to be optimized but instead as an opportunity, enabler and investment for the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c354c328f49" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solution Architect’s challenges and common mistakes]]></title>
            <link>https://medium.com/@dimi_2011/solution-architects-challenges-and-common-mistakes-91694a3b4979?source=rss-2cb4eab25a09------2</link>
            <guid isPermaLink="false">https://medium.com/p/91694a3b4979</guid>
            <category><![CDATA[solution-architecture]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Ivan Dimitrijevic]]></dc:creator>
            <pubDate>Wed, 31 Jan 2018 22:17:03 GMT</pubDate>
            <atom:updated>2018-01-31T22:17:03.147Z</atom:updated>
            <content:encoded><![CDATA[<p>As I stated in one of my previous posts, I really believe that the role of <em>Solution Architect</em> plays the crucial one in a company for keeping a system health and future proof. From one side this role is important more than ever but from the other side the complexity of challenges are equally complex.</p><p>Changes in general and environment is much more dynamic than it was only couple of years ago. On the other hand IT industry is offering more than ever different tools, languages, frameworks, solutions. Combined with legacy that every existing company has even prioritization is very complex task to approach.</p><p>Companies without established role or companies with such role but with bad selection starts to be in a position where technology is the main blocker for any change, opportunity or transformation. Their technical debt becomes unmanageable almost over night.</p><h4>The first trap — status quo for Legacy</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/0*Tb7CdSeBfSfzorU7.jpg" /><figcaption>The legacy system</figcaption></figure><p>What I can say for sure that status quo is almost never good. I worked in several companies where some legacy systems are present with different kind of issues: old technology, rare programming language, security issues, bad performances, quality issues, etc. Whenever demand side would like to do some initiative that involves legacy system almost always immediate warning is stated — <em>This change will affect system X. It is in very unmanageable state. We can change what you asked but responsibility is yours?</em> Of course demand would not take that risk but supply in this case played very unprofessional by just transferring the risk. I will not dive deeper what caused this situation instead I think that it is very clear that after this action nobody won. Demand did not get their initiative. Legacy system stayed legacy system. Next similar opportunity will produce the same outcome and what is even worst, legacy tends to grow.</p><blockquote>You can always do something with legacy and regardless if you created one or inherited what you must not do is to ignore it.</blockquote><p>Always tend to fight with legacy. Upgrade web server, refactor code, remove dead code, build facade around legacy system to control it better, patch database to fix and remove vulnerabilities, monitor problems, etc. Replace layer by layer if possible if not make it to be possible. At the end build a strategy how to replace this legacy for the long run and follow that plan.</p><h4>Over-architecture</h4><p>One of the main tasks for solution architect is to make such system that is highly independent from: vendor, database, programming language, framework, etc. To achieve so you need a really great effort to invest. Ask your self as an engineer, how many times in your career you were migrating database engine of your solution to a different one? Did you ever replaced your MySQL database with Oracle for example?</p><p>To achieve independence described in the paragraph above you need to invest very much time and money. If you are a startup who needs to test its MVP on the market you should never build it with such architecture in mind. But once MVP becomes a product which is used by significant number of people the architecture of MVP must be replaced with one that is scale-able, flexible, independent, etc. This trap is very common so you either over-architect your solution at the beginning which destroys your ability to go to market fast or you never replace your MVP architecture with appropriate one.</p><p>A good solution architect will try to understand the future of the system and based on that pick the right level of architecture that should be in place.</p><h4>Micro-services are cool. Lets do a micro-services</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*9XadwQ90BlLFjFxh.jpg" /><figcaption>Monolithic vs Microservice Architecture</figcaption></figure><p>To me it happened couple of times that some companies wanted to impress me by stating that their architecture is based on microservices. What i like to do in that case is to ask them how they solved some common issues that this architecture brings with it.</p><p>There is a big hype over Netflix, Uber and other digital companies about their switch to microservices architecture. But word that is very common missed from previous statement is <strong>switch</strong>. None of those companies started their journey from microservices architecture. They evolved to it, over time. They also had a bunch of new problems working on such architecture such as logging, debuging, stability, reliability, etc.</p><p>There is one even bigger thing that is omited from this architecture. All those companies that are using it did it to boost their speed of development. By making micro components that are isolated and do not share anything from the system it is very certain that you will have the same funcionality written dosen of times. Tradeoff that is accepted by companies who utilize this aproach is that they will speed up their delivery because teams will be much more efficient since that they do not need to syncronize anything with other teams but technical dept will increase much faster than in the system with different approach.</p><p>There is one phenomenon connected with this approach but for sure less important that previous one. Companies tend to apply micro-service architecture for all solution at once. The advice that could be read on many different places including Martin Fowler’s blog suggest decoupling and moving of monolith functionality by functionality (or service by service) for parts that make sense.</p><h4>We have competance for this language lets use this technology</h4><p>It is very common that teams are making decision on how to fulfill some goal but to use existing expertise as much as possible. On the paper it really makes sense but the reality is completely other story. The cause of problem is in fact that there is no technology/language that can cover any platform/challenge.</p><p>What I tried to say is you can not build Android app with PHP or you can not use JAVA to make IOS app. At least you can not expect that you will get the same level of options as it would be with the official SDKs and languages. The thing is that you as a solution architect should try to pick appropriate technology based on a requirements for a challenge that you try to face. Knowledge of particular language should be one but not the only one criteria.</p><h4>Cutting edge approach</h4><p>I woke up every morning asking myself whether a new version of Angular framework is released :)? The thing is that technology is so rapidly change that if one thing is mainstream today it is hard to guarantee that it will be tomorrow.</p><p>Every day new frameworks, languages and tools are born. Most of them will not live long.</p><p>Decision on whether to use any of those is the question of risk, trade-off and technical debt. I do not try to say that you should use Vanila only stuff. This approach also brings a lot of new challenges. What I try to say is that if you pick something that is cutting edge technology you should try to understand the future of it. Also you need to try to secure as much as possible easy transition to the something other if it becomes legacy. Try to utilize the independence principle of good architecture — The architecture should be independent from vendor, language, database engine, etc.</p><h4>Lets compose the package components</h4><p>One of the highly utilized principle these days when software development is considered is usage of package repository. Do not get me wrong, from the perspective of modularization<strong> </strong>it is great but many engineers tend to write the code only when is needed. Instead they try to find a package that will solve the challenge they are facing.</p><p>From one side if you use package that is used by many other projects it is more certain about its quality but from the other side your product depends very much on quality of that component. Again it is a trade-off and the rule of thumb is that you should try to make a balance on number of components grabbed from package repository. When picking one try to understand its health from the perspective of frequency of commits, list of bugs, community size, help materials, the speed of release of fixes, etc. So you as a solution architect should try to investigate as much as possible the quality and the future of 3rd party package that is considered to be required.</p><h4>Wrap-Up</h4><p>You know the saying: The only system which is 100% secured is the one turned off from the power plug. The similar is for solution architecture discipline. There is no approach that is the best fit for every situation. Every decision is a trade-off between speed, quality, technical debt, price, future proof, complexity and many other parameters. <strong>The role of solution architect is to balance those parameters while making architectural decision</strong>. His competence will secure the future proof of the system, health and the optimal level of technical debt.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91694a3b4979" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Serverless — revolution or another failure]]></title>
            <link>https://medium.com/@dimi_2011/serverless-revolution-or-another-failure-cfbe14fbbc52?source=rss-2cb4eab25a09------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfbe14fbbc52</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[solution-architecture]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[as-a-service-software]]></category>
            <dc:creator><![CDATA[Ivan Dimitrijevic]]></dc:creator>
            <pubDate>Fri, 01 Dec 2017 21:07:09 GMT</pubDate>
            <atom:updated>2017-12-01T21:36:48.618Z</atom:updated>
            <content:encoded><![CDATA[<p>It is not secret that there is a huge gap between demand and supply these days when software development is concerned. This trend is nothing new but because of digital market explosion this gap stared to be obstacle more than ever.</p><p>If you are developer ask your self how many real senior developers with 20+ years of experience you know? OK, software development is young discipline but not so young.</p><p>On the other side demand started to be very complex. It is anything but unusual to see startup company these days that heavily use AI for their solution. There are plenty of products on the market with so many details implemented when user experience is considered.</p><p>So lets do a small recap. Demand is more complex than ever. Gap between demand’s needs and supply’s possibility is expending. This gap is filled mostly with young and inexperienced engineers. For me it does not sound good at all.</p><h3>What kind of actions are taken by IT industry</h3><p>Vendors of development tools are giving their best to overcome this problem by introducing a better tools that simplifies engineering. This recipe gave mostly good results during the history of software engineering. Plenty of new programming languages was born with more clear syntax, more meaningful concepts and more abstraction. To be concrete, this is how object oriented concept was born, my favorite language JAVA, garbage collection concept, different IDEs, etc. Ask your self how big is trade-off because of writing code in JAVA which is after compilation executed by VM as additional layer? Layer after layers, less things to care and more time to focus on solving business cases.</p><p>But not always this approach was successful. On the contrary. There were many attempts to make application development database oriented. Remember <a href="http://www.oracle.com/technetwork/developer-tools/forms/overview/index.html">Oracle Forms</a> or <a href="https://en.wikipedia.org/wiki/PowerBuilder">Sybase Power Builder</a>? Their approach was that database is center of universe, you should make parameterized<strong> </strong>query which will automatically make UI for you. It even sounds bad but unfortunately many huge applications especially for business users are made this way.</p><p>Than there were even a more radical moves such as <a href="https://en.wikipedia.org/wiki/Model-driven_architecture">MDA </a>(<em>Model Driven Architecture</em>). Approach was based on assumption that code syntax is the bottleneck that should be solved so lets use visual symbols instead of coding and those symbols will generate a code for you.</p><p>Very similar I can continue with BMPL and SOA ESB but lets focus on something that is attractive these days — <a href="https://martinfowler.com/articles/serverless.html"><strong>serverless</strong></a>.</p><h3>Serverless architecture</h3><p>Imagine that you are making application but without back-end. Actually for back-end you can integrate SaaS based services for persistence, file storage, authentication, etc. You have to admit that this approach is far more different than thin-client principle because a lot of logic is moved to the client side.</p><p>Two most advanced players in this filed are <a href="https://aws.amazon.com/lambda/features/">Amazon AWS Lambda</a> and <a href="https://firebase.google.com/">Google Firebase</a>. They offer a lot of tools, dashboard for configuration and analytics. To integrate some functionality you need to activate it then to download SDK for your platform (Android, IOS or Web) and to copy-paste couple of lines of code.</p><p>There is no classic back-end, database, API and all components that are common when you try to build application these days. You simply integrate services that just requires your configuration. If you need some verification or additional processing you can write a simple function that is executed as a microservice in the cloud. With this approach you as a developer is able to fully focus on front-end because production ready back-end is provided with staging environment, deploy console, monitoring, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F8Xjy2dit59HyOTZFr8YrA.png" /><figcaption>Google Firebase showcase</figcaption></figure><h4>Everything is scalable and secure out of the box</h4><p>Any of service that you would like to use from either Amazon’s or Google’s solution is scalable out of the box. You do not need to worry about that.</p><p>If you still need some particular functionality that requires your attention you can write some script that will run as a microservice with ability to achieve scalability if you follow the rules offered by platform vendor.</p><p>Also you need to understand that security is not your concern. For instance this is not your database but database of SaaS vendor. Vendor cares about isolation, redundancy, backup, caching, locking, etc.</p><h4>Cost of functionality</h4><p>What is really great with serverless is that you would be able to calculate the cost of each functionality because you are able to see how each component in your setup consumes resources. Any service has its own way of cost calculation for instance number of requests or bandwidth, etc. Having this in mind for particular functionality you as an architect can select the most cost attractive approach. For instance, not so important functionality can be queued instead of real-time processed.</p><p>Speaking about costs, implementing functionality in terms of serverless is much simpler and you do not need so skilled developer to do so. He or she do not need to know design patterns, scalability principles, anatomy of web, web services, etc. Therefore finding a developer with such skill set is far more simpler and this is the purpose of serverless approach.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fw7X4gAQTk2E&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dw7X4gAQTk2E&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2Fw7X4gAQTk2E%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/af8a3eacb3d21bbebf2de1ee60c19f6d/href">https://medium.com/media/af8a3eacb3d21bbebf2de1ee60c19f6d/href</a></iframe><h4>The dark side</h4><p>Your solution becomes complitely platform dependent and more important your solution is not just code but a lot of configurations and scripts that you made in your dashboard. This is also same for your data. There is no classic database server to maintain.</p><p>All in all if you choose to go with serverless architecture switching back to something else is very hard to imagine. To achieve for instance hexagonal architecture you will need to create facades for any functionality which is almost impossible mission since that vendor’s gave their best to make their SDKs user-friendly.</p><p><strong>You as a solution architect should create architecture that is highly independent from: Vendor, Frameworks, Database system, Client side, etc. </strong>With serverless this is almost impossible.</p><h3>The role of Solution Architect</h3><p>Time will show what will be the outcome of serverless. From one side you are able to controle your costs more efficiently but from the other who will guaranty how your costs will follow the bigger usage.</p><p>With serverless architecture and bunch of frameworks that are introduced on daily basis the role of <em>Solution Architect</em> becomes on of the key roles in the company. He or she is a gate keeper for optimal choice that will keep your company’s solution stack healty. Keeping technology depth on optimal level has never been so important but also very much complex at the same time.</p><p>With severless this task is even harder. From one side you will get out-of-the-box scalable solution but highly dependent. You will be able to easier find developers to work on your code but your code will not be structured but instead splitted between source code, dashboard configurations, and serverless scripts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfbe14fbbc52" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>