Comment migrer une application peu testée, développée avec des outils RAD, pour intégrer de nombreuses évolutions de règles métiers et par la même occasion la rendre plus compréhensible, en ayant une démarche orientée Domain Driven Design ? La réponse n’est pas si évidente.
On peut bien sûr opter pour une réécriture complète du système mais ce n’est pas sans problème. Comment continuer à délivrer des fonctionnalités ? Comment s’assurer que le nouveau système aura bien le même comportement que l’ancien ? Et surtout, combien de temps cela va t’il prendre ?
Une autre piste est de refactorer le code petit à petit, d’introduire les nouveaux concepts lorsqu’un besoin se fait sentir, sans avoir besoin de bloquer tout autre développement. C’est ce que nous avons choisi de faire pour migrer un backoffice construit autour du bundle Symfony EasyAdmin.
Dans ce retour d’expérience nous verrons comment nous avons commencé à mieux connaître les règles métiers en lisant le code et en animant des Event Storming. Nous parlerons de la manière dont nous avons réussi à créer un filet de sécurité avec des tests en nous laissant guider par le code coverage, ou encore de comment nous avons introduit graduellement les nouveaux concepts métiers à l’aide des interfaces avant de modifier la base de données. Tout au long de la conférence nous présenterons les difficultés rencontrées et ce que nous avons mis en œuvre pour les déjouer.
The Ring programming language version 1.5.3 book - Part 79 of 184Mahmoud Samir Fayed
This document contains code for a cards game application developed using RingQt. It defines classes and functions for the game logic and GUI. The application deals 5 cards to each player from a deck. Players take turns clicking cards to reveal them. If a card matches another visible card or has a value of 5, the player earns points and "eats" the matching cards. The game ends when all cards are revealed, and displays which player won based on their final score.
The document provides an implementation plan for a database to support the Refugio Web System project. It includes an entity relationship diagram, logical database model, data dictionary defining the database tables and columns, functional dependency graph, and SQL script to create the database along with sample data. The plan was prepared by KMDC2 and contains details needed to set up the backend database for the Refugio Web System.
The Ring programming language version 1.10 book - Part 70 of 212Mahmoud Samir Fayed
This document describes the source code for a 3D tic-tac-toe game written in Ring. It loads necessary libraries, initializes the game, and defines several classes to handle different aspects of the game like the game logic, background, cubes, interface, and checking for a winner. Key aspects include representing the game board as a 3D array, tracking the active player, mapping mouse clicks to board positions, and checking the board array after each turn to detect a win condition.
The document discusses the importance of unit testing and describes how developers are returning to write good tests after cutting corners during economic difficulties. It provides examples of unit tests being written for an order management system using PHPUnit to test the createOrder method by mocking dependencies and asserting the return value.
This document discusses building web services using the Zend Framework. It introduces key components for building SOAP, XML-RPC, and RESTful services, including the Zend_Soap, Zend_XmlRpc, and Zend_Rest libraries. It provides an example of building a timesheet API and exposing it through different protocols, demonstrating how to define methods, handle requests and responses, and implement clients. Documentation of the API using docblocks is also covered.
PHPUnit is a test suite framework that is widely used for PHP projects. It provides improvements over older testing frameworks like SimpleTest, including better command line tools, code coverage reports, assertions, mock objects, and tool chain support. PHPUnit uses annotations and assertions to make tests stricter and more consistent. It supports features like fixtures, mock objects, and code coverage reporting to help test codebases thoroughly. PHPUnit can be run from the command line or a web interface, and integrates with continuous integration servers to run tests automatically.
This document discusses quality assurance (QA) for PHP projects. It introduces various QA tools and techniques including syntax checking, documentation, testing, version control and code coverage. Screenshots are provided to illustrate concepts like detecting bugs early, observing behavior and preventing mistakes. The document also includes exercises for attendees to practice setting up version control with Git, running syntax checks with PHP Lint, generating documentation with phpDocumentor, and testing models with PHPUnit.
The document discusses how arrays can help solve challenges in PHP development. It provides examples of using array functions like array_diff(), array_intersect(), and array_filter() to simplify common coding tasks compared to using foreach loops. Iterators are presented as another solution, providing better performance for large datasets than storing everything in arrays. The document advocates using arrays, interfaces, modules, and separation of responsibilities as best practices promoted by the Zend Framework.
The Ring programming language version 1.5.3 book - Part 79 of 184Mahmoud Samir Fayed
This document contains code for a cards game application developed using RingQt. It defines classes and functions for the game logic and GUI. The application deals 5 cards to each player from a deck. Players take turns clicking cards to reveal them. If a card matches another visible card or has a value of 5, the player earns points and "eats" the matching cards. The game ends when all cards are revealed, and displays which player won based on their final score.
The document provides an implementation plan for a database to support the Refugio Web System project. It includes an entity relationship diagram, logical database model, data dictionary defining the database tables and columns, functional dependency graph, and SQL script to create the database along with sample data. The plan was prepared by KMDC2 and contains details needed to set up the backend database for the Refugio Web System.
The Ring programming language version 1.10 book - Part 70 of 212Mahmoud Samir Fayed
This document describes the source code for a 3D tic-tac-toe game written in Ring. It loads necessary libraries, initializes the game, and defines several classes to handle different aspects of the game like the game logic, background, cubes, interface, and checking for a winner. Key aspects include representing the game board as a 3D array, tracking the active player, mapping mouse clicks to board positions, and checking the board array after each turn to detect a win condition.
The document discusses the importance of unit testing and describes how developers are returning to write good tests after cutting corners during economic difficulties. It provides examples of unit tests being written for an order management system using PHPUnit to test the createOrder method by mocking dependencies and asserting the return value.
This document discusses building web services using the Zend Framework. It introduces key components for building SOAP, XML-RPC, and RESTful services, including the Zend_Soap, Zend_XmlRpc, and Zend_Rest libraries. It provides an example of building a timesheet API and exposing it through different protocols, demonstrating how to define methods, handle requests and responses, and implement clients. Documentation of the API using docblocks is also covered.
PHPUnit is a test suite framework that is widely used for PHP projects. It provides improvements over older testing frameworks like SimpleTest, including better command line tools, code coverage reports, assertions, mock objects, and tool chain support. PHPUnit uses annotations and assertions to make tests stricter and more consistent. It supports features like fixtures, mock objects, and code coverage reporting to help test codebases thoroughly. PHPUnit can be run from the command line or a web interface, and integrates with continuous integration servers to run tests automatically.
This document discusses quality assurance (QA) for PHP projects. It introduces various QA tools and techniques including syntax checking, documentation, testing, version control and code coverage. Screenshots are provided to illustrate concepts like detecting bugs early, observing behavior and preventing mistakes. The document also includes exercises for attendees to practice setting up version control with Git, running syntax checks with PHP Lint, generating documentation with phpDocumentor, and testing models with PHPUnit.
The document discusses how arrays can help solve challenges in PHP development. It provides examples of using array functions like array_diff(), array_intersect(), and array_filter() to simplify common coding tasks compared to using foreach loops. Iterators are presented as another solution, providing better performance for large datasets than storing everything in arrays. The document advocates using arrays, interfaces, modules, and separation of responsibilities as best practices promoted by the Zend Framework.
The document discusses test-driven development (TDD) using Jasmine, a JavaScript unit testing framework. It mentions that TDD is important regardless of technology and lists some JavaScript unit testing frameworks including Jasmine, as well as testing tools like Pyccuracy and feedback. The document also provides brief contact information for Andre Fonseca, a senior developer at Globo.com with over 12 years of experience who is passionate about his work.
The document describes creating an Android application with multiple activities and features:
1) The first practical creates a basic "Hello World" application with one activity displaying text.
2) The second practical adds number calculation functionality, taking two numbers as input and allowing the user to select an operation.
3) The third practical demonstrates the Android activity lifecycle by displaying log messages at each stage.
4) Further practicals add widgets, form validation, and a login module to demonstrate additional Android features.
The document discusses unit testing Zend Framework applications. It provides an overview of setting up PHPUnit for testing, including creating a phpunit.xml file and TestHelper bootstrap file. It also discusses testing Zend Forms and Models, including writing tests to validate form data and test that models are empty on construction. Code examples are provided for writing tests for a CommentForm and CommentModel class.
We, as developers, often think that we don’t have to or don’t need to know what are what they call design patterns. We think that we already know how to build a software and don’t need all this theory. Years after years, by having to deal with the low maintainability of my own codebases, I explored a lot of ways of decoupling applications, in order to have enterprise-grade software that last for years. With concrete examples, I want to share with you some design patterns and how they can help you to grow well structured and decoupled applications.
The Ring programming language version 1.7 book - Part 63 of 196Mahmoud Samir Fayed
This document describes how to create 3D graphics in Ring using RingOpenGL and RingAllegro. It provides code for rendering a textured 3D cube and then multiple rotating textured cubes. The code loads textures, initializes OpenGL, handles events, and renders the cubes by drawing quads and applying rotations and translations. It shows how to create and manage an OpenGL context in Ring for basic 3D graphics.
The best practices approach for organizing Android applications into logical components has been widely debated by the developer community over the last several years. If you’ve had trouble choosing between MVC, MVP, MVVM and Reactive Architectures, or even understanding how they differ exactly, you’re not alone! Up until now, there has been no official guidance from Google, however at IO’17, Google announced Android Architecture Components as a recommended pattern moving forward. In this session you’ll learn how these architectural patterns relate to each other and the motivations behind each. You’ll also learn how to apply Android Architecture Components effectively through from live code and interactive demonstrations.
The document contains code snippets in PHP for working with categories and menus in Magento. It includes code to get store categories, loop through them to output the names and IDs, and generate URLs to link to the category pages. There are also code comments related to copyright and licensing for Magento.
Modern browsers employ optimization techniques like compiling code to bytecode or native code for fast execution. A benchmark test was conducted of various JavaScript performance tasks across browsers. The tests examined math operations, identifier resolution, data access, arrays, regular expressions, strings, DOM manipulation, SHA1 hashing, and canvas rendering. Chrome and Safari performed best overall due to their layout engines, while Firefox, Edge, and Opera also competed closely. Internet Explorer lagged other browsers. Faster compiled code, memory access, and GPU acceleration contributed to differences in results.
Would you like to make your Android UI code cleaner and more reactive? Android data binding can help. In this talk you’ll learn everything you need to know about data binding, including why it’s so powerful and how to use it effectively. If you haven’t tried data binding in the past, that’s okay! We’ll start with the basics, assuming no prior knowledge and slowly move into more advanced topics, such as 2-way binding, binding adapters, converters, best practices and common pitfalls to avoid.
This session of The Ajax Experience 2008 takes a look at the latest features in both Prototype and script.aculo.us, including custom events and how to leverage them, method wrapping for AOP-style programming, sprockets, the refactorings and improvements on Ajax, scheduling and the DOM, the new effects engine, and more.
We wrap up with an overview of the community landscape for these libraries, looking at major helpful resources, prominent peripheral frameworks, and seeing what the future looks like for both Prototype and script.aculo.us.
This document discusses using asynchronous JavaScript (JS) in Odoo. It covers:
- Creating and handling promises in JS, including creating promises, waiting for promises, and handling errors.
- Examples of asynchronous functions that return promises in Odoo, including loading a template asynchronously and creating a widget instance.
- How to handle concurrency issues that can arise when users click quickly, such as ensuring the last clicked item loads first and loads all items in sequence.
- The concurrency primitives available in Odoo like DropPrevious and Mutex that can help address these issues.
This document describes a quiz management system created by Joyita Kundu. It includes details on the database tables, menu design, form design and event coding. The database contains tables for login information, questions and results. The menu system allows users to take IP or GK tests. Forms are used for login, registration, the quiz and results. Event coding handles form interactions and database queries. The system allows users to take timed tests, view results and track performance over time.
The document discusses refactoring legacy PHP code, specifically dealing with code that has no separation between PHP and HTML. It recommends separating code into controllers and views by gathering all code, separating controller and view code, assigning variables to a view object, changing variable references in the view code, and splitting the files. Specific problems in legacy PHP code like no separation of concerns, global variables, and reliance on includes can be addressed through techniques like creating view classes, encapsulating logic in objects, and wrapping includes in functions to untangle dependency webs. The goal is to safely change code implementation without changing behavior through refactoring.
The Ring programming language version 1.6 book - Part 55 of 189Mahmoud Samir Fayed
Here are the key points about RingOpenGL:
- RingOpenGL provides bindings to the OpenGL graphics library, allowing Ring programs to use 3D graphics capabilities.
- It supports multiple versions of OpenGL from 1.1 to the latest 4.3 specification. This allows access to modern OpenGL features.
- Sample programs are included to demonstrate basic 3D rendering concepts like drawing cubes, handling user input, etc. These are based on tutorials for the GLUT (OpenGL Utility Toolkit) library.
- To get started, programs can load the RingOpenGL library and make OpenGL calls like glBegin, glColor3f, glVertex3f to render 3D shapes and scenes.
- The RingFreeGLUT
The document discusses different approaches to user validation in Scala using monadic types like Option, Try, Either, and custom monad types. It shows how to define user validation functions that return these monadic types and compose them using for-comprehensions. Later sections discuss implementing user validation using the State monad and the MonadState typeclass to manage application state like a user's credit card balance during a purchase flow. The document advocates using typeclasses like MonadError and MonadState to define common monad operations for custom monad types in a generic way.
The document discusses refactoring code that constructs composites to use the Builder pattern, describing how to create a Builder class that defines operations for constructing different parts of a product and loosens coupling between the client and composite. It provides examples of refactoring code to build XML tags to instead use a TagBuilder class that supports adding children, attributes, and values through defined operations.
Hacking Your Way To Better Security - Dutch PHP Conference 2016Colin O'Dell
The goal of this talk is to educate developers on common security vulnerabilities, how they are exploited, and how to protect against them. We'll explore several of the OWASP Top 10 attack vectors like SQL injection, XSS, CSRF, session hijacking, and insecure direct object references. Each topic will be approached from the perspective of an attacker to see how these vulnerabilities are detected and exploited using several realistic examples. Once we've established an understanding of how these attacks work, we'll look at concrete steps you can take to secure web applications against such vulnerabilities. The knowledge gained from this talk can also be used for participating in "Capture the Flag" security competitions.
This document contains code for a C# class called "test" that defines properties and validation attributes for a web form model. It includes properties for email, name, date, and other fields, along with attributes for validation rules like required, data type, length, and regular expressions. It also contains JavaScript code to add client-side validation logic and datepicker functionality to the form fields.
The document discusses building multiplayer worlds using Node.js and HTML. It describes the stack used including Node.js for the server, Socket.IO for cross-browser sockets, Now.js for namespaces and chat rooms, and Express for static files and pages. It then provides code snippets for implementing player movement, gravity, floors, lasers, and the animation loop to move everything.
The document describes the Backbone.js framework and how it can be used to build single page applications. It explains the core components of Backbone - Models, Collections, Views and Routers. It provides examples of initializing a Backbone application, defining models and collections, creating views to render data, and setting up routes and navigation. It also covers events, templating, and best practices for structuring Backbone code into separate JavaScript files for models, collections, views etc.
Games, AI, and Research - Part 2 Training (FightingICE AI Programming)Pujana Paliyawan
This document provides code for different types of AI in FightingICE. It includes templates for random AI, AI that copies opponent skills, and improved random AI that considers character energy and distance to opponent. The final section discusses the "Machate" AI champion from 2015 and provides its code, which uses rule-based logic to select skills based on various conditions like character energy levels, health differences, distance to opponent, and position on the stage. The code provided can be copied and modified to create new AI agents with different fighting strategies in FightingICE.
This document provides examples of functional JavaScript code using point-free style and typeclasses. It includes code snippets demonstrating:
- Composing functions using point-free style to remove unnecessary variables
- Implementing common typeclass methods like map, chain, and ap for a Container type
- Deriving typeclass instances for custom types to gain functionality like Functor, Applicative, Foldable
- Using typeclasses to compose functions operating on different container types in a uniform way
The document provides code samples but does not explain concepts in detail. It focuses on demonstrating point-free code and typeclass patterns through examples rather than performing in-depth explanations or performance analysis. Questions are provided at the end to prompt
The document discusses test-driven development (TDD) using Jasmine, a JavaScript unit testing framework. It mentions that TDD is important regardless of technology and lists some JavaScript unit testing frameworks including Jasmine, as well as testing tools like Pyccuracy and feedback. The document also provides brief contact information for Andre Fonseca, a senior developer at Globo.com with over 12 years of experience who is passionate about his work.
The document describes creating an Android application with multiple activities and features:
1) The first practical creates a basic "Hello World" application with one activity displaying text.
2) The second practical adds number calculation functionality, taking two numbers as input and allowing the user to select an operation.
3) The third practical demonstrates the Android activity lifecycle by displaying log messages at each stage.
4) Further practicals add widgets, form validation, and a login module to demonstrate additional Android features.
The document discusses unit testing Zend Framework applications. It provides an overview of setting up PHPUnit for testing, including creating a phpunit.xml file and TestHelper bootstrap file. It also discusses testing Zend Forms and Models, including writing tests to validate form data and test that models are empty on construction. Code examples are provided for writing tests for a CommentForm and CommentModel class.
We, as developers, often think that we don’t have to or don’t need to know what are what they call design patterns. We think that we already know how to build a software and don’t need all this theory. Years after years, by having to deal with the low maintainability of my own codebases, I explored a lot of ways of decoupling applications, in order to have enterprise-grade software that last for years. With concrete examples, I want to share with you some design patterns and how they can help you to grow well structured and decoupled applications.
The Ring programming language version 1.7 book - Part 63 of 196Mahmoud Samir Fayed
This document describes how to create 3D graphics in Ring using RingOpenGL and RingAllegro. It provides code for rendering a textured 3D cube and then multiple rotating textured cubes. The code loads textures, initializes OpenGL, handles events, and renders the cubes by drawing quads and applying rotations and translations. It shows how to create and manage an OpenGL context in Ring for basic 3D graphics.
The best practices approach for organizing Android applications into logical components has been widely debated by the developer community over the last several years. If you’ve had trouble choosing between MVC, MVP, MVVM and Reactive Architectures, or even understanding how they differ exactly, you’re not alone! Up until now, there has been no official guidance from Google, however at IO’17, Google announced Android Architecture Components as a recommended pattern moving forward. In this session you’ll learn how these architectural patterns relate to each other and the motivations behind each. You’ll also learn how to apply Android Architecture Components effectively through from live code and interactive demonstrations.
The document contains code snippets in PHP for working with categories and menus in Magento. It includes code to get store categories, loop through them to output the names and IDs, and generate URLs to link to the category pages. There are also code comments related to copyright and licensing for Magento.
Modern browsers employ optimization techniques like compiling code to bytecode or native code for fast execution. A benchmark test was conducted of various JavaScript performance tasks across browsers. The tests examined math operations, identifier resolution, data access, arrays, regular expressions, strings, DOM manipulation, SHA1 hashing, and canvas rendering. Chrome and Safari performed best overall due to their layout engines, while Firefox, Edge, and Opera also competed closely. Internet Explorer lagged other browsers. Faster compiled code, memory access, and GPU acceleration contributed to differences in results.
Would you like to make your Android UI code cleaner and more reactive? Android data binding can help. In this talk you’ll learn everything you need to know about data binding, including why it’s so powerful and how to use it effectively. If you haven’t tried data binding in the past, that’s okay! We’ll start with the basics, assuming no prior knowledge and slowly move into more advanced topics, such as 2-way binding, binding adapters, converters, best practices and common pitfalls to avoid.
This session of The Ajax Experience 2008 takes a look at the latest features in both Prototype and script.aculo.us, including custom events and how to leverage them, method wrapping for AOP-style programming, sprockets, the refactorings and improvements on Ajax, scheduling and the DOM, the new effects engine, and more.
We wrap up with an overview of the community landscape for these libraries, looking at major helpful resources, prominent peripheral frameworks, and seeing what the future looks like for both Prototype and script.aculo.us.
This document discusses using asynchronous JavaScript (JS) in Odoo. It covers:
- Creating and handling promises in JS, including creating promises, waiting for promises, and handling errors.
- Examples of asynchronous functions that return promises in Odoo, including loading a template asynchronously and creating a widget instance.
- How to handle concurrency issues that can arise when users click quickly, such as ensuring the last clicked item loads first and loads all items in sequence.
- The concurrency primitives available in Odoo like DropPrevious and Mutex that can help address these issues.
This document describes a quiz management system created by Joyita Kundu. It includes details on the database tables, menu design, form design and event coding. The database contains tables for login information, questions and results. The menu system allows users to take IP or GK tests. Forms are used for login, registration, the quiz and results. Event coding handles form interactions and database queries. The system allows users to take timed tests, view results and track performance over time.
The document discusses refactoring legacy PHP code, specifically dealing with code that has no separation between PHP and HTML. It recommends separating code into controllers and views by gathering all code, separating controller and view code, assigning variables to a view object, changing variable references in the view code, and splitting the files. Specific problems in legacy PHP code like no separation of concerns, global variables, and reliance on includes can be addressed through techniques like creating view classes, encapsulating logic in objects, and wrapping includes in functions to untangle dependency webs. The goal is to safely change code implementation without changing behavior through refactoring.
The Ring programming language version 1.6 book - Part 55 of 189Mahmoud Samir Fayed
Here are the key points about RingOpenGL:
- RingOpenGL provides bindings to the OpenGL graphics library, allowing Ring programs to use 3D graphics capabilities.
- It supports multiple versions of OpenGL from 1.1 to the latest 4.3 specification. This allows access to modern OpenGL features.
- Sample programs are included to demonstrate basic 3D rendering concepts like drawing cubes, handling user input, etc. These are based on tutorials for the GLUT (OpenGL Utility Toolkit) library.
- To get started, programs can load the RingOpenGL library and make OpenGL calls like glBegin, glColor3f, glVertex3f to render 3D shapes and scenes.
- The RingFreeGLUT
The document discusses different approaches to user validation in Scala using monadic types like Option, Try, Either, and custom monad types. It shows how to define user validation functions that return these monadic types and compose them using for-comprehensions. Later sections discuss implementing user validation using the State monad and the MonadState typeclass to manage application state like a user's credit card balance during a purchase flow. The document advocates using typeclasses like MonadError and MonadState to define common monad operations for custom monad types in a generic way.
The document discusses refactoring code that constructs composites to use the Builder pattern, describing how to create a Builder class that defines operations for constructing different parts of a product and loosens coupling between the client and composite. It provides examples of refactoring code to build XML tags to instead use a TagBuilder class that supports adding children, attributes, and values through defined operations.
Hacking Your Way To Better Security - Dutch PHP Conference 2016Colin O'Dell
The goal of this talk is to educate developers on common security vulnerabilities, how they are exploited, and how to protect against them. We'll explore several of the OWASP Top 10 attack vectors like SQL injection, XSS, CSRF, session hijacking, and insecure direct object references. Each topic will be approached from the perspective of an attacker to see how these vulnerabilities are detected and exploited using several realistic examples. Once we've established an understanding of how these attacks work, we'll look at concrete steps you can take to secure web applications against such vulnerabilities. The knowledge gained from this talk can also be used for participating in "Capture the Flag" security competitions.
This document contains code for a C# class called "test" that defines properties and validation attributes for a web form model. It includes properties for email, name, date, and other fields, along with attributes for validation rules like required, data type, length, and regular expressions. It also contains JavaScript code to add client-side validation logic and datepicker functionality to the form fields.
The document discusses building multiplayer worlds using Node.js and HTML. It describes the stack used including Node.js for the server, Socket.IO for cross-browser sockets, Now.js for namespaces and chat rooms, and Express for static files and pages. It then provides code snippets for implementing player movement, gravity, floors, lasers, and the animation loop to move everything.
The document describes the Backbone.js framework and how it can be used to build single page applications. It explains the core components of Backbone - Models, Collections, Views and Routers. It provides examples of initializing a Backbone application, defining models and collections, creating views to render data, and setting up routes and navigation. It also covers events, templating, and best practices for structuring Backbone code into separate JavaScript files for models, collections, views etc.
Games, AI, and Research - Part 2 Training (FightingICE AI Programming)Pujana Paliyawan
This document provides code for different types of AI in FightingICE. It includes templates for random AI, AI that copies opponent skills, and improved random AI that considers character energy and distance to opponent. The final section discusses the "Machate" AI champion from 2015 and provides its code, which uses rule-based logic to select skills based on various conditions like character energy levels, health differences, distance to opponent, and position on the stage. The code provided can be copied and modified to create new AI agents with different fighting strategies in FightingICE.
This document provides examples of functional JavaScript code using point-free style and typeclasses. It includes code snippets demonstrating:
- Composing functions using point-free style to remove unnecessary variables
- Implementing common typeclass methods like map, chain, and ap for a Container type
- Deriving typeclass instances for custom types to gain functionality like Functor, Applicative, Foldable
- Using typeclasses to compose functions operating on different container types in a uniform way
The document provides code samples but does not explain concepts in detail. It focuses on demonstrating point-free code and typeclass patterns through examples rather than performing in-depth explanations or performance analysis. Questions are provided at the end to prompt
The PHP code is for a shell called r57shell. It checks for bots, sets variables and configuration options, defines arrays of useful/dangerous commands and files, handles authentication, and generates the HTML interface for the shell.
Ordering System IP2buildclasses.netbeans_automatic_buildO.docxhopeaustin33688
Ordering System IP2/build/classes/.netbeans_automatic_build
Ordering System IP2/build/classes/.netbeans_update_resources
Ordering System IP2/build/classes/online/ordering/system/ip1/OnlineOrderingSystemIP1.classpackage online.ordering.system.ip1;
publicsynchronizedclass OnlineOrderingSystemIP1 {
public void OnlineOrderingSystemIP1();
privatestatic String getStringInput(String);
privatestatic double totalCost(int, double, double);
publicstatic void main(String[]);
}
Ordering System IP2/build.xml
Builds, tests, and runs the project Online Ordering System IP1.
Ordering System IP2/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
Ordering System IP2/nbproject/build-impl.xml
.
The document provides an overview of a NodeJS CRUD and deployment course. The course outline includes: setting up a NodeJS environment on SmartOS with MySQL and Git in 3 minutes; tools for cloud development like SSH, SCP, and Git; building a simple web server with authorization using Passport and CRUD functionality with MySQL; and advanced topics like load balancing for cloud services. The course also provides a Micloud server for hands-on labs and sample projects.
Versão com GIFs:
https://docs.google.com/presentation/d/17M-jHlkAP5KPfQ4_Alck_wIsN2gK3dZNGfJR9Bi1L50/present
Códigos para instalação das dependências:
https://github.com/fdaciuk/talks/tree/master/2015/wordcamp-sao-paulo
Solo PHP. Niente trucchi e niente inganno (ne Javascript ne Web). Ci imbarcheremo nell’odissea che porta un programmatore a pensare di poter scrivere videogiochi con PHP e SDL. Disegnare sullo schermo, gestire gli input, fare il play di audio e gestire il mixer.
PHPDay GrUSP edition 2022
This document discusses migrating from Drupal 6 and 7 to Drupal 8. It provides an overview of the Migrate module, which allows importing content and configuration from other Drupal versions or external systems. Key aspects covered include the source and destination plugins, processing pipelines, and the overall migration workflow of mapping, processing and importing data. Examples of how to configure and execute migrations using Drush or custom code are also presented.
This document provides an introduction to HTML enhanced for web apps using AngularJS. It discusses key AngularJS concepts like templates (directives), controllers, dependency injection, services, filters, models, configuration, routing, resources and testing. Directives allow HTML to be extended with new attributes and elements. Controllers contain business logic. Dependency injection provides dependencies to controllers and services. Filters transform displayed data. Models represent application data. Configuration sets up modules. Routing maps URLs to templates. Resources interact with RESTful APIs. Testing ensures code works as expected.
Having issues with passing my values through different functions aft.pdfrajkumarm401
The document describes creating an EmployeeRecord class to store employee data including ID, name, department, and salary. It includes the class definition with private member variables and public getter/setter functions. The main() function demonstrates creating an EmployeeRecord object, passing values to the constructor, and calling printRecord() to output the data. Issues were encountered passing values through functions after construction. The solution comments out incorrect nulling of string pointers in the constructor, fixes the getter/setter functions to properly copy between members and parameters, and changes the salary input in main to not use a pointer.
This document provides an overview of key Android development concepts and techniques. It discusses fragments, the support library, dependency injection, image caching, threading and AsyncTask, notifications, supporting multiple screens, and optimizing ListView performance. The document also recommends several popular Android libraries and open source apps that demonstrate best practices.
Celery is a distributed task queue that allows long-running processes to be executed asynchronously outside of the main request-response cycle. It uses message brokers like RabbitMQ to distribute jobs to worker nodes for processing. This improves request performance and allows tasks to be distributed across multiple machines. Common use cases include asynchronous tasks like email sending, long database operations, image/video processing, and external API calls.
This document provides an overview of key differences between Zend Framework 1 and Zend Framework 2. It discusses changes to namespaces, controllers, services, routing, views, database adapters, forms, and other areas. Code examples are given to illustrate how concepts are implemented in ZF1 versus ZF2, such as using namespaces, dependency injection, and table gateways. The document aims to help ZF1 developers get started with ZF2.
Server side data sync for mobile apps with silexMichele Orselli
oday mobile apps are everywhere. These apps cannot count on a reliable and constant internet connection: working in offline mode is becoming a common pattern. This is quite easy for read-only apps but it becomes rapidly tricky for apps that create data in offline mode. This talk is a case study about a possible architecture for enabling data synchronization in these situations. Some of the topics touched will be:
- id generation
- hierarchical data
- managing differente data types
- sync algorithm
David Kopal - Write better React with ReasonML - Codemotion Milan 2018Codemotion
Do you want to write better React? In that case, you shouldn’t use it with JavaScript. Why? Because JavaScript isn't compatible with React's core principles, meaning you need to mimic them using many external libraries. Fortunately, Reason is here and ready to help you out through writing safer and cleaner React code, thanks to its type system which is superior to TypeScript and Flow. You'll need much less dependencies and you get less complexity regarding the choices you need to make because React's core features are built-in in Reason.
Strategies for refactoring and migrating a big old project to be multilingual...benjaoming
The document discusses strategies for refactoring a large project to support multiple databases and languages. It describes migrating the project to use PostgreSQL schemas to separate data for different games into different schemas. It also explains refactoring the code base to split it into separate applications and using django-parler to add multilingual support.
Visual Component Testing -- w/ Gil Tayar (Applitools) and Gleb Bahmutov (Cyp...Applitools
Full Webinar recording:
Functional and visual testing work very well together for end-to-end frontend tests.
In this hands-on session, Gleb Bahmutov (VP Engineering @ Cypress) and Gil Tayar (Sr. Architect @ Applitools) showed how to apply the same approach to the individual components -- the building blocks of modern web apps.
Component testing ensures a thorough validation of all our components' variants such as different inputs and states, edge-case network responses, and responsive widths.
Gleb and Gil used Cypress to drive the tests and check them functionally, while integrating the Applitools plugin to provide us with the capability to quickly and easily test them visually across all browsers and response widths.
Watch this on-demand webinar to see the full power of the functional and visual component tests ability to speed up the development cycle.
Le Lutin Malin doit décorer les locaux de la start-up du Père Noël et c'est plus compliqué que prévu puisqu'il est limité par le système dans lequel il se trouve. Grâce aux Process Behavior Charts on voit bien que si rien ne change il ne pourra pas réussir à placer toutes les boules de noël au dessus de la gouttière, même avec les meilleurs encouragements du Père Noël...
As developers we sometimes add tools to the systems we are working on without thinking twice about the complexity they bring, because we pretend to be able to foresee what the future will be or just because we are following the hype. In this talk I share my view on this subject, why I think this is arming projects and explore a few alternatives to current buzzwords in order to gain simplicity.
Passer de 5 à 35 développeurs présente de nombreux challenges. Dans cette présentation se trouve une liste d'outils et de pratiques pour accompagner cette croissance.
Les exceptions, oui, mais pas n'importe commentCharles Desneuf
Les exceptions sont très pratiques pour communiquer que quelque chose s'est mal passé dans un système informatique, mais mal utilisées elles peuvent rendre un système difficile à utilisé et peu fiable.
The document provides guidance on test-driven development and unit testing. It discusses the goals of testing such as finding bugs, enabling refactoring, documenting code behavior, and detecting design issues. It also covers best practices for tests, including keeping them independent of implementation, predictable, fast, and simple to implement. Specific testing tools and frameworks mentioned include PHPUnit and Prophecy. The anatomy of a test is explained as Arrange, Act, Assert (or Given, When, Then). Examples are given of unit tests for a Serveur class using these concepts and frameworks.
What is the best way to deal with exceptions that are supposed to pop out from time to time because they are business related.
What is the appropriate log level ? What should we do if we sometimes want them to stop the process and in some other cases we don't ?
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfVALiNTRY360
Salesforce Healthcare CRM, implemented by VALiNTRY360, revolutionizes patient management by enhancing patient engagement, streamlining administrative processes, and improving care coordination. Its advanced analytics, robust security, and seamless integration with telehealth services ensure that healthcare providers can deliver personalized, efficient, and secure patient care. By automating routine tasks and providing actionable insights, Salesforce Healthcare CRM enables healthcare providers to focus on delivering high-quality care, leading to better patient outcomes and higher satisfaction. VALiNTRY360's expertise ensures a tailored solution that meets the unique needs of any healthcare practice, from small clinics to large hospital systems.
For more info visit us https://valintry360.com/solutions/health-life-sciences
Top 9 Trends in Cybersecurity for 2024.pptxdevvsandy
Security and risk management (SRM) leaders face disruptions on technological, organizational, and human fronts. Preparation and pragmatic execution are key for dealing with these disruptions and providing the right cybersecurity program.
Mobile app Development Services | Drona InfotechDrona Infotech
Drona Infotech is one of the Best Mobile App Development Company In Noida Maintenance and ongoing support. mobile app development Services can help you maintain and support your app after it has been launched. This includes fixing bugs, adding new features, and keeping your app up-to-date with the latest
Visit Us For :
When it is all about ERP solutions, companies typically meet their needs with common ERP solutions like SAP, Oracle, and Microsoft Dynamics. These big players have demonstrated that ERP systems can be either simple or highly comprehensive. This remains true today, but there are new factors to consider, including a promising new contender in the market that’s Odoo. This blog compares Odoo ERP with traditional ERP systems and explains why many companies now see Odoo ERP as the best choice.
What are ERP Systems?
An ERP, or Enterprise Resource Planning, system provides your company with valuable information to help you make better decisions and boost your ROI. You should choose an ERP system based on your company’s specific needs. For instance, if you run a manufacturing or retail business, you will need an ERP system that efficiently manages inventory. A consulting firm, on the other hand, would benefit from an ERP system that enhances daily operations. Similarly, eCommerce stores would select an ERP system tailored to their needs.
Because different businesses have different requirements, ERP system functionalities can vary. Among the various ERP systems available, Odoo ERP is considered one of the best in the ERp market with more than 12 million global users today.
Odoo is an open-source ERP system initially designed for small to medium-sized businesses but now suitable for a wide range of companies. Odoo offers a scalable and configurable point-of-sale management solution and allows you to create customised modules for specific industries. Odoo is gaining more popularity because it is built in a way that allows easy customisation, has a user-friendly interface, and is affordable. Here, you will cover the main differences and get to know why Odoo is gaining attention despite the many other ERP systems available in the market.
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
SMS API Integration in Saudi Arabia| Best SMS API ServiceYara Milbes
Discover the benefits and implementation of SMS API integration in the UAE and Middle East. This comprehensive guide covers the importance of SMS messaging APIs, the advantages of bulk SMS APIs, and real-world case studies. Learn how CEQUENS, a leader in communication solutions, can help your business enhance customer engagement and streamline operations with innovative CPaaS, reliable SMS APIs, and omnichannel solutions, including WhatsApp Business. Perfect for businesses seeking to optimize their communication strategies in the digital age.
Unveiling the Advantages of Agile Software Development.pdfbrainerhub1
Learn about Agile Software Development's advantages. Simplify your workflow to spur quicker innovation. Jump right in! We have also discussed the advantages.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
3. Context
Application de santé qui propose des jeux à des centres
de soins ou des entreprises
pour favoriser une activité physique.
@SelrahcD
4. Context
Une entreprise qui grandit et recrute.
4 Automatiser les tâches d'administration
chronophages
4 Faciliter la compréhension de son métier par ses
nouveaux arrivants
4 Pouvoir adapter son système rapidement
@SelrahcD
5. Le backend est développé au dessus d'EasyAdmin 2
@SelrahcD
7. class Player {
/**
* @ORMColumn(type="string")
*/
private $firstname;
public function getFirstname(): string {
return $this->firstname;
}
public function setFirstname(string $firstname): void {
$this->firstname = $firstname;
}
}
@SelrahcD
25. public function test_startIntervention(): void
{
$manager = new Player2GameManager();
$game = new Game(
new DateTimeImmutable(),
new DateTimeImmutable()
);
$player2Game = new Player2Game($game, new Player());
$player2GameResult = $manager->startIntervention($player2Game);
Approvals::verifyString($this->print($player2GameResult));
}
@SelrahcD
28. public function test_startIntervention(): void
{
$manager = new Player2GameManager();
$game = new Game(
new DateTimeImmutable(),
new DateTimeImmutable()
);
$player2Game = new Player2Game($game, new Player());
$player2GameResult = $manager->startIntervention($player2Game);
Approvals::verifyString($this->print($player2GameResult));
}
@SelrahcD
29. public function test_startIntervention(): void
{
$manager = new Player2GameManager();
$game = new Game(
new DateTimeImmutable('2017-12-18 22:14:17'),
new DateTimeImmutable('2019-10-09 06:06:16')
);
$player2Game = new Player2Game($game, new Player());
$player2GameResult = $manager->startIntervention($player2Game);
Approvals::verifyString($this->print($player2GameResult));
}
@SelrahcD
35. public function test_startIntervention(): void
{
$manager = new TestablePlayer2GameManager();
$manager->now = new DateTimeImmutable('2017-12-22 02:34:18');
$game = new Game(
new DateTimeImmutable('2017-12-18 22:14:17'),
new DateTimeImmutable('2019-10-09 06:06:16')
);
$player2Game = new Player2Game($game, new Player());
$player2GameResult = $manager->startIntervention($player2Game);
Approvals::verifyString($this->print($player2GameResult));
}
@SelrahcD
38. public function test_startIntervention_start_date_after_now(): void
{
$manager = new TestablePlayer2GameManager();
$manager->now = new DateTimeImmutable('2017-12-15 02:34:18');
$game = new Game(
new DateTimeImmutable('2017-12-18 22:14:17'),
new DateTimeImmutable('2019-10-09 06:06:16')
);
$player2Game = new Player2Game($game, new Player());
$player2GameResult = $manager->startIntervention($player2Game);
Approvals::verifyString($this->print($player2GameResult));
}
@SelrahcD
41. public function test_startIntervention_start_date_after_now(): void
{
$manager = new TestablePlayer2GameManager();
$manager->now = new DateTimeImmutable('2017-12-15 02:34:18');
$duration = 2;
$game = new Game(
new DateTimeImmutable('2017-12-18 22:14:17'),
new DateTimeImmutable('2019-10-09 06:06:16'),
$duration
);
$player2Game = new Player2Game($game, new Player());
$player2GameResult = $manager->startIntervention($player2Game);
Approvals::verifyString($this->print($player2GameResult));
}
@SelrahcD
49. class Player2GameManager {
public function startIntervention(Player2Game $player2Game): Player2Game
{
return $player2Game->startIntervention($this->getNow());
}
}
@SelrahcD
51. final class InterventionDates
{
public readonly DateTimeImmutable $startDate;
public readonly DateTimeImmutable $endDate;
public function __construct(
DateTimeImmutable $startDate,
DateTimeImmutable $endDate)
{
if($startDate > $endDate) {
throw new Exception('Start date must be before end date');
}
$this->startDate = $startDate;
$this->endDate = $endDate;
}
}
@SelrahcD
52. class Game {
public function computeInterventionDates(DateTimeImmutable $now): InterventionDates
{
$startDate = $this->startDate > $now ?
$this->startDate : $now;
$endDate = $this->duration === null ?
$this->endDate : $startDate->modify(sprintf('+ %d weeks', $this->duration));
return new InterventionDates($startDate, $endDate);
}
}
@SelrahcD
53. class Player2Game {
public function startIntervention(DateTimeImmutable $now): Player2Game
{
$interventionDates = $this->game->computeInterventionDates($now);
$this->startDate = $interventionDates->startDate;
$this->endDate = $interventionDates->endDate;
return $this;
}
}
@SelrahcD
55. class Player2Game {
public function startIntervention(DateTimeImmutable $now): Player2Game {}
public function startInitialAssessment(): Player2Game {}
public function restartOn(DateTimeImmutable $restartDate): void {}
public function validate(): void {}
public function accept(): self {}
}
@SelrahcD
56. Utilisation des interfaces
interface Registration {
public function accept(): self;
public function startIntervention(): Intervention;
public function startInitialAssessment(): Assessment;
}
interface Intervention {
public function restartOn(DateTimeImmutable $restartDate): void;
}
interface Assessment {
public function validate(): void;
}
class Player2Game implements Registration, Assessment, Intervention {}
@SelrahcD
57. class Player2GameManager {
public function startIntervention(Player2Game $player2Game): Player2Game
{
return $player2Game->startIntervention($this->getNow());
}
}
@SelrahcD
58. class Player2GameManager {
public function startIntervention(Registration $registration): Intervention
{
return $registration->startIntervention($this->getClock());
}
}
@SelrahcD
66. Tentative 3 : 3 tables, 3 entités d'écriture, 1 entitée de
lecture et 1 vue
@SelrahcD
67. Création d'une vue MySQL
CREATE VIEW view_player_2_game AS
SELECT
r.id,
r.player_id,
r.game_id,
r.is_validated,
CASE WHEN a.id IS NULL THEN 0
ELSE 1 END AS has_running_assessment,
i.start_date,
i.end_date
FROM registration r
LEFT JOIN assessement a ON a.player_id = r.player_id AND a.game_id = r.game_id AND a.validation_date IS NULL
LEFT JOIN intervention i ON i.player_id = r.player_id AND i.game_id = r.game_id
@SelrahcD
68. Création d'un entité Doctrine
/**
* @ORMEntity(readOnly=true)
* @ORMTable (name="view_player_2_game")
*/
class Player2Game {
/**
* @ORMId
* @ORMColumn(type="guid")
*/
public $id;
/**
* @ORMManyToOne(targetEntity="AppDomainEntityPlayer")
*/
public $player;
/**
* @ORMColumn(type="datetime_immutable")
*/
public $validationDate;
}
@SelrahcD
69. Utilisation d'entités uniquement pour
la vue
/**
* @ORMEntity(readOnly=true)
* @ORMTable (name="view_player_2_game")
*/
class Player2Game {
/**
* @ORMId
* @ORMColumn(type="guid")
*/
public $id;
/**
* @ORMManyToOne(targetEntity="AppUIViewModelPlayer")
*/
public $player;
/**
* @ORMColumn(type="datetime_immutable")
*/
public $validationDate;
}
@SelrahcD
70. Faites le à plusieurs !
Photo by Helena Lopes on Unsplash
@SelrahcD
74. Rollup
4 Why & How to use Doctrine Migrations Rollup? -
Olivier Dolbeau
4 Rolling up database migrations with Doctrine -
Andreas Möller
@SelrahcD
75. Doctrine et vues
4 Aggregate your data by using SQL views and
Doctrine. - Robbert Stevens
4 Separating Concerns using Embeddables - Doctrine
documentation
@SelrahcD