[FX.php List] MVC
William Downs
william.downs at gmail.com
Fri Jan 13 09:55:41 MST 2012
A ral php programmer friend of mine (as opposed to me I mean) has ben forcing me to work using mvc for a couple of years now...
It really does make certain parts of web development easier...readability, troubleshooting, expectation, as well as forcing proper coding also, to name a few
I now try to do this with every project I start
On 13 Jan 2012, at 16:40, BEVERLY VOTH wrote:
> [note: i've copied the discussion to start it here under a new topic.]
>
> I think we need to start a new discussion on MVC!
>
> As I said, I don't use any IDE or any "framework" or any application or any tools or anything other than text editor to make my sites MVC. It's my own way of structuring the code in a way that the queries (modal) are separated from the presentation (view) and tying them all together are the controllers (yes, that multiple).
>
> If you look at cake, what I do is similar. I just think that cake is a little more complex than what I do. The premise is that EVERYTHING goes through index with parameters to branch in the controllers.
>
> I don't have a "functions" file with all the queries. Each one is a separate file, but they can be used by passing parameters to alter them slightly. For example, if a admin is returning a list of registered people, it may find all. If a parameter for limiting the list to non-admin it passed, the careful use of if() can change the query. So there are not multiple queries.
>
> But by separating the queries, I can test them individually. If can even put in an "if()" to show the errors or print_r() or whatever when I'm logged in as developer.
>
> One of the beauties of MVC, is the ability to have multiple people work on a site and not have to depend upon something being "completed" before starting work on another part. Lots of lovely include(), but not complex as wordpress or other common websites. I try to make it more flexible. I also think it's easier to debug.
>
> Yes, I know I promised to come up with an MVC demo using fx.php... I'm working on it. :)
>
> Beverly
>
> On 12 Jan 2012, at 9:03 PM, Denis Somar wrote:
>
>> How exactly do you MVC it? Using codeigniter? I couldn't get the
>> solution on the CI wiki to work and I've just done my best to to
>> modularize the code without adding complexity.
>>
>> Thanks,Denis
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list