Skip to main content

Home/ PHP Programming/ Group items tagged class

Rss Feed Group items tagged

Mr. DiGi

NotORM - 1 views

  • foreach ($software->application() as $application) {    echo "$application[title]\n";    foreach ($application->application_tag() as $application_tag) {        echo "\t" . $application_tag->tag["name"] . "\n";    }}
  •  
    PHP library for simple reading data from the database
Raúl - [^BgTA^]

Pixelco Blog » Blog Archive » 31 Herramientas gratis - 0 views

  • 9:36 AMmeeblogbeta volunteers wanted! - With so many languages, browsers, and operating systems, it’s hard for us to predict all the ways which people use meebo. We have some stats (like the smiley is the most popular emoticon and a lot of
  •  
    Herramientas para desarrollo web.
jdr santos

Select2 Widget - © Kartik - 0 views

  • City::find($id)->name
    • jdr santos
       
      where is "find(..)", must be "findOne(...)"
Yves Leloup

PHP Password Generator Class | TutorialChip - 0 views

  •  
    "Secure, powerful and random password generator class is a need of every developer, administrator, blogger and the user of every level. Chip Password Generator class will be helpful to generate passwords with random and fixed length strings."
jdr santos

PHP Classes - Welcome to the PHP Classes Repository - 2 views

  •  
    My PHP Classes page
  •  
    My PHP Classes page
Sarah HL

ongoing · Test-Driven Heresy - 0 views

  • As a profession, we do a lot more software maintenance than we do greenfield development.
  • the deep-TDD rules: ¶ Never write code until you have a failing test. Never write any more code than is necessary to un-fail the test.
  • we do way more maintenance than initial development. And in my experience, the first-cut release of any nontrivial software is pretty well crap.
  • ...38 more annotations...
  • But to do that well, you absolutely must have enough test coverage that you just aren’t afraid to rip your code’s guts out
  • I always end up sketching in a few classes and then tearing them up and re-sketching, and after a few iterations I’m starting to have a feeling for X and Y.
  • I freely admit that this is not really truly TDD
  • once you’re into maintenance mode, there are really no excuses. Because you really know what all your X’s and Y’s are
  • Writing the tests points out all the mistakes you might make in signatures, prerequisites, etc. If the tests are too hard to make then you know that your API will be too hard to use, you're doing it completely wrong, and may as well pause for a rethink.
  • While the approach you advocate makes sense, it does require professionalism, not just from the developer but from management too.
  • the person left to maintain the code isn't the person who wrote it, leaving the maintainer with an unholy mess to untangle. Getting unit tests into such code is a monumental task.
  • he failure to address how unit tests can be introduced to an existing non unit-test codebase. (i.e. go from non-TDD to TDD)
  • I feel the TDD community only wants to focus on greenfield projects and has ignored maintenance/legacy issues. Which is strange when as you say code spends most of it's time in maintenance
  • The thing is that as long as the project is small you really don't see the benefits of TDD. I've done a couple of small projects and never had to go back to them ever again
  • Never use mocks unless you are mocking an interface that will almost never change
  • You are writing the client code (in the form of a test) so you are thinking how the worker code will be used. What is its public interface and what do you want it to do when it's called
  • From: Tathagata Chakraborty (Jun 24 2009, at 07:31)TDD is useful in another situation - in a commercial setting and when detailed specification documents have already been created by say a technical expert/architect. In this case you don't have to do a lot of designing while coding, so you can start off with the test cases.
  • writing the tests *first* is that it helps keep your code focused on exactly what it's meant to do, and no more
  • When work on production code begins, most of the code should fall into the categories of things that are not to be tested.
  • In theory, TDD is a great idea. The problem with TDD can be expressed in one word: money.
  • One approach to the unknown X and Y problem that I've been using recently has been to pretend that class X has been written already, and then write code that uses this pretend X object/API. I usually write this directly in the file that will become my unit test. Since X doesn't exist, I'm allowed to call whatever methods I want and pretend it all works. Once I'm satisfied with how it all looks, I cut and paste everything into a bunch of failing tests.
  • I get really bored adding tests to code that already runs
  • the seductive TDD trap
  • religious zealots
  • There is nothing wrong with building tests after you have built your product.
  • that goes a long way towards taking software development from a form of artisanal craftsmanship to a real engineering profession.
  • using tests to drive development cripples innovation, dramatically slows development
  • It always seem to me to be a codified form of reverse engineering, or at least a way to force the programmers into looking at their code from two separate angles at the same time.
  • If you're just adding tests at the end, then it's normal unit-testing, isn't it?
  • I do realize that this type of exercise might help younger coders in getting better structure, they do often rush in too quickly and focus more on the instructions than the abstractions.
  • TDD is test-driven *design*
  • He said he didn't write tests in cases where it would have taken him several hours to get a working test for a small piece of code.
  • In some applications, objects are self-contained, activities are sequential, and algorithms are tricky
  • I've seen cases where people have wrecked the architecture of systems in the name of making them testable... But have never written the tests.
  • Yes, it's possible to make peace with testability, and in the best situation, testability can improve the architecture of a program, but it can also lead people away from highly reliable and maintainable KISS approaches.
  • Like any infrastructure, it is always beneficial to provide unit testing. The most benefit is derived from installing it as early on in the project as possible.
  • The value of an untested feature, to a client, is ... zero. So, it doesn't matter how many of these you have rattled off in the past week, your net throughput is effectively... zero."
  • You can see in this thread the word "professionalism" (substitute "morality" with little gain/loss of substance) and even "sin" (used in jest, but not really!)
  • if I delay writing unit tests until after all the units are working together then because the system "already works" my subconscious enthusiasm for writing unit tests falls markedly, and so their quality and coverage fall
  • Experience teaches that if I generate that output by hand (1) it takes *much* longer (2) I almost always get it wrong. So I often write the code, get its output, carefully check it (really...) and then use it as the correct result.
  • My main objections to TDD are: 1) it promotes micro-design over macro-design and 2) it's hard to apply in practice (i.e. for any code that is not a bowling card calculator or a stack).
  • the tests are just a persistent artifact of the exploratory coding I've already done.
Sarah HL

Rasmus Lerdorf: PHP Frameworks? Think Again. - 0 views

  • Rasmus Lerdorf is the creator of PHP and still continues as a core developer to the PHP project.
  • heavy Twitter mashup that he created. This does a lot of database calls and a lot of behind the scenes work. By hand-tuning it he was able to get on the order of 280 req/sec.
  • "Any script based language is simply not fast enough".
  • ...2 more annotations...
  • So, are there any frameworks that don’t suck? Rasmus did mention that he liked CodeIgniter because it is faster, lighter and the least like a framework.
  • It all starts with “I don’t need a framework.” 2. Then you create 7 classes. 3. Now you have a small library of classes. 4. Then you create an application that uses your library. 5. It works and it’s fast, hurray! 6. Then someone asks you to extend the functionality of your application. 7. And they keep asking for more, and more, and more and more… 8. Now you have 43 classes. 9. You’ve learn so much in the last 2 years. Design patterns, security, performance, testing… 10. What once was a small library is now a big, ugly, un-tested, un-documented, scary framework. 11. Then you change jobs. 12. And you create another 7 classes… This has been happening for the last 30 years.
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
  • Mock and Stub Objects
  • 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.
  • Currently the plugin is available in version 0.2.0alpha.
  • 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
Yves Leloup

Zebra_Mptt, a PHP class providing an implementation of the modified preorder tree trave... - 0 views

  •  
    MPTT is a fast algorithm for storing hierarchical data
sloansteddi

PEAR Auth example - Dev Shed - 0 views

  •  
    PEAR::Auth example
  •  
    Example code for the PEAR auth class.
jdr santos

Spoon Library - 0 views

  •  
    Spoon is a PHP5 library that stands for speed, both in page execution and coding agility. Because of it's clear and logical structure, it offers a very small learning curve for both the experienced and not-so-experienced developer. Spoon provides a well documented library with a large collection of classes that you can use while building the next Web 2.0 application.
sloansteddi

PEAR::Calendar Examples - 0 views

  •  
    a bunch of examples on using the PEAR::Calendar class. Code included. With a little styling, those calenders could look right nice!!!
jdr santos

pxWeather - PHP XML Weather Utility - 1 views

  •  
    "A PHP class to retrieve, parse, and organize weather data for easy access."
Mr Ranjan Raja

php2ranjan is best Web/Software training institutes - 0 views

  •  
    php2ranjan is best Web/Software training institutes who provides real time and professional training with real time projects in PHP and MySQL, joomla training, drupal training with drupal theming, wordpress training with live project. We have experienced trainer on PHP-MySQL training, web design training and SEO training. Our trainers have more than 5 years of experience in their fields. They give real time examples and notes on corresponding topics. You can attend the DEMO CLASS before starting the real classes. We give web designing training hyderabad, html and css with real time web design training with live project.We successfully completed 5000+ hours of training with a track record of 100% placement assistance; php2ranjan is reknowned training institute for PHP training, webdesigning training plus seo training institute in Hyderabad, Andhra pradesh , india. We have Evening batch and morning batch plus fast track batch for Designer and other professional who is working in software company. B.E / B.TECH/ MCA final students can join our PHP-MySQL real time training and attend the live project training on web development. Live project training in PHP and mysql will be helpful in understanding the concepts and will be helpful in clearing the job interviews. Web designer can also improve their knowledge by attending our PHP training. This will be helpful in further growth of your career.
Yves Leloup

Object-Oriented PHP: Delving Deeper into Properties and Methods - 0 views

  •  
    Learn how to work with PHP properties and methods in depth. Looks at constructors and destructors; static properties and methods; class constants; type hinting; and overloading.
1 - 20 of 32 Next ›
Showing 20 items per page