Rasmus, Think Again! Agile Framework == Happy Php Developer

  • 78,103 views
Uploaded on

Talk was held during the PHP Conference in Barcelona (27.09.2008), which was also attended by Derick Rethans, Scott MacVicar and other international speakers. It shows the advantages of using a php …

Talk was held during the PHP Conference in Barcelona (27.09.2008), which was also attended by Derick Rethans, Scott MacVicar and other international speakers. It shows the advantages of using a php framework vs. spaghetti code for web application development in an agile manner.
A simple example based on the Akelos PHP Framework shows you how to implement a fulltext search in less than 20 minutes.

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • http://www.phpkode.com
    Are you sure you want to
    Your message goes here
  • good
    Are you sure you want to
    Your message goes here
  • A great slides about php framework
    Are you sure you want to
    Your message goes here
  • Very good presentation!

    http://bo-i-barcelona.se
    Are you sure you want to
    Your message goes here
  • excellent presentation, could you please send it to me
    sudarshanasampath@gmail.com
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
78,103
On Slideshare
0
From Embeds
0
Number of Embeds
35

Actions

Shares
Downloads
1
Comments
11
Likes
93

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. <?php echo ($AgileFramework == $HappyDeveloper) ? “Rasmus, think again!” : die(‘PHP’); delicious.com bookmarks.yahoo.com addons.mozilla.org All sites above were created using a PHP Framework.
  • 2. Who am I ?
  • 3. Xinc - Lead Developer Akelos Framework - Core Contributor BermiLabs.com - Partner
  • 4. C, C++, C# That’s not me!
  • 5. Been there. Done that. Got over it!
  • 6. I am a Web Developer. Like you!
  • 7. I am Pragmatic does the Job since 1995
  • 8. 1995 a star is born
  • 9. Do you like Spaghetti?
  • 10. Do you like Spaghetti? Warning: The following slides contain spaghetti code.
  • 11. The “Italian” Scripting Language * 1995 * Sample Snippet from 1995 (http://talks.php.net/show/froscon08/4)
  • 12. The “Italian” Scripting Language ? ! ? ! ? ! ?!?!?!? ok, back then .. but now everything is better, no? * 1995 * Sample Snippet from 1995 (http://talks.php.net/show/froscon08/4)
  • 13. Did I grow up?
  • 14. Did I grow up? has grown up
  • 15. But the manners? Did I grow up? has grown up
  • 16. “Spaghetti a la OOP” anyone? * 2005 * Sample Snippet from 2005 (http://talks.php.net/show/froscon08/5)
  • 17. “Spaghetti a la OOP” anyone? at least stmts! useless exception handling! wow! heredocs as view template! * 2005 * Sample Snippet from 2005 (http://talks.php.net/show/froscon08/5)
  • 18. dont_get_me_wrong.php4 <?php $dirty_coder = ‘Spaghetti coder’; while ($iWasLearning /* in 1999 */) { echo “I was a $dirty_codern”; }
  • 19. I know what it’s like ... ... to maintain spaghetti code.
  • 20. iChanged_in.php5 <?php $everything /* became a */ = new Object(); $inPHP = ‘5’; $andMixing = “<html>with $php was a sin</html>”; $frameworks = “I created a lot of them!”;
  • 21. Then I realized that ... ... knowing everything better ... reinventing the wheel ... organizing source code ... over and over again is a pretty heavy load.
  • 22. But there is help ... ... to make you a more relaxed, more productive web developer. Disclaimer: The following slides are not the view of a sect or any kind of religion. Its just pragmatic!
  • 23. If you could start fresh ... in a new job ... on a new project
  • 24. If you could choose ... Don’t us CAF* e PHP? Spaghetti F rameworks * Create Another Framework
  • 25. Don’t use PHP?
  • 26. How much Spaghetti can you take?
  • 27. Create Another Framework ?
  • 28. Create Another Framework ?
  • 29. Create Another Framework ?
  • 30. Create Another Framework ?
  • 31. Create Another Framework ?
  • 32. Why should you use a Framework? You don’t need to reinvent the wheel
  • 33. In fact, most of us should not ...
  • 34. Not reinventing the wheel ... Framework No Framework Lines of Code you need to write Project Complexity ... makes you code less! Disclaimer: I do not trust any statistics, I did not invent myself. Graphs are representative to express a general fact.
  • 35. But I am a coder! I want to code more!
  • 36. Lines of Code you need to write But writing more code ... Bugs ... results in more bugs! Disclaimer: I do not trust any statistics, I did not invent myself. Graphs are representative to express a general fact.
  • 37. I (the developer) need to be in control of everything.
  • 38. Control the important stuff ... Important Basic Without a framework With a framework ... to create a useful application! Disclaimer: I do not trust any statistics, I did not invent myself. Graphs are representative to express a general fact.
  • 39. Good Frameworks ...
  • 40. suspects you from the usual and a shield, which protects Good Frameworks ... ... while leaving room for your creativity.... ... provide a solid ... ... unit tested ... ... base ...
  • 41. Let us have a look at some frameworks.
  • 42. Framework or Library? Component Libraries weaker MVC MVC Frameworks stronger ... ...
  • 43. Framework or Library? Which one doMVC Frameworks Component Libraries I choose? weaker MVC stronger ... ...
  • 44. Framework or Library? Component Libraries weaker MVC MVC Frameworks stronger + ... ...
  • 45. Choose a solid MVC Framework ... and reuse components from libraries.
  • 46. I am not going to tell you ... ... to choose a specific framework. (This is not an advertisement for a specific framework)
  • 47. It’s up to your needs and likes.
  • 48. It’s up to your needs and likes. .. only one thing ... if you hate configuration... don’t choose Symfony!
  • 49. What does agile software development have to do with frameworks?
  • 50. Manifesto for Agile Software Development (http://www.agilemanifesto.org) Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan
  • 51. Ready to be agile?
  • 52. Be agile: Responding to change Stop fearing change. Accept it. Welcome it.
  • 53. Does your current development process allow change easily?
  • 54. Be agile Customer Collaboration Be transparent. About work. About timing.
  • 55. Can you collaborate transparently? Or do you need strong contracts to cover you ?
  • 56. Be agile Working Software Unit tests are the best developer documentation.
  • 57. Is your current software testable? Or do you need to test manually, with a browser ?
  • 58. Be agile Individuals and Interaction The right team will do the best job.
  • 59. Do you have a good team work? Or are you still building hierachies and departments ?
  • 60. If you answered one+ question(s) with “No ... “ you are probably not ready to be agile.
  • 61. How can a framework help me here?
  • 62. Design first. Enduser centric design - Only data that is needed for interaction is of importance.
  • 63. Test your MODELS and CONTROLLERS. Tests first. Frameworks make it easy to test.
  • 64. Honesty and Trust
  • 65. Welcome change If a change breaks something, the unit tests will alarm you.
  • 66. ... still doubts?
  • 67. But Rasmus said that* ... ... frameworks are performing poorly * http://tinyurl.com/frameworks-think-again
  • 68. Ok, let me tell you something about Rasmus Lerdorf
  • 69. Rasmus’ view on PHP a simple tool for non-developers “to solve the web problem” .. if you cannot solve it easily with PHP - push it to another layer* ... * (Not everyone wants/can code php extensions) Did I get you right Rasmus?
  • 70. I got a message for you Rasmus Graduated Computer Scientists are developing in PHP ... ... not just script kiddies.
  • 71. Let us have a look at Rasmus way of testing PHP frameworks.
  • 72. Who is running the following Application for Business?
  • 73. I am going to show you the source code for this money machine. You need to sign a NDA before though!
  • 74. Disclosed Hello World Business Core <html> <head> </title> hp ech o “Test” ?> <title><?p </head> <body> rld” ?> o “Hello Wo <?php ech </body> </html>
  • 75. puuuuuuh ... give me a second.
  • 76. Warning: Ugly Slides ahead Rasmus does his statistics about performance. Remember? I don’t trust statistics, I did not invent myself.
  • 77. no comment.
  • 78. Ok... maybe ONE.
  • 79. Rasmus simplifies things ... for the sake of understanding?
  • 80. Rasmus simplifies things ... for the sake of understanding? A bit too simple.
  • 81. Rasmus is right. Frameworks suck for Hello World Applications. ;-) We evolved a bit since 1995... Could someone please start a “hello business” example?
  • 82. We want to make money become rich and famous. So a hello world app would maybe be my second best choice for that purpose.
  • 83. Ok, now seriously.
  • 84. Frameworks are slower than static <HTML/>
  • 85. Is your primary concern Performance?
  • 86. So either ... your Application is already that BIG OR your creativity is too small
  • 87. You reach the limit of your Creativity way before ...
  • 88. ... you reach the limit of Computing Power
  • 89. Scaling is a problem all of us wish to have.
  • 90. But let’s first build that great application.
  • 91. But let’s first build that great application. ... which millions use!
  • 92. Choose a MVC Framework ... today
  • 93. .. and concentrate on the creative part ...
  • 94. .. let’s see a magic example of how easy web application development can be!
  • 95. A common problem: Search Engine Setting up a search engine in based on Hyperestraier
  • 96. A common problem: Search Engine The task add a search feature
  • 97. A common problem: Search Engine Preparation Install hyperestraier: debian: # apt-get install hyperestraier Setup / Start hyperestraier: debian: # estmaster init /var/myindices debian: # estmaster start /var/myindices Create API user and index at: http://admin:admin@localhost:1978 Install search plugin: debian: akelos# ./script/plugin install acts_as_searchable
  • 98. A common problem: Search Engine Overview Step 1 - Model Enabling the search plugin on the model Video. Indexing existing videos. Step 2 - View Add a search form to the archives view. Step 3 - Controller Add a search action to the video’s archive. /archive/search
  • 99. A common problem: Search Engine Step 1 The MODEL and the Index
  • 100. A common problem: Search Engine Step 1 The MODEL and the Index
  • 101. A common problem: Search Engine Step 1 The MODEL and the Index
  • 102. A common problem: Search Engine Step 2 The Search VIEW
  • 103. A common problem: Search Engine Step 3 The CONTROLLER
  • 104. A common problem: Search Engine The result searchable video blog
  • 105. A common problem: Search Engine Adding fulltext search ... on top of an existing application ...
  • 106. A common problem: Search Engine Adding fulltext search ... on top of an existing application ... ... will take you less than 20 min.
  • 107. Easy, Pragmatic Solutions for your problems If you use a Framework!
  • 108. If you are not already using a framework ... ... choose one and try it!
  • 109. If you don’t want to choose a framework. Be ready for people joking about you .....
  • 110. http://www.youtube.com/watch?v=p5EIrSM8dCA
  • 111. Now that know. Tell your ... Boss Colleagues Friends The World YOU
  • 112. If you feel like it tweet me gently | twitter.com/arnoschn drop me a line | arno at bermilabs.com read about me | bermilabs.com/arno