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

JS & Software Engineering

JS & Software Engineering

More Decks by Mohamed Cherif Bouchelaghem

Other Decks in Programming

Transcript

  1. 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
  2. What is software engineering? “Engineering is the Application of empirical,

    scientific approach to finding efficient, economic solutions to practical problems” - Dave Farley
  3. 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
  4. What is software engineering? “Software Engineering is an exercise in

    Discovery, Learning and Design ” - Dave Farley
  5. 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.
  6. How to do software engineering IMO, the following steps are

    mandatory for software engineering: - Discover - Learning - Design - … - Production
  7. 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 -
  8. 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.
  9. 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.
  10. 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
  11. 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)
  12. 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
  13. 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
  14. Production- Data Structures and Algorithms - Array - Maps (Hahmaps)

    - Heap - Stack - Lists - Linked lists - Graph - Sorting - Dynamic Programming - …
  15. 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
  16. 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
  17. 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
  18. Production- What about MVC? MVC is the half of the

    user menta model DCI is the other half soure
  19. 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.
  20. 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/