Posted by Marcus Antonius - October 27, 2010. in php
CRUD is a set of classes that facilitate the development of object-oriented applications in PHP, making the persistence of objects in relational databases using natural language.
The main goal is to change the way we think about solutions in php, but also change the way we programmed using a language as naturally as possible. We believe that there is a correct application based on a database (no longer to be Object Oriented Oriented Tables), who must send in the application are the classes model the problem domain, and the database is only a way of storing this data, but do not encourage leaving the resources of the database, but uses them in addition to ensuring the integrity of data.
Read more ...
Posted by Marcus Antonius - September 13, 2009. in php PHP Web applications can add the state in their applications very easily, because the illusion of state is maintained through the ID of a session and it can carry information from one page and another without losing it along the way. Perhaps you've lost a potential productivity due to bugs or even bizarre security breaches because of these little beauties. Here are four tips to keep you from getting lost time and ensure your site.
1. Do not use underscores in hostnames
Unless you have memorized the RFC number of characters allowed in the host name, you may not be aware that it is not allowed to put underscores in hostnames. In some browsers, like Firefox, this prohibition does not apply, but Internet Explorer will refuse to set a cookie / session which has hostname underscores. IE will make on each page load is generated a new session ID. But you will never accept it. Source: documentation set_cookie .
2. Update your sessions after redirects
You must call the function session_write_close (or alias session_commit) to write the data in the session before any HTTP Location redirects are issued. This command also "frees" the user's session so he can do other activities in your application. See the comments in the upper chamber and bkatz .
3. Preventing session fixation
Fixing session or session fixation, allows any malicious user receives the id of a valid session through a simple link. Not predict it or steal it from the cookie-user, or through a $ _GET common. The victim is caught using the session id generated by the "hacker" and not through the server. You can prevent this type of attack by calling the function session_regenerate_id (), particularly after storing important information such as a login name or a flag. This will show the "hacker" a session id useless. Chris Shifflet did a more thorough discussion on Session Fixation .
4 - Do not expose the session id's.
Cookies may be, relatively, the safest place to store the id of your sessions if comparing to incorporate it directly into your url (via PHPSESSID). Here are two settings (via php.ini) to control this behavior, each of them are very important, so you must either set. You must set the session.use_trans_sid to (off) and if you are using PHP 4.3.0 or higher you can also set session.use_only_cookies to "1 '.
Source: Invision Power
Tags: php , sessions
Posted by Marcus Antonius - August 18, 2009. in php Tekuna is small, just 3,000 lines of source code, it Improves reusability with the component-oriented definition of the application and intuitive routing. Its small footprint will not pollute your codebase with unnecessary stuff.

Below a more detailed feature list for Tekuna:
- Component-oriented Application of the Definition
- Intuitive Routing of Actions to Controllers
- Friendly URLs (RESTful API)
- MVC Architecture
- PHP Error Handling with Exceptions (and Thus Catchable)
- Separate Request and Response Objects
- Strict Input Filtering
- Full UTF-8 Support
- Support for multiple Template Engines
- Simple Multilanguage Support
- Fully unit-tested
- 100% Compliant E_STRICT
- Combinable with many other frameworks (templating, ORM, Unit-testing ...)
- Geared to java programming and naming style
- Open Source under an MIT License
Tekuna the current version 0.1.189 requires PHP 5.2.1 with Apache mod_rewrite enabled on your webserver. The quick start is available to Understand Tekuna Principles, architecture and features. The ITS project is at early stage and not ready for production, but You Might check the project's roadmap to have a better idea about what's coming next.
Tags: framework , php , tekuna
Posted by Marcus Antonius - August 4, 2009. in php Learn how to add documentation on PHP.net search progress bar of Mozilla Firefox and get quick and accurate documentation of the function or feature you are looking for.
Today I will give a basic tip for everyone who likes to work with PHP and need to constantly access the PHP.net to ask questions about the functions / arguments / parameters / classes, etc. ... It is a wonderful documentation that everyone should visit at least once a day.
Most developers use Mozilla Firefox for the huge advantage of plugin development and I really like FF because of that little bar that is on the search side of the "wonderfull bar" ... And I'll show you how to put the PHP.net there , for you to enter the function name and drop it directly in the documentation.
First go to PHP.net and note that the íconezinho the search bar will be blue:
Figure 1
Now just click on the arrow and click Add "Add PHP.net search", as shown in the image:
Read more ...
Tags: firefox , php , php.net
Posted by Marcus Antonius - August 1, 2009. in php If you - at this late date - no idea what a "tweet" from here to put www.twitter.com !
Now! We can talk as equals. Think of a framework. One big thing. With several options, modules, plugin support, MVC, perhaps a Data Mapper, etc, etc, etc.. Now think of a tweet: 140 characters. It's things like oil and water, cat and dog, are Pauline and women (I'll still listen for it).
Well, trying to show feminine beauty to St. Paulinus - or a framework need not be a great thing, for those who did not understand the joke - the founder of Symphony (the framework) created Twitter: a framework the size of a tweet , ie 140 characters. In fact - and logical - it is no big deal, simply acts as a Front Controller pretty basic. But it is a proof of concept and uses new features of PHP 5.3, finally ... the miscreant is as follows.
1 <php
2 __DIR__ require. '/ C.php';
3 if (! Is_callable ($ c = @ $ _GET ['c']?: Function () {echo 'Woah!'}))
4 throw new Exception ('Error');
$ 5 c ();
Now you can parguntar, what are the "new" things that Twitter is using, simply:
Constant __DIR__
Operator?:
Anonymous Functions
In the end, Twitter exists only as a joke, and to show some new features of PHP 5.3, but if he really is accepted as a framework it is the fastest existing. Fast forward a few benchmarks show that I am already doing and tweet them.
Twitter's website is: www.twitto.org
source: PHPSP.og.br
Tags: framework , php , twitter
Posted by Marcus Antonius - July 30, 2009. in php In this post I will make a sínstese a series of posts on the use of frameworks in php and also the fact that a framework is not.
PHP is the programming language world's most famous for several reasons: flexibility, ease of use and various other factors. But sometimes the programming becomes monotonous and / or repetitive, and there is a framework that can help.
What is a PHP framework?
In summary the framework is a structure, you create a foundation for its application. In other words, the framework will allow rapid application development (RAD), which saves time, helps to create more robust and secure applications while reducing the amount of repeated code. The frameworks also allow beginners to create applications more stable ensuring a good relationship between the database and the outer display. This all allows you to spend more time developing the application itself than repeating the code that all applications have.
The working set idea behind a framework is linked to the PHP MVC (Model View Controller). MVC is a form of programming that isolates the business logic (such as the application runs) layer display (the visual). The model takes care of the database, the View layer handles the display and the Controller handles the business logic. This all makes you work faster and in a sectorized.
Why use a PHP framework?
Developers use frameworks for various reasons, the greatest of which is to streamline the development process. The re-use of code in several projects will save much time and labor? This is guaranteed because the framework already has a number of modules pre-configured (and working) to the most varied and common tasks like sending emails, connecting to the database, sanitation (cleaning) and data protection against attacks.
Stability is another major advantage of the frameworks. The simplicity, which is a major "achievements" of PHP, is also what allows many mistakes and failures for beginners? Not every code that works is necessarily correct and well developed.
Read more ...
Tags: framework , php
Posted by Marcus Antonius - July 13, 2009. in php Hello all, I would like to apologize for the delay in posts, but time was way too rushed.
Now returning to the posts have come (yeah, I know it's been a few days ...) the new version of PHP.
PHP 3.5 brings some new innovations expected for the developer community.
Bugfix
There were over 140 small problems corrected, tornanado this a more stable versions of PHP parser.
Namespaces
Widely used in other languages, serve to group pieces of code and protect them and avoid conflicts with other parts of the code.
Garbage ECR r
Allows, among other things, to store the contents of variables in cache and can be redeemed at any time.
Anonymous Functions
Enables the creation of functions without a specific name, which will facilitate the implementation of callback functions, with indirect calls and responses similar to those of traditional functions.
Integration with MySQL
New drivers to access databases, which further expedite searches, and extend support to new models.
Tags: php , php 5.3
Posted by Marcus Antonius - May 28, 2009. in php One thing recently found really cool was the discovery of podcasts about PHP.
First was the PHP Podcast , very interesting, but only in English.
So searching I found the PHP user group SP, the PHPSP , and saw that they created PHPSPCast , who is having an amazing reception with several messages of support and encouragement, and hundreds of downloads in a few days.
Tags: php , podcast
Posted by Marcus Antonius - March 23, 2009. in events , php Congratulations to everyone who participated and especially organized the II PHP-PB! At each meeting the levels of the talk keeps getting more interesting!
For those who did not have the pleasure to witness such an event, follow the links to photos, slides, and the twitter of the Meeting:
Slides
Photos
Twitter
Tags: paradise , php , php pb
Posted by Mark Antony - February 17, 2009. in events , php Hello people! I apologize for the "disappearance" but I was too busy with the things of graduate and also what I do because I'm changing neighborhood, where the rush ta great!
But back with great news! the Second Meeting of Users of PHP Paraíba!!
The Second Meeting of Members of Paraíba PHP is an event aimed at disseminating the use of PHP programming language, especially
developed to create systems on the Internet. The public is estimated at 250 participants from the states of Paraiba, Pernambuco and Rio Grande do Norte, and will be held in the auditorium of UNIP, in João Pessoa, the date of March 7, 2009.
Registrations in the site -www.php pb.net .
The main objective of the event is to show the market feasibility of adopting as a standard development language mature, robust, with excellent technical support, fast performance and, above all, totally free of licenses.
In turn, the developer community is encouraged to explore their immense potential, ease of learning and viability
marketing, while you are also encouraged the professional development and the constant search for quality services.
With a grid of lectures diversified and focused on current and relevant technological issues, the Second Meeting of Users of PHP
Paraiba is to occupy an important role in the formation of opinion, both the business class and professional class, about
culture of information technology in our state.
Finally, the Second Meeting of Users of PHP Paraíba fulfilling its social responsibility role by encouraging its participants
the donation of food for the House of Children with Cancer, a philanthropic institution that offers support to patients and families from the countryside seeking treatment at the Cancer Hospital Napoleon Laureano.
Programming:
* 08:00 - Registration
* 08:30 - Opening
* 09:00 - Social Media and WordPress: the power of PHP plugins and themes - Joseph S. Fernando Carvalho "Fish"
* 10:00 - Development organized with version control - Alwin Garside
* 11:00 - clouds in PHP: Developing for the corporate market - Marcos Bezerra
* 12:00 to 14:00 - Lunch break
* 14:00 - Moodle: Systems Integration in PHP - Gleidson Lacerda
* 15:00 - Accessible Web Applications - Diego Person
* 16:00 to 16:30 - Coffee break
* 16:30 - PHP Jedi - Good practices and high performance - Felipe
Brook
* 17:30 - Paths to Certification Zend - Berardo
* 18:30 - Roundtable to resolve the ZCE Practice Test
* Post-event: PHPinga / PHPizza
Tags: paradise , php , php pb