Re: [PHP] Re: How to structure code for forms

2008-06-08 Thread Roland Häder
Hi,

On Sunday, 8. June 2008, Manuel Lemos wrote:
 Hello,

 on 06/08/2008 08:01 AM Ethan Whitt said the following:
  I am new to PHP and have been researching ways to structure code for
  forms. I have found a
  few basic tutorials that present, validate  present errors, and then
  process form data.  I was
  wondering if anyone could share their approach on how they structure
  these actions?  Ideally,
  I would like to separate each action in separate functions.  Thanks in
  advance...
Maybe this gives you an idea:
http://www.ship-simu.org/repos/ship-simu/trunk/application/ship-simu/templates/de/code/register.ctp

Please keep in mind that my software is GNU GPL 3. :)

Roland


signature.asc
Description: This is a digitally signed message part.


Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Roland Häder
Are you talking about Ruby-On-Rails, which is a framework, or about Ruby?

Well, to point out my view, I have to admit that PHP is not really good 
written. In some functions the needle is the first argument, second the 
haystack and vise-versa in other functions.

And talk about OOP with PHP, well, it is -working- but not as like as you know 
from Java. In Java I can create a type-hinted hash-map in one line, by the 
type-hint is an interface. Very nice and small code. :)

Ruby might also be able to do this. In PHP I have to write a class which does 
this for me.

Well, what I want to say is that you cannot compare PHP with wether RoR nor 
Java. RoR is a framework, PHP is not. Java is 99.99% pure OO, PHP is not.

Hope that gives you an idea. :)

And btw: Hello. I'm new to this list. ;-)

Roland

On Thursday, 13. March 2008, Greg Donald wrote:
 On 3/13/08, Robert Cummings [EMAIL PROTECTED] wrote:
  So... there we have it everyone... Greg has admitted that Ruby is as
  smart as a cat.

 Hahaha..  yeah, you really got me on that one.

 /me slaps his knee.

   I like something a little more edgy personally. Something closer to
  human... something with personality, something that evolves, something
  not afraid to be itself. PHP fits the bill.

 PHP is anything but itself.  Before it was actually written in C it
 was first written in Perl.  And although it may be written in C and
 may look like C and Perl right now, it's clearly evolving into
 something very similar to Java.  PHP has a long, long history with
 identity crisis, ongoing even today.

 Meanwhile Ruby was written as a full-on OO language from the start.
 The OO layer didn't get strapped on at version 3 like with PHP.  OO
 was the main idea from the very start with Ruby.  As a result Ruby's
 OO model makes PHP's OO model look like a steaming pile of shit out in
 the pasture.  Hell, Perl's OO even makes PHP's OO look bad
 syntax-wise.


 --
 Greg Donald
 http://destiney.com/



-- 
Weblog:
http://blog.mxchange.org


signature.asc
Description: This is a digitally signed message part.