<?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 Darshanmarathe on Medium]]></title>
        <description><![CDATA[Stories by Darshanmarathe on Medium]]></description>
        <link>https://medium.com/@darshanmarathe?source=rss-ceb0f8d49e78------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*8Wgq2cuSdWG9RNZS.jpg</url>
            <title>Stories by Darshanmarathe on Medium</title>
            <link>https://medium.com/@darshanmarathe?source=rss-ceb0f8d49e78------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 09:53:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@darshanmarathe/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[Why I Wrote my own web component framework (componentForge)]]></title>
            <link>https://medium.com/@darshanmarathe/why-i-wrote-my-own-web-component-framework-componentforge-8a8a2f7ca578?source=rss-ceb0f8d49e78------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a8a2f7ca578</guid>
            <category><![CDATA[micro-front-end]]></category>
            <category><![CDATA[stenciljs]]></category>
            <category><![CDATA[custom-elements]]></category>
            <category><![CDATA[micro-frontends]]></category>
            <category><![CDATA[web-components]]></category>
            <dc:creator><![CDATA[Darshanmarathe]]></dc:creator>
            <pubDate>Thu, 19 Jan 2023 12:49:30 GMT</pubDate>
            <atom:updated>2023-01-19T12:49:30.044Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VprnSnqC9jBmXrO2d_e1Dg.png" /></figure><p>Back in days I was assigned a task to create a distributable widget which can be embeddable in website or front-end technology and the obvious choice was web components / custom elements</p><h3><strong>Website</strong></h3><p><a href="https://componentforge.up.railway.app/">ComponentForge</a></p><p><strong>The goals</strong></p><ul><li>Create a lightweight widget</li><li>It has to work with a paid/free charting framework for e.g Highcharts, Amcharts etc.</li><li>It should be easy to maintain.</li><li>Minimum dependencies on other library&#39;s</li></ul><p><strong>Journey (planned) of building widget (web component)</strong></p><ol><li>Identify the framework</li><li>Create the component</li><li>Test the component.</li><li>Deploy.</li></ol><p>So as there ware many frameworks like <strong>Stencil </strong>and <strong>LitElement </strong>avaible i started to evaluate them by building my first MVP widget and <strong>Bang!!!</strong> I hit a roadblock right away the charting library was not able to compile with the web component.</p><p>Was trying to talk to support people from the charting library and there response was “We do not support web components yet” and for me that&#39;s like saying “<strong>We do support JavaScript yet…</strong>”</p><p>I was able to a MVP with basic JavaScript Web Component in a day. with the same library so clearly there was no problem with Web components.</p><p>I thought lets take the things in my hand …. grrrr</p><p>So next weekend i set some goals for my framework</p><p><strong>Framework goals</strong></p><ol><li>It has to have minimum learning curve.</li><li>Should have props and its own state like react.</li><li>Should be fast.</li><li>For simple ajax call it should not be dependant on any other library like axios.</li></ol><p>So I decided to mimic the React class components as its a well known API and the next developer can find its documentation online. so i re-created the state props all lifecycle events and the famous setState method</p><p>For templating I used googles lit-html which is fast and I am standing on the shoulders of giants</p><p>and Added get and post methods to the base class.</p><p>Now it was time to test it by creating the widget and Walla!!! it worked in first attempt.</p><p>Over the time I kept improving it and below are some features</p><ul><li>Available in Typescript and JavaScript</li><li>Speed</li><li>No Configuration needed just include in page and get started</li><li>Has Props and State like react</li><li>Micro-templating built in so you can allow your users to inject templates</li><li>For Basic Ajax no need for other library it has GET/POST built in or you can use fetch always#</li><li>You can load external CSS and JavaScript so you can easily load any third party dependencies</li><li>Slots databinding (Only available with componentForge) So you can use slots as child components like we use in React</li></ul><p>Some of the components I have developed with the componentForge</p><p><a href="https://dm-cf-components.netlify.app/">Webpack App</a></p><p>So if you need to maintain a old web site or application in 2023 componentForge is the way forward.</p><p>Some use cases</p><ul><li>Internal Legacy Apps like PHP Asp.net JSP Etc.</li><li>Use with CMS like WordPress, Umbraco, AEM Sitecore Etc.</li><li>Creating Cross Technology Widgets which we can distribute<br>Re-useable Web components.</li><li>Write a single component when you have Polyglot frontend teams using different technologies (Angular , React, VueJS, Etc.)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a8a2f7ca578" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>