<?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 Anthony Torres Detquizan on Medium]]></title>
        <description><![CDATA[Stories by Anthony Torres Detquizan on Medium]]></description>
        <link>https://medium.com/@atdetquizan?source=rss-d5500915bce5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*BXJn3slxxhrWQwKD.</url>
            <title>Stories by Anthony Torres Detquizan on Medium</title>
            <link>https://medium.com/@atdetquizan?source=rss-d5500915bce5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 06:46:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@atdetquizan/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[Simulating APIs in Frontend Development with json-server]]></title>
            <link>https://medium.com/@atdetquizan/simulating-apis-in-frontend-development-with-json-server-3e3054e3764f?source=rss-d5500915bce5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e3054e3764f</guid>
            <category><![CDATA[web]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[front-end-web-development]]></category>
            <category><![CDATA[web-design]]></category>
            <dc:creator><![CDATA[Anthony Torres Detquizan]]></dc:creator>
            <pubDate>Tue, 05 Nov 2024 15:28:14 GMT</pubDate>
            <atom:updated>2024-11-05T15:28:14.874Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Complete Guide</h3><p>In frontend development, we often need data from an API to build and test our applications, but we don’t always have a fully functional API available. Whether the backend team is still working on it or we just want to build a quick prototype, having a simulated API allows us to move forward without depending on backend services. This is where <strong>json-server</strong> comes in — a powerful and simple tool that turns a JSON file into a full REST API.</p><p>In this article, we’ll explore what <strong>json-server</strong> is, how to set it up, and how to use it to simulate an API in your frontend projects.</p><h3>What is json-server?</h3><p><strong>json-server</strong> is a Node.js library that allows you to create a RESTful API from a JSON file. This API includes endpoints for basic operations (GET, POST, PUT, and DELETE), making it perfect for testing, development, and rapid prototyping. With just a few steps, you can simulate user data, blog posts, store products, or any other resources you need for your project.</p><h3>Why Use json-server?</h3><p>Here are some reasons why <strong>json-server</strong> has become popular among frontend developers:</p><ul><li><strong>Quick setup</strong>: You can have a REST API in seconds with just a JSON file.</li><li><strong>Fast prototyping</strong>: Perfect for prototypes or testing frontend functionality.</li><li><strong>Backend independence</strong>: Allows frontend developers to work independently, without waiting for the backend to be ready.</li><li><strong>Flexibility</strong>: Supports routing, pagination, searching, and data filtering.</li></ul><p>Now that we know what json-server is and its benefits, let’s dive into how to implement it!</p><h3>Step 1: Installing json-server</h3><p>First, you’ll need <strong>Node.js</strong> and <strong>npm</strong> installed. Once those are ready, open a terminal and run the following command to install json-server globally:</p><pre>npm install -g json-server</pre><p>Alternatively, you can install it locally in a specific project:</p><pre>npm install json-server</pre><h3>Step 2: Create the JSON Data File</h3><p>The next step is to create a JSON file with the data we want to simulate. For example, let’s say we want to simulate a blog API. We’ll create a file named db.json and structure it like this:</p><pre>{<br>  &quot;posts&quot;: [<br>    { &quot;id&quot;: 1, &quot;title&quot;: &quot;First Post&quot;, &quot;author&quot;: &quot;John&quot; },<br>    { &quot;id&quot;: 2, &quot;title&quot;: &quot;Second Post&quot;, &quot;author&quot;: &quot;Ana&quot; }<br>  ],<br>  &quot;comments&quot;: [<br>    { &quot;id&quot;: 1, &quot;postId&quot;: 1, &quot;content&quot;: &quot;Great post!&quot; },<br>    { &quot;id&quot;: 2, &quot;postId&quot;: 2, &quot;content&quot;: &quot;Interesting, thanks for sharing!&quot; }<br>  ]<br>}</pre><p>This db.json file simulates a database with two datasets: <strong>posts</strong> and <strong>comments</strong>. Each dataset will have its own routes and endpoints generated automatically by json-server.</p><h3>Step 3: Start the json-server</h3><p>With the JSON file ready, we can start json-server and begin making requests to our simulated API. In the terminal, run:</p><pre>json-server --watch db.json</pre><p>This command will start a server that watches (or “observes”) the db.json file. If we make changes to the file, the server will automatically update.</p><p>By default, json-server uses port 3000, so now we have a REST API available at <a href="http://localhost:3000.">http://localhost:3000.</a></p><h3>Step 4: Making Requests to the Simulated API</h3><h3>1. Get All Posts (GET /posts)</h3><p>We can make a GET request to fetch all available posts:</p><pre>GET http://localhost:3000/posts</pre><p><strong>Response:</strong></p><pre>[<br>  { &quot;id&quot;: 1, &quot;title&quot;: &quot;First Post&quot;, &quot;author&quot;: &quot;John&quot; },<br>  { &quot;id&quot;: 2, &quot;title&quot;: &quot;Second Post&quot;, &quot;author&quot;: &quot;Ana&quot; }<br>]</pre><h3>2. Get a Specific Post (GET /posts/:id)</h3><p>To fetch only the first post, use the route with the post’s id:</p><pre>GET http://localhost:3000/posts/1</pre><p><strong>Response:</strong></p><pre>{ &quot;id&quot;: 1, &quot;title&quot;: &quot;First Post&quot;, &quot;author&quot;: &quot;John&quot; }</pre><h3>3. Create a New Post (POST /posts)</h3><p>We can add a new post using a POST request, sending data in JSON format in the request body:</p><pre>POST http://localhost:3000/posts</pre><p><strong>Request Body:</strong></p><pre>{ &quot;title&quot;: &quot;Third Post&quot;, &quot;author&quot;: &quot;Luis&quot; }</pre><p><strong>Response:</strong></p><pre>{ &quot;id&quot;: 3, &quot;title&quot;: &quot;Third Post&quot;, &quot;author&quot;: &quot;Luis&quot; }</pre><h3>4. Update a Post (PUT /posts/:id)</h3><p>To update a post, we use the PUT method and specify the id of the post we want to modify:</p><pre>PUT http://localhost:3000/posts/1</pre><p><strong>Request Body:</strong></p><pre>{ &quot;title&quot;: &quot;First Post (Updated)&quot;, &quot;author&quot;: &quot;John&quot; }</pre><p><strong>Response:</strong></p><pre>{ &quot;id&quot;: 1, &quot;title&quot;: &quot;First Post (Updated)&quot;, &quot;author&quot;: &quot;John&quot; }</pre><h3>5. Delete a Post (DELETE /posts/:id)</h3><p>To delete a post, send a DELETE request to the corresponding endpoint:</p><pre>DELETE http://localhost:3000/posts/1</pre><p><strong>Response:</strong> 204 No Content (indicating the resource was successfully deleted)</p><h3>Advanced Features of json-server</h3><p>Beyond basic CRUD operations, <strong>json-server</strong> offers additional useful features:</p><ul><li><strong>Filtering</strong>: Filter data using query parameters in the URL. For example, to get all comments for the first post:</li></ul><pre>GET http://localhost:3000/comments?postId=1</pre><ul><li><strong>Pagination</strong>: Paginate data using _page and _limit:</li></ul><pre>GET http://localhost:3000/posts?_page=1&amp;_limit=1</pre><ul><li><strong>Sorting</strong>: Sort data with _sort and _order:</li></ul><pre>GET http://localhost:3000/posts?_sort=title&amp;_order=asc</pre><ul><li><strong>Simulate Response Delays</strong>: If you want to simulate slower response times (useful for load testing), use the --delay option:</li></ul><pre>json-server --watch db.json --delay 1000</pre><h3>Conclusion</h3><p><strong>json-server</strong> is an essential tool for frontend developers who need to work with data but don’t have access to a real API. Thanks to its simplicity and flexibility, json-server enables you to simulate a complete API in minutes, making it easier to develop interactive applications and speeding up your workflow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e3054e3764f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Powerful SCSS Tips and Tricks to Elevate Your CSS Game]]></title>
            <link>https://medium.com/@atdetquizan/10-powerful-scss-tips-and-tricks-to-elevate-your-css-game-b664f3c82c3e?source=rss-d5500915bce5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b664f3c82c3e</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[scss]]></category>
            <dc:creator><![CDATA[Anthony Torres Detquizan]]></dc:creator>
            <pubDate>Thu, 19 Sep 2024 22:46:44 GMT</pubDate>
            <atom:updated>2024-09-19T22:46:44.337Z</atom:updated>
            <content:encoded><![CDATA[<p>Supercharge Your Stylesheets with These SCSS Features and Best Practices</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KTqMQfWUYjraXST6.jpg" /></figure><p>In the fast-paced world of front-end development, efficiency and scalability in styling are key. This is where <strong>SCSS</strong> comes in. As one of the most popular CSS preprocessors, SCSS extends CSS’s capabilities and provides powerful tools to help you write cleaner, more organized, and reusable code. Whether you’re new to SCSS or looking for ways to boost your workflow, these tips are for you.</p><p>Here are some of the best SCSS tips and tricks to help you master your styling workflow:</p><h3>1. Variables: Centralize Your Style Values</h3><p>In CSS, changing a color or value across your project can be tedious. SCSS solves this with <strong>variables</strong>, allowing you to define colors, fonts, sizes, and more in one place.</p><pre>$primary-color: #3498db;<br>$secondary-color: #2ecc71;<br><br>body {<br>  background-color: $primary-color;<br>}<br><br>button {<br>  background-color: $secondary-color;<br>}</pre><p>If you ever need to update the primary color, you just change the $primary-color variable, and it updates across your project.</p><h3>2. Nesting: Write More Organized Code</h3><p>Nesting is one of SCSS’s most appealing features, as it allows you to structure your CSS more logically, mirroring your HTML hierarchy.</p><pre>.nav {<br>  ul {<br>    list-style: none;<br>  }<br><br>  li {<br>    display: inline-block;<br>  }<br><br>  a {<br>    text-decoration: none;<br>    color: $primary-color;<br><br>    &amp;:hover {<br>      color: $secondary-color;<br>    }<br>  }<br>}</pre><p>This technique helps keep your code more readable and organized.</p><h3>3. Mixins: Reuse Code Efficiently</h3><p><strong>Mixins</strong> allow you to reuse chunks of code without repeating them. This is ideal for adding common styles like vendor prefixes or layouts.</p><pre>@mixin border-radius($radius) {<br>  -webkit-border-radius: $radius;<br>  -moz-border-radius: $radius;<br>  -ms-border-radius: $radius;<br>  border-radius: $radius;<br>}<br><br>.button {<br>  @include border-radius(5px);<br>}</pre><p>You can change the value in one place and apply it to multiple elements, saving you from redundant code.</p><h3>4. Functions: Generate Dynamic Values</h3><p>Besides mixins, SCSS also supports custom <strong>functions</strong> for calculations and generating dynamic values.</p><pre>@function calculate-spacing($multiplier) {<br>  @return $multiplier * 16px;<br>}<br><br>.container {<br>  margin: calculate-spacing(2);<br>}</pre><p>This is a powerful tool for creating modular spacing and sizing systems that adapt to different contexts.</p><h3>5. Extend/Inheritance: Avoid Duplication</h3><p>With <strong>@extend</strong>, you can inherit the styles of another selector, helping you avoid repeating code and keeping things DRY (Don’t Repeat Yourself).</p><pre>.message {<br>  padding: 10px;<br>  border: 1px solid #ccc;<br>  color: #333;<br>}<br><br>.success {<br>  @extend .message;<br>  background-color: $secondary-color;<br>}</pre><p>This allows .success to inherit all styles from .message, reducing redundant lines of code.</p><h3>6. Operators: Perform Calculations in SCSS</h3><p>SCSS lets you perform mathematical operations, making it easier to define font sizes, margins, widths, and other values.</p><pre>.container {<br>  width: 100% - 20px;<br>}<br><br>.button {<br>  font-size: 16px * 1.2;<br>}</pre><p>This is great for creating fluid, scalable designs without having to manually calculate values.</p><h3>7. Control Flow: @if, @for, @each, and @while</h3><p>SCSS includes control structures like @if, @for, @each, and @while to make your styles more dynamic and programmatic.</p><pre>@for $i from 1 through 5 {<br>  .column-#{$i} {<br>    width: 20% * $i;<br>  }<br>}</pre><p>This is especially useful for generating repetitive classes like grids, automatically and cleanly.</p><h3>8. Modularization: Divide and Conquer</h3><p>SCSS allows you to split your styles into multiple files and import them into a main file, improving organization and maintainability.</p><pre>// _variables.scss<br>$primary-color: #3498db;<br><br>// _buttons.scss<br>.button {<br>  background-color: $primary-color;<br>}<br><br>// styles.scss<br>@import &#39;variables&#39;;<br>@import &#39;buttons&#39;;</pre><p>This is a lifesaver in large projects, especially when working in teams.</p><h3>9. Dark Mode and Theming with SCSS</h3><p>With SCSS, you can easily implement dynamic theming, such as <strong>dark mode</strong>, by using variables and mixins to switch colors based on the theme.</p><pre>$light-theme: (<br>  primary-color: #ffffff,<br>  secondary-color: #333333<br>);<br><br>$dark-theme: (<br>  primary-color: #333333,<br>  secondary-color: #ffffff<br>);<br><br>@mixin theme($theme) {<br>  background-color: map-get($theme, primary-color);<br>  color: map-get($theme, secondary-color);<br>}<br><br>body.light-mode {<br>  @include theme($light-theme);<br>}<br><br>body.dark-mode {<br>  @include theme($dark-theme);<br>}</pre><p>Switching between themes becomes effortless by just changing a class on the body.</p><h3>10. Debugging Made Easy with @debug</h3><p>SCSS has a built-in debugging tool with @debug. It prints helpful information about variables and styles to the console.</p><pre>$font-size: 16px;<br><br>@debug $font-size;sc</pre><p>This can be invaluable when troubleshooting or tracking down specific values in your styles.</p><h3>Conclusion</h3><p>SCSS is more than just a CSS preprocessor; it’s a powerful tool that allows developers to write cleaner, scalable, and more efficient styles. These tips not only help you streamline your workflow but also ensure your CSS is more maintainable, which is crucial in large projects.</p><p>Start applying these tricks today, and you’ll see a significant boost in both productivity and code quality!</p><p><strong><em>I hope these tips help you become more productive! Feel free to ask any questions or request a deep dive into any of these topics. I’m happy to help!</em></strong></p><blockquote><strong><em>If you found this article helpful, make sure to follow me on Medium for more tips and tricks on front-end development and web design!</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b664f3c82c3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SVG Customizable Icons Library]]></title>
            <link>https://medium.com/@atdetquizan/svg-customizable-icons-library-6520c004eb3f?source=rss-d5500915bce5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6520c004eb3f</guid>
            <category><![CDATA[scss]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[font-family]]></category>
            <dc:creator><![CDATA[Anthony Torres Detquizan]]></dc:creator>
            <pubDate>Tue, 10 Sep 2024 17:01:24 GMT</pubDate>
            <atom:updated>2024-09-20T17:46:41.884Z</atom:updated>
            <content:encoded><![CDATA[<h4>A complete collection of scalable icons for web and graphic design</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*59PthKZjE5mmEwXB.png" /></figure><p>Creating an icon library is a process that can involve several steps, depending on your needs. If you want a custom library for your own project, here’s how you can create it from scratch.</p><blockquote><strong>Steps to create an icon library:</strong></blockquote><p><strong>Define the purpose and style of the icons:</strong></p><ul><li>Before starting, it is important to define the style and purpose of the icons. Will it be a library with a specific theme? Will it be minimalistic, realistic icons, or something more abstract?</li><li>Choose a consistent style for the entire library so that all icons look uniform.</li></ul><p><strong>Design tools to create icons:</strong> To create graphic icons, you will need design software. Some popular options are:</p><ul><li><strong>Adobe Illustrator:</strong> Ideal for creating vector icons.</li><li><strong>Figma:</strong> Very useful for collaborative design and allows you to create icons easily.</li><li><strong>Inkscape:</strong> A free option for creating vector graphics.</li><li><strong>Sketch:</strong> Very popular among interface designers.</li></ul><p><strong>Icon design:</strong></p><ul><li><strong>Format:</strong> Icons are generally created in vector format (SVG) because SVGs are scalable without losing quality. If you need raster icons, PNG is also common.</li><li><strong>Common sizes:</strong> Icons are generally designed in 16x16, 24x24, 32x32 and 64x64 pixel sizes, although it is advisable to design them in vector format to adapt to any size.</li><li><strong>Create a grid:</strong> Use a grid in the software to ensure that all icons maintain a consistent size and proportion.</li></ul><p><strong>Grouping and organization of icons:</strong></p><ul><li>Create categories within your library to better organize the icons.</li><li>Example of categories.</li><li>Interface.</li><li>Social networks.</li><li>Nature.</li><li>Technology.</li><li>Business.</li></ul><p><strong>Export icons: </strong>Once the icons are created, export them in different formats.</p><ul><li><strong>SVG:</strong> For scalable vector icons.</li><li><strong>PNG:</strong> If you need a raster format.</li><li><strong>Webfont:</strong> If you want the icons to be used as fonts (like FontAwesome).</li></ul><p><strong>Create a CSS file (if you want to use them as web icons):</strong> You can convert your SVG icons into a web font using tools like <a href="https://wangchujiang.com/svgtofont/"><em>svgtofont</em></a>, which will help you generate a font file and include a CSS file.</p><p><strong>Documentation:</strong> It is important that the icon library has good documentation. Some elements that should be included are:</p><ul><li>Instructions for use.</li><li>Examples of how to integrate the icons into websites or applications.</li><li>Sample HTML/CSS code.</li></ul><p><strong>Publish the library:</strong> You can make your library available to other developers by uploading it to a platform such as:</p><ul><li><strong>GitHub:</strong> To share it as an open-source project.</li><li><strong>NPM:</strong> If you plan to make a library for the web or integrations.</li><li><strong>Own website:</strong> Where you can preview and download it.</li></ul><blockquote><strong>Guide to Create an Icon Project in Node.js with </strong><a href="https://wangchujiang.com/svgtofont/"><strong>svgtofont</strong></a><strong>:</strong></blockquote><p><strong>Install Node.js and create your project:</strong> First, make sure you have Node.js installed. If you don’t have it, you can download it from <a href="https://nodejs.org/"><em>nodejs.org</em></a>.</p><p>Then, open your terminal or console and follow these steps:</p><pre># Create a directory for your project<br>mkdir vectofy-icons<br><br># Change to the new directory<br>cd vectofy-icons<br><br># Initializes a new Node.js project (this will create a package.json file)<br>npm init -y</pre><p>This will create a package.json file that manages your project.</p><p><strong>Install svgtofont:</strong> The svgtofont package is used to convert your SVG icons into a web font with CSS/SCSS files that you can integrate into your project.</p><p>Install it with the following command:</p><pre>npm install svgtofont --save-dev</pre><p><strong>Add a script in package.json:</strong> Modify your package.json file to include a script that runs the font generation process. Add the following.</p><pre>...,<br>&quot;scripts&quot;: {<br>  &quot;build&quot;: &quot;node ./src/index.mjs&quot;<br>},<br>...</pre><p><strong>Folder structure:</strong> Next, organize the structure of your project to store the generated icons and files.</p><p>Create the following folders:</p><pre>public/<br>src/<br>  icons/<br>    comment-solid.svg<br>    ellipsis-solid.svg<br>    heart-solid.svg<br>    xmark-solid.svg<br>  styles/<br>    _{{filename}}.css.template<br>  index.mjs<br>package.json</pre><ul><li><strong>public/</strong>: Place where the final optimized and compiled files are stored.</li><li><strong>src/</strong>: This directory contains the main source code of the project.</li><li><strong>src/icons/</strong>: Stores the SVG files of the icons. These vector files contain the graphics that represent the icons in your library. As you add more icons, these SVG files would be grouped here.</li><li><strong>src/styles/: </strong>templates to generate CSS, LESS, SCSS and STYL files automatically, _{{filename}}.css.template. <a href="https://github.com/jaywcjlove/svgtofont/tree/master/examples/templates/styles">More Examples</a>.</li></ul><pre>/* Hello CSS! */<br>@font-face {<br>  font-family: &quot;{{fontname}}&quot;;<br>  src: url(https://medium.com/&#39;{{cssPath}}{{fontname}}.eot?t={{timestamp}}&#39;); /* IE9*/<br>  src: url(https://medium.com/&#39;{{cssPath}}{{fontname}}.eot?t={{timestamp}}#iefix&#39;) format(&#39;embedded-opentype&#39;), /* IE6-IE8 */<br>  url(https://medium.com/&quot;%7B%7BcssPath%7D%7D%7B%7Bfontname%7D%7D.woff2?t={{timestamp}}&quot;) format(&quot;woff2&quot;),<br>  url(https://medium.com/&quot;%7B%7BcssPath%7D%7D%7B%7Bfontname%7D%7D.woff?t={{timestamp}}&quot;) format(&quot;woff&quot;),<br>  url(https://medium.com/&#39;{{cssPath}}{{fontname}}.ttf?t={{timestamp}}&#39;) format(&#39;truetype&#39;), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/<br>  url(https://medium.com/&#39;{{cssPath}}{{fontname}}.svg?t={{timestamp}}#{{fontname}}&#39;) format(&#39;svg&#39;); /* iOS 4.1- */<br>}<br><br>[class^=&quot;{{prefix}}-&quot;], [class*=&quot; {{prefix}}-&quot;] {<br>  font-family: &#39;{{fontname}}&#39; !important;{{fontSize}}<br>  font-style:normal;<br>  -webkit-font-smoothing: antialiased;<br>  -moz-osx-font-smoothing: grayscale;<br>}<br><br>{{cssString}}</pre><ul><li><strong>src/index.mjs: </strong>This is the entry point of the code in ES6 Modules (<strong>.mjs</strong>) format, which means it is compatible with modern JavaScript modules, file that groups all the logic of the project, exporting the icons or generating the CSS files from the SVGs. It could also handle loading icons from src/icons/ and generating CSS classes from the template in src/styles/.<br>src/index.js</li></ul><pre>import svgtofont from &#39;svgtofont&#39;;<br>import path from &#39;node:path&#39;;<br><br>const rootPath = &#39;./&#39;;<br><br>svgtofont({<br>  classNamePrefix: &#39;vectofy&#39;,<br>  src: path.resolve(process.cwd(), &quot;src/icons&quot;), // svg path<br>  styleTemplates: path.resolve(rootPath, &quot;src/styles&quot;), // file templates path (optional)<br>  dist: path.resolve(process.cwd(), &quot;public&quot;), // output path<br>  fontName: &quot;vectofy&quot;, // font name<br>  css: true, // Create CSS files.<br>  startUnicode: 0xea01, // unicode start number<br>  svgicons2svgfont: {<br>    fontHeight: 1000,<br>    normalize: true<br>  },<br>  // website = null, no demo html files<br>  website: {<br>    title: &quot;Base Vectofy&quot;,<br>    // Must be a .svg format image.<br>    // logo: path.resolve(process.cwd(), &quot;svg&quot;, &quot;git.svg&quot;),<br>    version: &#39;1.0.0&#39;,<br>    meta: {<br>      description: &quot;Converts SVG fonts to TTF/EOT/WOFF/WOFF2/SVG format.&quot;,<br>      keywords: &quot;vectofy,TTF,EOT,WOFF,WOFF2,SVG&quot;<br>    },<br>    description: ``,<br>    // Add a Github corner to your website<br>    // Like: https://github.com/uiwjs/react-github-corners<br>    corners: {<br>      url: &#39;https://github.com/atdetquizan/vectofy&#39;,<br>      width: 62, // default: 60<br>      height: 62, // default: 60<br>      bgColor: &#39;#dc3545&#39; // default: &#39;#151513&#39;<br>    },<br>    links: [<br>      {<br>        title: &quot;GitHub&quot;,<br>        url: &quot;https://github.com/atdetquizan/vectofy&quot;<br>      },<br>      {<br>        title: &quot;Feedback&quot;,<br>        url: &quot;https://github.com/atdetquizan/vectofy/issues&quot;<br>      },<br>      {<br>        title: &quot;Linkedin&quot;,<br>        url: &quot;https://www.linkedin.com/in/atdetquizan/&quot;<br>      },<br>    ],<br>    footerInfo: `Licensed under MIT. (Yes it&#39;s free and &lt;a href=&quot;https://github.com/atdetquizan/vectofy&quot;&gt;open-sourced&lt;/a&gt;`<br>  }<br>}).then(() =&gt; {<br>  console.log(&#39;done!&#39;);<br>});</pre><ul><li><strong>package.json: </strong>Defines the project’s dependencies, execution scripts, and metadata, such as name, version, and compilation commands.</li></ul><pre>{<br>  &quot;name&quot;: &quot;vectofy-icons&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;scripts&quot;: {<br>    &quot;build&quot;: &quot;node src/generate-icons.mjs&quot;<br>  },<br>  &quot;devDependencies&quot;: {<br>    &quot;svgtofont&quot;: &quot;^1.0.0&quot;<br>  }<br>}</pre><p><strong>Execute source generation: </strong>To generate the font and CSS files, run the following command:</p><pre>npm run build</pre><p>This will create a web source in the public/ folder with the .woff, .ttf, .eot files, as well as a CSS file that will contain the classes to use the icons in your web projects.</p><p>Once the script is executed, you should have an index.html file in the public/ folder that will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*Ivy2DqQQ-25DMZy4fjhACA.png" /></figure><p><strong>Use in a web project: </strong>To use the icons in a web project, simply include the generated CSS file:</p><pre>&lt;link rel=&quot;stylesheet&quot; href=&quot;dist/vectofy.css&quot;&gt;</pre><p>And then use the generated classes for each icon in your HTML:</p><pre>&lt;i class=&quot;vectofy comment-solid&quot;&gt;&lt;/i&gt;<br>&lt;i class=&quot;vectofy heart-solid&quot;&gt;&lt;/i&gt;</pre><blockquote><strong>Conclusions</strong></blockquote><ul><li><strong>Scalability and Flexibility:</strong> By generating a web font from SVG icons, the icons are guaranteed to be scalable without loss of quality. This not only allows the icons to look good on any device and resolution, but also offers great flexibility for use in different web or mobile projects.<br>Ease of Integration: The ability to automatically generate a CSS file that accompanies the fonts makes it easy to integrate the icons into any project. Developers only need to include the generated CSS file to easily use the icons through predefined classes.</li><li><strong>Reuse and Sharing:</strong> This type of project is ideal for creating an icon library that can be reused in multiple projects, or even shared on platforms such as GitHub, allowing other developers to leverage the work done.</li><li><strong>Control over the Design:</strong> By storing and managing the icons in SVG format, designers and developers maintain full control over the design, ensuring that the icons can be easily modified, customized or updated according to the needs of the project.</li></ul><p><a href="https://github.com/atdetquizan/vectofy">GitHub - atdetquizan/vectofy: Base de librería de íconos vectoriales escalables y personalizables</a></p><p><strong><em>I hope these tips help you become more productive! Feel free to ask any questions or request a deep dive into any of these topics. I’m happy to help!</em></strong></p><blockquote><strong><em>If you found this article helpful, make sure to follow me on Medium for more tips and tricks on front-end development and web design!</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6520c004eb3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[La evolución de los microfrontends: de los iFrames a la federación nativa]]></title>
            <link>https://medium.com/@atdetquizan/la-evoluci%C3%B3n-de-los-microfrontends-de-los-iframes-a-la-federaci%C3%B3n-nativa-9aa3aeb3f34f?source=rss-d5500915bce5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9aa3aeb3f34f</guid>
            <category><![CDATA[federation]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[implement-microfrontend]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Anthony Torres Detquizan]]></dc:creator>
            <pubDate>Mon, 09 Sep 2024 00:26:27 GMT</pubDate>
            <atom:updated>2024-09-20T17:46:57.355Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Evolution of Microfrontends: From iFrames to Native Federation</h3><p>Web development has continuously evolved since its inception, and one of the most exciting trends in recent years has been the rise and maturation of microfrontends. This approach has transformed how we build and manage frontend applications, allowing independent teams to work on different parts of an app without interfering with each other. In this article, we will explore the evolution of microfrontends through their most significant milestones, from iFrames to modern solutions like Native Federation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NXxoiE0yLrIakFf_fWOQmg.png" /></figure><h4>1. iFrames (1990s — 2000s)</h4><p>In the early days of the web, reuse and integration of different parts of a web application were limited. <strong>iFrames</strong> emerged in the 1990s as one of the first solutions for embedding content from different sources within a single webpage. iFrames allowed a webpage to insert content from another URL, creating a kind of “window” within the DOM.</p><p>While simple, this approach allowed a degree of independence between different parts of an application, as each iFrame had its own execution context. However, it also came with several limitations:</p><ul><li>The styling and behavior of iFrames were difficult to synchronize with the rest of the page.</li><li>Communication between iFrames was complex and limited.</li><li>Performance issues, especially in terms of loading and rendering.</li></ul><p>Despite these drawbacks, iFrames laid the groundwork for future solutions in microfrontend architecture.</p><h4>2. Custom Elements and Web Components (2013)</h4><p>In 2013, the W3C introduced a game-changing technology: <strong>Web Components</strong>. Within this suite of technologies, <strong>Custom Elements</strong> allowed developers to define their own reusable HTML elements with encapsulated behaviors and styles. Web Components brought significant improvements over iFrames:</p><ul><li><strong>Shadow DOM</strong>: Provided near-total isolation of styles and scripts, avoiding conflicts with other parts of the page.</li><li><strong>Reusability</strong>: Components could be used similarly to native HTML elements.</li><li><strong>Independence</strong>: Each component ran independently, making integration and maintainability easier in large applications.</li></ul><p>Although Web Components weren’t immediately adopted on a large scale, they marked a crucial step toward more modular and reusable frontend development.</p><h4>3. Single-SPA (2015)</h4><p>With the explosion of frontend frameworks like Angular, React, and Vue, developers faced the challenge of integrating multiple frameworks into a single application. This is where <strong>Single-SPA</strong> came in 2015. <strong>Single-SPA</strong> is a framework that enables the integration of multiple frontend applications (often built with different technologies) into a single app, allowing it to be split into multiple “microfrontends.”</p><p>This concept enabled teams to work independently on different parts of an application without being tied to a single framework. Each microfrontend could run inside a shared “container” while managing its own lifecycle. This was a significant breakthrough for organizations with distributed teams working on different technology stacks.</p><h4>4. Module Federation in Webpack 5 (2020)</h4><p>One of the most important advancements for microfrontends came with <strong>Module Federation</strong>, introduced in <strong>Webpack 5</strong> in 2020. Module Federation allows multiple applications to share modules at runtime without needing to bundle all the code into a single build. This solved one of the biggest challenges of microfrontends: dependency management and code reuse.</p><p>Key benefits of Module Federation include:</p><ul><li><strong>Runtime loading</strong>: Modules from different applications can be loaded dynamically, reducing the initial load of the app.</li><li><strong>Shared dependencies</strong>: Applications can share common dependencies, avoiding duplication and improving performance.</li><li><strong>Scalability</strong>: Applications can grow independently, as updates to one part don’t require changes to the rest.</li></ul><p>With Module Federation, the barrier between independent applications and shared modules was eliminated, further solidifying the microfrontend architecture as a robust solution for complex applications.</p><h4>5. Native Federation (2023)</h4><p>Finally, in 2023, we began to see the implementation of what is known as <strong>Native Federation</strong>. Although still in its early stages of adoption, this concept promises to take Module Federation to the next level, integrating it directly into the browser ecosystem without the need for tools like Webpack.</p><p>Native Federation aims to make integration between microfrontends even more efficient by eliminating the need to build multiple apps together or rely on external bundling tools. This aligns with the trend of empowering the browser to handle more capabilities without relying on additional tooling.</p><p>Native Federation offers:</p><ul><li><strong>Reduced complexity</strong>: By eliminating the need for external tools, the development and deployment process becomes simpler.</li><li><strong>Performance improvements</strong>: Since it is handled directly by the browser, Native Federation can offer significant performance boosts.</li><li><strong>Progressive adoption</strong>: Like Web Components, it is expected that Native Federation will grow as browsers and web standards evolve.</li></ul><h3>Final Thoughts: The Future of Microfrontends</h3><p>From rudimentary iFrames to advanced solutions like Native Federation, microfrontends have come a long way. Each new advancement has enabled greater modularity, independence, and scalability in frontend development. With the arrival of technologies like Native Federation, the future looks promising, offering more integrated, efficient, and easy-to-use tools for building modern applications.</p><p>However, like any technology, microfrontends are not a one-size-fits-all solution. The decision to adopt them depends on the size of the application, team structure, and technical requirements. What is clear, though, is that microfrontends will continue to play a crucial role in the web development landscape in the coming years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C0-oxDuzgRHICyz4.png" /></figure><p><strong><em>I hope these tips help you become more productive! Feel free to ask any questions or request a deep dive into any of these topics. I’m happy to help!</em></strong></p><blockquote><strong><em>If you found this article helpful, make sure to follow me on Medium for more tips and tricks on front-end development and web design!</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9aa3aeb3f34f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>