#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Location
    kerala
    Posts
    72
    Rep Power
    2

    Which backend is better for webdevelopment


    Hi,

    Iam looking for developing a website. Iam using PHP as frontend. In the case of backend iam confused. Which one is better mysql or mysqli? Please help me to find a better one.

    Thanks and Regards
    Sarath
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Hi,

    I guess you mean the mysql_* functions vs. the MySQLi extension.

    Those are not "backends". They're PHP extensions for accessing a MySQL database system. The mysql_* functions are long obsolete and have recently been deprecated, which means they'll be removed sooner or later. It's also difficult to use them in a secure way. So definitely go with the new MySQLi extension or PDO.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  4. #3
  5. Mad Scientist
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2007
    Location
    North Yorkshire, UK
    Posts
    3,661
    Rep Power
    4123
    For me, the definition of front end and backend can be somewhat ambiguous.

    For me, the front end is what the intended users of the website see. This is therefore HTML/CSS/JavaScript

    The backend is what the site administrators see (which is also HTML/CSS/JavaScript????)

    Eg, think of a CMS or ecommerce site - the backend is the site/store owner who adds the pages/products etc

    How the HTML/CSS/JavaScript reaches each type of user can be different. For 90% of the cases it will be the same technology (eg apache and PHP)....but you might have a php powered "front end" and a java powered "backend". Either way both technologies will have to read from some common data store (eg MySQL).

    So, if you're building a PHP based website you may as well stick with PHP throughout if you know no other language. If you need a relational database then choose one which meets your needs. Common choices are MySQL, SQL Server and PostgreSQL. PHP and MySQL have a proven history and have the most newbie friendly development tools available. The downside to this is that there is an awful lot of poor (and downright dangerous) tutorials out there.

    While a sensible and perfectly valid choice may be to use something less common (postgresql, node.js, couchedb), if you're new to all of this then you'll probably struggle to get up and running. The more exotic the solution you choose, the less community support you'll find
    I said I didn't like ORM!!! <?php $this->model->update($this->request->resources[0])->set($this->request->getData())->getData('count'); ?>

    PDO vs mysql_* functions: Find a Migration Guide Here

    [ Xeneco - T'interweb Development ] - [ Are you a Help Vampire? ] - [ Read The manual! ] - [ W3 methods - GET, POST, etc ] - [ Web Design Hell ]
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Location
    kerala
    Posts
    72
    Rep Power
    2
    Originally Posted by Jacques1
    Hi,

    I guess you mean the mysql_* functions vs. the MySQLi extension.

    Those are not "backends". They're PHP extensions for accessing a MySQL database system. The mysql_* functions are long obsolete and have recently been deprecated, which means they'll be removed sooner or later. It's also difficult to use them in a secure way. So definitely go with the new MySQLi extension or PDO.

    Thanks
  8. #5
  9. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    "front" and "back" aren't really defined. Northie points out that an admin interface could be the "back end" of a website. I tend to think of the server-side code as the "back end" and the client-side code as the "front end." That's how you see them used in job postings.

    Either way: PHP is your back-end, along with MySQL. You should use PDO to access MySQL databases, there's a sticky at the top of the PHP forum list.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  10. #6
  11. Web Developer/Musician
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Nov 2004
    Location
    Tennessee Mountains
    Posts
    2,408
    Rep Power
    1031
    My previous employer used a popular CMS as a slim easy to maintain "front end" to a site that got it's business logic from internal web services creating another layer if you will. I actually became a fan of this approach. So long as the hardware resources are there.

    I'm tired of hacking the crap out of a CMS to accomadate complex business logic and still provide non technical users the ability to change the look and feel of a site. In some cases offloading business logic to small dedicated services run on platforms like node.js makes more sense. So you end up with multiple layers doing what they are best at, working together. That does tend to blur the standard "front end/back end" model, but whatever works.
  12. #7
  13. No Profile Picture
    Dazed&Confused
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2002
    Location
    Tempe, AZ
    Posts
    506
    Rep Power
    128
    Originally Posted by ManiacDan
    I tend to think of the server-side code as the "back end" and the client-side code as the "front end." That's how you see them used in job postings.
    Huh. I've always read "back-end developer" as someone who will be responsible for primarily internal systems, rather than those exposed to customers/end users.

    Otherwise a posting for "PHP Back-End Developer" would be a bit redundant since there's no such thing as client-side PHP.
    LinkedIn: Dave Mittner
  14. #8
  15. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    Originally Posted by dmittner
    Huh. I've always read "back-end developer" as someone who will be responsible for primarily internal systems, rather than those exposed to customers/end users.

    Otherwise a posting for "PHP Back-End Developer" would be a bit redundant since there's no such thing as client-side PHP.
    It's all semantics, there's no real definition. If you ONLY develop things which the customer will never ever access, then you could call that "back-end." But what about a developer at facebook who does nothing but improve their graphing algorithms? That's back-end by your definition but literally drives the site if you recognize what their code does.

    As for job listings for "PHP Back-End," you can be certain those were written by HR after a dev manager rattled off what they're looking for. I've been asked if I was familiar with HTML Markup Language, Windows LAMP, and Adobe Counter-Strike 3. The actual title of the job posting is almost never relevant, you need to pass the first two screens before you talk to anyone at the company who knows what the difference is between PHP and JavaScript.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  16. #9
  17. Web Developer/Musician
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Nov 2004
    Location
    Tennessee Mountains
    Posts
    2,408
    Rep Power
    1031
    Originally Posted by dmittner
    Huh. I've always read "back-end developer" as someone who will be responsible for primarily internal systems, rather than those exposed to customers/end users.

    Otherwise a posting for "PHP Back-End Developer" would be a bit redundant since there's no such thing as client-side PHP.
    When referring to the pieces of a single application, "front end" is generally but not always considered the client side or UI portion and the "back end" is considered the server side/business logic portion of the same application. Depending on the complexity and technologies used different teams may work on those separately.

    In the context of a business as a whole, your description might be applicable, but when looking for developers that have a certain skill set, most companies are referring to what role that developer might play in a company project, not the IT division within the company they may be hired to work within. A developer is a developer and internal systems may have a front end and a back end portion to them just as the externally available systems do.

    Comments on this post

    • ManiacDan agrees : This too
    Last edited by Hammer65; July 30th, 2013 at 12:32 PM.
  18. #10
  19. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    I think it's time to close this thread before it gets overrun by the "w3schools is teh best" spam bots.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  20. #11
  21. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    Thread closed due to either spammers or people who can't understand the conversation, it's often difficult to tell which.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo