« first day (1663 days earlier)      last day (3290 days later) » 

1:00 PM
Unless Twitter card is part of Twitter's commitment to add blackjack and hookers, I don't think anyone here has heard about it or cares
 
@StephenWolfe thanks for your time, i ended up doing a replace for now
 
@Joseph not sure I was any help lol.
 
@StephenWolfe at least you tried
 
TWITTER CARD
 
1:08 PM
'noon
 
MORNING
 
indeed
 
Gotta get up at 3am -.- flight's at 6 from Manchester
 
@Jimbo Maybe if you lift in a good place you wouldn't have this issue :-P
On an entirely unrelated note @Jimbo... are you going to phpsc?
 
@DaveRandom I am, are you?
 
1:21 PM
I am. How are you getting down?
Also, where are you staying?
 
DaveRandom: and finally, can we share a bed?
 
That just goes without saying, no need to ask that
 
I haven't even thought about that. I was thinking (1) train, (2) travel inn or something
 
k cool, well should prob do something about it soon so don't get stung on prices. I'll take a look around this afternoon and let you know what I find if you want.
 
There's an airport in Southampton
 
1:26 PM
I may go see @Fabor on the day before if he's around so I can go and fettle his home network (if you still want me to?)
Fuck me train and flights are ridiculously expensive, would be cheaper to drive :-( /cc @Jimbo
You're looking at min £100pp for either option
 
Yeah, it can be nuts around that time of year I guess.
I'm around and coming with PHPSC (with my boss)
 
@DaveRandom Bollocks, that's not even including hotel
 
I thought you were both couch surfing
 
@Fabor Would like as close as poss to venue, tbh. No-one lives in Portsmouth afaik.
Like, literally no-one. The place is basically a wasteland.
:-P
 
I thought you were crashing at Joe's? And he's driving so travel is easy.
 
1:37 PM
It's like Fallout 3, but by the sea
 
@Fabor I'm drinking so travel is unpleasant (for him)
 
heh.
Well my sofa is still available for those willing to put up with the potential fetor of my cat dumping in his tray at 2am.
 
@Jimbo If you can be arsed driving I'll pay half petrol... I would drive myself but I doubt the wife would be too impressed with me taking the car for the w/e
 
Good morning.
 
@DaveRandom Maybe.. I just found a return ticket for £50
It'll cost more than that in petrol in my car (way more lol)
 
1:40 PM
@Jimbo Yeh but will it cost double that?
For each person in car, petrol cost halves
 
Gotta add parking costs, worry etc. Let's not rule out the train just yet, it's much easier if we both got the same train down to Portsmouth and back
 
Yeh no worries
Plus driving back sucks
Where'd you find the £50 ticket and what time(s) is it for?
 
@Jimbo Can definitely park at mine though it's in Soton. Joe passes by my house to get home/to the venue.
 
thetrainline.com UX sucks balls
 
So presumptuously could grab a lift iwth him
or my boss will drive us
 
1:43 PM
(and that's not even from Manchester)
 
@ircmaxell Did PNWPHP ever announce their second round of people they selected?
 
@LeviMorrison Still waiting...
 
@Jimbo Also means you'd definitely need a place to stay in Portsmouth
 
I still haven't received anything personally either. Nothing on twitter as far as I can tell either.
 
@Fabor Definitely. There's no chance I'm setting off at 3am to get there for 8 lol
That was a given though
It's looking like approx £100 per night @DaveRandom :/
Ah, found one for £67 per night
 
1:49 PM
Is there a conference in the UK soon?
I have never been to a PHP one
 
insert joke about not having decided whether I'm going to go here.
 
Wow i use to live in the south ! cant believe there was one there.
 
first one AFAIK
 
@LeviMorrison don't think so
 
Guess I'll submit to Northeast PHP. I can only attend one conference for the rest of the year since I have other commitments.
 
1:55 PM
Are there any good London ones?
 
@StephenWolfe It's cheaper for me to fly to Majorca, buy an unconf ticket there, get a suite room for 4 nights by the beach... than it is to go to PHP London
 
user895378
morning
 
user895378
@Jimbo That sounds like a no-brainer decision to me.
 
@Jimbo how much is PHP london then?
 
user895378
Majorca vs. London ...
 
1:57 PM
@rdlowrey Yep. I fly tomorrow morning at 6am :P
 
user895378
nice
 
London is only 20 mins on the train for me :D
 
@StephenWolfe The conf ticket is like £350 on it's own
 
@rdlowrey London in February....
 
1:57 PM
Thats like a holiday lol
 
user895378
Oh that's right. You guys live in a part of the world where seasons are a thing ;p
 
Technically no......we have weather, not seasons.
It just so happens that the weather in February usually sucks a lot.
 
Raining and Windy today :(
 
@rdlowrey I was so confused growing up why winter started in late December.
We usually had snow in November so… yeah
Was not too uncommon to have snow on Halloween either.
 
2:01 PM
Rain
 
@StephenWolfe uk
 
lol my tub looks so sorry for its self,
 
@rdlowrey yeah, they have 4 seasons, winter winter winter and winter
 
Need summer
 
user895378
hehe
 
2:03 PM
Anyone in here work in London?
 
Winter is coming!
 
What's a word for when someone is trying to be very authoritative in an unpleasant way , i.e. sounding like a twat, that doesn't involve the word the word twat or wanker?
 
condescending
 
@LeviMorrison def do it, it's a good time
 
2:08 PM
Nah, more deliberately authoritarian and unpleasant than that.
 
@ircmaxell I think I'm going to submit a talk on how to improve code with techniques from functional programming.
 
@Danack asshole?
 
awesome :-)
 
@FlorianMargaine I was thinking that
 
@LeviMorrison steal @ircmaxell's article on VO
 
2:09 PM
VO?
 
value objects
 
@Danack C++ developer?
 
@Danack twanker?
 
curt
disdainful
haughty
high-and-mighty
 
2:11 PM
@Danack Management material?
 
'haughty'. Now there's a good woody word.
 
@Danack No no no, tinny!
 
does any one knows why php script give 404 error while processing large csv file
 
Terrible tinny word.
 
2:12 PM
for files less than 40mb is fine
 
@Jimbo I was going to go with Java software architect.
 
Anonymous
@FaizRasool are you using nginx?
 
@Danack have you found a good word yet?
@Danack maybe you need to words
 
HTTP/1.1 200 OK
Date: Wed, 06 May 2015 14:14:52 GMT
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Apache @samaYo
 
@FaizRasool is your script trying to redirect to a page that doesn't exists
 
2:16 PM
no
it work fine with the file less than 40 mb.
 
@FaizRasool any theres no PHP errors?
 
Anonymous
@
 
@StephenWolfe yes, went with haughty.
 
this is header of just webpage
no error
 
@Danack haha what was you writing?
 
2:17 PM
And installed Rogers Profanisaurus for future reference. ffs the app doesn't work.
 
@StephenWolfe there is no error
 
@StephenWolfe Not going to say. This room has an unpleasant habit of jumping on the bandwagon.
 
this is the logic in the file
if ($filetype == "xlsx") {
//xlsx
$reader = ReaderFactory::create(Type::XLSX);
$reader->open('upload/tmp/' . $filepath);
$filearray = "";
while ($reader->hasNextSheet()) {
$reader->nextSheet();
while ($reader->hasNextRow()) {
$row = $reader->nextRow();
$filearray[] = $row;
}
}
$countout++;
$reader->close();
}

//csv
if ($filetype == "csv") {
$reader = ReaderFactory::create(Type::CSV);
$filearray = "";
$reader->open('upload/tmp/' . $filepath);
$reader->setFieldDelimiter(',');
$reader->setFieldEnclosure('"');
 
@Danack oh was it a comment somewhere then
 
upload a file convert it to jason
store into db
 
2:19 PM
I am a disciple of Jasonism. We will convert you. All of you.
 
@Danack I saw it hehehehuehue
 
Please don't jump on. The guy is a massive twat, but he's not a native english speaker - he might not be aware that the words he's using sound the way they do.
 
I won't, I don't often comment over there
 
@Danack if hes not a native english speaker how will u understand that word! lol
@FaizRasool have you tried writing to the database on each line rather than building a big array?
 
yes it is more slow
like you making 5 million queries
 
2:23 PM
@ircmaxell I wish every call for papers form that asks for tags would give examples of ones submitted already.
 
@FaizRasool then build smaller arrays ?
 
I'd love to pick out ones that already exist that are applicable and it would also give me a rough idea of what has been submitted already.
 
@LeviMorrison I wish they would all use a common system
 
@StephenWolfe yes thinking
 
2:24 PM
@ircmaxell Yeah, that would be nice too.
 
@StephenWolfe i think on this point $jasonarray = json_encode($filearray);
when i copy the array to jason encode
it goes out of memory
i think
 
@FaizRasool find out what number of rows inserts well then do your insert every time the array reaches it
@FaizRasool then carry on passing the CSV
 
i gonna break while loop
 
Does anyone have any good resources for best practices for timezone handling in (PHP / web-based) applications (that have to support multiple timezones)? We're just getting into this at work and I'm trying to write some standards so the entire team handles everything the same way.
 
on 2 million 2 see
 
2:26 PM
@FaizRasool yes
@FaizRasool let me know if it works
 
@AllenJB you're screwed
that's the standard
 
@StephenWolfe $count = 0;
//csv
if ($filetype == "csv") {
$reader = ReaderFactory::create(Type::CSV);
$filearray = "";
$reader->open('upload/tmp/' . $filepath);
$reader->setFieldDelimiter(',');
$reader->setFieldEnclosure('"');
while ($reader->hasNextRow()) {
$filearray[] = $reader->nextRow();
if ($count == "200000") {
break;
}
$count++;
}
$reader->close();
}
 
@AllenJB Store and handle everything as UTC and yes you are indeed screwed
 
@FaizRasool use pastbin or something to send code.
 
@StephenWolfe it works
for 2 millon
 
2:30 PM
:D
 
so it is memory @StephenWolfe
 
@FaizRasool yeah
 
@StephenWolfe let me see the possible solution for this
@StephenWolfe which one is better for free memory
unset or null
 
@ircmaxell solved the kmyacc problem yet?
 
2:43 PM
@StephenWolfe null is much better
 
@FaizRasool yeah but used CPU should be negligible though.
 
…I don't think there was a PHP Town Hall episode last month, was there?
 
Does anyone in here build websites for a living or just applications or both?
 
user895378
@ircmaxell @LeviMorrison sounds like a market opportunity ... online conference management tool.
 
@NikiC yeah
 
2:47 PM
@rdlowrey I can't do any entrepreneurial things until I have a stable Amp stack to work with, sorry.
 
user895378
Every industry has conferences ... it's a large market.
 
user895378
@LeviMorrison lol neither can I
 
:)
At the same time I haven't helped with it in like the last year and a half.
 
@NikiC I forgot the trailing %%, and kmyacc just sat at read(3) forever trying to read from the file
 
@ircmaxell lol, then my guess was right
I totally ran into that as well when using it for the first time ^^
 
2:48 PM
:-)
 
user895378
And the money-making angle could be you provide the registration services for attendees and take a % of every ticket sold. Attendees buy their tickets to the conference online through the application's interface and you skim off the top.
 
Morning!
 
Though back then I didn't know about strace and it took a while to figure out...
 
Trying to integrate Auryn into my project :)
 
@ChrisBaker ahh @ziGi helped me with the the other day
 
2:51 PM
@ChrisBaker what's the problem?
 
$code = <<<'EOF'
var a = 123;
var b = a + 1;
EOF;
 
@StephenWolfe you didn't say anything afterwards, how is it working now?
 
@rdlowrey Eh, I'd even be happy with a flat fee per event. As long as you have multiple events using it and they recur each year that's steady, stable income. I don't need to make a complete living off it.
 
array(2) {
  [0]=>
  array(1) {
    [0]=>
    object(JSParser\Node\Stmt\VariableDeclaration)#5 (3) {
      ["name"]=>
      string(1) "a"
      ["expr"]=>
      object(JSParser\Node\Literal\Number)#4 (2) {
        ["value"]=>
        string(3) "123"
        ["attributes":protected]=>
        array(2) {
          ["startLine"]=>
          int(1)
          ["endLine"]=>
          int(1)
        }
      }
      ["attributes":protected]=>
      array(2) {
        ["startLine"]=>
        int(1)
        ["endLine"]=>
 
Dude, I have to sit and write a blog about how to make your own project, something like the No-Framework one but with hookers and black jack
 
user895378
2:51 PM
@LeviMorrison well that's the beautiful thing about the conference market ... they're all recurring!
 
@ziGi I think its okay, I am still trying to get my head round how it all works.
 
@rdlowrey Yep.
 
@ziGi write a blog?
 
(or anyone else in NW UK)
 
user895378
2:52 PM
As long as the service isn't garbage every new customer is like a lifetime customer
 
The thing I am the most torn on is whether I should make a wrapper for it, or just directly use it.
 
Wrapper for the DI definitions?
since it's in the bootstrap I don't think it's necessary
 
@DaveRandom Not at that price with PHPNW + PHPucEU + PHPWC this year :P
 
@ircmaxell is js even lalr?
 
A wrapper for Auryn itself. Like... should I make my entire codebase depend on Auryn specifically, or make a wrapper within my library that takes Auryn as an injected dep.
 
2:53 PM
@Jimbo I was thinking more persuading boss to pay :-P
 
@NikiC no
 
user895378
@LeviMorrison We need to file that one away for later. I think that's one of my better ideas. It's a huge market that spans basically every industry with recurring annual business for almost every customer.
 
@NikiC but it's close enough where there are only a handful of edge cases
 
@ChrisBaker don't do the second one, because injecting Auryn/DIC is an antipattern, since it becomes a Service Locator
 
@rdlowrey I was just thinking about some features that would be nice for both submitters and organizers.
 
user895378
2:54 PM
@ChrisBaker Definitely don't make your codebase dependent on the injector.
 
@ChrisBaker your code base shouldn't know of the existence of Auryn at all
 
@ircmaxell which you plan to not support or hack around?
 
user895378
@ziGi exactly this.
 
because you might change it tomorrow
with a better one :P @rdlowrey
 
user895378
@LeviMorrison you could automate everything ... customers could even print out their own credentials upon buying a ticket.
 
2:56 PM
Oh, I was thinking even just about the call to papers section, but yeah you could offer a lot more.
 
user895378
Yeah that too. And you could even host videos of talks after the fact on the site ...
 
Guys, when you have simple objects like paginators, value objects, etc. they shouldn't be injected but created within the services, right?
 
@NikiC haven't much thought about it to be honest... Really the problem is around semi-colon insertion. With semi-colons there's only one other edge case which I can handle at the lexer stage...
 
@ziGi That's what I mean by a wrapper... a class called like InjectorAuryn, that implements MY Injector interface. So, if I drop Auryn, I can make a different concrete implementation of my Injector interface
 
user895378
@ziGi pretty much yes. That's correct.
 
2:57 PM
@ircmaxell yeah makes sense
 
@ziGi Inject a factory if you want it decoupled. Use new if you want it coupled
 
sane people always write their semicolons anyway :P
 
user895378
@ChrisBaker my point is you shouldn't even need that. You aren't injecting auryn into anything (except maybe one Bootstrapper class). It's only visible to bootstrap code.
 
I wonder if I can do that at the token stream, since there is a T_LINE_TERMINATOR token
 
@rdlowrey I wouldn't want to host the video personally. Talks are long enough that it'd be a fair bit of storage and bandwidth. I'd just put it on youtube and link to it or something.
 
2:58 PM
the parser itself was pretty straight forward
 
@ChrisBaker but the injector is used in the bootstrap phase, do you create objects there and use them?
 
user895378
@LeviMorrison yeah, embed. Better route.
 
@rdlowrey I have a couple of factory methods that are building userland "widgets", which I don't necessarily have control over. I would, for example, give my WidgetFactory a dependency injector. It is there that I am considering whether I hand it Auryn, or a wrapped Auryn.
 
@ChrisBaker I am not sure what your bootstrap setup is
@ChrisBaker never inject an injector, otherwise it becomes a service locator
 
@rdlowrey I'll make a Google doc and share it with you.
 
user895378
2:59 PM
@LeviMorrison cool
 
user895378
I don't have a problem with injecting the injector into factory code TBH. Factories are basically wiring code with delayed execution (not invoked during the bootstrap phase). They aren't part of your core application logic.
 
user895378
Your application logic is what should be agnostic about how it gets what it needs.
 
Are @Levi and @rdlowrey building some conf tool?
 
$widget = $widgetFactory->produce('AccordionList', $widgetOptions);
$output = $widget->render();
 
user895378
@NikiC no, we were mulling over the possibilities. I think it could be a useful (and profitable) thing if done right.
 
3:02 PM
^ I have code that is basically this, so the WidgetFactory is looking at the widget class. I need it to inject the dependencies
And there, I am unsure if my WidgetFactory should be dealing directly with Auryn, or a wrapper that has Auryn
 
@ChrisBaker Why do you need a generic factory? Would it really be that bad to have one factory each for every widget?
 
@rdlowrey that's interesting, I have never considered it like that
 
There are a couple hundred widgets, it's a dynamic page-building drag-n-drop CMS... thing
 
user895378
@ziGi yeah ... I mean a factory's entire purpose is to create a certain type of object. In that case the injector is a real dependency of the factory and not a service locator.
 
ecma-international.org/ecma-262/5.1/#sec-7.9 <-- I can do some of them at least at the token level
 
3:05 PM
That would be a pain in the butt. tbh it's a tradeoff, technically that would be 'bad', but yeah, if it saves writing a few hundred classes, probably worth it.
 
@rdlowrey nonetheless, aren't you breaking the 'tell, don't ask' rule?
because basically, the factory will ask of the injector how to instantiate objects
and you couple it with the factory
 
@ziGi Yep, that's the tradeoff. Having coupled code vs having to write a few hundred factories.
 
user895378
@ziGi How is that any different from the rest of your bootstrap code, though?
 
Aha, I see, so basically you also inject the factories on bootstrapping?
 
user895378
@ziGi yes.
 
3:07 PM
ok, I get it now
 
user895378
Your application just knows it needs a factory to build an object of type Foo so it asks for a FooFactory. The application still doesn't have to know anything about an injector.
 
@rdlowrey do you have an example of a factory that you use?
 
As someone who has to maintain a widget system where all the widgets have the same dependencies... Almost any tradeoff is worth it to avoid that...
 
@ziGi There's one in here, the ResponseFactory, as well as other stuff.
 
user895378
$injector->share($injector);
$injector->share("FooFactory");
class FooFactory {
    private $injector;
    function __construct(Injector $injector) {
        $this->injector = $injector;
    }
    function make($type) {
        switch($type) {
            case "bar":
                return $this->injector->make("Bar");
            case "baz":
                return $this->injector->make("Baz");
            case "bat":
                return $this->injector->make("Bat");
        }
        throw ...
 
3:11 PM
@rdlowrey ah, that's nice
 
user895378
@ziGi ^ there. Your application classes just ask for a FooFactory and they get it. They still don't know anything about how the factory gives them what they ask for.
 
user895378
I consider a factory nothing more than bootstrap code with delayed execution giving you the ability to easily swap out implementations.
 
For my code, the make function is taking the widget name, looking in the widgetPath for a directory of that name, including the widget.php inside that directory, determining what the class inside's dependencies are, then creating the instance.
 
and I guess the objects Bar, Baz, and Bat implement the same interface since make has to return an object that conforms to something
 
So... should that factory take Auryn\Injector, or MyProject\Injector which wraps Auryn
@ziGi Aye
 
user895378
3:14 PM
@ziGi yup. And they may have different dependencies ... or maybe they all need a globally shared config object like $injector->share($myConfig) that the injector provides.
 
^ for me, both of those
 
@rdlowrey that's a cool/useful use of the injector, I can see that now
 
And the other thing I am trying to work out, I want to centralize the aliasing between interfaces and concrete implementations. All the widgets are asking for iRenderEngine, which I have implemented as RenderEnginePHP and RenderEngineSmarty ( unfotunately :( ). So, again a wrapper seems like a good solution, because I can pass it the name of a file where those aliases are defined.
 
@ChrisBaker I do that with something like this
 
Agh, yaml
> # Oh @ocramius, why do you hate us so?
 
3:26 PM
lol
where did you find that? :D
 
Git won't follow Windows' symlinks. Windows' symlinks are exceedingly worse than POSIX symlinks.
 
lol
 
I think that the \Doctrine\ORM\EntityManager has too many responsibilities
breaks SOLID :D
I see at least 5 different responsibilities in there
and the Doctrine Repository is not really a DDD repository but something else
 
3:32 PM
hello, i am downloading a youtube video using one 0f online youtube downloader but after generating download links when i see the source code it does not show that download links in the source code but when you mouse over the download links its show the url but does not show in the source code , how it happening can any body tell me?
 
@NikiC thanks for the reply on internals, you saved me from having to write that exact same thing :-)
 
can any body help me.
 
@ircmaxell your work on ASI is for a php rfc? :D
 
@santosh nagging people to help you won't make things better.
 
@FlorianMargaine ASI?
 
3:38 PM
@ircmaxell automatic semicolon insertion
 
NO
 
@santosh They're probably inserting the download links with javascript after the page loads. From what I've seen, those sites are designed in such a way that the download link doesn't work until it has loaded all 1000 ads on the page first. So, to scrape the download link, you'd probably have to deal with javascript code.
 
Yes, Google are smart little buggers, of course they're gonna protect the content.
 
That said, scraping from Youtube violates their ToS and might constitute copyright infringement or unauthorized access to a computer system, which is a crime in the US. Further, scraping from the scraper sites also probably violates THEIR ToS, and also may constitute unauthorized access to a computer system. So... there's that.
@ziGi He's talking about one of these third party sites that extract audio or video from a youtube URL
I believe
 
3:41 PM
Yeah, but they violate the ToS as you say.
You can always give links/embed and avoid scraping and a lawsuit.
I like what StumbleUpon does
 
@ChrisBaker thanks for suggestion i will verify it
 
4:02 PM
posted on May 06, 2015 by kbironneau

/* by Delta */

 
Hey all, I seem to be having some issues building a custom session handler stackoverflow.com/questions/30081400/… could some one take a look and help me out? I think im on the right path
 
4:19 PM
@Jimbo I hate you. I hope you know that.
 
Why such love
:D
 
@DaveRandom So you found out about me and your mum then...
 
@LeviMorrison @bwoebi github.com/php/php-src/commit/… :)
 
@ziGi He made me do a dead complicated git rebase because of whitespace.
 
@KyleAdams that question probably isn't a good fit for stackoverflow. It's far too open ended.
 
4:20 PM
@DaveRandom hah :D
 
@rdlowrey Some of your examples show passing an instance of Auryn\ReflectionPool into Injector constructor, however, that class does not seem to be defined anywhere in the library. The Injector constructor itself creates a new CachingReflector if no dependency is passed -- is the documentation out of date in this respect?
 
@ziGi aware, but tbh, it's still the most decent API for this sort of stuff
 
It really wasn't actually that complicated but I'm lazy and also a bit ill
 
@Ocramius when was the voting for "most decent ORM API", I've missed it
 
It's called JSR-317
there was quite some work behind it
 
4:22 PM
is Doctrine build copying JSR?
 
pretty much, yes
 
@ziGi Voting has begun strawpoll.me/4293031
 
ahahaha :D
 
clearly not @Jimbo's
:P
 
ahaha
 
4:24 PM
haha
 
Mornings!
 
@NikiC Looks good given the other fix… I think.
 
it's funny cause you can re-vote every 1-2 minutes
so you can rig it
 
@NikiC So… what does this mean for static closures?
It just means they can't rebind?
 
@LeviMorrison static closures stay the same - only their scope can be rebound
 
4:29 PM
Okay. I think that's right.
Looks good to me.
 
With that most of the closure scoping bugs should be fixed
 
Thanks for the help.
 
I was actually looking into fixing these but was getting worried I wouldn't make progress by 7.0.
@NikiC I count that as a trait bug ;)
 
@KyleAdams why so much statics?
 
4:32 PM
@LeviMorrison depends
It's unclear whether __CLASS__ in a closure should be subject to rebinding
 
Honestly I'd like traits to be improved such that it's a proper entity.
Can implement interfaces and whatnot, can use as a type check.
 
@NikiC any experience in recovering from errors in the parser?
 
For what kind of objects is it logical to create factories to delay the bootstrapping?
 
@ziGi Stuff your controllers need.
You don't want to create the dependencies of all controllers for every request that comes through your router; just the dependencies for the ones you use that request.
 
@ircmaxell assuming you already have the error recovery code in place, it's just a matter of adding error tokens in the right places in the grammar
 
4:40 PM
@LeviMorrison But I find that a bit strange, since if you have a single action per controller, you can have in the constructor exactly what the action is going to use.
 
not the type of error recovery I mean :-)
I mean a syntax error, where you alter the token stream ;-)
 
Not sure I get what you mean. You want to actually fix the code?
 
@LeviMorrison the router uses the injector to create the controller, so it does not instantiate all controllers, just a single one with its dependencies
 
@ircmaxell hm, I see. that sounds like a simple enough rule
 
4:44 PM
@ziGi Then your controllers are effectively factories for only themselves.
 
does that mean I can avoid injecting factories then?
cause my controller uses services, and those services use domain objects and data mappers
so effectively everything which is injected is used
 
Where do you inject factories?
 
@ziGi Some of those services may need a factory for a domain object etc
 
@RonniSkansing I have some recollection that teresko injects factories which create the domain objects and the mappers
 
into the controller?
 
4:49 PM
@Jimbo I have repositories which reconstitute data and populate aggregates which are effectively created inside the repository, so maybe the factory should be injected there.
@RonniSkansing yes
@Jimbo logically speaking the domain objects are created and populated after some data has been retrieved, so it's a good idea to instantiate them on the spot instead of injecting empty entities/aggregates
 
@ziGi do you have an example of such? I do not fully follow why this would be in a controller
also a controller could have multiple actions, where the ctor is the base dependencies and the methods take their specific dependencies via args
 
@RonniSkansing that's possible, yes. I guess it is a matter of implementation
 
UserByIdController -> UserByIdService -> UserByIdRepo -> UserByIdMapper -> UserByIdQuery && Mapper and back??
 

« first day (1663 days earlier)      last day (3290 days later) »