Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What if I don't need a JavaScript Framework?

What if I don't need a JavaScript Framework?

Do a quick read on Twitter or visit a leading front-end development site and you are sure to find an article, tutorial or screencast series teaching you all about the wonders of Angular, Ember, React, or the next hot MV* library or framework.

What happens if you don’t need, or are unable to use, that full or robust of a solution? What are the rest of us to do? Cobble together poor implementations using these approaches because that’s what everyone else is doing? No!

This talk will explore the options you can consider if you don’t need a full-fledged MV* library, and why considering one may still be an option.

Vernon Kesner

May 07, 2016
Tweet

More Decks by Vernon Kesner

Other Decks in Programming

Transcript

  1. WHAT IF I DON’T NEED A JAVASCRIPT FRAMEWORK? @vernonk Vernon

    Kesner Front-End Architect, Ally Financial Slides: http://bit.ly/syntaxcon-js
  2. HI THERE, I’M VERNON. • Some people call me "Vern",

    that's cool. • Worked full-time on the web since 2002. Wow, so much has happened. • Front-End Architect at Ally Financial • Husband, father of 3 awesome "kids”
  3. QUICK DISCLAIMER This will not be a session about "why

    you don't need jQuery" or a talk that bashes one library or tool over another. I have my preferences, just like you do. This is one of the beautiful and wonderful things about our industry. We can approach the same problem from many directions, and still solve it elegantly. What this talk is not
  4. IN A NUTSHELL… “What are some things I can do

    – outside of using a library – that can help make sure my code is maintainable and reusable?”
  5. “These people have a busy job, and they want to

    make it work. Often they have to cut corners. In many other cases they rely on massive libraries and frameworks that promise magical solutions. This leads to products that are in a working state, and not in an enjoyable state.” https://www.christianheilmann.com/2015/01/29/on-towards-my-next-challenge-2/ - Christian Heilmann
  6. “These people have a busy job, and they want to

    make it work. Often they have to cut corners. In many other cases they rely on massive libraries and frameworks that promise magical solutions. This leads to products that are in a working state, and not in an enjoyable state.” https://www.christianheilmann.com/2015/01/29/on-towards-my-next-challenge-2/ - Christian Heilmann
  7. “These people have a busy job, and they want to

    make it work. Often they have to cut corners. In many other cases they rely on massive libraries and frameworks that promise magical solutions. This leads to products that are in a working state, and not in an enjoyable state.” https://www.christianheilmann.com/2015/01/29/on-towards-my-next-challenge-2/ - Christian Heilmann
  8. “These people have a busy job, and they want to

    make it work. Often they have to cut corners. In many other cases they rely on massive libraries and frameworks that promise magical solutions. This leads to products that are in a working state, and not in an enjoyable state.” https://www.christianheilmann.com/2015/01/29/on-towards-my-next-challenge-2/ - Christian Heilmann
  9. “These people have a busy job, and they want to

    make it work. Often they have to cut corners. In many other cases they rely on massive libraries and frameworks that promise magical solutions. This leads to products that are in a working state, and not in an enjoyable state.” https://www.christianheilmann.com/2015/01/29/on-towards-my-next-challenge-2/ - Christian Heilmann
  10. “These people have a busy job, and they want to

    make it work. Often they have to cut corners. In many other cases they rely on massive libraries and frameworks that promise magical solutions. This leads to products that are in a working state, and not in an enjoyable state.” https://www.christianheilmann.com/2015/01/29/on-towards-my-next-challenge-2/ - Christian Heilmann
  11. “These people have a busy job, and they want to

    make it work. Often they have to cut corners. In many other cases they rely on massive libraries and frameworks that promise magical solutions. This leads to products that are in a working state, and not in an enjoyable state.” https://www.christianheilmann.com/2015/01/29/on-towards-my-next-challenge-2/ - Christian Heilmann
  12. “These people have a busy job, and they want to

    make it work. Often they have to cut corners. In many other cases they rely on massive libraries and frameworks that promise magical solutions. This leads to products that are in a working state, and not in an enjoyable state.” https://www.christianheilmann.com/2015/01/29/on-towards-my-next-challenge-2/ - Christian Heilmann
  13. We should be focused on what makes our teams -

    and ourselves - most fulfilled, productive, and open to innovation.
  14. SO WHAT DOES THAT MEAN? For Front-End Engineering teams, it

    highlights 3 major areas: 1. Long-Life Code 2. Scalable and Understandable Workflows, Processes, and Tools 3. Clear Architecture and Direction
  15. WHO ARE WE? Ben works in an organization that just

    isn’t able to use a full-blown tool like Angular or Ember.
  16. Penny manages content focused sites, has a primary focus on

    performance, and wants to keep things as light as possible. WHO ARE WE?
  17. WHO ARE WE? Tim just doesn’t get behind the “pick

    a library” approach. He knows that libraries come and go, he’s worried about building something that lasts.
  18. WHAT WE’LL ACCOMPLISH TODAY • Take a look at how

    we can gain structure in our code, without the requirement of a library. • Look at examples of reusable patterns, that can potentially give you some ideas to potentially leverage and build on. • We’ll look at source code examples from popular Open Source libraries, to see how they create reusable products. • Look at a few action items you can go away with.
  19. STRUCTURE WITHOUT A LIBRARY •ES2015 (ES6) Class and Module Syntax

    •Prototypes •Module pattern •Revealing module pattern
  20. LET’S LOOK AT EX AMPLES OF THESE PATTERNS, AND THEN

    SEE HOW THEY MAY BE USED IN A FEW POPUL AR LIBRARIES. THESE EXAMPLES WILL GIVE YOU A FEEL FOR PATTERNS YOU WOULD LIKE TO EXPLORE FURTHER.
  21. jQUERY Reference: http://bit.ly/jquery-boilerplate, http://bit.ly/tooltipster jQuery Plugins are actually methods on

    jQuery’s prototype. $.fn[ pluginName ] is the convention used to create a common plugin that is available as a jQuery object method. e.g. $( “.mything” ).myFancyPlugin(); $.fn is an alias to jQuery.prototype Plugin Interface
  22. THE IDEA IS TO USE REPEATABLE AND CONSISTENT PATTERNS THAT

    BEST FIT YOUR WORKFLOW AND ENVIRONMENT
  23. WHAT CAN I DO TODAY? Let’s take a look at

    a 5 things you can do, starting today: 1. Decide a clear point where the shift will happen. It is possible to move to more maintainable patterns and support legacy code. 2. For each new project you look at, dedicate a particular focus to looking at particular areas of reusability. 3. If you aren’t, look at tooling and workflow. Using ES2015 at this point, mostly makes it a requirement. Look into Babel, Webpack or Browserify (Webpack if you can handle the curve), Gulp, Grunt. 4. Whiteboard or list what you need vs. what is nice to have. 5. Choose something and stick to it (unless it’s obviously bad).
  24. THANK YOU! QUESTIONS? I ’ M H A P P

    Y TO TA L K M O R E A B O U T T H I S S T U F F W I T H A N YO N E A F T E RWA R D S O R W H I L E W E ’ R E H E R E , J U S T G R A B M E . @vernonk