Some Newb Questions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nick

    Some Newb Questions

    Hi - apologies if these have been asked before. I've been looking
    around, but can't find answers to my question. Anyway...

    I'm an experienced programmer with JSP, ASP, and ASP.NET and am
    starting on a PHP project. Thus far, I haven't found anything in PHP
    which approximates, for example, a compiled class in .NET or a Java
    bean. Is there such a thing? That is can I create my own (compiled?)
    classes, import them onto a page, and use them? I've seen tutorials on
    classes. Can you compile them? If you want something like that is the
    common (best?) practise to use perl and cgi or is that old-fashioned?

    It's possible that because of my use of other languages I'm asking the
    wrong questions and taking the wrong approach with PHP. Please let me
    know if I am.

    Thanks,

    Nick
  • ccjx

    #2
    Re: Some Newb Questions

    nick wrote:
    [color=blue]
    > Hi - apologies if these have been asked before. I've been looking
    > around, but can't find answers to my question. Anyway...
    >
    > I'm an experienced programmer with JSP, ASP, and ASP.NET and am
    > starting on a PHP project. Thus far, I haven't found anything in PHP
    > which approximates, for example, a compiled class in .NET or a Java
    > bean. Is there such a thing? That is can I create my own (compiled?)
    > classes, import them onto a page, and use them? I've seen tutorials on
    > classes. Can you compile them? If you want something like that is the
    > common (best?) practise to use perl and cgi or is that old-fashioned?
    >
    > It's possible that because of my use of other languages I'm asking the
    > wrong questions and taking the wrong approach with PHP. Please let me
    > know if I am.
    >
    > Thanks,
    >
    > Nick[/color]
    Hi nick,

    PHP is a scripting CGI language. Its classes are not similar to Java or
    ..NET classes. Think of its classes like structures and objects.

    You can't compile classes but you can create them, and you can import
    (known as include or require in PHP) them on every page you need them
    and use them.

    I hope I have answered some of your doubts. Feel free to drop me an
    email or ask more questions.


    ccjx

    Comment

    Working...