Optimizing data retrieval using Realm Swift query

This article gives insights on Realm Extension Functions, through which time taken for a filter on the database is drastically reduced.

How to replace strings.xml dynamically in Android?

Handling localization is a tedious process in Android, but what if I tell you it can be done in a much simpler and effective way using Restring.

Architect role-permissions based app using React Hooks

React is a very popular and growing JavaScript library. When we think in the context of MVC architecture, React comprises the View in MVC architecture. For managing application state, we may need to rely on other JavaScript state management libraries like Redux or if you are using React v16+, so you can use React's Context API in combination with useReducer hook to serve our state management purpose. Good architecture makes the system easy to understand, easy to develop, easy to maintain, and easy to deploy. The ultimate goal is to minimize the lifetime cost of the system and to maximize

Deep Search with Azure Search

Efficient & robust search functionality is a necessity of any software application, may it be web, mobile, or desktop. It's a "must" to improve user experience (UX) and adoption. The search feature may seem very simple to a user but its very complex and challenging behind the scene to implement especially deep search. For one of our web applications, we had a challenging requirement to add several nested filters on search result pages. The primary data was sourced through Azure search on these web pages. In this article, I am sharing our learnings about Azure search and the power of

Deep dive into ActiveRecord .scoping method in Rails

In Rails, multiple scopes can be created and chained together. What if we wish to apply a specific scope to a group of queries? Consider the following scenario: we have Post and Comment models and we want to perform few operations on public posts. # app/models/post.rb class Post < ActiveRecord::Base scope :public, -> { where(private: false) } endLoading development environment (Rails 7.0.0.alpha2) 3.0.0 :001 > Post.public.update_all(body: 'public post') Post Update All (4.1ms) UPDATE "posts" SET "body" = ? WHERE "posts"."private" = ? [["body", "public post"], ["private", 0]] 3.0.0

Video Hosting Platforms for Mobile Apps - A comparative study!

There are ample video hosting platforms available on the internet. Choosing a video hosting platform is a critical decision as it should go hand in hand with your long-term hosting requirements, alongside taking utmost care of security breaches for copyrighted content. The video hosting platform that we have been using for one of our web apps is Wistia. Why did we choose Wistia for our Web App? Embeds seamlessly in any websiteEnsures data security through domain restrictionsProvides in-video formsCustomizable video controls, and much more.What's the challenge to use it in Mobile Apps? The challenge came in when we wanted

Rails 7 introduces partial_inserts config for ActiveRecord

Rails 7 adds the partial_inserts config to config.active_record that is used to control partial writes when creating a new record. config.active_record.partial_inserts is a boolean value and controls whether or not partial writes are used when creating new records (i.e. whether inserts only set attributes that are different from the default). Configuring config.active_record.partial_inserts In a newly created Rails 7.0 application, config.load_defaults 7.0 is set by default in application.rb. The default value of partial_inserts for config.load_defaults 7.0 is false and for

Custom Utility Types in TypeScript

TypeScript's type system makes it very easy to add types as per our requirements. But most of the time, we may need to perform some transformations on existing types to get resultant type as per our requirements instead of adding a new one. Some common type transformations may include: Extraction of types Exclusion/Inclusion of types Setting types to required/optional Utility Types provided by TypeScript help in performing such type transformations. Utility Types are built-in and globally accessible functions available in TypeScript. Under the hood, they make use of Generics extensively. Some frequently used Utility Types are as follows:

Rails 7 supports tracking of belongs_to association

One of the most convenient features of Rails is the ability to track attribute changes. Rails 7 is releasing soon and bringing in a lot of new features as a treat for developers. One of the many features that Rails 7 is introducing, is that we can also track the associated object. This Rails ActiveRecord specific PR has added two methods for tracking the changes for the belongs_to association. In this article, we will discuss these two new methods with the help of examples. 1. association_changed?The association_changed? method tells if a different associated object has been

Quick Guide: Integrating Widevine DRM In ExoPlayer For Android

Day by day OTT platforms are getting popular and along with that, it is increasing the fear of content security breaches. Ever amazed at How do these platforms secure streaming content from piracy or content leakage? How the content distributions are being controlled? Initially, I had all these doubts and after diving deep I got introduced to DRM. What is DRM? DRM stands for Digital Rights Management. It is a system that uses various licenses, keys and encryption techniques to protect the digital contents and also ensures that only an authorized user can decrypt the file with the help of