Question

  • Creator
    Topic
  • #4019543
    Avatar photo

    Server Side of Website

    by Iustinian Serban ·

    Hello.
    I am a bachelor’s student in Automation and Computer Science.
    I want to create an eCommerce site from scratch using a three-way architecture. I don’t have any questions regarding the HTML or the Database, just about the Server (I’m going to pay for hosting). I created a RestAPI using Spring, Java, and MySQL in the past, so I have some experience (Javascript sends the input to the server, and the server fetches data from my database and sends it back to my website).
    I want to know how I can connect my Website and my Database, and how to fetch the correct data. Where do I put my logic code?

    I would appreciate your response to this.

You are posting a reply to: Server Side of Website

The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our Community FAQs for details. All submitted content is subject to our Terms of Use.

All Answers

  • Author
    Replies
    • #4019664
      Avatar photo

      Re: Server side of website

      by kees_b ·

      In reply to Server Side of Website

      The client (the program running in your browser) sends a get or put-request to the server.
      The program running on the server connects to the database and runs the necessary SQL-statements via the database API.

      https://www.w3schools.com/php/php_mysql_connect.asp tells how it works in PHP 5. But you might be using another language at the server site.

      Two remarks:
      1. Isn’t this treated in the course material?
      2. Why not run the server on your own PC in localhost? You don’t have to pay for hosting then and it’s a very useful experience for an IT bachelor.

      • #4019771
        Avatar photo

        Reply To: Server Side of Website

        by Iustinian Serban ·

        In reply to Re: Server side of website

        Thank you for your answer.
        So if I want to create a RestAPI as a Spring Boot Application and host it on a server, would it run like a normal website?
        1. Currently, I’m in my first year of University. They teach us this type of course in the second or third year. This website is a personal project.
        2. I was thinking about that. I will run it on my PC in the early stages, but I want to take the site public when it’s finished.

        • #4020150
          Avatar photo

          Re: API

          by kees_b ·

          In reply to Reply To: Server Side of Website

          Strictly speaking, an API is an interface. Interfaces don’t run. They are being called.
          Websites don’t run either, The webserver runs.

          Best of luck with your project.

    • #4026404

      server-side code

      by auraitsollutions ·

      In reply to Server Side of Website

      The server-side code handles tasks like validating submitted data and requests, using databases to store and retrieve data and sending the correct data to the client as required.

      http://auraitsollution.com/

Viewing 1 reply thread