Skip to main content

Posts

Showing posts from February, 2022

Thinking Sphinx on Ruby on Rails Application with Spree.

  one of the easiest ways to connect your rails app with sphinx. It is used to connect your Active Record with Sphinx search and it is easy to use and fast to install. Install Sphinx: Add this to Gemfile.gem 'mysql2', '~> 0.5.2' gem 'thinking-sphinx' Run bundle command: bundle install For passing the indexing parameter, create ‘app/indices/modelname_index.rb’ Let’s do this with  Spree  Search. Here we are taking the example of the Product Model of Spree, Follow these steps: Create an index file in ‘app/indices/product_index.rb, add the indexing parameters. ` thinkingSphinx::Index.define 'spree/product', :with => :real_time  do indexes name, :sortable => true end 2.  Run the command to index and start the Sphinx: rake ts:stop rake ts:index rake ts:start rake ts:rebuild (stops, re-index, and start) 3. Let’s search for Productspay-as-you-go with Sphinx: # To query a product model q = 'Search Product Name' products = Spree::Product.search(q

Best Tools for Frontend Web Development and Technologies

  Website is a collection of related web pages that may contain text, images, audio and video. Frontend development deals with the view part of a website i.e UI (User Interface). UI is where the user interacts. To build UI there are Three pillars of Frontend development: -HTML (Building Blocks) - CSS (Building Blocks) - JavaScript HTML:  First pillar & the most important skill for web developers as it provides the structure for a web page. It is a most basic building block of a website. HTML defines the structure of a web page. CSS:  Second pillar of web development and used to style web pages so that they look good. JS:  Third pillar of web development and used to make your web pages interactive. JS is the most popular programming language in the world. It can add tons of functionalities to the website. Front-end  Development Tools: Main Frontend Tools used are: Git Less and SASS Bootstrap jquery Chrome Web development VS code Npm / Yarn React (JS Framework) 1. Git : Git is a VCS

Impact of Cloud Computing on Today's Businesses

Cloud computing is a revolution that is sweeping across the digital industry. Cloud computing has been adopted by more and more companies and firms every day for the past decade or more. Customers have been able to do business more easily and more conveniently because of the Cloud computing revolution. When we take a small step back, we see that before the revolution, The IT infrastructure on the premises of businesses has to be supported by sufficient budgets and a skilled workforce . Cloud computing is saving you from all these expenses, so you do not have to deal with them anymore. Cloud computing can take several forms. What are some of those types? Although cloud computing can be categorized in many different ways, there are three main types: Software as a Service (SaaS) Infrastructure as a Services (IaaS) Platform as a Service (PaaS) We can say that cloud computing is more expensive than these types because of its flexibility and accessibility . Cloud computing has many advantage

https://www.bluebash.co/blog/rails-6-7-api-authentication-with-jwt/

  What is JWT? JSON Web Token authentication (also known as Token-based authentication) is a new way to manage user authentication in applications. It is an alternative method of session-based authentication. The most notable difference between session-based authentication and token-based authentication are:- Token-based authentication  is  stateless  we do not store any information about the user logged into the server (which also means we do not need a model or table for our user sessions). Session-based authentication  relies heavily on the  server . The record is made for each logged-in user. Dissimilar to session-based authentication, the token method will not associate the user with login information but with a unique token used to manage client host transactions. JSON Web Token Structure? A JWT is easy to identify. It is three strings separated by (.) 1) Header 2) Payload 3) Signature Header The header carries two parts: ● The type of token ● The hashing algorithm to use, such