Note that there are some explanatory texts on larger screens.

plurals
  1. POMiddle layer between MongoDB and PHP and mobile aps
    primarykey
    data
    text
    <p>We plan web project (accounting software) using PHP for web frontend and MongoDB as database. Also, there will be probably mobile aps for iPhone and Android, possible REST API and more. We need to write middle layer over raw database ("model" in desing pattern MVC or MVP) with as much shared functionality as possible. What is smart way to write middle layer in such a scenario ?</p> <p>Options we are considering:</p> <p>1) Write middle layer as PHP library. Plus: super easy connection to PHP frontend, but not so great for other use-cases (mobile aps, REST API...). <strong>Edit:</strong> also not so great for security and isolation.</p> <p>2) Write middle layer as <a href="http://www.mongodb.org/display/DOCS/Server-side+Code+Execution#" rel="nofollow" title="server-side executed code">server-side executed code</a> on MongoDB server. But they are too many limits limits (db.eval() write lock, one shard only) as well as it seems it not recommended usage of this MongoDB functionality. I was looking for MongoDB extensions which would extend server-side code execution capabilities, but found none.</p> <p>3) Write middle layer as independent web service, for example in PHP, python or Node.js. Main problem which I see - MongoDB communicate in BSON. Many middle layer functions would do simple MondoDB query. Than they would have to re-encode result in some other serialization standard (since BSON is MongoDB specific) and then send results to client - which seems to me like big waste. </p> <p>Unless we find better solution, we will probably go for variant 1), but any advice would be really appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload