<?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>DEV Community: Derek Rosenzweig</title>
    <description>The latest articles on DEV Community by Derek Rosenzweig (@ozzyogkush).</description>
    <link>https://dev.to/ozzyogkush</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%2F22907%2F9e73c454-d6ba-4f39-8cb9-0e093aa9d7db.jpg</url>
      <title>DEV Community: Derek Rosenzweig</title>
      <link>https://dev.to/ozzyogkush</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ozzyogkush"/>
    <language>en</language>
    <item>
      <title>Rule-Based HTML Form Validation with Formation</title>
      <dc:creator>Derek Rosenzweig</dc:creator>
      <pubDate>Tue, 24 Jul 2018 01:17:23 +0000</pubDate>
      <link>https://dev.to/ozzyogkush/rule-based-html-form-validation-with-formation-3bfh</link>
      <guid>https://dev.to/ozzyogkush/rule-based-html-form-validation-with-formation-3bfh</guid>
      <description>

&lt;p&gt;Even for relatively simple projects, consistent client-side form validation can get tedious. To that end a while ago I wrote a library called &lt;a href="http://ozzyogkush.github.io/formation/"&gt;Formation&lt;/a&gt; (available on NPM at &lt;a href="https://www.npmjs.com/package/js-formation"&gt;https://www.npmjs.com/package/js-formation&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;I was inspired by Bootstrap and how you can simply add &lt;code&gt;data-&lt;/code&gt; attributes to your DOM nodes, add the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag, and let the library see and react. This lets the developer use the code without having to know JavaScript, while providing a simple API for hooking into registered changes. Formation allows developers to validate forms based on text inputs, checkboxes/groups, radio button groups, and select boxes. Developers can add handlers to listen to field and/or form validation state changes, and add custom rules and apply them to many fields. &lt;a href="http://ozzyogkush.github.io/formation/examples/text-inputs"&gt;See a live example for text-based input&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Currently it enforces a submit button, but that's a choice based on an early opinionated viewpoint that I will likely modify.&lt;/p&gt;

&lt;p&gt;This was originally designed with jQuery and raw DOM manipulation in mind, and I have since removed jQuery from the equation as ultimately it was unnecessary. Nowadays, stateful view libraries like React and Vue are the norm, and manual DOM manipulation is less of a thing. So, in the near future I'll be working to extract out the validation and rules engines from the DOM traversal/manipulation side, so that this can be extended easily to 3rd party libraries like React and Vue. It also makes it possible to re-use the rules/validators engines server-side form submission handling (in projects running a Node backend of course).&lt;/p&gt;

&lt;p&gt;For basic web projects that don't require the overhead of something like React, but need to let users input and submit data, this can save a lot of time and energy. More often than not, when building some piece of code, a well-maintained module/package/library exists which can and should be re-used. I'd like to think Formation would get to the level where it's in common use. Only time will tell!&lt;/p&gt;

&lt;p&gt;This is an open source project and I would welcome contributors! Check it out on github: &lt;a href="https://github.com/ozzyogkush/formation/"&gt;https://github.com/ozzyogkush/formation/&lt;/a&gt;&lt;/p&gt;


</description>
      <category>javascript</category>
      <category>forms</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Poll: Helpful or Annoying - Fixed Position Video Players on Page Scroll</title>
      <dc:creator>Derek Rosenzweig</dc:creator>
      <pubDate>Fri, 17 Nov 2017 21:18:50 +0000</pubDate>
      <link>https://dev.to/ozzyogkush/poll-helpful-or-annoying---fixed-position-video-players-on-page-scroll-7ef</link>
      <guid>https://dev.to/ozzyogkush/poll-helpful-or-annoying---fixed-position-video-players-on-page-scroll-7ef</guid>
      <description>

&lt;p&gt;This is less of a post for developers, more of a question for consumers - ie individuals visiting websites for content articles, which happen to show videos. &lt;/p&gt;

&lt;p&gt;We've all been there. You see a link to an article you want to read so you click it, and the page loads. You start scrolling to get past the enormous header ads and read the content, and a video starts playing. It then re-positions itself (ie its CSS changes to &lt;code&gt;position:fixed&lt;/code&gt;) and resizes to be always visible in a rail,  and stays there while you scroll the article. The question is:&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;&lt;div class="ltag__twitter-tweet__main"&gt;
&lt;div class="ltag__twitter-tweet__header"&gt;
&lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--kKcmQ39i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/922356872472010752/aRQTSKBw_normal.jpg"&gt;&lt;div class="ltag__twitter-tweet__full-name"&gt;Derek Rosenzweig&lt;/div&gt;
&lt;div class="ltag__twitter-tweet__username"&gt;@ozzyogkush&lt;/div&gt;
&lt;div class="ltag__twitter-tweet__twitter-logo"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kX-SksTr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-eb8b335b75231c6443385ac04fdfcaed8ca5423c3990e89dc0178a4090ac1908.svg"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ltag__twitter-tweet__body"&gt;Question for my fellow interneters - does anyone actually *like* it when you're visiting a web page (news or blog a… &lt;a href="https://t.co/oIQ4VHOaAS"&gt;twitter.com/i/web/status/9…&lt;/a&gt;
&lt;/div&gt;
&lt;div class="ltag__twitter-tweet__date"&gt;16:27 PM - 17 Nov 2017&lt;/div&gt;
&lt;div class="ltag__twitter-tweet__actions"&gt;
&lt;a href="https://twitter.com/intent/tweet?in_reply_to=931559320743014401" class="ltag__twitter-tweet__actions__button"&gt;&lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;&lt;/a&gt;&lt;a href="https://twitter.com/intent/retweet?tweet_id=931559320743014401" class="ltag__twitter-tweet__actions__button"&gt;&lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;&lt;/a&gt;0&lt;a href="https://twitter.com/intent/like?tweet_id=931559320743014401" class="ltag__twitter-tweet__actions__button"&gt;&lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;&lt;/a&gt;0&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;

&lt;p&gt;Do you generally like this behavior? What does your own site's user actions/experience tell us? Is it a trend that should continue, or that should go away? Take the poll above, leave your responses below! &lt;/p&gt;


</description>
      <category>ux</category>
      <category>webdesign</category>
      <category>discuss</category>
      <category>videos</category>
    </item>
  </channel>
</rss>
