« first day (447 days earlier)      last day (4486 days later) » 

12:00 AM
but thans for responses
 
there can be multiple access logs if you have configured virtual hosts.
but normally all requests are logged.
if you get error responses like 404 you should check your error.log as well.
good night folks.
 
ok thanks for responses
 
dream well about cute kittens
 
good night
 
Herro?
 
12:12 AM
 
what is it with you and your js @hakre?
 
Is this type of mapping Blah.com/users/100/ part of the definition of ReST?
 
@Anfurny The url itself has nothing to do with REST, honestly. How you interact with a URL does.
 
good night
 
Having a URL '/user/100/delete' be restful would confusing, but perfectly in spec.
@hakre By the way, my gravatar changed. Look familiar?
 
12:17 AM
but is having a URL like blah.com/cheeze.php?controller=user&id=100&action=delete still rest?
Can I even just issue a delete request to blah.com/theAdmin.php?myIdIs=100
 
@Anfurny If you are controlling actions based on URL parameters, then no, that is not rest in context of What is ReSTful.
 
So you're saying that basically, for rest, the request information must be in the path request not the get parameters.
 
@Anfurny Not entirely. For example /user/100 may rewrite to /user?id=100, but as long as that resource responds properly to various HTTP methods, then it is considered RESTFUL.
 
but without the rewrite, it's not restful, is that right?
 
It's still restful.
 
12:22 AM
So why isn't this rest: blah.com/cheeze.php?controller=user&id=100&action=delete
(which is exactly what the above example would rewrite to)
 
@Anfurny Does it respond to GET, POST, PUT, and DELETE methods?
 
No, probably not, but remember modern webservers and browsers don't respond to delete, so it's usually "emulated"
if you don't know, just say so.
because I want a definitive answer here.
 
Modern webservers absolutely DO respond to delete.
You are correct about browsers, but lots of people are pushing to get it into the spec.
It was in HTML5 for a moment, but was removed because it wasn't ready to be released.
 
Okay, so isn't that how it's emulated presently, as a get value?
 
@Anfurny This is one reason that API's are often used in conjunction to REST. The web script itself is not necessarily RESTFUL, but what does all the work is.
 
12:28 AM
Isn't one of the core principles of REST is that you respond to the request based on the HTTP method passed?
 
@CharlesSprayberry Yes.
 
Okay, so you're saying that the crucial part of rest is that we use different HTTP verbs, and that putting the intended verb/action as a get parameter violates ReST. That's what I was afraid of, but it was my understanding, and I think it's incredibly stupid.
 
@Anfurny What, exactly, is incredibly stupid?
 
I think you have to be an idiot to think a Delete request to cheeze.php and a cheeze.php?request=delete are different for any practical purpose.
 
@Anfurny They are from a RESTFUL point of view.
 
12:30 AM
but what advantage does Rest offer that putting all the exact same information in get variables doesn't?
To the user, and to the coder, they are nearly or entirely indistinguisable.
No?
 
@Anfurny To the user, probably. To the coder? They shouldn't be.
 
time to find some literature
 
@Anfurny Why does this matter to you all of a sudden? I'm curious.
 
Well my framework is gonna wrap the exact retrieval of the request type and pass it to me as a string either way, no?
I'm curious because I'm studying for ZF, because nobody online will shut up about Rest but nobody really articulates the why so well, etc
 
@Anfurny I have to go home. I'll be back on shortly and we can keep talking, alright?
 
12:32 AM
@LeviMorrison I think cheeze.php/?request=delete&id=1 will be a lot different to the user as compared to typing cheese.php/user/1 and marking your request as DELETE
 
Okay @lev
@Charles Except the user won't be typing either. They will be generated by links in your application.
 
@Anfurny In my opinion I think its more (1) designed to be consistent across implementations, if you say REST other devs know you're returning a response based on the HTTP methods (2) be easier than SOAP, which imo it is.
@Anfurny The user still sees the URL. Which one would you rather see?
 
Well as a coder I'd much rather have my web app do the former non-Rest one, so I can test in my browser easily.
 
@Anfurny Wait, if it is a linked clicked how are you gonna set the HTTP method regardless? This will always be sent as a GET
 
Well link clicked, form submitted, ajax request, whatever.
 
12:40 AM
Link clicked and form submitted still only allow GET and POST. I'd see REST as something more appropriate for a SaaS as compared to a means for handling normal web traffic
 
Anyone read any of these? PHP 6 and MySQL 5, PHP and MySQL Web Development, Learning PHP5, Web Database Applications with PHP and MySQL, PHP5, Apache, MySQL Web Development.
 
Love seeing a title about PHP6
 
no @Twinborn
 
@Anfurny Well I own all 5 and neither have I, HAHA!
 
Heh. Better get started. Unless you already know it.
 
12:51 AM
Yeppers, but sadly I don't know much. It's been a while since I have used PHP for anything. But now I have use for it
 
@CharlesSprayberry, I hate your name so much.
I've gotten like five rogue @-alerts today
We're not the only Charleses, damnit!
 
hey hey
 
Hey, I want your opinion on something @ircmaxell
is having a URL like
blah.com/cheeze.php?controller=user&id=100&action=delete still rest?
How about a php file that response to delete at
blah.com/theAdmin.php?myIdIs=100
 
/me runs away
@Anfurny eih. Rest is a loaded term. I consider REST any stateless HTTP api. So yes, that would be Restful. Now, it's not traditional REST, since you're not using HTTP verbs to dictate the action...
 
But the latter example is traditional rest, for sure, if it responds to delete?
 
1:07 AM
perhaps...
 
I guess the other side of the coin is: is mapping urls to resources: cooking.com/recipes/15/ necessary/relevant to rest?
And "nobody freaking knows because everybody uses the word differently" is always an acceptable answer.
And all too often true.
 
I prefer not to get caught up in those semantics, I try to stick to the spirit without getting dragged down in the details
 
@Charles I used to hate your name for the exact same reason.
 
I agree, when possible. I just recently had an experience where I was asked to make a restful php service as a job code-sample test, and I asked "Do you mean with apache rewrite, or using an existing framework?" and they said "huh?". Ultimately I was turned down and they deemed I didn't understand the definition between MVC and ReST (bullshit).
 
@Charles You're not?
@Anfurny I got a green light from my boss to write a post on how we interview people and what we look for in a candidate...
 
1:14 AM
That's a controversial topic these days.
@ircmaxell
 
yes, which is why I'm writing a post on it
basically disagreeing with the 37 signals post...
 
the "I'd never hire a .net programmer" or whatever it was?
 
@Anfurny I see that @ircmaxell has enlightened you a little bit.
 
He's reassured me rather, that my initial fear that NOBODY F_ING KNOWS is correct, intentionally or not.
 
That's why I was careful to use the term RESTFUL, as it has less ambiguous meaning. REST is just Representation State Transfer. It's how the web works, regardless of how you implement your website.
 
Oh, the "We don't hire based on brainteasers" one
 
I do hire on brainteasers (well, tricky problems)
 
That's a topic that I've been thinking about for a long time, especially in light of my recent certification efforts.
 
@ircmaxell I don't hire based on brainteasers. I don't hire. . . yet.
 
@LeviMorrison lol, nice
The difference is I don't hire on the answer that you give to the brain teaser.
 
1:19 AM
@ircmaxell You see how they act and think?
 
I can't help but suspect 37 signal's timing is a response to interview street's codathon today that has dozens of companies including facebook hiring...
 
;-)
 
@Anfurny But as far as REST and RESTFUL websites go, do you want to talk about anything else?
 
I guess my only other question is, how uncertain were you as you answered my questions?
 
@Anfurny I am confident that what you presented as /cheese.php?request=delete is not RESTFUL by any interpretation I have ever seen.
That does not mean it is not useful.
 
1:24 AM
But the other cases?
 
That does not mean it is not a viable solution to a problem.
 
"How about a php file that responds to delete at
blah.com/theAdmin.php?myIdIs=100"
 
@Anfurny RESTFUL. Absolutely. There is a difference between query parameters and the GET method. It's too often confused.
 
Okay, then my question is, where did you learn this distinction, did you just happen to have been well read on wikipedia, or did you look into this yourself recently, or is there some blog/magazine that keeps you up to date?
 
Hey guys
 
1:29 AM
P.S. @LeviMorrison if you go down to RestFul Services on en.wikipedia.org/wiki/Representational_state_transfer it makes me doubt even your Absolute confidence....
 
@Anfurny I've found those kind of questions will push people away
 
Well, you want to push the bad ones away. Why would a competent programmer be bothered by a question like that? @ircmaxell
Sup @Tural
 
@Anfurny the pressure of an interview can make many simple problems much more complicated
 
@Anfurny To answer both your statements: I read everything I can find and interpret to get the general feel of everything. The reason that is interesting is that I know I've read a paper that stated that Wikipedia does not properly summarize REST according to what it is.
And if you look at the web services portion, it is not clearly cited.
@Anfurny Here is an article from Roy Fielding on common misconceptions of REST APIs: roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven
 
Interesting. I'll take your word for it, but really the take-away lesson for me here is: "Always ask for clarification."
So what's your no-stress solution, having them talk through a problem outloud? @ircmaxell
 
1:35 AM
@Anfurny Oh, it's not no stress... you'll have to wait for the blog post :-P
 
Well, just be sure you adequately justify your system over the cforcoding one, because I think it makes a pretty good case.
 
I will try
 
I wish he'd give more examples in his blog, the language is pretty thick. @LeviMorrison
 
Guys, I'm looking for highly customizable php cart. Researched and found that, people suggests Magento or Zen cart. But magento is very difficult to understand and customize. I think about building e-commerce for my needs from ground but don't want to reinvent the wheel. any suggestions?
 
@Tural I doubt any of us have used a shopping cart. It sounds like you've already researched it and found like Zen is a good way to go. I suggest you do so. That's all.
 
1:44 AM
@Anfurny Also, I think websites are not currently useful using REST. This is because the main method of using the web is a browser. Browsers don't agree on PUT actions, and DELETE actions are worse. But a web services API is different. A web service requires that the user works with the service.
 
@Anfurny ok. thx.
 
81
Q: In Russian roulette, is it best to go first?

nikkitaAssume that we are playing a game of Russian roulette (6 chambers). Assume that there is no shuffling after the shot is fired. I was wondering if you have an advantage in going first? If so, how big of an advantage? I was just debating this with friends, and I wouldn't know what probability to...

Might come in handy :)
 
if you have 1, 2, 3 or 6 players, order won't matter.
Amirite?
Okay, so here's the other point, I guess. If everybody argues "OMG rest is sooo good it's so universal not like SOAP blah blah" but I can have my rest work like this poop.com/zig/david_section/2/test/… @LeviMorrison
So that argument becomes false if we use strict definition of ReST, no?
 
@Anfurny Correct, your argument would not hold.
 
@Anfurny your kinda right. If you play it with only one player you will tend to always lose :P
 
1:50 AM
If only Colbain had known... @PeeHaa
 
@Anfurny lol
How can my answer not be constructive? I clearly state why you shouldn't surpress warnings.
http://stackoverflow.com/questions/8752398/show-different-page-if-first-time-visit/8752438#answer-8752438
:P
flag-bait? ;)
 
I just gave you a 1-up
your answer was constructive to improving my mood
 
@Anfurny hehe
 
sigh
 
@ircmaxell ?
 
1:59 AM
the answer you commented on
 
@ircmaxell :P You should think that those people / that kind of answers should become more scares every day. But than again everyone is a 'programmer' these days. :)
 
lol
:-D
 
@ircmaxell but serious really think that's a problem. The fact the PHP is so 'easy' everyone can do it. They can't do it right, but they will do it.
Even by looking at all the SQLi vulns found on the web. I mean WTF. That kind of people shouldn't be allowed to do any coding.
Now that's an idea
A kind of drivers license for PHP to be able to code
 
there's talk about requiring licenses to dev in the US
 
Serious? I find that a great idea.
 
2:04 AM
it's the government, I don't trust them to do anything
 
Well here's the thing
It's simple supply and demand. There are a ton of shitty developers.
And companies hire cheap shitty developers, or expensive good developers, or maybe mix it up and hope the bad ones learn on the job.
 
@ircmaxell Unless they have to implement SOPA, PIPA, ProtectIP, etc
 
and good ones get paid a lot more to come in and clean up what bad ones fubared up...
 
But if companies want to hire crappy developers let them. It doesn't bother me unless/until they are developing for critical infrastructure and weapons systems [then it does!]
And most testwriters are as shitty at their jobs as your average VB coder.
 
Who says they hire the good ones for that?
 
2:07 AM
I don't think they do only hire good devs for gov, and I think that's a problem, but I don't think there's an easy solution, and testing may be part of it. @PeeHaa
 
@Anfurny Well you can test all you want, but some pieces of shit code just are doomed and cannot be fixed. We even have an name for that in our organization: 2012 code. And it sucks big time.
PS also known as 2038 code
 
I meant test the coders, not the code
 
Hi everyone
 
@Anfurny ah k. well. Even if you test people it's hard to weed to bad ones out. You will weed out the terrible ones
hi @Bracketworks
 
It's easy to rule out the terrible ones. Hard to rule out the bad ones. And very hard just to rule-in the good ones. But it's not impossible. It's the inevitable future.
Though it'll be 100 years before our government can do that.
Dinner. Laters.
 
2:18 AM
Took a break from dev today; worked on some graphics. Critique my framework logo!
 
cya
 
@Bracketworks I don't do designing (I suck at it) so I wouldn't have any idea :P
 
@PeeHaa I suck at graphics too. I get my fiancee to do all mine :D
 
@PeeHaa I haven't in quite awhile, and staring at it for the last little bit, I can't tell if its good anymore
framework is called "Cascade", so I was trying to sorta have a "cascading" effect
I dunno
 
2:23 AM
@Bracketworks is it on github?
 
@PeeHaa not yet, just set up a repo; haven't commit yet
 
@Bracketworks I'd suggest that you flatten it. That way your logo will be extremely familiar and recognizable as an icon. That's the current trend, anyway.
 
@LeviMorrison That's what I was thinking too; simplicity is obviously important (and low res decipher-ability)
Thanks :)
 
@Anfurny By the way, I recommend that you have a back-end REST API and that the web site simply makes calls to the API. The reasons are simple. It highly improves testability because it must be succinct to work, it makes it easier to change the entire website without changing the real work horse, and if you choose, you can expose the API to users.
Additionally, the data/operations server and the web server no longer have to be on the same machine.
 
2:43 AM
Post written
 
 
1 hour later…
4:12 AM
Hey guys help would be greatly appericiated :S
http://stackoverflow.com/questions/8750354/file-update-multiple-times-depending-on-viewers-and-i-dont-want-it-to
 
4:54 AM
@Anfurny I've reviewed several authoritative documents on REST. I want to emphasize that my statements are simplifications of the idea. If a resource conforms to the HTTP methods and protocols, then generally speaking it is RESTFUL. Reading the HTTP 1.1 spec and part of Roy Fielding's dissertation will be useful.
 
 
1 hour later…
6:21 AM
When dealing with mysql, does it always return an array?
 
6:31 AM
depends
PDO returns objects
 
yeah im not familiar with PDO :S
 
@Howdy_McGee You should get familiar.
just forget about mysql_.
if you can't use PDO at least go for mysqli_.
 
so I've been told but I never understood $this-> and havent had time to research
 
@Howdy_McGee you need to understand Object Oriented Programming. then $this-> comes automatically.
 
also is there a way to have 1 database connection going, no matter how many users are online?
 
6:36 AM
don't!
 
:/ i need to
 
Don't talk about THE PATTERN THAT MUST NOT BE NAMED
 
then you are doing it wrong.
 
if there are no users on I don't want a database connection going
 
umm this is PHP
not Java
 
6:37 AM
but when I have multiple users viewing the same page one of my variables increments depending on the number of viewers
 
@JohnP no, it's not even possible with a singleton.
 
you don't have an application context
@OmeidHerat ahh, I see he's talking about 1 persistent connection
 
the problem is becoming increasingly more annoying :/
 
what problem?
 
@Howdy_McGee You better understand how web works before writing web application.
HTTP is stateless.
That makes heaps of things different then writing a conventional desktop application.
and plus. PHP is parsed unlike other compiled languages that gets executed. (like any other script langauge)
 
6:43 AM
idk there's got to be a way to limit connections to 1 or something similar
 
would help if you explained why you need this requirement
 
I put a link to my question a little ways up
:S i've already linked it like twice today in here tho so i dont want to over do it
Everybody is telling me CRON jobs and timestamps, but I'm not server savvy in the slightest so I'm trying to find a workaround
I figured putting it in a database would help but its the same problem as writing to file.
 
 
1 hour later…
7:54 AM
HAPPY NEW DAY EVERYBODY
@HowdyMcGee: You're still running into congruency problems?
 
 
2 hours later…
9:37 AM
Anyone going to fosdem.org/2012 ?
 
10:07 AM
Does anybody here work for an agency that uses a PHP Framework for all their client sites?
 
I did once, they were using typo3.
And sometimes they used a Zend Framework frontend for the typo3 backend.
I can imagine some agencies do similar (in terms of using one framework) to have a copy-effect.
 
yeah, currently use Zend,
but its so cumbersome and not very strict, I think Cake would be a lot better
faster and more consistent
 
Yeah many agencies felt well some time ago seeing the framework sort of backed-up by zend itself for a long-term solution.
Every framework has it's downsides. Some agencies develop the stuff their own, so they have what they need.
 
yeah, if ZF was made by anyone other than Zend, it wouldn't have even half the usage it has now
 
30k barrier broken.
 
10:20 AM
in my opinion anyway
 
Yes, there was a lot of marketing when they released it to the public.
 
the documentation is awful, most code examples are without context
 
The time they started, the docs weren't awful compared with other frameworks.
 
yeah, most of the time the user comments are more useful than the docs themself
 
@hakre FOSDEM looks nice, plus I've been looking for an excuse to go to Brussels ^^
 
10:55 AM
Actually FOSDEM looks like an excuse for fosdem.org/2012/beerevent :)
 
@Dunhamzzz yeah, the reference guide with more than 500 pages translated in many languages plus the Wiki and API docs, plus the various online articles of contributors really are crap. *rolleyes*
there is plenty of things to criticise about ZF (note that it's ZF not Zend) but the docs are nothing to complain about. And for what it's worth Cake is an even bigger mess than ZF code-wise. The ZF guys at least tried to follow design principles. Cake just tried to be RoR.
 
@hakre Yeah I saw that ^^ That bar is incredible too, I'm amazed they managed to rent a room in there. I was also looking at the Linux Certification Exams they offer but even the 101 course seems tough (compared to my level)
 
@hakre all confs are actually just that ;)
 
@hakre And I can't seem to find a comprehensive list of speakers
(nvm, I hadn't looked hard enough, i was too focused on the beer part)
 
11:10 AM
@Gordon what's irritating is the lack of consistency in ZF, there are too many ways to do a certain task (one of the main problems with PHP imho) and the docs don't make it clear what way you should use
 
@Dunhamzzz god forbid a language/framework be flexible!
 
@HowdyMcGee are you still in the room?
 
If you're the sole dev that's fine, but in an agency or something with multiple devs
the code seems to get a mess with everyone doing different things in different ways
 
I'm happy like a child working with XSLT templates.
 
You need a company methodology then. Good communication with the team is a start.
 
11:13 AM
It's like a webdesigners dream.
 
@Dunhamzzz god forbid they put someone in charge to do architecture
@hakre webdesigners cannot do XSLT. they have a hard time understanding html already
 
what do you mean?
 
Remembers me of this: Why do all classes need to be singletons? Lead dev: Well, we do it that way, it's one HTTP request only, so we don't need more than one instance.
@Gordon Okay, maybe I mean XSLT is a HTML-Designers dream. I normally pick Webdesign for designing sites with HTML.
Always do a static prototype first.
 
@hakre I'd remove the term designer altogether and use Author :)
 
Sorry, can you please call the authoring hypertext structuralist for the project? We have an issue with an unclosed <div> over here and the frontend framework team is unable to solve it. ^^
 
11:24 AM
@Dunhamzzz if everyone in the team is coding like they want, you are doing it wrong. there should - at the very minimum - be a coding standard to follow. and you should have done a few architectural decisions up front. and there should be QA in place to check on that. add pair programming, frequent retrospectives, etc.
 
Yeah, maybe the problem is more internal than with zf
I fairly new to zf, and just asked another dev to show me an example of fetching related data in query - the answer was to write the SQL!!
 
@Dunhamzzz and?
 
I feel it defeats the idea of a framework when to do a simple join I'm reverting back to writing manual sql queries
which like I said, is not a ZF issue, but internal
 
You haven't ask him like so "If you were me and I were you and I ask you this question, what would I prefer as an answer", right?
 
@Dunhamzzz well, for one part whoever told you you have to write a join probably didnt look at framework.zend.com/manual/en/zend.db.table.relationships.html or framework.zend.com/manual/en/zend.db.select.html closely enough, because it's perfectly possible to do joins with Zend_Db
 
11:30 AM
Said dev is certainly aware of relationships, but prefers not to use them
 
and for the other part: if the idea of a framework is just to do Joins, you are likely just looking for a DBAL or an ORM. A framework is a generic toolkit and not limited to the persistence layer.
 
I just meant the fetching as an example, the framework is definitely needed for the app
 
@Dunhamzzz Devs are not DBAs, so you should ask the DBA how to write a JOIN for the database in question.
 
@hakre ??
I can write a join query -_-
 
@Dunhamzzz if said dev knows about relations and you know he knows then claiming that you need to write raw sql to do a join is a kinda odd argument because both of you know you dont :)
 
11:34 AM
I know! But she* has opted to write the manual SQL query, I have no say to moan as she's been here 6 years and I've only just started
She thinks the gateway patterns are too heavy for a simple join, but at the end of the day that's what they are there for
 
If by the Gateway patterns you mean Zend_Db_Table and Zend_Db_Table_Row then no, that's not what they are for :) at least not by definition of the patterns they represent.
However, you can do joins with them
 
There's so much reptition in the models too, every model grabs the dbtable and then defines various findbyid, fetch all methods, I've managed to scrap about 4 methods in each model simply by making an abstract model class
 
@Dunhamzzz sounds like you reinvented Zend_Db_Table_Abstract ;)
 
I just was wondering as well, as far as I remember, there was already a base class in ZF for that.
But it's some time ago I used ZF.
@Dunhamzzz Next to just fixing code, you should do that in code-reviews. That's helpful, too for a team.
 
At the moment, in order to grab some data from the controller, we (I actually mean they) are instantiating the model class, which in turn instantiates the db table class in itself
Then we call a "fetchAll" method on the model which basically calls the fetchall method on the dbtable
 
11:41 AM
Cargo cult programming is a style of computer programming that is characterized by the ritual inclusion of code or program structures that serve no real purpose. Cargo cult programming is typically symptomatic of a programmer not understanding either a bug he or she was attempting to solve or the apparent solution (compare shotgun debugging, voodoo programming). The term cargo cult programmer may also apply when an unskilled or novice computer programmer (or one not experienced with the problem at hand) copies some program code from one place and pastes it into another place, with little o...
 
there are other "findById", "findbyX" model methods too, all essentially directly calling dbTable methods. What makes me think this is wrong is that there are 3-4 of these identical methods in each model
 
So when do you do the team-session to locate duplicate code in the project?
It sounds as if there is some hidden potential.
 
we dont
after 2 months I've come to the conclusion that to meet deadlines everyone just wings it to make it work
 
@Dunhamzzz well, it's correct to prevent code duplication, so if you can abstract some parts of that into another class or if it makes sense to have a supertype, then yes, do so. But it also sounds like there is some misunderstanding about the various Zend_Db components. Maybe you need to have one guy do the ZFCE exam and put him in charge of reviewing proper usage.
 
there's no technichal discussion on specific architecture needed or anything, should there be ?
 
11:46 AM
@Dunhamzzz yes, of course there should be
 
Depends on the business goals.
 
business goals are "Get the productto the client"
 
@Dunhamzzz well, if that's the business goal then you dont have to worry about it being poor quality ;)
 
true, but what can I say, I'm a conventional guy, probably while Cake appeals to me so much
 
@Dunhamzzz I don't see the problem with your example. Shouldn't the model be initialized to grab data from DB?
 
11:49 AM
Additionally it sounds like making one-self absolutely important to the project (because of adding unmaintable code), you can raise your payment requirements easily.
A sit-and-wait strategy also works, because most of the problems that arise will disappear over time. Either because other problems become more important or some other developer will deliver.
 
@johnP yeah, but without the abstract class I've just introduced, things like this are happening in every model: pastebin.com/tSps7Yva
multiply that by 15 models. What grates on me is that the functions aren't even flexible
 
@Dunhamzzz there is no reason why you cannot have conventions on a ZF project. There is a number of things ZF expects you to do in a specific way already. If you need more convention put that into a coding standard and enforce it with phpmd and/or phpcs.
 
@Dunhamzzz why not just extend your class from Zend_DB_Abstract ?
 
should models extend Zend_Db?
 
@Dunhamzzz no
 
11:53 AM
thought so
 
Zend Framework has no models, right? (only some DB abstraction?)
 
@hakre right
 
We've got all of that extended on the models :( and a separate lib folder
 
@Dunhamzzz the main misunderstanding there is likely that a lot of people think Model === DB, which is not true. The Model in MVC is basically everything that isnt View or Controller, e.g. presentation layer.
2
So in the Model you have objects dealing with persistence and you have your domain model objects and you have service classes, etc
V and C are just the web interface to the Model
 
Do you have any recommendations of properly-made apps ongithub?
 
11:58 AM
and that also pretty much why MVC is not an architecture. The essential part is happening within M and that is project specific. So you need to think about the architecture of M separately.
 
a Model doesn't really do much with out a DB in this case
 
I just showed this transcript to my colleague
man, I love hanging out here. It's like you're getting consultation. But for free!
2
 
@JohnP :)
 
It's almost like these models aren\t needed, as all they do is interface with the DB
so in my controller I may as well instantiate Model_DbTable_blah
instead
 
In computer programming, a poltergeist (or gypsy wagon) is a short-lived, typically stateless object used to perform initialization or to invoke methods in another, more permanent class. It is considered an anti-pattern. The original definition is by Michael Akroyd 1996 - Object World West Conference: :"As a gypsy wagon or a poltergeist appears and disappears mysteriously, so does this short lived object. As a consequence the code is more difficult to maintain and there is unnecessary resource waste. The typical cause for this antipattern is poor object design." A poltergeist can ofte...
 
12:04 PM
@Dunhamzzz have a look at martinfowler.com/eaaCatalog/index.html. ZF is inspired to a fair extent by the patterns in that book. It might help get a clearer picture on how to layer the application.
 
I read that book some weeks ago and it's very interesting.
(still some sections at the left over)
 
@hakre its not an easy read though. i found that after you read it the first time, you can read it again and you'll understand even more.
 
Next to code, the much more important question is: What for lunch and with whom?
 
@hakre chicken salad with colleagues?
 
chicken and mushrooms with spaghetti :)
sigh, that settled in nicely.
I love the business lunches when the boss is in the country
 
12:08 PM
My colleague is out to the dentist :/. Ah but it's friday I know who I can call :) And yeah salad is a good idea.
I wonder who will clean up all these numerous git commits? I sometimes have the feeling I do too many of them, so I now started to create a new branch first.
So I can squash all of that branch together.
 
after dv/cv'ing stackoverflow.com/questions/8755650/… I got a dv on stackoverflow.com/questions/2155110/…, which is one of the linked duplicates. revenge downvote? or can anyone spot a mistake in it?
 
12:25 PM
nothing wrong with the answer, probably just a peeved user
 
Gordon, answering a duplicate!
 
@salathe :P
 
12:46 PM
Good morning
The next post on my blog is schedule for 2 hours from now (10 am local)
and this one should be a good one...
 
@ircmaxell good day, is this is the post about interviews?
 
Yup
 
ah nice, looking forward to that. anything to get inside the guy doing the interviewing
 
nav
Hi to all.
 
:-P (well, we do it differently than most, so not sure how much help it will be)
 
nav
12:51 PM
i have one query
i am unable display images which i have stored in database.
 
@Gordon or @NikiC (or any one know knows German here) want to comment on this post? Google translate did a horrible job: it-republik.de/php/news/…
ok, shower time
 
@RaduMari hi
 

« first day (447 days earlier)      last day (4486 days later) »