|
CGIDEV had an HTML template interface back in 1998. PHP seems to bestruggling with separation of concerns in 2013.
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
________________________________
From: Eric Lehti <elehti@xxxxxxxxxxxxxxxxxx>
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Sent: Thursday, March 21, 2013 3:47 PM
Subject: [WEB400] PHP coding styles; Procedural versus
Model-view-controller (MVC)
I received an email from iprodeveloper.com saying this link to paid
content is temporarily unlocked for all to read. I find it interesting
and want to share with you. Enjoy.
http://www.iprodeveloper.com/article/application-development-tools/jumps
tart-php-productivity-websmart-699592
Discusses PHP coding styles:
- Procedural Pros and Cons, with Comparison to procedural RPG. UI is
often intertwined with the coding logic-a poor design strategy.
- Advantage of separating UI from business logic. separates the UI
from the business logic.
<snip> SoC stands for separation of concerns, which is just a fancy way
of saying "keep your programming logic separate from your user
interface." The SoC philosophy is exemplified by Model-View-Controller
(MVC) development. One can make a case that RPG green-screen programs
were using MVC design long before it became popular in web application
development. The RPG code is the model (and parts of it are the
controller, too) and the Display file is the view
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
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.