<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: RouCodes_AI</title>
    <description>The latest articles on Forem by RouCodes_AI (@rouaabelhajali).</description>
    <link>https://forem.com/rouaabelhajali</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1070452%2Fca95a610-b93e-4d45-80c4-466c29dd5135.gif</url>
      <title>Forem: RouCodes_AI</title>
      <link>https://forem.com/rouaabelhajali</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/rouaabelhajali"/>
    <language>en</language>
    <item>
      <title>My WebMethods Journey: From Raw Data to Sent EDI – A Step-by-Step Saga</title>
      <dc:creator>RouCodes_AI</dc:creator>
      <pubDate>Mon, 16 Feb 2026 21:46:34 +0000</pubDate>
      <link>https://forem.com/rouaabelhajali/my-webmethods-journey-from-raw-data-to-sent-edi-a-step-by-step-saga-p51</link>
      <guid>https://forem.com/rouaabelhajali/my-webmethods-journey-from-raw-data-to-sent-edi-a-step-by-step-saga-p51</guid>
      <description>&lt;p&gt;Integrating Electronic Data Interchange (EDI) can feel like navigating a complex maze, especially when you're starting out.&lt;br&gt;
I recently embarked on an assignment from my mentors to convert internal data into an EDIFACT file and securely transfer it via SFTP using webMethods Integration Server. &lt;br&gt;
It was a journey of high stakes, hidden errors, and a 48-hour delay that taught me the most important lesson in integration: The Pipeline is King.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Chapter 1: The Starting Line – Building Without a Map
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;From Manual Architect to EDI Expert From Manual Architect to EDI Expert😅​&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The initial stage of this project was a massive hurdle that forced me to level up quickly.&lt;br&gt;
In the flurry of onboarding and the high volume of documentation shared by my mentors, I initially overlooked the specific EDIFACT order specifications.&lt;br&gt;
Without that "north star" guide, I found myself facing a blank canvas with only an SNF file in hand.&lt;/p&gt;

&lt;p&gt;Instead of waiting, I dove into the deep end. I took on the role of an Architect before I ever wrote a line of code. This involved:&lt;/p&gt;

&lt;p&gt;Reverse-Engineering the SNF: I analyzed the raw file structure to understand the data relationships.&lt;/p&gt;

&lt;p&gt;Manual Schema Creation: I built the entire EDI Dictionary and Flat File Schema from scratch, manually defining every segment and element based on my own structural analysis.&lt;/p&gt;

&lt;p&gt;The Hard Way is the Best Way: While the specs were eventually found, this manual "reverse-engineering" phase proved to be a blessing in disguise. It gave me a granular understanding of the EDIFACT conversion process that I never would have gained by simply following a document.&lt;/p&gt;

&lt;p&gt;It was a classic "developer's lesson": sometimes the documents we miss lead us to the insights we need most. Once I finally aligned my custom-built schema with the official specs, the mapping became a precision exercise rather than a guessing game.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkdpt2k6wixa61qealrb5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkdpt2k6wixa61qealrb5.png" alt=" " width="800" height="514"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Chapter 2: The 48-Hour Roadblock – The ffData Trap
&lt;/h2&gt;

&lt;p&gt;My first major struggle came when I tried to use pub.client.sftp:get to retrieve a file from the SFTP server. I kept hitting a wall with a frustrating error: "Pipeline input parameter ffData cannot be null."&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb36xch93289tqi4axzal.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb36xch93289tqi4axzal.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8r1uim2flz19l0uvduwb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8r1uim2flz19l0uvduwb.png" alt=" " width="480" height="481"&gt;&lt;/a&gt;&lt;br&gt;
My screenshot of the "ffData cannot be null" error in the console, with the confused expression.&lt;/p&gt;

&lt;p&gt;I was convinced the two sftp:get services I was testing in my flow were somehow confusing the pipeline, leading to data loss. &lt;br&gt;
I spent nearly 48 hours of intense debugging and stress trying to figure out why the ffData input was coming up empty. It turns out, the issue wasn't the services themselves, but a fundamental misunderstanding of the pipeline flow and mapping.&lt;br&gt;
I wasn't correctly linking the contentStream from the sftp:get output to the subsequent service that needed ffData. A simple detail, overlooked, leading to days of delay 🙄🤭.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1uq9xdviengn6cw1aork.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1uq9xdviengn6cw1aork.png" alt=" " width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Lesson Learned:&lt;/em&gt;&lt;/strong&gt; A single missing or incorrect mapping line in the pipeline can lead to days of delay. Success relies entirely on a deep understanding of the Pipeline and the structured data format you’ve built.&lt;/p&gt;

&lt;h2&gt;
  
  
  **
&lt;/h2&gt;

&lt;p&gt;Chapter 3: The Core Challenge – Converting Data to EDI**&lt;/p&gt;

&lt;p&gt;Once I overcame the ffData roadblock, the next major step was transforming my internal DATA structure into a standard EDIFACT string. I chose wm.b2b.edi:convertToString for this, mapping my custom DATA document directly to the Values input.&lt;/p&gt;

&lt;p&gt;![My screenshot of the "correct data mapping for convertToString"]&lt;/p&gt;

&lt;p&gt;As shown in my mapping screen, I had to ensure the complex hierarchy I built—containing SenderID, ReceiverID, and the detailed HEADER and ITEM loops—was correctly linked so the service could iterate through the data.&lt;/p&gt;

&lt;p&gt;The Struggle with Delimiters:&lt;br&gt;
A subtle but critical point here was the configuration of the service parameters. I had to manually enter the EDItemplate path (e.g., WMEDIFACT.V97A:ORDERS) and the EDI delimiters:&lt;/p&gt;

&lt;p&gt;Segment_terminator: '&lt;/p&gt;

&lt;p&gt;Field_separator: +&lt;/p&gt;

&lt;p&gt;Subfield_separator: :&lt;/p&gt;

&lt;p&gt;If these weren't precisely entered in the properties, the convertToString service would either fail with a technical exception or, worse, produce an empty string that would lead to a 0-byte file on the SFTP server. This was the moment where my self-built schema and dictionary had to precisely align with the EDIFACT standard expectations.&lt;/p&gt;

&lt;p&gt;The Proof of Success: Validating the Output&lt;br&gt;
To ensure the transformation worked, I monitored the pipeline results. Seeing the DemoStatus update to "SUCCESS" and witnessing the structured data successfully populate the Values document was a massive win after the initial mapping struggles.&lt;/p&gt;

&lt;p&gt;![Screenshot of the successful Results screen showing populated EDI Values]&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu50xp9g1dqn80u70gehk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu50xp9g1dqn80u70gehk.png" alt=" " width="800" height="593"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xnk2yr08jxhlyt6x9tp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xnk2yr08jxhlyt6x9tp.png" alt=" " width="800" height="499"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8uqsxv7kycyxumbyhu0s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8uqsxv7kycyxumbyhu0s.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My screenshot of the "correct data mapping for convertToString" (with the green checkmark visual from our previous discussion).&lt;/p&gt;

&lt;p&gt;The Struggle with Delimiters: A subtle but critical point here was ensuring the EDItemplate path (e.g., WMEDIFACT.V97A:ORDERS) and the EDI delimiters (Segment_terminator as ', Field_separator as +, Subfield_separator as :) were manually entered correctly. If these weren't precise, the convertToString service would either fail or produce an empty string, &lt;strong&gt;leading to an empty file later. This was a place where my self-built schema and dictionary had to precisely match the service's expectations.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffw4eo9qvan4g17543p3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffw4eo9qvan4g17543p3p.png" alt=" " width="800" height="576"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgby1zuynacoigaw8pmy3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgby1zuynacoigaw8pmy3.png" alt=" " width="800" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Chapter 4: The Translation Layer – Why stringToBytes?
&lt;/h2&gt;

&lt;p&gt;After convertToString successfully produced my human-readable EDI string, the next step was pub.string:stringToBytes.&lt;br&gt;
During my demo, I was asked: "Why did you use the stringToBytes service instead of converting directly to bytes?"&lt;/p&gt;

&lt;p&gt;The answer is about control, validation, and protocol requirements. &lt;br&gt;
SFTP servers primarily deal in binary data streams, not plain text. &lt;br&gt;
While some webMethods services might attempt an implicit conversion, using stringToBytes provides explicit control over the encoding (e.g., UTF-8) and ensures data integrity.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Matter of Validation
Because I built the Dictionary and Schema manually from an SNF file without a specification, I needed a "safety check".&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Using convertToString first allowed me to verify the EDI segments (like UNB, UNH, and BGM) were structured perfectly while they were still in a readable text format.&lt;/p&gt;

&lt;p&gt;If I had converted directly to bytes, any mapping error would have been hidden inside a binary "blob" that is impossible for a human to read during debugging.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Protocol Requirement&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While we see "text" when we open a file,&lt;br&gt;
SFTP servers move binary data streams.&lt;/p&gt;

&lt;p&gt;The pub.client.sftp:put service specifically requires a contentStream or bytes object to execute the transfer.&lt;/p&gt;

&lt;p&gt;By using stringToBytes, I explicitly controlled the encoding (like UTF-8) to ensure that the special characters in the EDIFACT message wouldn't be corrupted during the move from the Integration Server to the remote host.&lt;/p&gt;

&lt;p&gt;![My mapping of the string output to the bytes input for final SFTP preparation]&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Final Result: "Sweet Success"&lt;/strong&gt;&lt;br&gt;
As you can see in my final Results screen, this logic worked perfectly.&lt;/p&gt;

&lt;p&gt;The contentStream is populated with a byte array ([B@211340e2).&lt;/p&gt;

&lt;p&gt;My DemoStatus confirms: "SUCCESS: EDI File Generated and Sent to SFTP Server".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb2dc61cix08vqtp22c1u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb2dc61cix08vqtp22c1u.png" alt=" " width="800" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faazjht1v0x3otvh37k5x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faazjht1v0x3otvh37k5x.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before wrapping up this journey, I want to give a heartfelt thank‑you to my mentors Jason, Canes Jhon, and Susan for their guidance, patience, and steady support throughout this entire adventure.&lt;/p&gt;

&lt;p&gt;**Stay tuned **a new blog is coming soon,and the next chapter is going to be even more exciting 🚀✨&lt;/p&gt;

</description>
      <category>developer</category>
      <category>sysstemintegration</category>
      <category>webmethods</category>
      <category>b2b</category>
    </item>
    <item>
      <title>The Geolocation API : One Byte Explainer</title>
      <dc:creator>RouCodes_AI</dc:creator>
      <pubDate>Sun, 31 Mar 2024 04:42:19 +0000</pubDate>
      <link>https://forem.com/rouaabelhajali/the-geolocation-api-one-byte-explainer-3k7g</link>
      <guid>https://forem.com/rouaabelhajali/the-geolocation-api-one-byte-explainer-3k7g</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for DEV Challenge v24.03.20, One Byte Explainer: Browser API or Feature.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Explainer
&lt;/h2&gt;

&lt;p&gt;The Geolocation API allows a web page to access the user's geographical location. With user consent, it retrieves latitude and longitude, enabling location-based services like maps and local weather.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Context
&lt;/h2&gt;

&lt;p&gt;Understanding user location enhances user experience by providing relevant local information or services. While powerful, it's vital to use it responsibly, ensuring user privacy and data protection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other Resources
&lt;/h2&gt;

&lt;p&gt;MDN Web Docs on Geolocation API:&lt;br&gt;
This comprehensive guide offers an in-depth look at the Geolocation API, including syntax, examples, and best practices.&lt;br&gt;
MDN Web Docs - Geolocation API &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Team Submissions
&lt;/h2&gt;

&lt;p&gt;Completed this project independently, there are no other team members to credit.&lt;/p&gt;

</description>
      <category>frontendchallenge</category>
      <category>devchallenge</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Unveiling React 19: A Dive into the Game-Changing Features</title>
      <dc:creator>RouCodes_AI</dc:creator>
      <pubDate>Mon, 04 Mar 2024 09:10:32 +0000</pubDate>
      <link>https://forem.com/rouaabelhajali/unveiling-react-19-a-dive-into-the-game-changing-features-3fl8</link>
      <guid>https://forem.com/rouaabelhajali/unveiling-react-19-a-dive-into-the-game-changing-features-3fl8</guid>
      <description>&lt;p&gt;Honestly, I wrote this post while checking out the React 19 documentation to catch up on the latest updates mentioned in the February 2024 blog post on react.dev.&lt;br&gt;
😅&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.pinterest.com/pin/761460249484109811/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;br&gt;
_&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The React Compiler Revolutionizes Development&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Empowering Development with React 19 Actions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Server Components for Enhanced Performance and SEO&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Seamless Asset Loading in React 19&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Introducing Simplified SEO with React 19's Document Metadata&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Web Components&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enhanced Hooks&lt;br&gt;
_&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The React Compiler Revolutionizes Development
&lt;/h2&gt;

&lt;p&gt;At the forefront of React 19 lies the highly anticipated React Compiler, a groundbreaking tool reshaping the landscape of React applications. This revolutionary compiler converts React code into optimized JavaScript during the build process, potentially doubling performance. The React Compiler opens the door to unprecedented efficiency and responsiveness, promising developers remarkable performance gains without compromising speed or productivity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Empowering Development with React 19 Actions
&lt;/h2&gt;

&lt;p&gt;React 19 introduces Actions, a robust abstraction that simplifies data handling and interactions within web pages. Developers can now encapsulate intricate logic into reusable units, fostering modularity and maintainability. Actions decouple UI components from data manipulation, streamlining development workflows and empowering developers to effortlessly create dynamic and interactive user experiences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Server Components for Enhanced Performance and SEO
&lt;/h2&gt;

&lt;p&gt;React 19 takes a bold step towards performance and SEO optimization with the introduction of Server Components. This game-changing feature enables rendering components on the server, significantly accelerating page loads and improving search engine visibility. Server Components mark a substantial advancement in React development, providing developers with a powerful tool to optimize performance and enhance the discoverability of their applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Seamless Asset Loading in React 19
&lt;/h2&gt;

&lt;p&gt;React 19 introduces a seamless asset loading mechanism, allowing images, stylesheets, and scripts to load in the background. By preloading assets, React 19 minimizes latency, facilitating smoother page transitions and elevating the overall user experience. With asset loading, developers can ensure their applications feel responsive and fluid, even in bandwidth-constrained environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing Simplified SEO with React 19's Document Metadata
&lt;/h2&gt;

&lt;p&gt;Discovering web applications becomes a breeze with React 19's Document Metadata feature. Thanks to the  component, developers can easily handle crucial document details like title tags, meta descriptions, and canonical URLs. This straightforward approach to SEO optimization empowers developers to boost their applications' visibility and relevance in search engine results, leading to increased organic traffic and user engagement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Web Components
&lt;/h2&gt;

&lt;p&gt;React 19 extends its support for Web Components,&lt;br&gt;
offering improved compatibility and interoperability for&lt;br&gt;
more flexible development. By seamlessly integrating with&lt;br&gt;
existing Web Components, React 19 empowers&lt;br&gt;
developers to leverage the rich ecosystem of reusable UI&lt;br&gt;
elements, libraries, and frameworks, enabling faster&lt;br&gt;
development cycles and greater code reusability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enhanced Hooks
&lt;/h2&gt;

&lt;p&gt;Building upon the success of React Hooks, React 19&lt;br&gt;
introduces Enhanced Hooks, providing developers with&lt;br&gt;
greater control over component lifecycle and state&lt;br&gt;
management. With Enhanced Hooks, developers can finetune the behavior of components, optimize performance,&lt;br&gt;
and build more scalable and maintainable applications.&lt;br&gt;
Whether it's managing side effects, handling asynchronous&lt;br&gt;
operations, or orchestrating complex state transitions,&lt;br&gt;
Enhanced Hooks offer a powerful mechanism for building&lt;br&gt;
robust and efficient React applications**&lt;/p&gt;

</description>
      <category>programming</category>
      <category>react</category>
      <category>discuss</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Build a Machine Learning Model for Image Classification with Node.js and Hugging Face in Just 3 Lines of Code.</title>
      <dc:creator>RouCodes_AI</dc:creator>
      <pubDate>Wed, 14 Feb 2024 23:59:07 +0000</pubDate>
      <link>https://forem.com/rouaabelhajali/build-a-machine-learning-model-for-image-classification-with-nodejs-and-hugging-face-in-just-3-lines-of-code-4hbk</link>
      <guid>https://forem.com/rouaabelhajali/build-a-machine-learning-model-for-image-classification-with-nodejs-and-hugging-face-in-just-3-lines-of-code-4hbk</guid>
      <description>&lt;p&gt;Hello dev.Community! 👋 In this post, I'll guide you through the process of image classification using JavaScript with the assistance of Hugging Face AI Models.&lt;/p&gt;

&lt;p&gt;First and foremost, let's select a random image online and download it. For example, I came across this picture during a quick Google search. Once we have our chosen image, let's open Visual Studio Code (VSCode) and initiate our Node.js project by executing the following command in the terminal:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foyfpp03aly6mpoamaw75.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foyfpp03aly6mpoamaw75.PNG" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After running this command, a package.json file will be generated.&lt;/p&gt;

&lt;p&gt;Now, let's get down to business and install our Hugging Face model. If you're not familiar with &lt;/p&gt;

&lt;h2&gt;
  
  
  Hugging Face
&lt;/h2&gt;

&lt;p&gt;It's a company renowned for its Natural Language Processing (NLP) platform and an extensive open-source community that offers various pre-trained models, including transformers for tasks like text generation, translation, and sentiment analysis.&lt;/p&gt;

&lt;p&gt;To install our specific model, Xenova/transformers.js, use the following terminal command:*&lt;/p&gt;

&lt;p&gt;Xenova/transformers.js&lt;br&gt;
with this command in terminal: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9o8wkkia8mxllq5iovpq.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9o8wkkia8mxllq5iovpq.PNG" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To install our specific model, Xenova/transformers.js, use the following terminal command:&lt;/p&gt;

&lt;p&gt;npm install Xenova/transformers.js --save&lt;br&gt;
Upon installing the model, a dependency entry will be added to the package.json file, as depicted below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0gv7bjawscyst6sm9b7h.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0gv7bjawscyst6sm9b7h.PNG" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, modify the package.json by adding "type": "module" because we want to leverage ES6 features.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhcufu49msj8r0h3uz9lz.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhcufu49msj8r0h3uz9lz.PNG" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next step we create an index.js file in our project folder , you need to write these lines of code : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9id1fznvoral6vdvkk0h.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9id1fznvoral6vdvkk0h.PNG" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
Here we imported pipeline from Xenova/transformers.js then initialize a pipe to use with an async function to tell what this pipeline is for also the task we want to accomplish is we want to make an image classification , you can specify also a specific model you want to use but here in this post we just stick with the  default one cause it will quicker to download , we declared also a const called result so we can process an image so we need to provide an absolute path for the image,finally we just console.log  the result. &lt;/p&gt;

&lt;p&gt;Run Node index in terminal :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdbg02gfs5uzzotvtsu96.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdbg02gfs5uzzotvtsu96.PNG" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So as shown in terminal label it tell us that is a lion king and a score of possibiliy with a high percantage 99% but if we want our result to be more accurate add the option topk:6 to the result constant.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcw9z60wxrky5m9ilvl42.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcw9z60wxrky5m9ilvl42.PNG" alt=" " width="800" height="400"&gt;&lt;/a&gt; here it shows other labels with 0% percantage so defiently it is a lion &lt;br&gt;
🦁!    &lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>learning</category>
      <category>javascript</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
