Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6253043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:55:03+00:00 2026-05-24T13:55:03+00:00

Currently we have a lot of web pages that either have SQL statements embedded

  • 0

Currently we have a lot of web pages that either have SQL statements embedded in them or call a specific php script that does a specific job – ie getNames.php – as part of a ajax call back. Neither are particularly maintainable.

I was thinking about using a REST like API to get the necessary data to the client and then munge the data into something usable. This is attractive as this lessens the burden on maintaining highly complex sql in code and allows centralisation of data (so just one AJAX call to get the data not lots of little ones). Also allows the database to change lessening the impact on the client.

However there are two problems I can see with this strategy:

  1. The site is a game, and so I need the RESTlike API to be protected from abuse/cheating as much as possible.
  2. All examples of REST API’s use a controller to handle the requests in root. That’s not ideal for me since we are at //company/games/game/ and there already is an index.php at root (//company/).

What options and strategies do I have for the two constraints I listed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:55:04+00:00Added an answer on May 24, 2026 at 1:55 pm

    Well, you’re asking for opinion, but I’m well seasoned enough (having written many many API schemes over the years) that I’m totally willing to open myself up to Net abuse. I think the key here, and this should provide an opinion to work from on both of your questions, is that REST is simply a set of principles. Sure there are people that follow a RESTful pattern explicitly, but that isn’t practical for most people.

    Take the Flickr “REST” API for instance… a call may look like this: http://api.flickr.com/services/rest/?method=flickr.favorites.getContext&api_key=a114adf91150953107987e4c3dc14df8&photo_id=6033564557&format=json&nojsoncallback=1&api_sig=0d2c215992d643ef6fe4a085805f7059

    Not very RESTful, from a patterning perspective… however, it contains all of the elements of REST and is a fine enough model. You can understand what it is doing at a glance, and you can easily build on top of that.

    IN the end, REST is a set of principals, not a protocol, and not even a pattern in and of itself. You’re free to implement it however you want. There’s always an interoperability intermediate layer and the point is to just make it understandable… and many of the REST patterns actually get in the way of that, favoring form over function.

    In fact, most of the patterns I’ve seen are insufficient for anything particularly advanced, but that’s part of the point of REST… Keep It Simple (Stupid).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We currently have a utilities class that handles a lot of string formatting, date
We currently have a quite complex business application that contains a huge lot of
Currently I have a lot of python objects in my code similar to the
I have a facebook app using a lot of Javascript that doesn't work correctly
I currently have an MS Access application that connects to a PostgreSQL database via
I currently have a library of UserControls which I use in a lot of
Our web app currently under development has authentication on all the pages. We can
I am currently working on an web application that uses ASP.NET 2.0 framework. I
I am currently doing some work for a company that runs a legacy web
I have a single web page with master detail form/input layout. Currently the form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.