Web Application Testing Tips [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am diving into the web application testing line(php ,ajax,javascript) and need some guidance. There is a lot of stuff in google.
Does anybody known any good links or tutorials to learn from. Any video tutorials that I can watch ?

For PHP testing you could check out the PHPUnit tutorial on the Pear site, and this video on CakePHP TV
For JS testing it might be worth looking at Google JS Test
Hope that's useful!

If you want to go for automated testing, then I would suggest using SELENIUM IDE. You should be able to find tutorials & videos to learn how to use it.

It might be worth trying a bit of Unit Testing with your PHP. You can take a look at
http://www.simpletest.org/

For PHP testing there's a lot of automated testing framework that you can try out, here's a list of some of them.
PHPUnit
PHPUnit is a programmer-oriented testing framework for PHP.
It is an instance of the xUnit architecture for unit testing frameworks.
Documentation for PHPUnit : https://phpunit.de/documentation.html
Codeception
Codeception collects and shares best practices and solutions for testing PHP web applications. With a flexible set of included modules tests are easy to write, easy to use and easy to maintain. Codeception encourages developers and QA engineers to concentrate on testing and not on building test suite.
Documentation for Codeception : http://codeception.com/docs/01-Introduction
Phpspec
A php toolset to drive emergent
design by specification.
Documentation for Phpspec : http://www.phpspec.net/en/stable/manual/introduction.html
Peridot PHP
highly extensible, highly enjoyable, BDD testing framework for PHP.
Documentation for Peridot PHP : http://peridot-php.github.io/docs/
Atoum
atoum is a simple, modern and intuitive unit testing framework for PHP! It is completely standalone, everything is available and works out of the box.
Documentation for Atoum : http://docs.atoum.org/en/latest/
these are few of many many other php unit testing frameworks, you can check them all and choose for your self which one to use and which one is best for the job.

Try out for
http://www.w3schools.com/
it will be helpful

Related

PHP session handling to save to database [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Learning PHP, the most frustrating hurdle for me seems to be weeding through outdated tutorials, blog and forum posts to find relevant, modern guides.
I want to understand how to implement saving sessions data to databases the right way. However, most of the instructions I can find regard custom session handlers, and seem to be many years old, and this concerns me. I don't want to waste my time learning outdated procedures. Are custom handlers still the way to accomplish this? Are there better/newer modes of storing sessions to db's? I would greatly appreciate anyone taking the time to point me in the right direction. Many thanks!
To confirm what #rickdenhaan was saying in comments, custom handlers is the right way to go.
PHP doesn't provide a lot of different session handles. Maybe because Zend (which supports PHP) provide Zend Session tools.
To avoid reinventing the wheel you have to options :
Use a framework
That will handle all of this kind of stuff for you : session, MVC, ORM, config files etc
Most of the time this is the right choice for a new project, and Symfony and Laravel are great projects to start.
Use external modules
If you want a more modular approach, you can import externals modules with composer and create something that suits your particular needs.
This can be a great approach to refactor an existing project (either based on an old framework, or on legacy code)
And in this case, you still don't reinvent the wheel, you can use Zend Tools to handle your session :
https://github.com/zendframework/zend-session
Install it with composer and start working with it. Use it with built-in php tools session_set_save_handler()
I hope this answer your question in a broader way.

Event-Driven PHP Framework? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm wondering if there are any completely event-drive frameworks out there for PHP which are based around dependency injection for decoupling. I know there are some frameworks that make use of these patterns - but in the end the entire life-cycle of the application is still pre-defined and linear in style.
For example, most frameworks are built to receive, process, and return results from HTTP requests. An event drive framework would have handlers for that, but also be able to be used for new purposes like background processing, command line interaction, or other non-standard use cases.
It sounds to me like the Photon framework fits closest to your description - the key point is that you can't have event-driven code without php running in a daemon-like process. Your choice of webserver in fact dictates whether what you ask is possible or not - photon is dependent on mongrel2.
I have never used it for a project personally, but I believe that Prado covers what you are asking. It is componentised, but I cannot be sure about the dependency injection aspect.
From their site:
PRADOTM is a component-based and event-driven programming framework for developing Web applications in PHP 5. PRADO stands for
PHP Rapid Application Development Object-oriented.
I know of it because one of my university class mates designed the logo and website for the project.
Not used it, but I believe in addition to Prado, which Treffynnon has mentioned, Qcodo is a pure event-driven framework.
I was looking what is around as well and i came across p4e which is based on zend framework,and nette, hope it can help!
Off the bat there are these 2 as well:
Zend Framework 2 (still in beta)
symfony 2
Both have all the things you are looking for I believe.
Symfony2. Simple as that.
http://symfony.com/
Yii ,It is a component based and event-driven framework, Pure OOP and MVC. It is very clean and neat. Check it out.
http://www.yiiframework.com
The Qbix Platform is heavily event-driven in PHP, although it does not use dependency injection.
Reactphp is what you are looking for.

PHP Framework / Library Suggestions for a Backend [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 months ago.
Improve this question
I am about to start to developing backend site of a php project. Companies and site admins will login to this site and manage their data on the project.
My previous admin panel experiences were full of agony and pain. So I want to make sure that I choose correct tools for my purpose.
By the way, please note, I'm not looking for scaffolding. There won't be much tables in my database. Instead, there will be complex logic between entities.
I want clear seperation of markup and logic code and easy-to-use and standardized user-interface.
Thank you.
Edit:
I understand this is very subjective. This is why I call it suggestion. I want to try a few of chunks of code before going along with one of them.
There is no perfect answer for this, it depends a lot of your (and your team) programming experience and your project's requirements.
As it talks about PHP and backoffice, I suggest you look at symfony framework. It's a RAD framework with great admin features and tons of plugins easing backpanel developement.
I understand you don't want scaffolding, in symfony you can choose to use a very customizable admin generator or build your own forms/listings (or mix between both, using generated as a good code base and extending it).
It comes with a great separation of concerns as it uses MVC paradigm, but aside from MVC it has form management sub-framework which can help a lot developing backoffice.
Be careful if you're not familiar with PHP5 OOP and MVC it could be little complex to learn and understand, but if your planning could allow you to have time to learn symfony programming, it's an experience I would recommand to every PHP developer.
This framework is very well documented, and as an introduction tutorial they offer a class around a website example with its backend application.
Of course, this is subjective and others would perhaps recommend you other choices.
Only recently went through a couple of frameworks about a month ago for a site I was working on and found CodeIgniter was easiest to get up and running and had the best documentation and tutorials.
http://codeigniter.com/
Alternatives are symphony, cakePHP and Kohona

PHP desktop applications [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have quite a few years experience of developing PHP web applications, and have recently started to delve into Python as well. Recently I've been interested in getting into desktop applications as well, but have absolutely no experience in that area. I've seen very little written about PHP-gtk and wonder whether it's really a good area to get stuck in to.
What I'm really looking for is something that will allow me to quite quickly develop some decent small/medium sized apps, and be able to deploy them in Linux and Windows. Something in Python or PHP would be great (but I'd be happy to learn something else if it has big advantages).
What do you guys recommend?
Thanks
Building applications in PHP with GTK is possible to create client-side cross-platform applications, but I don't necessarily think it's the optimal choice for GUI development...
Here are some links:
http://gtk.php.net
http://www.cweiske.de/phpgtk.htm
Gnope.org
kksou
Python and Java are both excellent for working on both Linux and Windows environment. They are generally hassle-free as long as you're not doing any OS specific type of work. Python for creating desktop apps is fairly simple and easy to learn as well if you're coming from a PHP background, especially if you're used to doing object oriented PHP.
Why would you like to develop a desktop app in php??
Get yourself a descent programming environment (c/java/c#/) instead of abusing php
especially with c# and java you get pretty quick very nice results. And both are cross platform (although java is easier for cross platform stuff).
C(++) in combination with QT or GTK is also possible, but there the results appear slower
Well its too late to answer i guess but still for the sake of information may I suggest Open Application Platform (OAP) as a possible solution. OAP allows for PHP/MySQL applications to be distributed as installable Windows(tm) applications.
I stumbled upon it while I was looking for porting a PHP app to desktop and found this. Worked great for me. No extra tags for window creations like in winbinder etc.

Mastering Joomla [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am planning to develop a portal using Joomla cms.
The portal has to be fully customized.
I would like to know some best tutorials and books for Joomla CMS customization.
Thanks
Really the best thing I've tried - and believe me I tried a lot - is by using Lynda.com. Its very cheap and it has some really great video tutorials about Joomla. You can also learn how to develop modules and components if you are an OOP developer.
http://www.lynda.com/search?q=joomla&x=0&y=0
Also for books I would suggest the "officials" from Core Devs of the Joomla Platform
Joomla-Programming
Joomla-Templates by Angie Radtke
In this order:
Joomla! 1.5: A User's Guide: Building a Successful Joomla! Powered Website (2nd Edition) by Barrie M. North
Joomla! 1.5 Template Design by Tessa Blakeley Silver
Learning Joomla! 1.5 Extension Development by Joseph LeBlanc
Mastering Joomla! 1.5 Extension and Framework Development: The Professional Guide to Programming Joomla! by James Kennard
Where you start on that list depends on your current ability and what your goals are. #1 is for beginners. If you want to do template design and already know html and css, then #2 is the place to start. If you are doing custom module and components and you already know PHP, then start with #3 and #4.
HowToJoomla is what you're looking for.
If you're going to be doing modules or components, the offical Joomla! wiki is by no means exhaustive, but can be useful for some common tasks. Check the 'Developers' section.
There are some decent tutorials at jlleblanc.com here:
http://www.jlleblanc.com/content/blogcategory/0/51/
If you're a bit more of a hardened dev, then the Joomla API docs can be useful, but I do admit they're hard to browse (it's not always obvious which package any given class will be in), so it's often easier to search them using Google or similar.
And there is Joomla! 1.7 - Beginner's Guide in several languages.
Joomla's documentation is mainly aimed at 1.5 right now. The API is not as documented as it could be, with a lot of method names that are things like printfooter() and the documentation says 'prints the footer' (I'm looking at you, pagination class).
The books recommended above are solid. There is a 1.7 MVC component tutorial as well that leaves out details, but between that and careful reading of source code and the Joomla API you can slowly get something out of it.
The biggest hurdle is going to be memorization. Lots of Joomla Class methods are not intuitive or the best documented (for instance, using the _() setup to run lots of arbitrary class/method combinations).

Categories