API-based projects are more and more popular, and they are pretty easy to create in Laravel. But one topic is less talked about – it’s error handling for various exceptions. API consumers often complain that they get “Server error” but no valuable messages. So, how to handle API errors gracefully? How to return them in “readable” form? Main Goal: Status Code + Readable Message For APIs, correct errors are even more important than for web-only browser projects. As people, we can understand the error from browser message and then decide what to do, but for APIs – they are usually consumed by other software and not by people, so returned result should be “readable by machines”. And that means HTTP status codes. Every request to the API returns some status code, for successful requests it’s usually 200, or 2xx with XX as other number. If you return an error response, it should not contain 2xx code, here are most popular ones for errors: Status Code Meaning 404 Not Found (page or other resource doesn’t exist) 401 Not authorized (not logged in) 403 Logged in but access to requested area is forbidden 400 Bad request (something wrong with URL or parameters) 422 Unprocessable Entity (validation failed) 500 General server error Notice that if we don’t specify the status code for return, Laravel will do it automatically for us, and that may be incorrect. So it is advisable to specify codes whenever possible. In addition to that, we need to take care of human-readable messages. So typical good response should contain HTTP error code and JSON result with something like this: Ideally,...
We all are diving in the world of Smartphones and tablets. The backbone of these gadgets are –applications, which in general known as – Mobile apps. Mobile apps provide a lot of benefits to the end-users and organizations. Business owners are delivering apps for different purposes such as – customer awareness, revenue generation, workforce productivity etc. This leads to emerging demands of mobile applications and app development companies as well. Every unit of a development firm is capable and up-to-date with the latest concepts and app development trends. For the sake of all of you, we prepared a list of all the latest trends that describe the future of mobile app development. Let’s have a look – 1. IoT( Internet of things ) IoT stands for ‘Internet of Things’. It is a technology responsible for connecting physical objects with the smartphone or each other to communicate. From past some years, mobile app development is very much into IoT because of its advanced functionalities. The use of IoT is very common nowadays in electrically controlled devices. You can control these devices just with the help of your smartphone. No physical interaction required. For example, if you forgot to switch off your AC after coming out of the house, you don’t need to go there. You can turn off it with the help of your smartphone. 2. AI and Machine Learning Artificial intelligence was already booming in 2017. In 2018, it is the most common trend in app development. Brands are optimizing artificial intelligence and machine learning in their web-apps and mobile apps. The AI-powered apps can accomplish tedious tasks. Users love...
Node.js or as commonly called NodeJS, is an open source , cross platform Java Run time environment based Chrome’s V8 JavaScript engine, meant for server-side programming. It allows us to run scripts on server-side to produce dynamic web page content before the page is sent to the user’s web browser. It allows to easily develop networked applications that require back-end functionality with Java-scripts being used on both front-end & back-end. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. In this tutorial, we will learn to install Node.JS on Ubuntu & CentOS machines. (Recommended Read: – ) Pre-requisites We need to have some packages like ‘gcc, gcc-c++’ installed on our systems. Install them on CentOS using the following command, $ sudo yum install gcc gcc-c++ For Ubuntu, install them using the following command, $ sudo apt-get install build-essential Install NodeJS on Ubuntu We can install either of the two available Node.JS versions i.e. 6 (which has long term support) or 9 (which is the latest version available). For installing Node.JS, we will add the official repositories on our system, use the following command to add the repository, For Node.JS 6, $ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash – For Node.JS 9, $ curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash – Once added, install Node.JS using the following command, $ sudo apt-get install nodejs We can also install Node.JS using the source code, method has been discussed below. Install NodeJS on CentOS On CentOS, we can either install Node.JS from EPEL repository or from official Node.JS repositories. Both methods have been shared below. Using EPEL...
If you’re into mobile app development, the name of React Native mustn’t be new for you. The term has been trending in the world of technology for quite some time now. Since Facebook formally launched it as an open-source platform, a lot of businesses have already incorporated it into their process.Just like any other origination, React Native comes with its own pros and cons. Despite the fact that professional web developers still prefer working with the native tools, there are a thriving number of budding developers who’re considering React Native for their projects.This post is targeted to highlight the theoretical as well as practical aspects of using React Native in comparison with the Swift. To make this comparison, we have two almost identical apps in both frameworks (please check out details at https://github.com/weblab-technology/swift-honors-app https://github.com/weblab-technology/react-native-honors-app )My objective was to keep these apps as simple as possible so that it would be easier make a fair comparison in between important aspects of both the platforms. Below you will find a detailed analysis of the apps developed in Swift as well as in React Native in terms of CPU, GPU, and memory consumption. So let’s explore! Swift vs React Native Okay, so this app involves Facebook login, Facebook profile recovery, Database recovery, and Tab Bar Controller. I’ve codified the similar app in Swift as well as in React Native and will be using a real device to assess the performance of these apps . My objective is to equate them against each other to observe which one platform performs better. The Swift Unlike other languages, Swift is comparatively easy to work with,...
How much does it cost to get a mobile app developed The easy accessibility of mobile phones has accelerated the growth of mobile applications worldwide. In 2019 alone, over 209 billion app downloads were recorded globally; which is a noteworthy feat in this field. A report by Statista suggests that the number of is slated to touch a whopping 3.8 billion by the end of 2020. It was 2.5 billion just four years ago! These astounding numbers could do wonders in the coming years and might change the face of app development, too. Both small and large businesses have understood the power and importance of to engage their customers and drive sales. However, with the market saturated with freelancing services and mobile development companies, it has become extremely difficult to predict the cost of mobile application development. This is the main reason why small businesses cannot raise the right funds, and why large companies end up paying thousands to build a sub-par product. In this article, we will explore the factors that determine the cost of . We will also break down the factors, features, and methodologies that are involved in the process. If you are a business owner who is planning to develop a mobile application or hoping to rebuild an existing one, this article will offer you some valuable insight and clarity so you can take an organized and informed route. Factors that affect mobile application development cost The cost of mobile application development depends on multiple factors that range from the technology stack you choose to the developers you hire. There is no standard way to...
React Native is an excellent entering point to app development for a web developer, especially with React experiences. However, it does not mean that React Native is simple. You can write apps with your familiar language, JavaScript, but it certainly requires an overall understanding of iOS and Android platforms. This article is a summary of my learning process on the React Native architecture and the ecosystem from the web developer point of view. The Execution Environments React runs on the JavaScript runtime environment. For the web, it is a web browser. There is a single JavaScript thread, and it uses web APIs implemented natively in the browser. It is important to understand how the callbacks work between the main JS thread and Web APIs, especially when using asynchronous functions. This interaction between JavaScript engine and native APIs are also vital to understand how React Native behaves in its environment. Threads in React Native There are three key threads in React Native execution environment, JavaScript thread, Native main thread and the background thread to handle Shadow Node. In the current architecture, the communication between these threads happens over the library called “bridge”. The React Native team is actively working on the major architecture upgrade and this article gives a great overview of why and how the change is needed. I don’t get into the details, but the basic understanding of the current and future architecture helps to model your application, especially to separate the concerns. React and React Native As you can see above, React Native covers a significantly broader area than React itself. React for the web looks rather...
web development company singapore,mobile application development singapore,ruby on rails developer singapore,singapore web development,singapore mobile application developer,web development singapore,web design services singapore,singapore website design,mobile app developer singapore,singapore web design,design agency singapore,website developer singapore,developers in singapore,website development singapore,singapore mobile app developer,singapore web design services,web design singapore,design firms in singapore,web design company singapore,ios developer singapore,app developer singapore,graphic designer in singapore,mobile game developer singapore,ios app development singapore,android developer singapore,developer in singapore,app development singapore,web application singapore,mobile application developer singapore,mobile app development singapore,web designer singapore,website designer singapore,singapore app developer,mobile apps singapore,mobile apps development singapore,website design singapore,mobile developer singapore