Slide 1

Slide 1 text

JS & Software Engineering Mohammed Cherif Bouchelaghem

Slide 2

Slide 2 text

Cherif BOUCHELAGHEM Twitter: @cherif_b Github: cherifGsoul Software developer consultant at Bitovi CanJS core team member

Slide 3

Slide 3 text

Agenda - What is software engineering? - Why software engineering? - How to do software engineering? - Discovery & Learning - Design - Production - Algorithm and Data structures - Programming paradigms and languages - Tools - Architectural patterns - Questions - References

Slide 4

Slide 4 text

Jargon Alert and boring presentation

Slide 5

Slide 5 text

What is software engineering?

Slide 6

Slide 6 text

What is software engineering? “Engineering is the Application of empirical, scientific approach to finding efficient, economic solutions to practical problems” - Dave Farley

Slide 7

Slide 7 text

What is software engineering? Software engineering is about how to compose small pieces into bigger pieces: ➔ Compose software from components ➔ Compose components from classes/modules ➔ Compose classes/modules from properties/data structures and methods/functions ➔ Write code using function and data structures

Slide 8

Slide 8 text

What is software engineering? “Software Engineering is an exercise in Discovery, Learning and Design ” - Dave Farley

Slide 9

Slide 9 text

Why software engineering?

Slide 10

Slide 10 text

Why software engineering? - Because it is fun and sheer joy of making things. - The pleasure of making things that help people. - For the fascination fashioning puzzle-like objects of interlocking moving parts and watch them work in subtle cycles.

Slide 11

Slide 11 text

How to do software engineering IMO, the following steps are mandatory for software engineering: - Discover - Learning - Design - … - Production

Slide 12

Slide 12 text

Discovery & Learning

Slide 13

Slide 13 text

Discovery & Learning - Domain-Driven Design (DDDesign) strategic patterns(knowledge crunching, ubiquitous language, …) a design discipline where you - Grasp the domain - Agree on a language - Express it in shared models - Embrace complexity - Separate models in contexts - … and evolve them continuously -

Slide 14

Slide 14 text

Discovery & Learning - Test-Driven Development (TDD), is a technique for building software that guides software development by writing tests. It was developed by Kent Beck in the late 1990's as part of Extreme Programming. In essence you follow three simple steps repeatedly: - Write a test for the next bit of functionality you want to add. - Write the functional code until the test passes. - Refactor both new and old code to make it well structured.

Slide 15

Slide 15 text

Discovery & Learning - Behavior Driven-Development (BDD), Using examples in conversation to illustrate behaviour, the conversation about the examples involves Product Owner (a stakeholder), Tester and the developer.

Slide 16

Slide 16 text

Design

Slide 17

Slide 17 text

Design - Business Logic Implementation Patterns: - Transaction Script - Domain-Driven Design (DDDesign) Tactical Patterns: - Bounded-Context - Entities - Value Objects - Aggregates - Repositories - Domain Events - Domain Services - Domain Factories

Slide 18

Slide 18 text

Design - Modularity for decoupling - Modules Code Design Principles - Don’t Repeat Yourself (DRY) - Keep It Simple and Stupid/Smart (KISS) - You Ain’t Gonna need it (YAGNI) - Design Pattern (GoF patterns) - SOLID Principles - Single Responsibility Principle (SRP) - Open-Closed Principle (OCP) - Liskov Substitution Principle (LSP) - Interface Segregation Principle (ISP) - Dependency Inversion Principle (DIP)

Slide 19

Slide 19 text

Design - Modularity for decoupling - Modules Code Design Principles - CUPID - Composable: plays well with others - Unix philosophy: does one thing well - Predictable: does what you expect - Idiomatic: feels natural - Domain-based: the solution domain models the problem domain in language and structure Source

Slide 20

Slide 20 text

Design - Components Principles for coupling management - Component Cohesion Principles: - The Reuse/Release Equivalence Principle (REP) - The Common Closure Principle (CCP) - The Common Reuse Principle (CRP) - Coupling between Components: - The Acyclic Dependencies Principle (ADP) - The Stable-Dependency Principle (SDP) - The Stable-Abstractions Principle (SAP) - Bounded-Context integration patterns - Microservices integration patterns

Slide 21

Slide 21 text

Production

Slide 22

Slide 22 text

Production- Data Structures and Algorithms - Array - Maps (Hahmaps) - Heap - Stack - Lists - Linked lists - Graph - Sorting - Dynamic Programming - …

Slide 23

Slide 23 text

Production- Programming Paradigms and Languages - Declarative Programming: SQL - Functional Programming: Lisp, Scheme, F#, Haskell, Clojure, Scala, Elixir, Erlang, PureScript, Racket - Logic Programming: Prolog - Data-driven programming: Lua, Clojure, Racket - Imperative Programming: - Object-Oriented Programming: C++, Java, C#, Smalltak, Ruby, JavaScript, PHP, Rust, Kotlin, Scala, Python - Procedural programming: C, Pascal, JavaScript, PHP, Go

Slide 24

Slide 24 text

Production- Tools - Frameworks, Desktop GUI, Mobile, Web … - Testing frameworks and libraries: - XUnit frameworks - Assertions Libraries - Property testing frameworks - Mutation Testing frameworks (if you want to test your tests) - Databases (SQL Server, Oracle, MySQL, Postregresql …) - Message brokers (RabbitMQ, Kafka …) - DevOPS processes and techniques

Slide 25

Slide 25 text

Production- Tools - Frameworks, Desktop GUI, Mobile, Web … - Testing frameworks and libraries: - XUnit frameworks - Assertions Libraries - Property testing frameworks - Mutation Testing frameworks (if you want to test your tests) - Devops processes and techniques

Slide 26

Slide 26 text

Production- Architectural patterns Clean architecture - 2012 Functional core, imperative shell - 2012

Slide 27

Slide 27 text

Production- Architectural patterns Onion architecture - 2008 Hexagonal architecture - 2005

Slide 28

Slide 28 text

What about MVC?

Slide 29

Slide 29 text

Production- What about MVC? MVC is the half of the user menta model soure

Slide 30

Slide 30 text

Production- What about MVC? MVC is the half of the user menta model DCI is the other half soure

Slide 31

Slide 31 text

What about MVC? Trygve Reenskaug James Coplien

Slide 32

Slide 32 text

Javascript JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat. JavaScript is a prototype-based, multi-paradigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles.

Slide 33

Slide 33 text

Fin! Questions?

Slide 34

Slide 34 text

References

Slide 35

Slide 35 text

References - https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architectu re.html - https://jeffreypalermo.com/2008/07/the-onion-architecture-part-1/ - https://web.archive.org/web/20180822100852/http://alistair.cockburn.u s/Hexagonal+architecture - https://jmgarridopaz.github.io/content/hexagonalarchitecture.html - https://www.destroyallsoftware.com/screencasts/catalog/functional-cor e-imperative-shell - https://verraes.net/2021/09/what-is-domain-driven-design-ddd/ - https://martinfowler.com/bliki/TestDrivenDevelopment.html#:~:text=Tes t%2DDriven%20Development%20(TDD),functionality%20you%20want%20to%20ad d. - https://microservices.io/