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 Michael Austin on 01/21/06 23:38

neodem wrote:

> PHP, and to a lesser degree JSF has become very popular ways to build web
> applications. What I don't understand, and what I would like you all to
> comment on, is how these methods are the best way to build web applications.
> I come from the traditional Struts/JAVA world and the traditional MVC
> archetecture. 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

Let's see. user clicks on link A that starts Jave -> sends
"information" to browser (or downloads and executes in a Java machine ON
THE CLIENT". Data is sent back to original server and is processed ,
then more stuff presented to the client.

User clicks on link B. sends data to server, server processes data, send
results back to browser.

Not much different. On is/can be a compiled executable (JAR file etc.)
and the other is "interpreted" at run time.

in the "compiled" executable, you can have many different
modules/classes that accomplish business rules, database connectivity,
transactional integrity and presentation.

In PHP, JSF you have essentially the same thing, they may be
contained/segmented in seperate "include" files, but they are there just
the same.

Same thing goes for compiled CGI-type applications. In fact there can
be many module files that get created, compiled and linked to the "main"
program.

Bottom line is that they all do the same thing.

> see how this is a good thing. 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..
>
> Can someone give me an idea of where I am wrong?
>
>

PHP code is not "viewable" in the browser and if done correctly, neither
are the business "modules".

With either Java, JSF or HTML/PHP, Your business logic is contained in a
language that transmits it's results to the browser. If you are
taking about using Java Scripting, then yes, those rules move to the
viewable side of the "application" - what gets presented to the browser.

M.

 

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

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