Entities lifecycle is usually something more than create and delete. Models with which we are working on day to day basis change their state under some business circumstances. State machine patterns can be a powerful allay when solving this kind of problem. How does it look like? What are the pros and cons of state machine usage? What are the things that we should be beware of? I will answer these questions during my talk, together with practical differences between the most popular implementation.
Sylius and Api Platform The story of integrationŁukasz Chruściel
Being a part of the Symfony ecosystem gives access to the vast number of open-source solutions built on top. A lot of people voluntarily committed the time to make impressive, multipurpose solutions. One of these solutions is the API Platform, the most mature framework for API development.
In Sylius, it was always our goal to take advantage of the best of the breed and integrate with others. Keeping this in mind, we have decided to combine both projects and deliver a new quality in the headless e-commerce world.
How did it go to integrate new infrastructure to the existing, pretty big codebase? What were the main challenges that we encountered, and how did we solve them? What are the key take-outs from our integrations? I will answer these and a few more questions during this presentation.
Symfony World - Symfony components and design patternsŁukasz Chruściel
There are so many Symfony components already, and they have some pretty neat perks. But have you seen them in action?
Design patterns are not a silver bullet. They will never resolve your problem on their own. On the other hand, design patterns provide a common ground for developers without going into details and could be used as building bricks to solve some more advanced problems.
During my presentation, I will take a closer look and explain the appliance of selected design patterns. What is more, I will take advantage of the Symfony ecosystem to implement them with ease.
I will do the presentation on sample code that developers will understand at all levels of expertise.
A Series of Fortunate Events - Symfony Camp Sweden 2014Matthias Noback
What is an event really? How can you best describe an event in your code? What types of events are there, and how do you decide whether or not to implement something as an event?
In this talk we start with a straightforward command-only piece of code. We extract events from it and start moving the event handling code out, trying different design patterns on the way. First we try Observer. Then we introduce event data, event handlers and a Mediator between our code and the event handlers. Finally we pick a well-known event dispatcher implementation (the Symfony EventDispatcher) and see how it uses the Chain of Responsibility design pattern to control the entire flow of a web application request.
In the end I will answer some burning questions like: is it safe to use events all over the place and rely on event handlers to do some really important stuff? How do I overcome the indirection in my event-driven code? And how can I quickly find out what happens where?
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014Matthias Noback
Events are the new hooks. But what is an event really? How can you best describe an event in your code? What types of events are there, and how do you decide whether or not to implement something as an event?
In this talk we take a look at how events are essential to processing a Request and producing a Response. We take a look at the Symfony EventDispatcher and related classes that you need when you want to hook into this process. When you know all about the event system and how you can implement your own events, we discuss some situations which may or may not be good use cases for events. You will learn to decide if using events is the right solution for your problem.
Entities lifecycle is usually something more than create and delete. Models with which we are working on day to day basis change their state under some business circumstances. State machine patterns can be a powerful allay when solving this kind of problem. How does it look like? What are the pros and cons of state machine usage? What are the things that we should be beware of? I will answer these questions during my talk, together with practical differences between the most popular implementation.
Sylius and Api Platform The story of integrationŁukasz Chruściel
Being a part of the Symfony ecosystem gives access to the vast number of open-source solutions built on top. A lot of people voluntarily committed the time to make impressive, multipurpose solutions. One of these solutions is the API Platform, the most mature framework for API development.
In Sylius, it was always our goal to take advantage of the best of the breed and integrate with others. Keeping this in mind, we have decided to combine both projects and deliver a new quality in the headless e-commerce world.
How did it go to integrate new infrastructure to the existing, pretty big codebase? What were the main challenges that we encountered, and how did we solve them? What are the key take-outs from our integrations? I will answer these and a few more questions during this presentation.
Symfony World - Symfony components and design patternsŁukasz Chruściel
There are so many Symfony components already, and they have some pretty neat perks. But have you seen them in action?
Design patterns are not a silver bullet. They will never resolve your problem on their own. On the other hand, design patterns provide a common ground for developers without going into details and could be used as building bricks to solve some more advanced problems.
During my presentation, I will take a closer look and explain the appliance of selected design patterns. What is more, I will take advantage of the Symfony ecosystem to implement them with ease.
I will do the presentation on sample code that developers will understand at all levels of expertise.
A Series of Fortunate Events - Symfony Camp Sweden 2014Matthias Noback
What is an event really? How can you best describe an event in your code? What types of events are there, and how do you decide whether or not to implement something as an event?
In this talk we start with a straightforward command-only piece of code. We extract events from it and start moving the event handling code out, trying different design patterns on the way. First we try Observer. Then we introduce event data, event handlers and a Mediator between our code and the event handlers. Finally we pick a well-known event dispatcher implementation (the Symfony EventDispatcher) and see how it uses the Chain of Responsibility design pattern to control the entire flow of a web application request.
In the end I will answer some burning questions like: is it safe to use events all over the place and rely on event handlers to do some really important stuff? How do I overcome the indirection in my event-driven code? And how can I quickly find out what happens where?
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014Matthias Noback
Events are the new hooks. But what is an event really? How can you best describe an event in your code? What types of events are there, and how do you decide whether or not to implement something as an event?
In this talk we take a look at how events are essential to processing a Request and producing a Response. We take a look at the Symfony EventDispatcher and related classes that you need when you want to hook into this process. When you know all about the event system and how you can implement your own events, we discuss some situations which may or may not be good use cases for events. You will learn to decide if using events is the right solution for your problem.
A Series of Fortunate Events - PHP Benelux Conference 2015Matthias Noback
What is an event really? How can you best describe an event in your code? What types of events are there, and how do you decide whether or not to implement something as an event?
In this talk we start with a straightforward command-only piece of code. We extract events from it and start moving the event handling code out, trying different design patterns on the way. First we try Observer. Then we introduce event data, event handlers and a Mediator between our code and the event handlers. Finally we pick a well-known event dispatcher implementation (the Symfony EventDispatcher) and see how it uses the Chain of Responsibility design pattern to control the entire flow of a web application request.
In the end I will answer some burning questions like: is it safe to use events all over the place and rely on event handlers to do some really important stuff? How do I overcome the indirection in my event-driven code? And how can I quickly find out what happens where?
You've seen Kris' open source libraries, but how does he tackle coding out an application? Walk through green fields with a Symfony expert as he takes his latest “next big thing” idea from the first line of code to a functional prototype. Learn design patterns and principles to guide your way in organizing your own code and take home some practical examples to kickstart your next project.
In this talk, I'm presenting an alternative approach to thinking about UI and navigation on iOS - one that is declarative and that I find easy to reason about in a big application. I did live coding and the link is on the last slide. Enjoy!
By the sum of PHPUnit assertion power and Symfony2 functional testing tools the developer can obtain a deep control on the developed application.
Here you can find some suggestions on how to leverage that power.
This project calls for the modification of the DollarFormat clas.pdfjibinsh
This project calls for the modification of the \"DollarFormat\" class that is in listing 6.14 (p. 424-
425) of the textbook. Access the file named \"DollarFormat.java\" and modify as instructed in
the problem statement. Access the test application to test your modifications when you produce
\"TruncatedDollarFormat\". Start by going into JGRASP and open \"DollarFormat.java\",
rename the class to \"TruncatedDollarFormat\" and save the file as
\"TruncatedDollarFormat.java\", then make the necessary modifications as defined in the
problem statement, save and compile the file, then open the \"TruncatedBankAccount\"
application. Review the TruncatedBankAccount source code to see how each of the methods are
called. DO NOT make any changes to the TruncatedBankAccount application but instead modify
your TruncatedDollarFormat class to accommodate it.
this is the file that needs to be modified
public class TruncatedDollarFormat
{
/**
Displays amount in dollars and cents notation.
Rounds after two decimal places.
Does not advance to the next line after output.
*/
public static void write(double amount)
{
if (amount >= 0)
{
System.out.print(\'$\');
writePositive(amount);
}
else
{
double positiveAmount = -amount;
System.out.print(\'$\');
System.out.print(\'-\');
writePositive(positiveAmount);
}
}
//Precondition: amount >= 0;
//Displays amount in dollars and cents notation. Rounds
//after two decimal places. Omits the dollar sign.
private static void writePositive(double amount)
{
int allCents = (int)(Math.round(amount * 100));
int dollars = allCents / 100;
int cents = allCents % 100;
System.out.print(dollars);
System.out.print(\'.\');
if (cents < 10)
System.out.print(\'0\');
System.out.print(cents);
}
/**
Displays amount in dollars and cents notation.
Rounds after two decimal points.
Advances to the next line after output.
*/
public static void writeln(double amount)
{
write(amount);
System.out.println( );
}
}
this is the test file
import java.util.*;
public class TruncatedBankAccount
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
double initialBalance;
double interestRate;
double newBalance; // after 10 years
char answer; // sentinel to repeat or end program
int iteration; // loop counter
do // repeat entire program if user says yes
{
System.out.println(\"Please enter an initial balance \"
+ \"(dollars.cents):\");
initialBalance = keyboard.nextDouble();
System.out.println
(\"Please enter an interest rate in percent \"
+ \"(e.g. 5.25):\");
interestRate = keyboard.nextDouble();
System.out.print(\"In ten years an initial balance of \");
TruncatedDollarFormat.writeln(initialBalance);
System.out.println(\" at an interest rate of \"
+ interestRate + \"% will be worth:\");
// compound annually
newBalance = initialBalance;
for(iteration =1; iteration <= 10; ++iteration)
newBalance = newBalance
+ (interestRate/100) * newBalance;
TruncatedDollarFormat.write(newBalance);
System.out.println(\" compounded annually\");
// compound.
The REST API is an awesome plugin to expose your data from the WordPress core. But … the standard implementation might not fit your specific case.
Just like the WordPress core, you'll be able to extend it to your specific needs. I'll show you how to handle authentication, introduce caching strategies, alter custom post types, or even change the default way of communication altogether.
Maintaining sanity in a large redux appNitish Kumar
The most common complaint about using Redux with React is how it makes you write a lot of boilerplate. We’ll see how Redux lets us choose how verbose we'd like our code to be, depending on personal style, team preferences, longer term maintainability, etc.
From object oriented to functional domain modelingCodemotion
"From object oriented to functional domain modeling" by Mario Fusco
Malgrado l'introduzione delle lambda, la gran parte degli sviluppatori Java non è ancora abituata agli idiomi della programmazione funzionale e quindi non è pronta a sfruttare a pieno le potenzialità di Java 8. In particolare non è ancora comune vedere dati e funzioni usate insieme quando si modella un dominio di business. Lo scopo del talk è mostrare come alcuni principi di programmazione funzionale quali l'impiego di oggetti e strutture dati immutabili, l'uso di funzioni senza side-effect e il loro reuso mediante composizione, possono anche essere validi strumenti di domain modelling.
Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...Stanfy
MadCode Meetup is a monthly webinar held by Stanfy Team for knowledge sharing about mobile development.
This time Vitalii Malakhovskyi (@VitaliyMal), iOS Engineer at Stanfy, explains why do we need to switch from Obj-C to Swift, and talks about new features of ReactiveCocoa v4.
- what has been changed since ReactiveCocoa v2
- how to make CocoaTouch reactive
- a few words about MVVM architecture designed with ReactiveCocoa v4
Video from the presentation (rus): https://youtu.be/S-D04dz1tR4
Join our MadCode group on FB (rus): https://www.facebook.com/MadCodeMeetup/
Find more videos from MadCode Meetups (rus) : https://www.youtube.com/playlist?list=PLrplqd3YJvBvUygFkx4Xvx1p3zyiCgB9Q
Come to this talk prepared to learn about the Doctrine PHP open source project. The Doctrine project has been around for over a decade and has evolved from database abstraction software that dates back to the PEAR days. The packages provided by the Doctrine project have been downloaded almost 500 million times from packagist. In this talk we will take you through how to get started with Doctrine and how to take advantage of some of the more advanced features.
Pragmatic functional refactoring with java 8 (1)RichardWarburton
You may be hearing a lot of buzz around functional programming. For example, Java 8 recently introduced new features (lambda expressions and method references) and APIs (Streams, Optional and CompletableFutures) inspired from functional ideas such as first-class functions, composition and immutability.
However, what does this mean for my existing codebase?
In this talk we show how you can refactor your traditional object-oriented Java to using FP features and APIs from Java 8 in a beneficial manner.
We will discuss:
* How to adapt to requirement changes using first-class functions
* How you can enhance code reusability using currying
* How you can make your code more robust by favouring immutability over mutability
* How you can design better APIs and reduce unintended null pointer exceptions using an optional data type
Please distinguish between the .h and .cpp file, create a fully work.pdfneerajsachdeva33
Please distinguish between the .h and .cpp file, create a fully working c++ program using the
diagram provided.
Section 1: Homework Objectives
1. Given a class UML, learn to write a C++ class declaration.
2. Learn how to define/call constructor, accessor, mutator or toString( )
Section 2: Background
In this homework, according to the given UML class diagram, you’re required to design a
BankAccount class. You are also required to write a driver’s program to test it.
Section 3: Program description
3.1 Introduction
According to the following UML diagram, design a BankAccount class.
BankAccount
-id: string = \"?\"
-balance: double = 0.0
-address: string = \"?\"
+BankAccount()
+BankAccount(string, double, string)
+getID(): string
+getBalance(): double
+getAddress(): string
+setID(string): void
+deposit(double): bool
+withdraw(double): bool
+updateAddress(string):void
+toString(): string
+addInterest(): void
+equals(BankAccount): bool
Member variables and member functions\' description
Member
Variable
Data Type
Description
id
string
This represents a bank account\'s unique ID, such as \"123-456-
789\"
balance
double
This is the account balance.
address
string
This represents a bank account customer\'s mailing address, such as \"12345 Via Linda Rd.
Phoenix, AZ 85048\"
Member Function
Function Description
BankAccount()
This is the default constructor and it should initialize all member varible by the initial value
defined inside the UML. For example, id should be initialized to \"?\" etc.
BankAccount(string newID, double newBal, string newAddress)
This is the overloadded constructor. It takes three input parameters and initialize the three
member variables accordingly with the three input parameters.
string getID()
This is the accessor for member variable id
double getBalance()
This is the accessor for member variable balance
string getAddress()
This is the accessor for member variable address
void setID(string newID)
This is the mutator for member variable id. It takes a new id as input and change the member
variable id accordingly
bool deposit(double amount)
This is a mutator for member variable balance. It takes an amount as input parameter, if the
amount of deposit is negative, the balance will not be changed and the function should return
false; otherwise, the deposited amount (parameter value) will be added to the balance and the
function returns true.
bool withdraw(double amount)
This is a mutator for member variable balance. It takes an amount as input parameter, if the
balance is less than the withdraw amount (parameter value) or the withdraw amount is less than
zero, the function should return false, otherwise subtract the balance by withdraw amount and
return true.
void updateAddress(string newAddress)
This is a mutator for member variable address. In case the bank account\'s customer want to
change his/her address, we will use this function.
string toString()
The toString function will display an bank account info. in the following format.
WP-CLI is fantastically awesome, but did you know it’s surprisingly easy to make it even moreso? Come to this session and you’ll learn how to write your own WP-CLI commands, while also getting inspired by how we’ve used it at my agency to really speed up all our custom development work.
Delivered at WordCamp Minneapolis 2018.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
A Series of Fortunate Events - PHP Benelux Conference 2015Matthias Noback
What is an event really? How can you best describe an event in your code? What types of events are there, and how do you decide whether or not to implement something as an event?
In this talk we start with a straightforward command-only piece of code. We extract events from it and start moving the event handling code out, trying different design patterns on the way. First we try Observer. Then we introduce event data, event handlers and a Mediator between our code and the event handlers. Finally we pick a well-known event dispatcher implementation (the Symfony EventDispatcher) and see how it uses the Chain of Responsibility design pattern to control the entire flow of a web application request.
In the end I will answer some burning questions like: is it safe to use events all over the place and rely on event handlers to do some really important stuff? How do I overcome the indirection in my event-driven code? And how can I quickly find out what happens where?
You've seen Kris' open source libraries, but how does he tackle coding out an application? Walk through green fields with a Symfony expert as he takes his latest “next big thing” idea from the first line of code to a functional prototype. Learn design patterns and principles to guide your way in organizing your own code and take home some practical examples to kickstart your next project.
In this talk, I'm presenting an alternative approach to thinking about UI and navigation on iOS - one that is declarative and that I find easy to reason about in a big application. I did live coding and the link is on the last slide. Enjoy!
By the sum of PHPUnit assertion power and Symfony2 functional testing tools the developer can obtain a deep control on the developed application.
Here you can find some suggestions on how to leverage that power.
This project calls for the modification of the DollarFormat clas.pdfjibinsh
This project calls for the modification of the \"DollarFormat\" class that is in listing 6.14 (p. 424-
425) of the textbook. Access the file named \"DollarFormat.java\" and modify as instructed in
the problem statement. Access the test application to test your modifications when you produce
\"TruncatedDollarFormat\". Start by going into JGRASP and open \"DollarFormat.java\",
rename the class to \"TruncatedDollarFormat\" and save the file as
\"TruncatedDollarFormat.java\", then make the necessary modifications as defined in the
problem statement, save and compile the file, then open the \"TruncatedBankAccount\"
application. Review the TruncatedBankAccount source code to see how each of the methods are
called. DO NOT make any changes to the TruncatedBankAccount application but instead modify
your TruncatedDollarFormat class to accommodate it.
this is the file that needs to be modified
public class TruncatedDollarFormat
{
/**
Displays amount in dollars and cents notation.
Rounds after two decimal places.
Does not advance to the next line after output.
*/
public static void write(double amount)
{
if (amount >= 0)
{
System.out.print(\'$\');
writePositive(amount);
}
else
{
double positiveAmount = -amount;
System.out.print(\'$\');
System.out.print(\'-\');
writePositive(positiveAmount);
}
}
//Precondition: amount >= 0;
//Displays amount in dollars and cents notation. Rounds
//after two decimal places. Omits the dollar sign.
private static void writePositive(double amount)
{
int allCents = (int)(Math.round(amount * 100));
int dollars = allCents / 100;
int cents = allCents % 100;
System.out.print(dollars);
System.out.print(\'.\');
if (cents < 10)
System.out.print(\'0\');
System.out.print(cents);
}
/**
Displays amount in dollars and cents notation.
Rounds after two decimal points.
Advances to the next line after output.
*/
public static void writeln(double amount)
{
write(amount);
System.out.println( );
}
}
this is the test file
import java.util.*;
public class TruncatedBankAccount
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
double initialBalance;
double interestRate;
double newBalance; // after 10 years
char answer; // sentinel to repeat or end program
int iteration; // loop counter
do // repeat entire program if user says yes
{
System.out.println(\"Please enter an initial balance \"
+ \"(dollars.cents):\");
initialBalance = keyboard.nextDouble();
System.out.println
(\"Please enter an interest rate in percent \"
+ \"(e.g. 5.25):\");
interestRate = keyboard.nextDouble();
System.out.print(\"In ten years an initial balance of \");
TruncatedDollarFormat.writeln(initialBalance);
System.out.println(\" at an interest rate of \"
+ interestRate + \"% will be worth:\");
// compound annually
newBalance = initialBalance;
for(iteration =1; iteration <= 10; ++iteration)
newBalance = newBalance
+ (interestRate/100) * newBalance;
TruncatedDollarFormat.write(newBalance);
System.out.println(\" compounded annually\");
// compound.
The REST API is an awesome plugin to expose your data from the WordPress core. But … the standard implementation might not fit your specific case.
Just like the WordPress core, you'll be able to extend it to your specific needs. I'll show you how to handle authentication, introduce caching strategies, alter custom post types, or even change the default way of communication altogether.
Maintaining sanity in a large redux appNitish Kumar
The most common complaint about using Redux with React is how it makes you write a lot of boilerplate. We’ll see how Redux lets us choose how verbose we'd like our code to be, depending on personal style, team preferences, longer term maintainability, etc.
From object oriented to functional domain modelingCodemotion
"From object oriented to functional domain modeling" by Mario Fusco
Malgrado l'introduzione delle lambda, la gran parte degli sviluppatori Java non è ancora abituata agli idiomi della programmazione funzionale e quindi non è pronta a sfruttare a pieno le potenzialità di Java 8. In particolare non è ancora comune vedere dati e funzioni usate insieme quando si modella un dominio di business. Lo scopo del talk è mostrare come alcuni principi di programmazione funzionale quali l'impiego di oggetti e strutture dati immutabili, l'uso di funzioni senza side-effect e il loro reuso mediante composizione, possono anche essere validi strumenti di domain modelling.
Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...Stanfy
MadCode Meetup is a monthly webinar held by Stanfy Team for knowledge sharing about mobile development.
This time Vitalii Malakhovskyi (@VitaliyMal), iOS Engineer at Stanfy, explains why do we need to switch from Obj-C to Swift, and talks about new features of ReactiveCocoa v4.
- what has been changed since ReactiveCocoa v2
- how to make CocoaTouch reactive
- a few words about MVVM architecture designed with ReactiveCocoa v4
Video from the presentation (rus): https://youtu.be/S-D04dz1tR4
Join our MadCode group on FB (rus): https://www.facebook.com/MadCodeMeetup/
Find more videos from MadCode Meetups (rus) : https://www.youtube.com/playlist?list=PLrplqd3YJvBvUygFkx4Xvx1p3zyiCgB9Q
Come to this talk prepared to learn about the Doctrine PHP open source project. The Doctrine project has been around for over a decade and has evolved from database abstraction software that dates back to the PEAR days. The packages provided by the Doctrine project have been downloaded almost 500 million times from packagist. In this talk we will take you through how to get started with Doctrine and how to take advantage of some of the more advanced features.
Pragmatic functional refactoring with java 8 (1)RichardWarburton
You may be hearing a lot of buzz around functional programming. For example, Java 8 recently introduced new features (lambda expressions and method references) and APIs (Streams, Optional and CompletableFutures) inspired from functional ideas such as first-class functions, composition and immutability.
However, what does this mean for my existing codebase?
In this talk we show how you can refactor your traditional object-oriented Java to using FP features and APIs from Java 8 in a beneficial manner.
We will discuss:
* How to adapt to requirement changes using first-class functions
* How you can enhance code reusability using currying
* How you can make your code more robust by favouring immutability over mutability
* How you can design better APIs and reduce unintended null pointer exceptions using an optional data type
Please distinguish between the .h and .cpp file, create a fully work.pdfneerajsachdeva33
Please distinguish between the .h and .cpp file, create a fully working c++ program using the
diagram provided.
Section 1: Homework Objectives
1. Given a class UML, learn to write a C++ class declaration.
2. Learn how to define/call constructor, accessor, mutator or toString( )
Section 2: Background
In this homework, according to the given UML class diagram, you’re required to design a
BankAccount class. You are also required to write a driver’s program to test it.
Section 3: Program description
3.1 Introduction
According to the following UML diagram, design a BankAccount class.
BankAccount
-id: string = \"?\"
-balance: double = 0.0
-address: string = \"?\"
+BankAccount()
+BankAccount(string, double, string)
+getID(): string
+getBalance(): double
+getAddress(): string
+setID(string): void
+deposit(double): bool
+withdraw(double): bool
+updateAddress(string):void
+toString(): string
+addInterest(): void
+equals(BankAccount): bool
Member variables and member functions\' description
Member
Variable
Data Type
Description
id
string
This represents a bank account\'s unique ID, such as \"123-456-
789\"
balance
double
This is the account balance.
address
string
This represents a bank account customer\'s mailing address, such as \"12345 Via Linda Rd.
Phoenix, AZ 85048\"
Member Function
Function Description
BankAccount()
This is the default constructor and it should initialize all member varible by the initial value
defined inside the UML. For example, id should be initialized to \"?\" etc.
BankAccount(string newID, double newBal, string newAddress)
This is the overloadded constructor. It takes three input parameters and initialize the three
member variables accordingly with the three input parameters.
string getID()
This is the accessor for member variable id
double getBalance()
This is the accessor for member variable balance
string getAddress()
This is the accessor for member variable address
void setID(string newID)
This is the mutator for member variable id. It takes a new id as input and change the member
variable id accordingly
bool deposit(double amount)
This is a mutator for member variable balance. It takes an amount as input parameter, if the
amount of deposit is negative, the balance will not be changed and the function should return
false; otherwise, the deposited amount (parameter value) will be added to the balance and the
function returns true.
bool withdraw(double amount)
This is a mutator for member variable balance. It takes an amount as input parameter, if the
balance is less than the withdraw amount (parameter value) or the withdraw amount is less than
zero, the function should return false, otherwise subtract the balance by withdraw amount and
return true.
void updateAddress(string newAddress)
This is a mutator for member variable address. In case the bank account\'s customer want to
change his/her address, we will use this function.
string toString()
The toString function will display an bank account info. in the following format.
WP-CLI is fantastically awesome, but did you know it’s surprisingly easy to make it even moreso? Come to this session and you’ll learn how to write your own WP-CLI commands, while also getting inspired by how we’ve used it at my agency to really speed up all our custom development work.
Delivered at WordCamp Minneapolis 2018.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
"Unveiling the Future: Sylius 2.0 New Features" - the most anticipated update to Sylius since 2017.
This is a unique chance to directly discover the new functionalities and opportunities that come with Sylius 2.0. Don't miss this exceptional opportunity to be part of the unveiling.
ConFoo 2024 - Need for Speed: Removing speed bumps in API ProjectsŁukasz Chruściel
No one wants their app to be slow! Yet, we all may end up with not optimal solutions that may slow down responses of API Platform-based applications. During this speech, together, we will discover typical pitfalls and how to spot them and address them.
This presentation will focus on the application-level things we may change to improve our response times.
Have you ever worked with eCommerce? Have you never heard about Sylius? If your answer to both questions is true, this presentation is for you! The first version of it was released in 2017 and many things have changed since then. I will present you a new version of Sylius, a prominent member of the Symfony ecosystem and top-notch eCommerce framework for your custom eCommerce needs.
SyliusCon - Typical pitfalls of Sylius development.pdfŁukasz Chruściel
Together with Mateusz we've seen plenty of projects and help countless teams. Some of the problems, that we encountered could happen more often then others. And these are the problems we would like to talk with you during our session.
Need for Speed: Removing speed bumps in API ProjectsŁukasz Chruściel
No one wants their app to be slow! Yet, we all may end up with not optimal solutions that may slow down responses of API Platform-based applications. During this speech, together, we will discover typical pitfalls and how to spot them and address them.
This presentation will focus on the application-level things we may change to improve our response times.
In his publication describing CUPID principles, Dan North begins with the question, "If I do not think the SOLID principles are useful these days, then what would I replace them with?". This got me thinking about what I think of SOLID and how I look at it. In my presentation, I would like to break down this acronym into its components, test its usefulness with examples (based on a Symfony-based app), and consider what we can take from it. I will also try to answer the question posed in the title of the presentation.
Worldwide Software Architecture Summit'23 - BDD and why most of us do it wron...Łukasz Chruściel
For the last 8 years, I'm using BDD approach in my day-to-day work. During that time, together with team we change our approach and restructurized our tests architecture serval times. After these years, I want to share with you, how you can take the best out of the BDD approach. We will see how you can deliver better, more suitable code, but also how to migrate your projects infrastructure.
- Sylius rozpoczął integrację z API Platform na początku 2020. Od tego czasu pracowaliśmy ciężko projektując oraz dostarczając nasze nowe API. Integracja ta zapewniła nam sporo doświadczeń, którymi chciałbym się podzielić w ramach mojej prezentacji. Z mojej prezentacji dowiesz się:
- Dlaczego zaprojektowaliśmy nasz system tak, a nie inaczej
- Jakimi heurystykami kierowaliśmy się podejmując decyzje oraz jakie były konsekwencje naszych wyborów
- Jak projektować bardziej skomplikowane procesy przez API
Prawdopodobnie każdy programista spotkał się z CRUD’ami. Proste operacja na encjach mogą zająć dużo czasu i utworzyć sporo kodu do utrzymania bez użycia odpowiednich narzędzi. W Syliusie rozwiązaliśmy ten problem generycznymi implementacjami żyjącymi w komponentach Resource i Grid. Naszym ostatnim wysiłkiem było także odświeżenie tych bibliotek, by przynieść więcej radości programistom używających ich. Dzięki nim można znacznie skrócić czas oraz ilość kodu potrzebną do dostarczenia wartości biznesowej. Jak te komponenty użyć poza środowiskiem Syliusowym? Jakie są wady i zalety tego rozwiązania? Jak je połączyć z bardziej zaawansowanymi architekturami? Prezentacja będzie przedstawiać bezpośrednie przykłady użycia obu komponentów. Przeznaczona dla wszystkich programistów nie mających wcześniej styczności z którymś z tych komponentów.
BoilingFrogs - Rozterki i decyzje. Czego się nauczyliśmy projektując API SyliusaŁukasz Chruściel
Sylius rozpoczął integrację z API Platform na początku 2020. Od tego czasu pracowaliśmy ciężko projektując oraz dostarczając nasze nowe API. Integracja ta zapewniła nam sporo doświadczeń, którymi chciałbym się podzielić w ramach mojej prezentacji. Z mojej prezentacji dowiesz się:
– Dlaczego zaprojektowaliśmy nasz system tak, a nie inaczej
– Jakimi heurystykami kierowaliśmy się podejmując decyzje oraz jakie były konsekwencje naszych wyborów
– Jak projektować bardziej skomplikowane procesy przez API
Sylius and API Platform integration is the project that we started in early 2020. Since then, we were working hard designing, delivering and adjusting our new API. We've learned a lot and during my presentation, I would like to share our findings. During my talk, you may expect answers to following questions: How to design more complicated flows in API? Why did we design our API this way? What were our heuristics and what did we achieve?
With the recent Sylius release v1.11, we've introduced a brand new feature - catalog promotions. As this feature may require processing a significant amount of data(the whole product catalog), we had to decide on async processing by default. But it does not mean that we can waste resources and not optimize the processing algorithm! We had to improve it and to do that we've been using Blackfire.
Sylius and API Platform integration is the project that we started in early 2020. Since then, we were working hard designing, delivering and adjusting our new API. We've learned a lot and during my presentation, I would like to share our findings.
Why did we design our API this way?
What were our heuristics and what did we achieve?
How to design more complicated flows in API?
How to optimize background processes - when Sylius meets BlackfireŁukasz Chruściel
With the recent Sylius release v1.11, we've introduced a brand new feature - catalog promotions. As this feature may require processing a significant amount of data(the whole product catalog), we had to decide on async processing by default. But it does not mean that we can waste resources and not optimize the processing algorithm! We had to improve it and to do that we've been using Blackfire. During my presentation, I will bring you on the journey we've done to make catalog processing better from a performance point of view and beyond. The presentation will be based on real examples from Sylius. Nonetheless, its takeovers may be helpful in any Symfony app.
Presentation available at: https://live.symfony.com/account/replay/video/646
It is a presentation about basic pros and cons of PHP. I tried to figure out why so hated language is still a popular choice for web development and over 80% of web is powered by it.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaYara Milbes
Discover the transformative power of the WhatsApp API in our latest SlideShare presentation, "Top 7 Unique WhatsApp API Benefits." In today's fast-paced digital era, effective communication is crucial for both personal and professional success. Whether you're a small business looking to enhance customer interactions or an individual seeking seamless communication with loved ones, the WhatsApp API offers robust capabilities that can significantly elevate your experience.
In this presentation, we delve into the top 7 distinctive benefits of the WhatsApp API, provided by the leading WhatsApp API service provider in Saudi Arabia. Learn how to streamline customer support, automate notifications, leverage rich media messaging, run scalable marketing campaigns, integrate secure payments, synchronize with CRM systems, and ensure enhanced security and privacy.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
15. (Q, Σ, δ, q0, F)
Q = a finite set of states
Σ = a finite, nonempty input alphabet
δ = a series of transition functions
q0 = the starting state
F = the set of accepting states
20. Callback’s execution in config file
Used heavily in Sylius
Configurable arguments of service
Services have to be public in order to make it work
Lack of documentation
Not stable
26. Maintained by Symfony
Flex support
Workflow & state machine support
Execution of external services with events
XML / YAML / PHP support out-of-the-box
32. Oldest and most popular implementation (in terms of stars)
Extendability with events & callbacks definition
It is said to be little bit heavier implementation compared to
Winzou
44. AppOperatorInventoryOperator:
public: true
final class InventoryOperator
{
public function __invoke(Payment $payment): void
{
// Reduce inventory of bought products
}
}
winzou_state_machine:
payment:
…
callbacks:
before:
reduce_amount:
on: ["pay"]
do: [“@AppOperatorInventoryOperator”, "__invoke"]
args: [“object"] # <- Expression language can be used
67. final class InformAboutPaidPayment
{...}
final class InformAboutPaidPaymentHandler implements MessageHandlerInterface
{
public function __invoke(InformAboutPaidPayment $payment)
{
// Check if it should be dispatched
file_get_contents(
‘https://workflow.free.beeceptor.com?state='. $payment->getSubject()
);
}
}
MESSENGER_TRANSPORT_DSN=doctrine://default
70. Define possible states and relation between them
Protect business rules (with guards)
Trigger other services on transitions
Trigger other state changes as a reaction