The big ball of mud!

67
Nacho Fanjul #4sessions 25 - Febrero The big ball of mu

Transcript of The big ball of mud!

Page 1: The big ball of mud!

Nacho Fanjul

#4sessions25 - Febrero

The big ball of mud!

Page 2: The big ball of mud!

Lenguaje

introducción

Es un sistema de comunicación estructurado para el que existe un Contexto de uso y ciertos principios combinatorios formales.

Page 3: The big ball of mud!

Tal día como hoy…

introducción

Page 4: The big ball of mud!

introducción

… 6 meses después...

Page 5: The big ball of mud!
Page 6: The big ball of mud!

Nacho FanjulKey Developer

@[email protected]@

Page 7: The big ball of mud!

Agenda08:30 am

09:00 – 12:00 am 12:00 – 02:00 PM 02:00 – 03:00 Pm 03:30 Pm 04:00 pm 04:30 – 06:00 pm 06:00 pm Conclusiones

– Cup of coffee time!– Architecture– Code– lunch time!– Testing– Javascript– API– The end!

Page 8: The big ball of mud!

Cup of coffee time!

08:30 AM

Page 9: The big ball of mud!

Cup of coffee time!

08:30 AM

Page 10: The big ball of mud!

Cup of coffee time!

08:30 AM

Page 11: The big ball of mud!

09:00 AM

Architecture

Capa presentación WEB API APP

Page 12: The big ball of mud!

09:00 AM

Architecture

Capa presentación WEB API APP

Application Service Logic Entitie

s

Page 13: The big ball of mud!

09:00 AM

Architecture

Capa presentación WEB API APP

Application

Infrastructure BD Agents Files

Service Logic Entitie

s

Page 14: The big ball of mud!

09:00 AM

Architecture

Capa presentación WEB API APP

Application

Infrastructure BD Agents Files

Service Logic Entitie

s

Crosscutting

Const Enum

Page 15: The big ball of mud!

09:30 AM

Show me the architecture

Page 16: The big ball of mud!

09:30 AM

Show me the architecture

Page 17: The big ball of mud!

09:30 AM

Show me the architecture

Page 18: The big ball of mud!

09:30 AM

Show me the architecture

Page 19: The big ball of mud!

09:30 AM

Show me the architecture

Page 20: The big ball of mud!
Page 21: The big ball of mud!

10:00 AM

Patterns

• Soluciones a problemas ya típicos y recurrentes• Vocabulario común• Estandarizar• Facilitar el aprendizaje y desarrollo• Evitar reiteración

Page 22: The big ball of mud!

10:00 AM

Patterns

MVC

Decorator

Factory

Facade

Unit Of Work Repository

Page 23: The big ball of mud!

10:30 AM

Polymorphism

Una misma operación, distintos tipos de objetos

Page 24: The big ball of mud!

10:30 AM

Polymorphism

Una misma operación, distintos tipos de objetos

Page 25: The big ball of mud!

10:30 AM

Polymorphism

Una misma operación, distintos tipos de objetos

Page 26: The big ball of mud!

10:30 AM

Polymorphism

Una misma operación, distintos tipos de objetos

Page 27: The big ball of mud!

10:30 AM

Polymorphism

Una misma operación, distintos tipos de objetos

Page 28: The big ball of mud!

11:00 AM

Almuerzo time!

Page 29: The big ball of mud!

11:00 AM

Almuerzo time!

Page 30: The big ball of mud!

11:30 AM

Abstraction

Separar el comportamiento especifico de un objeto, método o clase.

• Clases base (Herencia)• Métodos • Evitar acoplamientos• …

Page 31: The big ball of mud!

11:30 AM

Abstraction

Separar el comportamiento especifico de un objeto, método o clase.

• Clases base (Herencia)• Métodos • Evitar acoplamientos• …

Page 32: The big ball of mud!

12:00 PM

In my code (I)

• Scrolling• Naming• Use objects• Comments

Page 33: The big ball of mud!

12:00 PM

In my code (I)

• Scrolling• Naming• Use objects• Comments

Page 34: The big ball of mud!

12:00 PM

In my code (I)

• Scrolling• Naming• Use objects• Comments

Page 35: The big ball of mud!

12:00 PM

In my code (I)

• Scrolling• Naming• Use objects• Comments

Page 36: The big ball of mud!

12:00 PM

In my code (I)

• Scrolling• Naming• Use objects• Comments

Page 37: The big ball of mud!

12:00 PM

In my code (I)

• Scrolling• Naming• Use objects• Comments

Page 38: The big ball of mud!

12:30 PM

In my code (II)

• If Else…• Constants• Configurable• Logs

Page 39: The big ball of mud!

12:30 PM

In my code (II)

• If Else…• Constants• Configurable• Logs

Page 40: The big ball of mud!

12:30 PM

In my code (II)

• If Else…• Constants• Configurable• Logs

Page 41: The big ball of mud!

12:30 PM

In my code (II)

• If Else…• Constants• Configurable• Logs

Page 42: The big ball of mud!

12:30 PM

In my code (II)

• If Else…• Constants• Configurable• Logs

Page 43: The big ball of mud!

01:00 PM

Extensions

Extendamos nuestros objetos y dotémoslos de funcionalidad.

• ToString();• ToList();• Toxxxxx();• …

Page 44: The big ball of mud!

01:00 PM

Extensions

Extendamos nuestros objetos y dotémoslos de funcionalidad.

• ToString();• ToList();• Toxxxxx();• …

Page 45: The big ball of mud!

01:00 PM

Extensions

Extendamos nuestros objetos y dotémoslos de funcionalidad.

• ToString();• ToList();• Toxxxxx();• …

Page 46: The big ball of mud!

01:00 PM

Extensions

Extendamos nuestros objetos y dotémoslos de funcionalidad.

• ToString();• ToList();• Toxxxxx();• …

Page 47: The big ball of mud!

01:30 PM

Generics

Clases base con parámetros genéricospara su reutilización.

Page 48: The big ball of mud!

Lunch Time!

02:00-03:00 PM

Page 49: The big ball of mud!

03:30 PM

Testing

Un minuto “perdido” haciendo un test, son horas GANADAS en resolución de bugs!

Page 50: The big ball of mud!

03:30 PM

Testing

Un minuto “perdido” haciendo un test, son horas GANADAS en resolución de bugs!

• Nombres descriptivos• 1 test => 1 funcionalidad• Simple

• UnitTest != IntegracionTest• Uso de Mocks

Page 51: The big ball of mud!

Javascript

04:00 PM

• Modular• Estructurado• Herencia• Métodos públicos• Métodos privados

Llego donde pocos lenguajes llegan y

dentro del “caos”, yo soy el REY.

Page 52: The big ball of mud!

Javascript

04:00 PM

• Modular• Estructurado• Herencia• Métodos públicos• Métodos privados

Llego donde pocos lenguajes llegan y

dentro del “caos”, yo soy el REY.

Page 53: The big ball of mud!

Javascript

04:00 PM

• Modular• Estructurado• Herencia• Métodos públicos• Métodos privados

Llego donde pocos lenguajes llegan y

dentro del “caos”, yo soy el REY.

Page 54: The big ball of mud!

Javascript

04:00 PM

• Modular• Estructurado• Herencia• Métodos públicos• Métodos privados

Llego donde pocos lenguajes llegan y

dentro del “caos”, yo soy el REY.

Page 55: The big ball of mud!

Javascript

04:00 PM

• Modular• Estructurado• Herencia• Métodos públicos• Métodos privados

Llego donde pocos lenguajes llegan y

dentro del “caos”, yo soy el REY.

Page 56: The big ball of mud!

Javascript

04:00 PM

• Modular• Estructurado• Herencia• Métodos públicos• Métodos privados

Llego donde pocos lenguajes llegan y

dentro del “caos”, yo soy el REY.

Page 57: The big ball of mud!

API

04:30 PM

Llámame, y yo te respondo!

Page 58: The big ball of mud!

Implement API

05:00 PM

• Simple• Verbos• Retornos adecuados

Respetando voy, respetando vengo…

Page 59: The big ball of mud!

Implement API

05:00 PM

• Simple• Verbos• Retornos adecuados

Respetando voy, respetando vengo…

Page 60: The big ball of mud!

Implement API

05:00 PM

• Simple• Verbos• Retornos

adecuados

Respetando voy, respetando vengo…

Page 61: The big ball of mud!

Diogenes syndrome

05:30 PM

Page 62: The big ball of mud!

Diogenes syndrome

05:30 PM

Page 63: The big ball of mud!

The end!!

06:00 PM

Page 64: The big ball of mud!

"Programa como si supieses que quien va a mantener tu código, es un psicópata con

tendencias violentas que sabe donde vives"

conclusiones

Page 65: The big ball of mud!

"Programa como si supieses que quien va a mantener tu código, es un psicópata con

tendencias violentas que sabe donde vives"

conclusiones

Page 66: The big ball of mud!

Q&ANacho Fanjul @nfanjul

[email protected]@

Page 67: The big ball of mud!