Php, html

Results 1 to 7 of 7
  1. #1
    .. .-- - .-.. .. ...- . iwtLive is offline
    True MemberRank
    Sep 2012 Join Date
    260Posts

    Php, html

    Php, html
    I'm pretty new to the websites coding world and I've gotten curious about something.
    People always say that CSS, HTML, JavaScript and PHP should always be separated for the 'clean code' purpose.
    I understand how CSS, HTML and JavaScript can combine nicely but what about PHP?
    I've learn most of my knowledge from MapleBit (gotta tag you @greenelf) and from what I see PHP always overlaps with the HTML, and some HTML is being sent to the clients from PHP. Is that proper?

    I also played around with vBulletin a bit. I've seen some weird code that I'm not sure what it does or how it works but it definitely interacts with the server. I'm talking about the {blabla}. what is this and where can I get a summary about it?

    Thank you for reading this far!
    Last edited by iwtLive; 10-07-16 at 01:07 AM.


  2. #2
    Member Spaceman is offline
    MemberRank
    Jan 2016 Join Date
    36Posts

    Re: Php, html

    I'm having trouble understanding what you're asking.

    Can you provide an example of the code you're having trouble understanding?

    Also - if you want to learn how PHP works I would try to stray away from using MapleBit as your first example as it can be a bit daunting to a newbie who doesn't know what different things do.

    Take a look at PHP: The Right Way to learn a bit more in depth. And if you want some help feel free to ask me.

    Straight to the basics

  3. #3
    very green greenelfx is offline
    True MemberRank
    Jul 2011 Join Date
    1,322Posts

    Re: Php, html

    MapleBit is a terrible example of good PHP. The way it was written is very outdated, and you absolutely should not use it to learn PHP. Definitely look into the link posted in the above comment, and also look into Symfony Components, and the Laravel framework. Also, reading up on PHP PSRs, MVC paradigm, and other general programming concepts (OOP) will be helpful.

    VBulletin (and most frameworks) use something called MVC, which essentially splits the logic (backend PHP code) from the presentation (HTML/CSS/etc). Thr brackets you see {likeThis} are part of the VBulletin template system. For something similar, look into Mustache.

    Finally, MVC is just one of many paradigms out there. Something that is becoming increasingly popular is the idea of building an API and client to consume the API instead of building an "all in one" web app. This separates the logic and presentation further, making cross platform development faster.
    Last edited by greenelfx; 10-07-16 at 02:25 PM.

  4. #4
    .. .-- - .-.. .. ...- . iwtLive is offline
    True MemberRank
    Sep 2012 Join Date
    260Posts

    Re: Php, html

    I see, thanks!
    I'll learn that PHP scroll, didn't even know that PHP supports so many things.
    What do you suggest I learn after PHP? (Symfony/MVC/Laravel framework/Etc)

  5. #5
    Member Spaceman is offline
    MemberRank
    Jan 2016 Join Date
    36Posts

    Re: Php, html

    I would learn a framework like greenelf suggested. After that, make sure you have the front end stuff down pretty good, maybe some JavaScript here and there.

  6. #6
    .. .-- - .-.. .. ...- . iwtLive is offline
    True MemberRank
    Sep 2012 Join Date
    260Posts

    Re: Php, html

    Quote Originally Posted by Spaceman View Post
    I would learn a framework like greenelf suggested. After that, make sure you have the front end stuff down pretty good, maybe some JavaScript here and there.
    What is a framework? What is it meant to do?

  7. #7
    very green greenelfx is offline
    True MemberRank
    Jul 2011 Join Date
    1,322Posts

    Re: Php, html

    Quote Originally Posted by dorkie4ever View Post
    What is a framework? What is it meant to do?
    All your questions can be answered on the PHP the Right Way site (PHP: The Right Way)



Advertisement