Use of Closures in Views |
(09-25-2015, 08:26 AM)mwhitney Wrote: Eventually, I hope to get around to replying to everything directed towards me since my last post. However, I wanted to point out that quirk #3 is of course isolated to 5.3, and does not exist in 5.4+. I also happen to know that @kilishan has used $this in an anonymous function at some point, because it had to be rewritten to support PHP 5.3 Oh, wow, I did, didn't I!? Guess I didn't realize because I didn't realize it was something you weren't supposed to be able to do. And now that I know - it's too late because PHP already supports it. (09-25-2015, 11:00 AM)spjonez Wrote: [...] I omitted most of the conversation because I think it really comes down to, more or less, what you've said in these two responses. For you, the application builds a client in JavaScript which builds the user interface, displays information to the user, communicates with the server, etc. With all of this discussion of views, you don't really seem to use the View layer in CodeIgniter for handling most requests. For me, the use of a JavaScript client has to be presumed invalid from the start. It can be added as an option, after the HTML/CSS client is complete. In some ways, your approach can still be useful and beneficial with this assumption, but it can be difficult to see how you could implement a thin View layer on the same codebase to perform at least the minimum functionality of your JavaScript client on the server. |
Welcome Guest, Not a member yet? Register Sign In |