Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Web API needed or not?!

Web API needed or not?!

Scheduled Pinned Locked Moved Web Development
javascriptquestioncssdatabasesysadmin
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amr Mohammad87
    wrote on last edited by
    #1

    Greetings, I am working on a website back end and I am using Bootstrap and jQuery to handle the pages layout and the user interaction. However, I need to make some read/writing at the server side (i.e., saving pictures that will be displayed on the front end and updating data within the database) my question is do I have to implement a Web API to handle such operation reading/writing to the server or there is a way for doing that through using jQuery or Javascript only?!

    F 1 Reply Last reply
    0
    • A Amr Mohammad87

      Greetings, I am working on a website back end and I am using Bootstrap and jQuery to handle the pages layout and the user interaction. However, I need to make some read/writing at the server side (i.e., saving pictures that will be displayed on the front end and updating data within the database) my question is do I have to implement a Web API to handle such operation reading/writing to the server or there is a way for doing that through using jQuery or Javascript only?!

      F Offline
      F Offline
      F ES Sitecore
      wrote on last edited by
      #2

      javascript runs on the client so it's not possible to use it to store files etc on the server.

      A 1 Reply Last reply
      0
      • F F ES Sitecore

        javascript runs on the client so it's not possible to use it to store files etc on the server.

        A Offline
        A Offline
        Amr Mohammad87
        wrote on last edited by
        #3

        I mean is there a way that enable javascript or jQuery to send something like a request to a specific server to store/retrieve data or I must do this through a Web API. Sorry I am new to web development

        F 1 Reply Last reply
        0
        • A Amr Mohammad87

          I mean is there a way that enable javascript or jQuery to send something like a request to a specific server to store/retrieve data or I must do this through a Web API. Sorry I am new to web development

          F Offline
          F Offline
          F ES Sitecore
          wrote on last edited by
          #4

          Web API is just a generic term for something on the server that listens to requests, so if there is an API that can accept your data and do something with it then you can use jQuery to send data to that API. The only problem is if it is files you are sending as javascript can't read the local file system. For that you'll need to use html file api if the browser supports it.

          A 1 Reply Last reply
          0
          • F F ES Sitecore

            Web API is just a generic term for something on the server that listens to requests, so if there is an API that can accept your data and do something with it then you can use jQuery to send data to that API. The only problem is if it is files you are sending as javascript can't read the local file system. For that you'll need to use html file api if the browser supports it.

            A Offline
            A Offline
            Amr Mohammad87
            wrote on last edited by
            #5

            I am already using HTML file api to read files from local system and those file(s) are simply photo(s) which the client will choose to use it to be displayed on the front-end banners(s). Now I need to send those photo(s) I've read to the server to be stored within a specific folder there and I do not know what I have to do for that even if I have a Web API (ASP.NET Web API) that accepts data sent to it then doing the storing functionality how can I send the data to those method(s) within the Web API I mean the jQuery get, post, and getJson methods need a URL for the Web API so do I have to write the IP address of the server (which I do not know in advance) in this URL or I can use something like this ./myapi/mycontroller to call the methods within my Web API?!!!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups