Librería Portfolio Librería Portfolio

Búsqueda avanzada

TIENE EN SU CESTA DE LA COMPRA

0 productos

en total 0,00 €

REFACTORING JAVASCRIPT. TURNING BAD CODE INTO GOOD CODE
Título:
REFACTORING JAVASCRIPT. TURNING BAD CODE INTO GOOD CODE
Subtítulo:
Autor:
BURCHARD, E
Editorial:
O´REILLY
Año de edición:
2017
Materia
PROGRAMACION INTERNET
ISBN:
978-1-4919-6492-7
Páginas:
442
47,95 €

 

Sinopsis

How often do you hear people say things like this? ´Our JavaScript is a mess, but we're thinking about using [framework of the month].´

Like it or not, JavaScript is not going away. No matter what framework or öcompiles-to-jsö language or library you use, bugs and performance concerns will always be an issue if the underlying quality of your JavaScript is poor. Rewrites, including porting to the framework of the month, are terribly expensive and unpredictable. The bugs won't magically go away, and can happily reproduce themselves in a new context. To complicate things further, features will get dropped, at least temporarily.

The other popular method of fixing your JS is playing "JavaScript Jenga,ö where each developer slowly and carefully takes their best guess at how the out-of-control system can be altered to allow for new features, hoping that this doesn't bring the whole stack of blocks down. This book provides clear guidance on how best to avoid these pathological approaches to writing JavaScript:

Recognize you have a problem with your JavaScript quality.
Forgive the code you have now, and the developers who made it.
Learn repeatable, memorable, and time-saving refactoring techniques.
Apply these techniques as you work, fixing things along the way.
Internalize these techniques, and avoid writing as much problematic code to begin with.
Bad code doesn't have to stay that way. And making it better doesn't have to be intimidating or unreasonably expensive.



Chapter 1What Is Refactoring?
How Can You Guarantee Behavior Doesn't Change?
What Is the Point of Refactoring if Behavior Doesn't Change?
What Is and Isn't Refactoring
Wrapping Up
Chapter 2Which JavaScript Are You Using?
Versions and Specifications
Platforms and Implementations
Precompiled Languages
Frameworks
Libraries
What JavaScript Do You Need?
What JavaScript Are We Using?
Wrapping Up
Chapter 3Testing
The Many Whys of Testing
The Many Ways of Testing
Tools and Processes
Wrapping Up
Chapter 4Testing in Action
New Code from Scratch
New Code from Scratch with TDD
Untested Code and Characterization Tests
Debugging and Regression Tests
Wrapping Up
Chapter 5Basic Refactoring Goals
Function Bulk
Inputs
Outputs
Side Effects
Context Part 1: The Implicit Input
Context Part 2: Privacy
Wrapping Up
Chapter 6Refactoring Simple Structures
The Code
Our Strategy for Confidence
Renaming Things
Useless Code
Variables
Strings
Working with Arrays: Loops, forEach, map
Wrapping Up
Chapter 7Refactoring Functions and Objects
The Code (Improved)
Array and Object Alternatives
Testing What We Have
Extracting Functions
Streamlining the API with One Global Object
Wrapping Up
Chapter 8Refactoring Within a Hierarchy
About "CRUD Appsö and Frameworks
Let's Build a Hierarchy
Let's Wreck Our Hierarchy
Inheritance and Architecture
Has-A Relationships
Inheritance Antipatterns
Wrapping Up
Chapter 9Refactoring to OOP Patterns
Template Method
Strategy
State
null Object
Wrapper (Decorator and Adapter)
Facade
Wrapping Up
Chapter 10Asynchronous Refactoring
Why Async?
Fixing the Pyramid of Doom
Callbacks and Testing
Promises
Wrapping Up
Chapter 11Functional Refactoring
The Restrictions and Benefits of Functional Programming
The Basics
Advanced Basics
Burritos
Learning and Using Burritos
Moving from OOP to FP
Wrapping Up
Chapter 12Conclusion
Appendix Further Reading and Resources
Origins of Refactoring
Baseline JavaScript(s)
Keeping Up with JavaScript
JavaScript Reference
Object-Oriented Programs/Patterns (Including Anticlass Stances)
Async
Functional
Tools
Non-JS-Specific but Relevant Sources
Me