Custom Data Scripting

This is just the name I like to call for the way I write my javascript. Which looks at the dom for configuration rather than in a script file or some api. This is a style of javascript that allows non-javascript developers to jump in if they can read basic html elements. There are many reasons why I use this approach other than the other two. For example to minimizing the overall javascript code which simplifies the website. I took this approach up because of what I learned with Aspnet razor syntax. Later made improvements to the style once I learned anguar/react (components).
  Now I don't not what other developers call this style or if they even acknowledge this pattern. I'm giving it a name cause I need a way to define it. Plus its easily explain to other developers where to look for with my code. The goal here is to always look at the Dom for something and if I need more complex stuff then place it in a object. However I could always argue that one could go back and makeup a new tag and simplify the settings. Some docs might be required but good names for your component help. For example <carasuel img="3" time="300"></carasuel>  beat that's easy to get. The point is that my code could be written in an js framework but the approach doesn't change.

Popular posts from this blog

Updating Razor 2.0 to 3.0 with Asp.net MVC

EF: The database cannot be opened because it is version 782

HTML5 Audio doesn't Autoplay for Chrome on Android