FAQ

Frequently asked questions.

Why don't you support legacy systems without URL rewriting?

Pragwork is a new technology and it assumes you will create modern web applications. Nowadays, in the age of SEO and PHP 5.3, URL rewriting is a such common feature you should not have any troubles to get it working.

However, if you are really tied to the legacy system without URL rewriting, there is a hack that might help you. But notice, it is not tested well and rather not widely used. To make Pragwork working without URL rewriting try to append to the server_path configuration property (in the 'config/application.php' file) value: '/index.php'. Pragwork will work without URL rewriting though all URLs will contain the /index.php part inside.

Why there is no automated routing?

There are two main reasons: speed and security. Automated routing is very convenient while developing but when the application is deployed and works in real conditions, the whole action parsing process should be as quick as possible. Also, the same parsing scheme is used in almost all URL resolving functions. Each use of such function adds extra time so the function must be as fast as possible.

The second reason is security. There is a lot methods placed in controllers which are not actions. There are filter methods, conditional routines (notice, anonymous functions cannot be declared in static definitions, so they have to be plain methods), etc. Many frameworks make use of action naming conventions therefore. But we find it more embarrassing than managing routes explicitly.

To make it easy for you, we tried to make a really clever tool that will handle routing with ease. The Prag will add them automatically if needed along with proper comments to help you navigate through the config/routes.php file.

Of course, we will see how things change in the future. Perhaps annotations in the future release of PHP (5.4) would be helpful.

Enter your question

Please enter your question below.

Privacy Policy

All your data will be used only to answer you. Your question may be displayed later on this site. Your email will be kept in confidence, whereas your web page may be listed here as a hyperlink.

We will never spam you. If you want to track recent changes on the website consider following us on Twitter or Github.


Fields with * are required.

*

http://

*

1024 characters max.

*
    Please use digits, not letters.