NoSQL DBs and AppStudio: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
(NoSQL databases are a very good option for WebApp development, instead of always relying on SQL (local) and on a webserver with an SQL backend, on top of an API (usually PHP).)
 
mNo edit summary
Line 1: Line 1:
( UNDER CONSTRUCTION )
Before I get into the real thing, I'd like to first share a bit of history:
 
If you have been into WebApp creation, you probably realized that it is not just the application itself, you'll need to also have other stuff on your backend to be able to make the application meaningful. Considering I'm an old-fashioned programmer, I initially chose the "comfort zone" and had my server based on a LAMP model (Linux-Apache-MySQL-PHP, while other might prefer WAMP. You can figure out what W stands for).
 
The MySQL part was easy and creating all the tables and relationships was kind of fun and reminded me of the joy of normalizing data and creating all those relationships, indexes, views and so on. Then I had to think about the hard part: how could I interact with the server DB from my app? Easy: PHP as the frontend and I'm done. A friend of mine recommended a look on APIgility and it realy helped with the API-like heavy-lifting and it was quite easy to implement a RESTful HAL+JSON API on top of it, talking to my MySQL database.
 
Next step, why not cache some records on the WebApp WebSQL (or SQLite if you prefer). By doing this, the app will look faster and it will also work offline. I started coding the caching mechanism and after a long couple months I realized that I was spending much more time on programming the "support" for my application than the application itself.
 
Now enter CouchDB/PouchDB. If you never heard of them, you definitely should Google about them.

Revision as of 19:50, 19 August 2015

Before I get into the real thing, I'd like to first share a bit of history:

If you have been into WebApp creation, you probably realized that it is not just the application itself, you'll need to also have other stuff on your backend to be able to make the application meaningful. Considering I'm an old-fashioned programmer, I initially chose the "comfort zone" and had my server based on a LAMP model (Linux-Apache-MySQL-PHP, while other might prefer WAMP. You can figure out what W stands for).

The MySQL part was easy and creating all the tables and relationships was kind of fun and reminded me of the joy of normalizing data and creating all those relationships, indexes, views and so on. Then I had to think about the hard part: how could I interact with the server DB from my app? Easy: PHP as the frontend and I'm done. A friend of mine recommended a look on APIgility and it realy helped with the API-like heavy-lifting and it was quite easy to implement a RESTful HAL+JSON API on top of it, talking to my MySQL database.

Next step, why not cache some records on the WebApp WebSQL (or SQLite if you prefer). By doing this, the app will look faster and it will also work offline. I started coding the caching mechanism and after a long couple months I realized that I was spending much more time on programming the "support" for my application than the application itself.

Now enter CouchDB/PouchDB. If you never heard of them, you definitely should Google about them.