a tale of two apps n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
A Tale of Two Apps PowerPoint Presentation
Download Presentation
A Tale of Two Apps

Loading in 2 Seconds...

play fullscreen
1 / 31

A Tale of Two Apps - PowerPoint PPT Presentation


  • 74 Views
  • Uploaded on

A Tale of Two Apps. Why Development practices matter. Who Am I?. Chris Tankersley Been Doing PHP for 9+ Years Lots of projects no one uses, and a few that some do: https://github.com/dragonmantank Worked in insurance for 4.5 years I know RPG!. What did we need to do?.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'A Tale of Two Apps' - gannon-hoover


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
a tale of two apps

A Tale of Two Apps

Zendcon 2013

Why Development practices matter

who am i
Who Am I?
  • Chris Tankersley
  • Been Doing PHP for 9+ Years
  • Lots of projects no one uses, and a few that some do:
    • https://github.com/dragonmantank
  • Worked in insurance for 4.5 years
  • I know RPG!

Zendcon 2013

what did we need to do
What did we need to do?

“Build an app for agents to quote and issues new policies online, print ID cards, and policy documents, and all the fun stuff associated with that.”

Zendcon 2013

* ‘Fun Stuff’ was subjective

we had this kinda
We had this… kinda
  • Backend iSeries vendor supplied a ‘solution’ for our Personal Auto policies
  • Only worked with Personal Auto
  • After many years, support was dropped

Zendcon 2013

what did we have
What did we have?

Zendcon 2013

we needed a solution
We needed a solution
  • We needed something that worked with our existing backend, which had all of our raters and business logic. We didn’t want to switch processing systems.
  • Turns out we had two things – a web app and a “RESTful” interface to the iSeries. The interface used ACORD XML, which is a standard XML schema. We could replace the web app with a new one that understood ACORD!

Zendcon 2013

what we decided to do
What we decided to do
  • Build one!
  • Purchase one!

We went with a vendor with a pedigree in insurance. They had a Tomcat+Postgres solution, and since the magical black box talked XML, they were confident they could swap out their rating system with theirs. We’d be done in 6 months.

Zendcon 2013

their solution
Their Solution

Zendcon 2013

More on them later though

we finally build our own
We finally build our own!

We needed to bring our commercial business online to help sell it. We had the technology (but not $6 million)

Zendcon 2013

our solution
Our Solution

Zendcon 2013

why two solutions
Why Two Solutions?

Notice how I said that the Tomcat/Postgres app would be done in 6 months?

Yeah…

Zendcon 2013

The app took much more time and budget than originally thought. How did we do a PHP app in 7 months and much less money?

what was different
What was different?
  • Proper specifications
  • Development Lifecycle
  • Understanding your stack
  • Testing and QA
  • Deployment Practices

Zendcon 2013

proper specifications
Proper Specifications
  • Functional and technical specifications are a must. If you don’t know what you are building, how will you know how to build it? Or when it’s finished?

Zendcon 2013

and this
And This

Zendcon 2013

development lifecycle
Development Lifecycle
  • Waterfall
  • Spiral/Prototype
  • Agile (SCRUM, Kanban, etc)

Zendcon 2013

understanding your stack
Understanding Your Stack
  • If you don’t know how your stack works, it makes it really hard to figure out problems with things go belly up.

Zendcon 2013

their stack
Their Stack

Zendcon 2013

our stack
Our Stack

Zendcon 2013

testing and qa
Testing and QA
  • You do test your code, right?
  • How do you prove your code works?
  • Can anyone run your tests or are they only accessible to certain people?

Zendcon 2013

they used only hp functional testing
They used only “HP Functional Testing”
  • As the name implies, it just did functional testing. In the end, it was a very expensive Selenium.
  • While they wrote in Java, they did not use (nor understand why anyone would use) JUnit or other unit testing frameworks.
  • Because it was cost prohibitive, we could not run tests.

Zendcon 2013

we used standard php tools
We used standard PHP tools
  • PHPUnit
    • We settled on PHPUnit for unit testing. It was/is widely documented and we even managed to get it to run on the iSeries.
  • Selenium
    • We manually ran these tests as we hadn’t worked out how to get it to run headless. Not a big deal because we had to support IE, which only supported manually running it anyway.
  • phpUnderControl
    • This ran PHPUnit automatically for us and built our documentation

Zendcon 2013

unit testing works
Unit Testing Works!
  • Using unit testing and continuous integration, we were able to detect test failures right away. Being able to run PHPUnit on the iSeries helped us identify and fix platform-specific bugs. Since developers could run PHPUnit and Selenium locally, we had less regressions.
  • Since HP Functional Testing was expensive, only the vendor could run the functional tests so developers (even at the vendor) never knew when the tests broke. Since it was only functional, it didn’t find subtle bugs in the code.

Zendcon 2013

deployment practices
Deployment Practices
  • Continuous Integration Tools (Jenkins, xinc/phing)
  • Build file with manual deployment
  • Custom deployment script
  • Hope and a Prayer

Zendcon 2013

we went the custom route
We went the custom route
  • Tagged trunk in SVN
  • Script checked out the build, SCP’d it to the iSeries
  • MySQL Updates were applied by the script

This worked pretty well considering we could tag a revision in SVN that passed tests, which we could check via phpUnderControl.

Zendcon 2013

they went with the last option
They went with the last option
  • The code on the dev server was packaged as a WAR file
  • The SQL needed for the upgrade was put into a file
    • Sometimes multiple SQL files that would need to be run in order
  • A zip file was created from this
  • It was e-mailed to us
  • We put the WAR file into place and ran the SQL files manually against Postgres
  • Tomcat was restarted

tl;dr: Stuff blew up regularly

Zendcon 2013

putting it all together
Putting it all together
  • Auto Quoter
    • Originally 6 months to production and small price tag. Ended up being way over budget and way over time. When I left, it had just barely gotten to where v1 had originally been. This was due to poor specs, poor QA, and poor development practices.
  • Artisan Quoter
    • We ended up 1 month over time, but much cheaper (even when payroll was considered). It ran on existing hardware, so the software cost only ended up being Zend Server.

Zendcon 2013

questions
Questions?

Zendcon 2013

thank you
Thank You!
  • chris@ctankersley.com
  • @dragonmantank
  • https://joind.in/9070

Zendcon 2013