× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



To be fair to MVC, the article doesn't present a very good example. It doesn't really have an "M".

For trivial examples, dumping everything into one file will always look simpler.
________________________________________
From: web400-bounces@xxxxxxxxxxxx [web400-bounces@xxxxxxxxxxxx] on behalf of Nathan Andelin [nandelin@xxxxxxxxx]
Sent: Thursday, March 21, 2013 7:05 PM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] PHP coding styles; Procedural versus Model-view-controller (MVC)

I can see a lot of programmers reading that article and scratching their heads and wondering if "separation of concerns" or MVC is really worth it. The first sample shows DB I/O, control logic, and HTML in just one file. Strait forward and easy to read.

As the code evolves to finally using the "twig" template engine, the code is split into several files, and grows substantially in size. Some must wonder if maintainability is actually improved.

You're still left with a mixture of DB I/O, control logic, and Browser I/O in multiple files. The "separation of concerns" is not pure, so to speak.

CGIDEV had an HTML template interface back in 1998. PHP seems to be struggling with separation of concerns in 2013.

-Nathan

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.