You are here: Re: Is PHP the best way to create a web application? « PHP Programming Language « IT news, forums, messages
Re: Is PHP the best way to create a web application?

Posted by Chung Leong on 01/21/06 22:24

neodem wrote:
> It seems to me, and I could be wrong, that PHP and JSF seem to
> be pulling more business and data layer code up to the View Layer. I don't
> see how this is a good thing.

That's true to some extent. In web development many things don't settle
naturally into separate layers. Page navigation, for example, impacts
both business logic and presentation. By tradition and structure, PHP
does steer people towards having an expanded presentation layer. I
think this just reflects the reality of web development: Presentation
is very important, more so than in traditional applications. If your
web site is ugly or hard to navigate, visitors will go elsewhere.

> Wouldn't it be better to use the traditional
> method and keep the code out of the view? How does one maintain the code? It
> will be scattered across web source code (PHP pages, etc.)... The coupling
> would seem to be really high and that can't be a good thing for reusue..

Embedding code in HTML actually makes a lot of sense if you rethink
what an HTML page is. Instead of a static document, think of it as a
list of commands directing the browser to do certain things. When you
insert a block of PHP of code in its midst, you're just coding in a
different language. The place of execution might be different, but the
purpose is the same: to display something at the particular area of the
page. Viewed this way, code embedding is a way to consolidate code with
related visual impacts at one location.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация