Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Loïc Faugeron:
Mars Rover, Driving event
Sep 07, 2016 @ 15:34:18

In this latest post in the series Loïc Faugeron continues his "Mars Rover" tutorials, this time with a focus on creating the logic that will "drive" the rover around.

In this series we're building the software of a Mars Rover, according to the following specifications. It allows us to practice the followings: Monolithic Repositories (MonoRepo), Command / Query Responsibility Segregation (CQRS), Event Sourcing (ES) and Test Driven Development (TDD).

We've already developed the first use case about landing the rover on mars, and we've started the second one about driving it. [...] In this article we're going to create the actual driving logic, using Event Sourcing.

He follows the "Command Bus" design pattern and creates the command structure for the DriveRoverHandler to handle the logic related to the DriveRover instance. He starts with the spec (the test) and updates the generated class with the logic in the handle method to record an event happening on the DriveRover instance. He make a few more changes to the functionality for the spec and class to make the tests go green.

tagged: mars rover tutorial series driving event eventsourcing commandbus phpspec

Link: https://gnugat.github.io/2016/09/07/mars-rover-driving-event.html

Loïc Faugeron:
Mars Rover, Driving instruction
Aug 17, 2016 @ 14:47:01

Loïc Faugeron continues his series of "Mars Rover" posts with this new article focusing on a refactor of the currently defined method of "driving" the rover.

In this series we're building the software of a Mars Rover, according to the following specifications. It allows us to practice the followings: Monolithic Repositories (MonoRepo), Command / Query Responsibility Segregation (CQRS), Event Sourcing (ES) [and] Test Driven Development (TDD).

We've already developed the first use case about landing the rover on mars, and we've started the second one about driving it. [...] In this article we're going to refactor DriveRover

He points out the reason for the refactor: there could be a desire to have more that one driving instruction in the list to execute. He starts by using phpspec to define the "Instruction" class and some tests to ensure the different directions are handled. He then moves over to the "Instruction" test and moves the code from the "DriveRover" class into it, including the valid driving directions.

tagged: mars rover tutorial series driving instruction refactor phpspec

Link: https://gnugat.github.io/2016/08/17/mars-rover-driving-instruction.html

Loïc Faugeron:
Mars Rover, Driving
Aug 10, 2016 @ 16:24:36

Loïc Faugeron continues his series of "Mars Rover" tutorial posts with the latest covering the driving of the rover.

In this series we're building the software of a Mars Rover, according to the following specifications. It allows us to practice the followings: Monolithic Repositories (MonoRepo), Command / Query Responsibility Segregation (CQRS), Event Sourcing (ES), Test Driven Development (TDD)

We just finished developing the first use case, so we can now get cracking on the second one, driving the rover.

As is tradition in this series, he starts with the phpspec testing, defining the DriverRover spec requiring driving instructions to be provided. He generates the code for it and fills in the brief functional details handling the instruction property. He also adds in some validations as far as what instructions it can be given and re-runs the tests to ensure they all pass.

tagged: mars rover tutorial series driving usecase phpspec

Link: https://gnugat.github.io/2016/08/10/mars-rover-driving.html

Sean Coates' Blog:
Security and...Driving? (and Hiring)
Jan 25, 2006 @ 12:35:49

Sean Coates has posted his opinions on all of the recent talk about the "inherent security flaws" that have voiced that PHP has.

There's been a blip on the PHP blogosphere (think what you will of that word, it's accurate) regarding PHP's "inherent security flaws."

I guess it's time to toss in my 2c (even though I was one of the first to reply to Chris' post on this). Since I like similes, I propose the following: coding is like driving.

He continues the metaphor, stating that no one is a great driver when they first start - the same with coding. There's always a learning process. He also notes that it's not PHP's responsibility to police this inexperience. Experience comes with time and good security in PHP applications comes with experience...

tagged: security flaws inherent driving metaphor security flaws inherent driving metaphor

Link:

Sean Coates' Blog:
Security and...Driving? (and Hiring)
Jan 25, 2006 @ 12:35:49

Sean Coates has posted his opinions on all of the recent talk about the "inherent security flaws" that have voiced that PHP has.

There's been a blip on the PHP blogosphere (think what you will of that word, it's accurate) regarding PHP's "inherent security flaws."

I guess it's time to toss in my 2c (even though I was one of the first to reply to Chris' post on this). Since I like similes, I propose the following: coding is like driving.

He continues the metaphor, stating that no one is a great driver when they first start - the same with coding. There's always a learning process. He also notes that it's not PHP's responsibility to police this inexperience. Experience comes with time and good security in PHP applications comes with experience...

tagged: security flaws inherent driving metaphor security flaws inherent driving metaphor

Link:


Trending Topics: