Posts

Showing posts from August, 2019

How to store files gracefully

When building web application, one thing you may need to think about is how you plan to store user files. If you are building an application that requires users to upload or download files(images, documents, pdf's..etc.). file storage can be an important part of your application architecture. Where Should I Store Files When building web applications, you’ve got a few choices for where to store your files.  like Store user files in your database in a text column, or something similar Store user files directly on your web server Store user files in a file storage service like  Amazon S3 Out of the above choices, #3 is your best bet. Storing files in a database directly is not very performant. Databases are not optimized for  storing large blobs of content. Both retrieving and storing files from a database server is  incredibly slow and will tax all other database queries. Storing files locally on your web server is also not normally a good idea...

RESTful API Designing guidelines.

The API is an interface, through which many developers interact with the data. A good designed API is always very easy to use and makes the developer’s life very smooth. API is the GUI for developers, if it is confusing or not verbose, then the developer will start finding the alternatives or stop using it. Developers’ experience is the most important metric to measure the quality of the APIs. Terminologies The following are the most important terms related to REST APIs Resource  is an object or representation of something, which has some associated data with it and there can be set of methods to operate on it. E.g. Animals, schools and employees are resources and  delete, add, update  are the operations to be performed on these resources. Collections  are set of resources, e.g  Companies  is the collection of  Company  resource. URL  (Uniform  Resource  Locator) is a path through which a  resource...