« first day (452 days earlier)      last day (4479 days later) » 

8:00 PM
Sounds like good oop to me, what do you guys think?
 
Tehre are things I would change, but it's not horrible
 
stackoverflow.com/questions/8825654/… Do you guys think this is a Location: redirect issue?
 
@beta0x64 There's a setting about redirects MAX_REDIRECTS or something...it's 0 by default. Turn it to at least 3.
 
Thanks, I added that
Gee I wish he'd respond though
 
@ircmaxell yeah, thats what i suspected, too (scroll down a bit). thanks for clarifying
 
8:06 PM
Ah ok
@LeviMorrison You're in New York?
 
@ircmaxell No. A close friend of mine lives there.
 
3
Q: How to register a single character SLD

stevetherMost of the major registrars have a 3 character minimum for second-level domains. However, I know that it's possible to register them. (a.cc, o.co) You can ever register single unicode domain names (௫.net, ✈.com, ಠ.com) How is that possible? I know that IANA has most of the .coms restricted, bu...

 
Ah ok, cause I'm in New York right now :-P
 
@ircmaxell Ah, shucks :)
 
yeah
 
8:08 PM
Maybe if I close my eyes and think thoughts of New York, I'll suddenly be there.
 
I want to register http:///..com pfffft
 
@ircmaxell Day #3 and still can't figure out what's wrong with websockets/php.
 
can't helo you there
 
The code I linked above is nearly identical to what I have.
 
@LeviMorrison Where are you located again? (I forget)
 
8:09 PM
@ircmaxell Yeah, that's pretty frustrating.
I know, time to dig in with wireshark.
 
@ircmaxell Utah.
 
@Gavin If it's the server, then it's unrelated to the CMS.
 
9:03 PM
Awesome, 2 phone interviews for development positions in a week. I'm on fire!
 
congrats
 
nice
 
HI all
 
@Radi Howdy
 
9:08 PM
How could this $dreams .= "the following should say locations ".$k." ".($k == "locations")."<br><BR>"; possibly print this the following should say locations 0 1
 
hmm
 
i have a script in /example/dir/script.php and would like to use the is_dir() function to see if there is a directory in /example123/dir123/123/. What do i wright in the is_dir() to look up /example123/dir123/123/?
 
well $k isn't a string most likely
so you probably want ===
 
hmm so if $k is an int of zero, why does (0 == "locations") evaluate you to one? Thanks for the response btw
 
@Radi Is / your web root or file-system root?
 
9:11 PM
evaluate to one*
 
yes
 
I don't think it's an int of zero, I'm not exactly sure what it is, maybe a boolean or something...
You should look at your program and see.
 
@PeteHerbertPenito viper-7.com/xGFEeA
 
Thanks Levi
I didn't know that.
 
@Levi wow 0 == "locations" is one! lol
 
9:12 PM
I was trying to get interactive mode to work for me...
 
@levi
@LeviMorrison yes
 
@radi It's either web-root or file-system root. Which?
 
cool site btw
 
oh I am sorry. "/" is my web-root
 
Thank you Levi
 
9:18 PM
@Radi is_dir needs a path relative to where you are, or the full path. So you would use ../../example123/dir123/123 for a relative path, or /full/path/to/web-root/example123/dir123/123 for a full path.
 
hello
 
@LeviMorrison 10q
@LeviMorrison is there a function that will give me my current full path?
 
@Radi There's a constant __DIR__
 
@Radi and for PHP < 5.3, dirname(__FILE__)
 
9:33 PM
@cbuckley Eh, I assume everyone is on 5.3+ until they state otherwise.
 
@cbuckley thanks
 
out of curiosity, who here has used ZF?
 
I got lost at the bootstrapper
Then I went back to CI
To be fair, I wasn't very experienced with PHP back then when I was like 15 :)
 
@Anfurny I'm waiting for Zend Framework 2.0
 
Use it at an enterprise level, so stuck on 1.9 :(
 
9:37 PM
@Anfurny me
 
Do you like it?
As in, would you rather hear your boss say "next project HAS TO BE ZF" or "Next project cannot be ZF" ? And also, is it your favorite framework?
 
You know, I just noticed, StackOverflow sends out VERY few emails...
 
@ircmaxell I love them for that.
 
seriously
 
Also, when you read this "I really enjoyed our conversation today and am looking forward to having you in the office for some in-depth exploration on both sides. " Does that strike you as an obvious double-entendre?
 
9:41 PM
The last time I got a "You have new answers" email was 2 years ago
 
@Anfurny It could be, but I wouldn't take it as that
 
Good times.
 
@Anfurny i used to think it is the framework out there but after having worked with it for about a year and a half and getting below it's surface i came to the conclusion that it sucks. I would not use it again. Or if I had to, then I'd make sure I would not have to use MVC components. They are broken beyond repair. The other components are mostly okay unless you need them customized. The codebase isnt too good.
 
Heh, no I'm not saying she really means it, consciously, just whether that blatantly strikes everybody who reads it as "that's what he said" kind of moment or I just have a dirty mind.
 
@Gordon our team has come to the same opinion. Not suitable for much more than a single/small Web site.
 
9:43 PM
@Gordon Hence ZF 2.0 . . . :)
 
Wow, that's really interesting.
 
Also I've noticed that bug-fixes are less forthcoming, as they're concentrating on ZF 2.0 features
which doesn't seem like the correct priority to me
 
PHP frameworks suck.
27
 
So you @cbuckley @Gordon found that zend in particular's implementation of MVC sucked. I would really appreciate an example thing you wanted to do but were held back by.
 
@Anfurny in particular i found it pretty much impossible to unit-test code that use the mvc components.
@salathe can you make it php frameworks? then i pin it ;)
 
9:45 PM
I see that PEAR caught up to PECL in sucking.
 
:-P
 
Really, I always thought that MVC (zend included) made unit testing a lot easier.
 
@Gordon I'm too quick for you
 
The bootstrapping is very restrictive and very difficult to extend. We've concentrated on functional testing for the MVC portion and left unit testing to the logic so we haven't hit on such problems
 
okay, so what were you trying to do with the bootstrapper that you couldn't?
 
9:47 PM
we were trying to sandbox our modules to only load root-level config and the config for the requested module, rather than all config files
 
@Anfurny Who?
 
(this is ZF 1.9, no doubt things have moved on since then)
 
anybody who has had negative or positive ZF experience can answer, if they consider-themselves informed enough to have an opinion.
 
Oh. In that case I don't.
 
Really? The only way to find unlabled email in gmail is to do a search negating every single label you have? -{label:label1} -{label:label2} -{label:label3} -{label:label4}??? I have over 200 labels. Good god...
 
9:50 PM
huh, okay, I'm not really learned enough to grok that but thanks @cbuckley
 
@ircmaxell have you tried label:{} ?
 
@anfurny another thing that annoyed me was when mocking/stubbing components. ZF uses so many magic methods that you never know if a method is magic and you have to stub __call or if its a real method.
@Anfurny there is also an overly large amount of statics and singletons, which i consider unnecessary in ZF but they lead to coupling in our app.
 
@Arnfuny and some older classes don't follow their new coding standards, and contain a number of private methods; often called from some huge method
 
hmm
 
also, i fell into the use-as-much-as-you-can trap in the beginning. i gave preference to ZF components when I could have done it with native PHP. This leads to abyssmal performance when handling dates
 
9:56 PM
so would you guys ditch MVC or go to another framework?
 
@Anfurny I ditched MVC long ago. The web was designed to be used with resources. I have found it is best to treat it that way.
 
Oh God Zend_Date :-/
 
@cbuckley doesn't work
 
@Anfurny well, like i said, i wouldnt use the MVC components anymore nowadays. but i wouldnt rule out using other components of it again. id just be more selective and open to alternatives.
 
@ircmaxell apparently not... sorry, read on gmail support and posted without testing
 
9:58 PM
@cbuckley no problem
Down to 1 email in my inbox (I need to process it today)
 
@Gordon So then do you not use anything framework for mvc?
 
@ircmaxell I try to stay <5.
 
I go through it once a month and clean it out, but it's often quite large (I get around 50 to 100 non-spam methods per day)...
 
@Anfurny i'd roll my own MVC components. it's not difficult to do. or maybe try Silex or another micro framework for that part.
 
I also have literally 1000 filters setup to try to auto-label for me as much as possible
 
10:00 PM
@Levi how do you apply the concept of resources to Web applications?
 
@cbuckley I've found web applications can benefit more from resources than web sites. You can leverage the HTTP methods quite a bit more. Give me a moment and I can give you some examples.
 
@cbuckley likely by making the controller respond to http methods instead of verbs encoded in the url
here is one link for that peej.co.uk/articles/rmr-architecture.html showing one way to do that. i dont like the article that much though because it doesnt say that much about rest as a whole
 
@gordon That's great for a custom client, but if it's direct-to-browser?
 
@cbuckley i dont understand the question. please clarify.
 
@gordon I understand that for a RESTful Web service, but if the service is to be used to deliver a Web application to a browser for instance, a custom client needs to exist to consume that service
In most of our cases that is a lightweight MVC app
I guess the main focus of that is device independence
 
10:10 PM
@cbuckley you really only need the custom client when you want to use verbs beyond post and get because you need ajax for that. iirc not all browser supports all methods as form methods yet.
 
@Gordon yes, we mainly use a JS framework to call our REST APIs, which of course use much more than GET/POST.
 
@cbuckley and if you want to deliver a rich client with that, you send it along when there is a request with a accept header for html
 
@ircmaxell I got it working!!! Avoid stream_recv if at all possible, it's got some very strange side-effects. Instead use file functions (fread et al).
 
@cbuckley To begin with, my server set-up is different than normal. I have the web site the user sees, and a different website that serves up a REST API. The really nice thing about this setup is that you can expose the API to users if you wish.
The web server essentially becomes the client for the API. This way you can build the requests you need without ever using JavaScript. I love JS, don't get me wrong, but to depend on it for these tasks seems really, really wrong.
Maybe its just the way I think, but when I design for resources I end up with very, very clean URLs.
Another nice thing is you can do anything your site does via ajax if the need arises. Again, I don't recommend relying on JavaScript, but if you have some nice enhancement you can do, that's fine.
 
@ChristianSciberras Well, I use stream_recv all the time, because I want those side-effects (non-blocking nature, etc)
 
10:25 PM
Another benefit of keeping them separated is that your data can easily be transformed into whatever content type you need to serve.
A lot of the things I've mentioned can be done without focusing on resources. I have simply found that it all becomes easier and more natural when you do.
 
@LeviMorrison it depends. its a different mental model. for a user it might be easier to think in the usecases the application allows. rest is http centric and most users dont think that way
 
When you say you have a "website ... and a different website" do you mean different web server? Or do you mean your application sends http requests to itself?
 
@Anfurny If my website is www.example.org, then I have api.example.org. www sends requests to api.
 
When you say rest, are you referring to path mapping someController/action/id ? @Gordon
 
@Gordon Define what you meant by users, please.
 
10:29 PM
but do your requests actually go out through http, or do you use some sort of include to just simulate the requests (i.e. API->user_controller->add('joe'))
 
@Anfurny I actually make the requests. I have a little API class that makes it easy to make the requests, but it's just a helper class.
 
Interesting. But I don't see what advantages you get over traditional mvc.
 
@Anfurny no action. action is in the http verb. rather example.com/resource/{id}
 
@Anfurny Can you decide in a meeting one day, "So, our users are asking for an API. Let's expose ours." Can that project be done within the week? Probably not if you are using the setups I've seen. With the setup I use, I just have to make sure authentication is working properly for the new users. There's one benefit.
 
@LeviMorrison human users of the service
 
10:33 PM
@Anfurny Cleaner urls. The verb is now missing from the url.
As far as actually programming it, I do all my transactions with the API, and my website only has to deal with views, essentially.
 
Well, MVC traditionally makes it easy to expose your API by separating the view so thoroughly. In Zend for example, I could do something like echo json_encode($view); with a little tweaking
Yes, you're separating out the view from the logic... but that's almost the definition of MVC.
 
@Anfurny content negotiation is baked into http as well by the way. you dont need that context switch thingy ZF provides
 
@Anfurny My point is that my web site doesn't really have to do much with the MC parts of MVC. You basically just do views.
@Gordon exactly.
 
well it sounds like you have a website for the View and a seperate section for the business logic (MV)
*sorry MC
The difference I see is that you're actually communicating these objects through HTTP rather than passing them through memory.
 
@Anfurny But that distinction right there makes you stop and actually think about what you are doing. You cannot pass object through memory over HTTP. You have to serialize it.
 
10:40 PM
You don't have to pass it through HTTP at all though, if it's all kept in one application on one web server.
I wish I had a whiteboard
is there a good shared-whiteboard app online
 
@Anfurny you are not sending the objects as such. its not soap or rpc. you dont need to reassemble on the other side. you actually just send the representation for a resource as requested by the client.
 
I know, it's presumably json, but it's still an extra step of things going over the wire without any special reason to.
 
@Anfurny I'd like to point out that MVC and REST don't necessarily compete with each other.
It's just that traditional implementations of MVC have their own defined way to make methods, etc, whereas in REST, it's built-in to the protocol.
 
Okay. I agree, but I'm not trying to talk about rest right now.
I'm trying to talk about your custom app setup vs mvc
 
@Anfurny I'm connected.
 
10:45 PM
Did you see me hi?
 
yes
I erased it.
 
where do I type?
 
@BoltClock superping. i have collected the additiona information made by the OP in the comments to stackoverflow.com/questions/8826908/… into the question. can you cleanup the obsolete comments, please? I flagged them but i doubt people will understand why.
@Anfurny very nice
 
hehe, this is more difficult than i thought
 
@Gordon to superping: @@BoltClock
 
10:58 PM
@ircmaxell they actually implemented a real superping?
@ircmaxell not important anyway anymore though. either he got the message already or other people followed my flags. comments are gone.
 
back
conclusion: Nothing really
 
@Anfurny I guess I prefer managing my resources as resources. Using HTTP makes it really easy. Browsers don't fully implement the HTTP protocol, notably they don't normally won't send a DELETE or PUT request. Because of this, it is useful to have a resource-centric server and a user-centric server.
 
Sounds to me like you just wanted to try something new
 
New? HTTP predates MVC on the web . . . lol
I'm not sure why we moved away from it. HTTP is well defined, MVC implementations for the web are not.
 
11:16 PM
okay
well then I guess I still don't see why you did it.
Because MVC can give you: a REST API plus a website with one app.
 
@Anfurny Again, MVC as a concept doesn't fight with REST.
 
I don't understand why you keep saying that.
I never said they fight.
 
But if I send a GET request to /group/delete/11, what on earth is that supposed to do?
 
You said you wanted a rest api, plus a website. I'm telling you MVC can do that.
 
@Anfurny I never said it couldn't. I've just never really seen it done. I've seen people claim they have, but I've always found pretty significant flaws.
REST can give you an API and a website too . . .
 
11:19 PM
any of them use Zend_Rest_Server ?
 
@Anfurny Yes. I've been trying to find an example. Mind blank. I'll find one soon enough, I hope :)
 
You could always write one using it yourself
 
I could.
I could probably do a pretty good job of it too.
Read the first few paragraphs of benramsey.com/archives/…
 
My bad, that's old.
Don't use Zend_Rest_Server, that's deprecated. use Zend_Rest_Controller
 
Okay.
 
11:27 PM
but it sounds like he was able to do it fine with the old version.
 
You missed a few key points: assumes XML, cannot add support for PUT and DELETE.
 
then he says "To do this, I added the following lines to my virtual host configuration:"
and got it to work
And I know for a fact that the XML thing is changed in later versions of Zend
 
I haven't used ZF in a while, btw. It's probably obvious.
 
And don't forget Ruby on Rails for example as an example that automatically does Rest
IIRC
 
By the way, you should use the word Zend to refer to the company. Zend has an engine, a framework, and more . . .
I know it really bothers some people to refer to the Zend Framework as Zend.
I forget who, but someone here on SO gets really peeved.
 
11:31 PM
where did my comment go on stackoverflow.com/questions/8826908/… ?
 
Whatevs, I'm not too worried about pissing people off online. If I didn't say something everytime it got somebody online mad I wouldn't be talking too much.
 
@Anfurny lol
@Anfurny I may have to give Zend Framework another chance. If I restrict myself to the Zend_Rest_* areas, I may be able to avoid a lot of other problems.
 
I'm very new to the zend framework, but what I see so far seems to make a lot of sense, and I like it.
maybe it'll make even more sense with version 2.0
 
I have followed some of the ZF 2.0 changes. Seems like it will be a lot better.
 
I'm in the shitty situation of preparing to take the ZF exam, meaning I'm kind of having to learn the wrong, old version of ZF
(it's about 1.5)
And I know the day I get my cert, the V 2.0 exam will come out.
 
11:42 PM
@Anfurny Why get the certification?
 
Because so many companies seem to want Zend in SF
 
it seems to be the most popular MVC framework for php.
San Francisco.
And some of the companies that have been interviewing me, I realized, mistook my zend php 5.3 certification for a Zend framework (which seems to be what they want).
 
Ah. Unless you like the area or you are tied down, I'd recommend moving . . .
:) I'm biased towards smaller cities.
 
It's gonna be a great way for me to get proof of MVC on my resume quickly.
SF is one of hte biggest software places in the country
And I actually moved TO here, from a smaller area
 
11:45 PM
Oh, I just like smaller areas.
 
If I could be assured a 6 figure job in a smaller area in a startup company, I might do that.
 
I like to know EVERYONE around me. It's a kind of life I really enjoy.
I don't care about money as long as I have enough to live.
 
Yeah. I want a lot of kids someday, so I'm trying to save up.
 
@Anfurny Good for you. Married yet?
 
Nah
too picky
 
11:47 PM
How old are you, if you don't mind sharing?
 
anyways, I'm going for a walk, bbl
 

« first day (452 days earlier)      last day (4479 days later) »