Skip to main content

Home/ Groups/ PHP Programming
jdr santos

Tekuna.org - MVC Microframework for PHP - 0 views

shared by jdr santos on 01 Sep 09 - Cached
  •  
    Tekuna is a compact framework for web-based applications. It provides a stable basis and a generic infrastructure for your projects. Tekuna has a very small footprint and will not pollute your codebase with unnecessary stuff.
qualitypoint Tech

SEO friendly URL or Pretty URL using Apache mod_rewrite |QualityPoint Technologies - 0 views

  •  
    Consider below url. http://site.com/showtopic.php?id=10 By seeing this url we can understand that this site is developed using php, and we can understand coding/database table upto some extent. For example, if you change id value to some invalid value instead of 10 we will get some error message/query which may give some details about database table.
Sarah HL

Learning JavaScript from PHP - a Comparison | Lullabot - 0 views

  • In PHP, all variables are local in scope unless declared as global. JavaScript is opposite, and all variables are global unless declared with the var keyword.
  • Both PHP and JavaScript are loosely typed
  • JavaScript is a bit mixed concerning undeclared variables, if you attempt to modify or compare with an undeclared variable, the script will break entirely, but you can check the variable status using typeof() or in conditional statements containing only that variable.
  • ...6 more annotations...
  • JavaScript only recognizes the keyword true in all lowercase. PHP accepts both uppercase and lowercase
  • PHP is not case-sensitive in function or class declarations, but JavaScript is case sensitive for these also.
  • The key difference between PHP and JavaScript is that JavaScript does not have associative arrays.
  • JSON strings having become very popular as a faster alternative to XML, and can be read and created with the PHP functions json_encode() and json_decode().
  • Let's take one more look at defining an object in JavaScript and see how it can be used to compensate for the lack of associative arrays in JavaScript.
  • // Note that variables should always be// prefixed with "var" to define a local scope.for (var n = 0; n < 10; n++) {  alert(n);}
Sarah HL

Dr. Dobb's | Extreme Testing | juin 1, 2003 - 0 views

shared by Sarah HL on 29 Jun 09 - Cached
  • First, you quickly add a test
  • TDD employs five basic steps
  • The second step involves running your tests
  • ...15 more annotations...
  • Third, you make a little change to your functional code
  • Next, you run the tests
  • In the optional fifth step, you refactor your code to remove any duplication.
  • two simple rules. First, you should write new business code only when an automated test has failed. Second, you should eliminate any duplication that you find.
  • Your designs must consist of highly cohesive
  • You write your own tests because you can’t wait
  • the running code providing feedback between decisions
  • Test-Driven Development (Addison-Wesley 2003)
  • a Smalltalk system with a completely test-driven approach that took four years and 40 person-years of effort
  • there’s far more to testing than unit tests, so you’ll still need other testing techniques such as functional testing, user acceptance testing, system integration testing and so on.
  • you have a clear measure of success
  • most programmers don’t read the written documentation for a system; instead, they prefer to dig right into the code.
    • Sarah HL
       
      Follow the "natural" tendance of the developers, a pro TDD
  • Your acceptance tests define exactly what your stakeholders expect of your system; therefore, they truly do determine a good portion of your requirements.
  • Bob Martin says it best: “The act of writing a unit test is more an act of design than of verification. It’s also more an act of documentation than of verification.
  • Side by Side: Comparing TDD and AMDD TDD shortens the programming feedback loop; AMDD abridges the modeling feedback loop. TDD provides detailed specification (tests), while AMDD provides traditional specifications (agile documents). TDD promotes the development of high-quality code; AMDD encourages high-quality communication between your stakeholders and other developers. TDD provides concrete evidence that your software works, whereas AMDD supports your entire team, including stakeholders, in working toward a common understanding. TDD provides finely grained, concrete feedback in minutes. However, concrete feedback requires developers to follow the practice Prove It With Code, and they may become dependent on non-AM techniques; AMDD lets you get verbal feedback in minutes. TDD ensures that your design is clean by focusing on creation of callable and testable operations; AMDD lets you think through larger design and architectural issues before you code. TDD isn’t visually oriented; AMDD is. Both techniques are new and therefore may be threatening to traditional developers. Both techniques support evolutionary development. —S. W. Ambler
Sarah HL

Les tests unitaires | Crossbow Labs - 0 views

  • Par rapport aux tests manuels évoqués précédemment, la granularité des tests unitaires est extrêmement fine
  • tests de recette, qui valident chaque fonctionnalité de l'application dans son ensemble et permettent ainsi de mesurer l'avancement du projet
  • La mise en place du contexte de test et la vérification du résultat sont le plus souvent très simples, et le coût d'écriture des tests est très réduit. Ils peuvent être exécutés très tôt dans le développement d'une tâche (les tests de recette ne peuvent être lancés que lorsque la fonctionnalité complète est implémentée). Ils peuvent être lancés à chaque compilation de la classe (les tests de recette ne peuvent être lancés que lorsque toute l'application est compilée).
  • ...2 more annotations...
  • Les tests unitaires apportent donc un feedback beaucoup plus rapide que les tests de recette, pour un coût nettement plus réduit.
  • Bien sûr, l'adoption de cette pratique n'est ni gratuite ni immédiate. Il faut d'abord apprendre à utiliser un framework de tests, et surtout ensuite apprendre à organiser son code pour le rendre testable unitairement.
  •  
    Très didactique pour expliquer le rôle des tests unitaires dans une application
alfred westerveld

tk_self - 0 views

Sarah HL

Nexen.net : portail PHP et MySQL - De retour de PHP Québec 2008 - 0 views

  • Il m'a signalé deux projets de BDD, qui permettent de faire le pont entre les demandes de tests fonctionnels, émis par des clients non-techniques, et les tests unitaires. Il s'agit de greenpepper (http://www.greenpeppersoftware.com/en/, Open Source et commercial ) et easyb (http://www.easyb.org/, logiciel libre).
  • Ces deux logiciels permettent de capturer les tests fonctionnels : on note les demandes de tests, puis on les convertis en un pseudo-langage. Une fois celui-ci écrit, le logiciel produit des tests fonctionnels à faire passer, et à exécuter automatiquement. Le concept est une couche qui ressemble aux tests unitaires, mais prend le problème à partir des clients, et non plus à partir des besoins de tests des couches base. Le concept est prometteur, notamment en conceptualisant les tests et les demandes clients, même si elles sont peut claires. Je me promets d'y consacrer un peu de temps.
Sarah HL

Easy Unit Testing - Web Mozarts - 0 views

  • Contrary to PHPUnit, lime tests are written in a procedural way.
  • Each test case is, by convention, introduced by a comment that explains the tests purpose.
  • requires you to initiate your fixture manually
  • ...7 more annotations...
  • sfLimeExtraPlugin introduces the new class lime_test_simple
  • @Test A test case @Before Executed before each test case @After Executed after each test case @BeforeAll Executed once before all test cases @AfterAll Executed once after all test cases
  • Currently the plugin is available in version 0.2.0alpha.
  • You can create stubs for interfaces, classes or abstract classes. You can even create stubs for non-existing classes, which is very convenient if you develop test-driven.
  • I personally think that tests can be written in a much more concise and readable way with sfLimeExtraPlugin.
  • Mock and Stub Objects
  • the code is not being considered 100% stable
Sarah HL

10 Principles of the PHP Masters | Internet Resources | Cpworld2000.com - 0 views

  • 1. Use PHP Only When You Need it – Rasmus Lerdorf
  • PHP was created out of a need to solve web development problems
  • Lerdorf is the first to admit that PHP is really just a tool in your toolbox, and that even PHP has limitations.
  • ...9 more annotations...
  • 2. Use Many Tables With PHP and MYSQL for Scalability – Matt Mullenweg
  • 3. Never, ever trust your users – Dave Child
  • 4. Invest in PHP Caching – Ben Balbo
  • 5. Speed up PHP Development with an IDE, Templates and Snippets – Chad Kieffer
  • 6. Make Better Use of PHP’s Filter Functions – Joey Sochacki
  • 7. Use a PHP Framework – Josh Sharp
  • 8. Don’t use a PHP Framework – Rasmus Lerdorf
  • 9. Use Batch Processing – Jack D. Herrington
  • 10. Turn on Error Reporting Immediately – David Cummings
« First ‹ Previous 341 - 357
Showing 20 items per page