logs archiveIRC Archive / Freenode / #php / 2015 / September / 26 / 4
caffinated
(Action) isn't going to touch that one
Alphos
:D
zach_
though admittedly wordpress could be better software in a lot of ways
Sammitch
unless they've recenly done a ground-up, backwards incompatible rewrite of literally the entire product...
zach_
Sammitch: you use bedrock yet?
Alphos
Sammitch : that would have made the front pages...
biberu
http://forums.na.leagueoflegends.com/board/attachment.php?attachmentid=1016687&d=1405488418
caffinated
I appreciate what wordpress does for PHP, I just think it's time to start over and do it right.
Sammitch
zach_: never heard of it
         

zach_
caffinated: https://roots.io/bedrock
caffinated
instead of endlessly bandaiding the same bad software
zach_
it's a laravel eloquent package for wordpress
Bad_Advice_Cat
"WordPress Implementer", "WordPress Customizer", "WordPress Installer", or even "WordPress Administrator".
Alphos
"some improvements, including renaming wp-content/ to app/" /// uuuuh, naming conventions aren't the thing that's the most wrong with wordpress
Sammitch
can't type... laughing... uncontrollably
Alphos
although i'll admit, the_post(), the_loop(), and such, could use some improvement, no contest there
Sammitch
zach_: you can tie a ribbon around a turd, but it's still a turd.
Alphos
Sammitch : but a pretty one !
zach_
the main point being you don't have to use wordpress to use wordpress
which makes it all the better
Alphos
zach_ i don't have to use wordpress to not use wordpress either
zach_
^
Sammitch
wtf are you talking about? bedrock is literally wordpress with a few ribbons tied around it
Alphos
Sammitch : yeah, pretty. still a turd, but pretty !
caffinated
I think if you have to use wordpress, bedrock is a good idea.
Alphos
it has a ribbon on it, ffs !
makes all the difference !
caffinated
you can't really blame bedrock for the state of wordpress. it's just trying to make a bad situation more tolerable.
Alphos
by renaming wp-content/ into app/
Sammitch
I remember getting a newletter from Dreamhost back in the day saying they had upgraded squirrelmail, and in that *official newsletter* they referred to said upgrade as "tying a ribbon around a turd"
Alphos
yah, less intolerable that way, sure
         

caffinated
Alphos: I see you read one line of the description and stopped there.
good job!
Bruce_dev
whats a good node.js irc channel?
zach_
#nodejs ?
retran
prolly nodejs
heh... " You're in the wrong room. You should /join #node.js"
Alphos
caffinated sorry, couldn't stop laughing ;p
Bruce_dev
haha
Bad_Advice_Cat
zach_, this exactly reminds me of ModernBB and Luna. http://getluna.org/ <-- Pretty bootstrap, but the code behind it is awful. - People seem to think that sugar-coating code with Bootstrap automagically makes it "Modern".
retran
Bootstrap makes me sad because all the menu animation is slow and cludgy.. doenst take advantage of css GPU functionality
zach_
yeah luna is pretty horribly developed, not even MVC
not even mntioning bootstrap here
Bad_Advice_Cat
You can make just about anything look good nowadays with almost any CSS-framework.
retran
what's something gotta have to be "modern" anyway? MVC fully ajax controlled with RESTful compliant backend?
zach_
i like laravel though, even as a pro it makes sure you don't do stupid sh*t like mass assignment, and your code makes a lot more sense after you map a model and it's morphs/polys
and the dependency injection doe
retran
what issues exist with dependency management if you use composer?
Bad_Advice_Cat
retran, not my concerns. - I mean the principles behind the code and such. Utilizing autoloader and other tools in php that significantly make life less painful.
Not using that awful atsign so friggen often.
retran
fair enough... namespacing + autoloading is a step in being "modern" PHP
zach_
it helps make your code testable, very git friendly, doesn't leak encryption keys/tokens
if you use Dotenv anyway
retran
i'm really confused at this talk about dependency injection though
Bad_Advice_Cat
It shows that the devs care. Using good practices.
retran
what more to it is besides declaring them in a composer manifest?
Bad_Advice_Cat
(I am not talking about DI by the way.)
retran
gotcha
zach_
retran: http://laravel.com/docs/5.1/container
good stuff
event binding with queues is even better
__adrian
retran, DI is "give things the things they need." e.g., class foo{ public function __construct( bar $bar ){ $this->bar = $bar; } } and not class foo{ public function __construct(){ $this->bar = new bar; } }
everything else all the confusing parts is just tools/patterns/etc. for making it "easier"
(though, as you can see above, it's not that complex to start with)
retran
hmm... so the goal with DI, is making sure objects your class depends on are already prepared (avoiding having to map constructor args..)?
zach_
yep
and so you can easily switch them out for something else if need be without having to change 50 files
__adrian
retran, yeah. the classic example being your class needs a DB connection, so *give it one*, it shouldn't make its own.
retran
ok
Sammitch
ideally you define a generic interface that your injected object must conform to, eg. class MyFoo() { public function __construct(\My\DBInterface $dbh){} }
retran
interesting, so with the DI strategy, wheres the object being made in the first place?
is there a route mapped somewhere to it
__adrian
a factory
Sammitch
I've still not wrapped my head around factories, I'm back here banging rocks together and manually constructing DI argument objects :P
retran
i've implemented a factory design... is it always so tied to DI strategy?
__adrian
no
but lends itself
retran
why not use namespacing to imply it, instead of some factory configuration
__adrian
"imply"?
retran
and a resolver could go through and figure it out
__adrian
imply what
retran
imply what dependancy you need corresponding to the caller
or whatever you want to use as the "resource" if not implied by caller class
__adrian
oh - i generally prefer to set up factories that know what they're doing. but people use Reflection to figure out stuff like that
Alphos
retran the resolver would require to know the dependencies of your dependency
retran
heh... yes! and you could map out rules on where it would look
Alphos
and when you keep on that track, at some point it'll require to know values in basic types (string, int, float, bool), which means it'll need human intervention
retran
ok ok i'm only leading you down this path of questioning because i've played with such a solution
true the rules do have to be mapped at some point
DissidentRage
herregud
json_deocde won't decode a response from Google reCAPTCHA
retran
this is my github to my stab at this https://github.com/katmore/flat
Bad_Advice_Cat
retran, the object is created OUTSIDE the class that needs the object.
DissidentRage
{\n "success": false\n}
retran
right, Bad_Advice
i've implemented that by having a resolver that looks through designated portions of namespace
Alphos
that's not injection then
Sammitch
so a Factory is essentially a wrapper around the constructors of various classes so that you can abstract the instantiation of the object itself from the business logic?
retran
but my dependant classes aren't having to explictly call them
or create the objects
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 next »