[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: LUG Blr Minutes July - small correction and different approach to web prging
Hi
I actually wanted to mention this in the meet itself, but I wanted to
verify it once. And later forgot about it till now when I read it.
The statement that PHP provides Session management (or a state based
logic to put it in a very abstract way), with out using cookies or
invisible form variables in the html pages (or as part of the html
url: which is what the variables of a form get converted to for a
particular method) is not realy true. It internally uses these very
mechanisms, but hides the web prger from these issues.
Rather to put it in other words, doing web prging in C or perl or php or
asp or ... is basically doing the same thing but with different level of
support features added in to simplfy things ( be it database access,
scriptability or templates or, security, session management, etc).
At one level one is required to put in a lot of effort but if done
properly can provides better efficiency and features. And at the other
level one gets many features at not so bad performance in a simplistic
manner.
The 2nd method is usually sufficient for most of the part. Thats
the reason why php or asp is so popular compared to C modules or isapi
or nsapi(don't remember properly now) or so native dlls in the windows
world.
The best way I can think of for web prging is to have a __Template
management layer and a business logic layer__. This provides the maximum
flexibility. And this can be done is C and it can still give the
simplicity found in these scripting languages. (I have developed such a
system, Check out my website after some days, currenlty I am busy with
some other stuff so no time to tidy it up a bit, its still not efficient
in all ways but will give a rought idea).
But normaly people endup having
a) The Business logic contains the template - usualy in C and Perl
b) the Template logic contains the Business logic - usually in PHP, ASP
...
to simply the work at hand.
The problem with the above 2 approach is that when either the
Business or the Template requries to be modified invariable the other gets
or requries to be modified.
Note: Its not that one cann't get to do these things without Cookies or
invisible variables but then u have to have ur own communication layer
siting between ur web server and client, providing the required context
info to the server side programs. And its not that simple considering that
http is to a great extent stateless and so the clients can be used and
written in so many different mixes.
On Sat, 19 Aug 2000, Gandalf Mithrandir wrote:
> programmers please stand up??..?. His presentation covered what PHP is, what
> is it capable of doing, and how it compares with various techniques such as
> Perl/CGI, JavaScript and ASP. His presentation was complete along with code
> that worked, unlike last time!) and a full demonstration. He finally covered
> session management (with a cookie less demo !) and other features of PHP4,
> including Zend, the optimizer for PHP.
>
---------
Keep :-)
HanishKVC
http://www.hanishkvc.com/