Install and Use Redis Server

Sort Introduction

Redis is an extremely fast, atomic key-value store. It allows the storage of strings, sets, sorted sets, lists and hashes. Redis keeps all the data in RAM, much like Memcached but unlike Memcached, Redis periodically writes to disk, giving it persistence. It is quite useful as both a cache store and as a full-fledged, NoSQL data store.

This blog describes getting Redis working on your rails application.

Initial setup

  1. Start off by updating all of the apt-get packages:
    $ sudo apt-get update
  2. Now Download a compiler with build essential which will help us install Redis from source:
    $ sudo apt-get install build-essential
  3. Now in the last we need to download tcl:
    $ sudo apt-get install tcl8.5

Redis Installation

Thats all… Finish Now try to run the redis server into your machine

$ redis-serverredis

Stop redis server running in background :

  • $ killall redis-server

OR

  • sidekiqctl

If you are, looking to Develop and design for your project then feel free to contact us at any time

  • Call Us- +91 9910781148, +1 8033353593
  • Email: company@tecorb.com
  • Skype- tecorb

“We maintain transparency with our customers. Our values and business ethics has given us repeated customers. We tend are proud to be a reliable outsourcing partner for many clients across the World.”

Case Study of Laundry Application

You may not think of laundry as a high-tech industry, but at Laundry we’ve invested large quantity in technology to transform the laundry room experience for our customers.

The result is drove towards the intelligent systems that allow for real-time connectivity, easy to use mobile apps, and quicker service response, remote laundry monitoring and smart-card payment.

Being dynamic, multi-national business, technology enables us to maximize laundry room profits, deliver superior service, keep a pulse on what’s important to our customers, and maintain the lifetime customer retention rate.

Phases of Laundry Application

A.) Pick  

pick up

B.) Wash 

laundryD application Development company

C.) En-Route  

   

En-Route

                                                                    

D.) Drop  

                                       drop                                                

Save time. Save money. Save the environment. It’s an easy choice. Revolutionize your laundry process today by signing up for Simply Laundry’s door-to-door laundry and dry cleaning delivery service!

Features of LaundryD App:

  • One tap (Request on the Home Pick Button) to complete all your laundry requirement
  • You can Track status of your laundry request whenever you want.
  • Order history of your current and previous orders.
  • You will receive Apps notifications on your mobile. After successful completion of your laundry request.
  • You can mark your pickup and delivery time slot at the time of placing the request.
  • Live location tracking of pickup/delivery persons.
  • Simplified and secured advanced payment options.

 

Working of Laundry:

PICK: This section is again divided in to 3 sub-sections with a progress form, where contractor have to add details of laundry, like type, unit and Quantity, than contractor have to Submit date for DROP, on last sub-section, contractor have to get sign of a assigned person and submit form.

WASH: After getting laundry, Contractor supply this laundry to washing unit. Taking washing unit authority signature. (Here authorities can check laundry details).

EN-ROUTE: On Getting, Laundry from washing unit, contractor can add notes for laundry.

DROP: This section is again divided in to 2 sub-sections with a progress form, where contractor have to add details of DROPED laundry, like type, unit and Quantity, than contractor have to get sign of a assigned person than contractor submit form.

Conclusion

Here, at Laundry, we believe that each of the laundry order – no matter big or small – is an opportunity to provide better service. We make it a point to collect data and feedback from user, and act on it as fast as we can. Also, we make sure that our presented laundry must know our customers’ standards and that you people as customers get the very best out of it. We trust in giving you the best and most remarkable experience – that even though doing your laundry is our job, it becomes a smooth and unified experience every time, without flop.

Deploy Ruby on Rails project with Passenger and Nginx

I’m assuming that you have installed ruby and rails at your server and have a Ruby on rails project to deploy with Passenger and Nginx

Step 1 –  First of all, we need to add a Sudo User to our system so user can have privilege to access the files.

create a user if not exists, in this example, I will explain to create a root user

tecorb@tecorb-Lenovo-B40-80:~$  adduser root

(this will ask few questions like your password etc.)

Step 2 – Now we have to add this new user to the sudo group

Syntex:

tecorb@tecorb-Lenovo-B40-80:~$ gpasswd -a root sudo

Step 3 – Now we need to install Passenger and Nginx

First of all we will install a PGP (Pretty Good Privacy) key:

tecorb@tecorb-Lenovo-B40-80:~$  sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 561F9B9CAC40B2F7

Now we have to create an APT (Advanced Packaging Tool) source file

tecorb@tecorb-Lenovo-B40-80:~$  sudo vim /etc/apt/sources.list.d/passenger.list

And insert the following line in the file:

deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main

Press ESC then :wq and hit enter, Now our file has been saved through vi editor

Now we need to change the owner and permissions for this passenger.list file:

tecorb@tecorb-Lenovo-B40-80:~$  sudo chown root: /etc/apt/sources.list.d/passenger.list

tecorb@tecorb-Lenovo-B40-80:~$  sudo chmod 600 /etc/apt/sources.list.d/passenger.list

Now we have to update our APT cache:

tecorb@tecorb-Lenovo-B40-80:~$   sudo apt-get update

And finally, we will install Passenger with Nginx:

tecorb@tecorb-Lenovo-B40-80:~$  sudo apt-get install nginx-extras passenger

Step 4- In this step we will open the Nginx configuration file for some changes:

tecorb@tecorb-Lenovo-B40-80:~$  sudo vim /etc/nginx/nginx.conf

now file will be open in vi editer, Uncomment given line, These lines will look like this:

# passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;

# passenger_ruby /usr/bin/ruby;

uncomment these lines and update the path mentioned in the passenger_ruby line and add default user :

passenger_default_user root;

passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;

passenger_ruby /usr/local/rvm/gems/ruby-2.3.0/wrappers/ruby;

Note if you are unable to get what is your path to ruby then follow these steps:

tecorb@tecorb-Lenovo-B40-80:~$   which passenger-config

this will return a path like: /usr/bin/passenger-config

If you are on RVM and use Ruby 2.2.1 (version can be whatever you are using)

tecorb@tecorb-Lenovo-B40-80:~$  rvm use 2.3.0

Now finally, we will invoke passenger-config with its full path, passing –ruby-command as parameter like:

tecorb@tecorb-Lenovo-B40-80:~$  /usr/bin/passenger-config –ruby-command

This will show you something like:

  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby

  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby

  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start

From here you will get path for your passenger_ruby (Nginx). This path will use at passenger_ruby in nginx.conf

Now finally we will save our file and exit by Press ESC then type :wq and hit enter.

Step 5- Now we have almost done, we need to disable the default Nginx configuration at Nginx config file:

tecorb@tecorb-Lenovo-B40-80:~$  sudo vim /etc/nginx/sites-available/default

Findout these lines and comment them:

# listen 80 default_server;

# listen [::]:80 default_server ipv6only=on;

Save this config file, Press ESC then type :wq and hit enter.

Step 6- Now we will create an Nginx configuration file for our application (like our app name is tecorbapp):

tecorb@tecorb-Lenovo-B40-80:~$  sudo vim /etc/nginx/sites-available/tecorbapp

Add the following server block into this file:

server {

  listen 80 default_server;

  server_name tecorbdomain.com http://www.tecorbdomain.com;

  passenger_enabled on;

  passenger_app_env development;

  root /home/rails/tecorbapp/public;

}

In this file we enable listening on port 80, set our domain, enable Passenger, set the application environment here we have used development environment and set the root to the public directory of our ruby on rails project.

If you don’t want to add your domain to the application, you can skip the server_name line from this file, or if you want to use any IP address you can replace

tecorbdomain.com http://www.tecorbdomain.com with your ip address.

Now we will save this config file, Press ESC then type :wq and hit enter.

Step 7- Now finally we will create a symlink this file:

tecorb@tecorb-Lenovo-B40-80:~$   sudo ln -s /etc/nginx/sites-available/tecorbapp /etc/nginx/sites-enabled/tecorbapp

and Restart our Nginx:

tecorb@tecorb-Lenovo-B40-80:~$  sudo nginx -s reload

Now our application should be accessible from our domain, go to your browser and hit the domain.

Also Read- AngularJs with Ruby on Rails Task-1

If you are, looking to Develop and design for your project then feel free to contact us at any time

  • Call Us- +91 9910781148, +1 8033353593
  • Email: company@tecorb.com
  • Skype- tecorb

“We maintain transparency with our customers. Our values and business ethics has given us repeated customers. We tend are proud to be a reliable outsourcing partner for many clients across the World.”

Mobile Search Engine Optimization

Mobile Optimization

Mobile optimization is the process of ensuring that visitors who access your website from mobile devices have knowledge of optimized for the device.

What is mobile Optimization

Every year people spend maximum time on their mobile devices and tablets, however several websites still are not designed to account for various screen sizes and load times. Mobile optimization takes a look at page speed, website structure, website design, and additional to create certain you are not unwittingly turning mobile guests or visitors away.

images

Mobile SEO Best Practices

If your website is already optimized for search engines, there are only some additional things that you can think about when you optimizing for mobile.

Page Speed:

Because of hardware and property problems, page speed is even a lot of necessary for mobile users than desktop users. Beyond optimizing pictures, you will need to minify code, leverage browser caching, and reduce redirects.

responsive-website-design-toronto-tomsawyer-left

Website design for mobile

Mobile devices are simplifying and revolutionizing the ways in which websites are designed. “Above the fold” not has which means during a world whenever we have a tendency to scroll endlessly

Optimize titles and Meta descriptions

Remember that you are working with less screen space when a user searches using a mobile device. To show off your best work in SERPS (Tools for Keyword Checking on Google or Yahoo Search engine), be as concise as possible (without sacrificing the quality of the information) when creating URLs, titles, and Meta descriptions.

Optimize for local search

If your business has a local element, keep in mind to optimize your mobile content for local search. This includes standardizing your name, address, and signal and as well as your town and state name in your website’s data.

Mobile site configuration

Probably the most necessary decision you will build once fitting a website is deciding whether or not you wish to use a responsive, dynamic serving, or separate website configuration. Everyone has its advantages and disadvantages. Google prefers responsive design however supports all 3 choices as long as you have got set them up properly.

Responsive web design

Responsively designed websites use CSS3 media queries to serve an equivalent content to mobile and desktop users using a fluid grid and a useable design to automatically depend to the size of a user’s screen.

responsive-web-design-640x320

Responsive designed use media queries to focus on the layout supported screen dimension, resolution and orientation. For example, you might use the subsequent CSS to instruct browsers a way to show content for a screen that is 420 or fewer pixels wide:

Final thoughts

Sure, do paid search to get visibility in Google smart-phone search; however do not forget to try to mobile SEO (Search engine optimization) for additional visibility. These steps — target on fix mobile-friendly errors, core ranking, do mobile keyword research and content creation, do apps store optimization and apps indexing, and use AMP (Accelerated Mobile Pages) — will help bring more organic traffic to your content from mobile searchers.

 

Swift Tips for Those Getting Started

Start developing iOS Apps (Swift) is that the excellent start line for learning to make apps that runs on iPhone and iPad. Get through this set of progressive lessons as a target-hunting introduction to putting together your initial app-including the tools, major ideas, and best practices that may ease your path.

Each chapter contains a tutorial and also the abstract info you wish to complete it. The teachings hinge on one another, walking you thru a step-wise method of making an easy and Real-world iOS app.

As you create your means through the teachings and build the app, you’ll study ideas in iOS app development, gain a deeper understanding of the

Swift programming language, and inform yourself with the numerous valuable options of Xcode, Apple’s integrated development surroundings (IDE).

Since its 1.0 release in September 2014, Savvy Apps’ development team has been experimenting with and using Swift in iOS projects.

Though the majority of our current projects remain in OC (Objective-C) because of the relative youth of Swift, we have started coding new projects in Swift since its 2.0 release in September 2015.

Swift Tips for Those Getting Started

ios-apps-development-comapmy

Clean Up Asynchronous Code

Swift had got a neat syntax for writing off the completion functions. We had completion blocks in the Objective-C, but they were delayed in the language’s development process.

untitled

Control Access to Our Code

We should always use the appropriate access control modifier to encapsulate the code. Good encapsulation helps us to understand how pieces of code interact with each other.

sw

Perform experiment and validation

Playground is an interactive and easy coding environment in Swift. We can also create playgrounds in order to test and validate the ideas, learn Swift and share concepts to each other.

ios-application-develoment

Leave NSNumber Behind

Here the Objective-C uses the C primitives for numbers, also the Foundation Objective-C API provides the NSNumber type for boxing and unboxing the primitives as well.  We can actually add Int / Float / AnyObject values for Swift dictionaries and array.

The most common Swift type that are used instead of NSNumber:

Swift: Objective-C

Int: [NSNumber integerValue]

UInt: [NSNumber unsignedIntegerValue]

Float: [NSNumber floatValue]

Bool: [NSNumber boolValue]

Double: [NSNumber doubleValue]

Download

downlad

To download the latest version of Xcode

-Open the App Store app on your Mac (by default it’s in the Dock).

-In the SF (search field) in the top-right corner, type Xcode and press the Return key.

-The Xcode app shows up as the first search result.

-Click Get and then click Install App.

-Enter your Apple ID and password when prompted.

-Xcode is download into your Application directory.

Conclusion

ios-apps

Here in Swift we had used may update classes and methods from time to time. We need to choose the correct development methodology so that we can develop more secure and flexible application.

As the Apple CEO said, “The sidelines are not where you want to live your life. The world needs you in the arena.” Its’s just the beginning for better future and technology advancement.

We TecOrb Technologies Pvt Lmt is the best company for mobile and web application development. If you want to developed any application for mobile and web and you have any query regarding this then you contact us by our website http://tecorb.com and you also call us

Call Us- +91 9910781148, +1 8033353593
Email: company@tecorb.com
Skype- tecorb

AngularJs with Ruby on Rails Task-3

In Part-2 we have worked with the controller and model in angularJs with Ruby on Rails  and submitted the book form, add that book into the list.

Today we will discuss how to save and get and save data  from/to  the database model using API in ruby on rails with the help of AngularJs.

Lets proceed further :

Step 1: First of all we have to create a Book model in rails with name attribute. And migrate the migration.

Step 2. Now create a  books controller in rails that will contain two actions first for index (to  make an api to get all books records from the db) and another for create( to save data in Book Model). And generate the routes for both of these.

  • Assuming that you are generating the routes using resources :books  in route.rb
  • So for index action path will be ‘books/’ with GET type and for create action path will be same ‘books/’ with POST type.

 Step 3: Now we have to create the JSON Apis for index and create in our books controller like so we can call them from angularJs Controller

rsz_book8

Step 4: Now from AngularJS controller that we have defined in welcome.js we have to call these apis to fetch the book records and save the book into the database.

rsz_1book9

Now We have all done. Refresh your page add book from text-box that will save into your database and all blow listing will be fetch from database. Have fun with AngularJS

rsz_book6

Also Read- AngularJs with Ruby on Rails Task-II

If you are, looking to Develop and design for your project then feel free to contact us at any time

Call Us- +91 9910781148, +1 8033353593
Email: company@tecorb.com
Skype- tecorb
“We maintain transparency with our customers. Our values and business ethics has given us repeated customers. We tend are proud to be a reliable outsourcing partner for many clients across the World.”

AngularJs with Ruby on Rails Task-II

In Part-I we have done how to use basic AngularJs in our Ruby on Rails Project.

Now today we will work with the controller and model in angularJs and submit that book form and add that book into the list.Lets proceed further:

Step 1: Now we will define a controller into our view (index.html.erb) using a div using ‘ng-controller’ like:

rsz_book3

Step 2: Now we will define the controller in the welcome.js fil

rsz_book4

Here ‘myapp’ is same as we have defined in application.html.erb within ‘ng-app’ and ‘welcomeCtrl’ is same which we have defined in view index.html.erb.

$scope is an object by which we will use to interact with the view, we can get and set variables and functions on it.

Here we have set a books array with hashes as the elements.

Step 3: Now first of all we have to access this books array on our view and show a list of books . So come to the index.html.erb and add a list like:

rsz_2book5

Here ‘ng-repeat’ will works like as loop and return every book one by one that are available in books array.

rsz_book6

Step 4: Now we have to submit this form and add the value to the list shown below.

For this we have to add  ng-submit=”addEntry()” in our form tag. Basically ‘ng-submit’ will call the ‘addEntry()’ method when this form will submit. Like,

<form ng-submit=”addEntry()”>

Step 5: Now we have to define this ‘addEntry()’ method in our Angular controller that we have defined in welcome.js file

rsz_1book7

Here $scope.books.push($scope.newEntry) will push the newEntry object in books array. ‘newEntry’ is that object which will use to access the form fields as we have described in Part-I blog.

And after pushing the newEntry data into books array we have to reset the fields so we will initialize ‘newEntry’ with null {}

Now All Done, refresh and add some book.

Also Read- AngularJs with Ruby on Rails Task-1

If you are, looking to Develop and design for your project then feel free to contact us at any time

Call Us- +91 9910781148, +1 8033353593
Email: company@tecorb.com
Skype- tecorb
“We maintain transparency with our customers. Our values and business ethics has given us repeated customers. We tend are proud to be a reliable outsourcing partner for many clients across the World.”