
trq
Staff Alumni-
Posts
30,999 -
Joined
-
Last visited
-
Days Won
26
Everything posted by trq
-
The simplest way to gain request-start to request-end speed is to cache using something like akamai.
-
Composer ships with an autoloader, just stick to one of the standards and use that.
-
like wtf?
-
The point I'm trying to make is why have the rewrite at all if you're just going to use normal querystring parameters? I understand you want to force everything through a front controller, but why stop there? But yeah, you could just use the QSA flag to have apache append existing parameters. RewriteRule ^(.*)$ index.php?uri=$1 [PT,L,QSA]
-
That rewrite rule removes the need for typical GET parameters by making your urls "pretty". So instead of this: users/activate-account?email_address=test&token=test You would use something more like: users/activate-account/test/test Of course then you need some sort of "router" to parse and handle these parameters for you. If this is your own framework you need to decide how your urls are going to be formed.
-
Why? The only reason to do this is laziness. It is making your code tightly coupled to whatever this "god" object is. A controller has no interest in your connection settings for instance. Objects should be passed their dependencies (and only their dependencies) at construction time. Most frameworks handle this in an easy to manage manor by providing a configurable dependency injection container which allows you to configure how objects are to be created.
-
You don't need a regex unless you actually need to match a pattern.. <?php if (substr_count($path, '/') > 2) { echo "Directories too deep"; }
-
The official site will have the best most up to date documentation, not that it's a very popular framework IMO.
-
CodeIgnitor will teach you nothing.
-
Codelgniter is an abomination and a dying project so forget it. Any of the other 3 are probably worthwhile though I don't hear much about Cake these days (but that is likely just the circles I hang in). As for where to start. This question gets asked all the time and the answer is always the same. Try them all and see. If I were in your position I would spend a weekend with each, and then decide. They are all very capable, so it's just personal opinions as to which one you like best.
-
Your code is unreadable.
-
How do you debug php? Which debugger do you use?
trq replied to renatov's topic in Editor Help (PhpStorm, VS Code, etc)
It is. I use it on a daily basis with a few large Symfony2 based applications. It's a great tool. http://thorpesystems.com/blog/debugging-php-in-vim I'm pretty interested in taking a look at http://phpdbg.com one of these days too as it ships with PHP5.6. -
The second question in particular assumes you are talking about client side (executed in the browser) javascript. Server side javascript is becoming more and more popular these days and is capable of making use of many different database systems.
-
vim for Windows? Yuk.
-
We do not delete accounts. If you don't want it, don't use it, simple.
-
2 & 3 will never happen using vim's autocompletion. And 1, well, vim gets its context from a few different locations depending on the keystroke you use to start completion. Generally, I only ever use the context of the current buffer. This meens variables will only be completed if they already exist in the current buffer. Not that I use completion often anyway.
-
Not at all. That's why I said I rarely use it.
-
vim's code completion is the best (quickest and most flexible) Ive used, not that I use it often.
-
Silex (http://silex.sensiolabs.org) is an awesome micro-framework built on the shoulders of Symfony (another great though full stack framework).
- 8 replies
-
- 1
-
-
- framework
- micro-framework
-
(and 1 more)
Tagged with:
-
This resonates with me more than anything else. http://blog.sanctum.geek.nz/series/unix-as-ide/
-
My main motivation for working in vim is the fact that we do allot of remote stuff via ssh on client machines at work. So, now I can use the same editor under all circumstances. Even when I work from home, it's so much easier to just connect to the vps, ssh in and open vim in a terminal. I don;t have to worry about the overhead of a Desktop.
-
Have you tried an IDE? I used to think a simple text editor was all I needed too, but then I tried an IDE. The only time I use a regular text editor now is just for real quick edits, or stuff that I don't want to make into a project in my IDE. IDE's tend to get in my way. All I use is vim with a few plugins: https://github.com/tpope/vim-pathogen https://github.com/tpope/vim-fugitive https://github.com/tpope/vim-unimpaired https://github.com/vim-scripts/taglist.vim https://github.com/vim-scripts/sessionman.vim https://github.com/vim-scripts/bufexplorer.zip https://github.com/tpope/vim-surround https://github.com/vim-scripts/FuzzyFinder
-
I'm a massive vim fan so don't really have much of an opinion when it comes to IDE's.
-
That's because MS sux balls.