How does one implement object-oriented programming on the server?

Source: Internet
Author: User
Course Design assignments require an e-commerce website. The front end obtains data through AJAX + JSON and is rendered using native JavaScript, which is no problem at present. The backend intends to use the object-oriented PHP to write a session-related class (sessionClass),... the course design assignment requires an e-commerce website.

The front end obtains data through AJAX + JSON and is rendered using native JavaScript, which is no problem at present. Backend intended to use Object-orientedPHP, write a session-related class (sessionClass), a session generates a sessionClass object, sessionClass object analysis JSON response.

The problem is that, based on my current AJAX knowledge, I Know That AJAX needs to write a url parameter, which corresponds to PHP pageHow can I write this page?

Reply content:

Course Design assignments require an e-commerce website.

The front end obtains data through AJAX + JSON and is rendered using native JavaScript, which is no problem at present. Backend intended to useObject-orientedPHP, write a session-related class (sessionClass), a session generates a sessionClass object, sessionClass object analysis JSON response.

The problem is that, based on my current AJAX knowledge, I Know That AJAX needs to write a url parameter, which corresponds toPHP pageHow can I write this page?

First, how much do you know about PHP?

This url parameter corresponds to a PHP page

This statement and understanding are both incorrect.

Abstract: The url corresponds to a service.
Specifically, the project you are talking about should be a PHP method or a PHP script.

The backend intends to use the object-oriented PHP

Object-oriented is a development method. How to organize your code depends on you, not PHP.

Since you are designing courses, I suggest you first go to PHP development, so you don't have to worry about routing and automatic loading.
A simple PHP framework that is ready for use without any configuration.To implement the functions you want.
I recommend ThinkPHP here, but I don't think it is good or bad,Low usage threshold.

If you are interested, you can watch the PHP development video and go deeper.

From the perspective of your questions, you need to learn a lot to develop an e-commerce business.

Enjoy ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.