« first day (1093 days earlier)      last day (3871 days later) » 

10:00 PM
echo MagicTranslator::get('main.heading', 'ru-RU');
 
static, your favorite.
 
you asked how it is usually implemented
this is what people usually do, at least that what it boils down to in all the major frameworks ... then again I have not looked in how Sf2 does it
 
Does symphony2 do that with the static calls?
If Sf2 does it like that I will be in a bad mood
 
it probably has something like $container->get('translator')->get('main.heading', 'ru-RU');
 
Isn't translation just a service injected to the templating engine that then uses it for figuring out which strings to use? It's still a big dictionary in the end but at least you get to test it easily and you use different translators based on context without global state.
 
10:02 PM
I have this picture of it being unit tested with 100% coverage and working perfectly
 
At least that's how I've seen it implemented in the past.
 
How many things are you working on @tereško? -_-
 
I do not want to see static calls like that in the first few files I open
Or it will put me off it straight away
 
well ... I was right about how Sf2 does it
 
@tereško Does the fact you have to pass a string to .get to get a translator bother you?
 
10:06 PM
@BenjaminGruenbaum , it's the service locator that bothers me in Symfony2 ... it's always the service locator
 
Does Sf2 pass that service locator all over the application?
 
I never really got service location, it seems kind of counter intuitive to work so hard to have just as much if not more implicit global state.
I mean, you work hard to do inversion of control for your dependencies but you get none of the benefits.
 
Nov 9 '12 at 9:53, by tereško
@raghul currently "the best" framework in PHP would be Symfony2, but it is like being the smartest kid in the remedial class. They are all bad, it's just that Sf2 is the less-broken one.
and yes, it does
 
I had high hopes for this
What would be a massive positive of this framework
Is there any huge feature that is amazing
 
The main feature is "it is better then all other popular frameworks"
 
10:10 PM
Why don't they do it like Angular? They have a service locator (although they're fixing that) but you never create dependencies unless you work really hard to - they're just pushed to you by default.
 
The documentation seems to be better than Zend aswell at first glance anyway
Time to take a look under the hood of this
 
.controller("MyController",function($scope,$http){
    //http module available here, injected by the FW
})
//Is a lot more common than
.controller("MyController",function(){
    var $injector =angular.injector(['ng']); // why would you even
    var $http = $injector.get("$http"); // that's not even guaranteed the same $http
})
 
well ... Zend's codebase was filled with globals and singletons as late as Beta3 release .. dunno .. whenever I look at ZF2 the code seems just that tiny bit off ... uncanny valley effect
 
(Not saying people don't do the second, if you give the people the slightest chance to shoot themselves in the foot...)
 
@BenjaminGruenbaum that angular there seems like a one big global to me
 
10:14 PM
@tereško big question. Is it easy to implement correct views? Views which have brains
 
@David SF2 does not come with "views" .. you use what you wrote
 
@tereško It's a namespace, it has no state. angular.injector is a constructor. I could have done myApp.$injector which would have been even worse (and yes, people do that, and yes - those people are why they're rewriting the whole DI system for Angular 2)
 
What do you mean what I wrote?
What I have used in the past?
 
The fact people choose service location is what's most astounding to me. Then again you get that a lot in JS frameworks, people use a bunch of stuff they don't understand and generally just mess up. Sure that's common in PHP just as much.
 
10:25 PM
@David I might have messed up tenses there ... the point was that there is nothing in core of Sf2, which defines how views have to be implemented. You have to write your own ones.
 
@tereško I like the sound of this
Sounds flexible
 
10:39 PM
lol, how to get free healthcare in the US youtube.com/watch?v=A2GcVxy3jRA
 
Joe
@webarto Were you asking @JoeWatkins about this or me?
 
In Sf2 how do you know what type of bundles to create? Do you split the application into different parts and have a bundle for each?
 
5,000+ downloads on packagist for this DB Abstraction Layer :(
 
user652649
10:57 PM
@Fabien skipped reading at line 1 column 5: dibi::connect()
 
@Wes Sounds about right.
 
@tereško Sf2 documentation "A bundle is nothing more than a directory that houses everything related to a specific feature". Lets say I want to just show a homepage and a contact page with a contact form, do they go in the same bundle or separate?
What "feature" is a homepage classed under
 
I am not an Sf2 expert
 
Damn
 
@tereško, do you know how long before an idle chat room freezes?
 
11:07 PM
nope .. but it's more then 4 days, AFAIK
 
because i did an experiment. XP trying to lure other people from my country to that room. hehe
it's because i dont see much people from our country here in SO. which is weird given the amount of programmers here. hmm..
 
@PeeHaa the owner is lucky the police is there..
 
got that right
 
Brazil is crazy
Any of you guys have a PDO wrapper I could peruse?
 
11:30 PM
for what purpose ?
 
Just to see some good implementations/code. I haven't actually used PDO before lamephp. :(
 
Night @PeeHaa
 

« first day (1093 days earlier)      last day (3871 days later) »