What is Redux?
In this tutorial we will create an awesome Redux app in organized fashion. But at first we will create an app in single file, analyse it and break it down to more manageable chunks of components and organize it in a comprehensible dir-structure. Continue reading
If you have read my another post about creating a ToDo app in react you are good to go; if not see this post.
You know that React App is a single page application containing only static assets. So, you only need to setup a mechanism to serve your static assets like CSS, JS, HTML, IMAGE, etc. files when clients ask for. Either you can use market leader HTTP servers like Apache, Nginx, etc or simple Express server that runs in Node.js.
It is a good practice to follow community standards while developing softwares. It has some major pros like
- Its easier to understand and debug/maintain software
- quicker to get help when needed from community
- It will lower development cost [Money and Time]
We will be taking the convention used by this project into consideration. react-slingshot
Make a dir called ‘todo‘ and initialize a node.js app. Continue reading
My assumptions: You have prior experience of Web framework like
Ruby on Rails, Django, Phoenix, etc.
Please refer to this React.js style guide for community comprehensible source code.
Hey, its not mandatory to use NPM to build applications with ReactJs; but, it will be alot easier to build, maintain, share codes using NPM. Firstly you should have NodeJs installed in your development machine.
Installation for Development Environment
$ sudo apt-get install nodejs
$ node -v
# if its says
command not found: node then try
# If it shows up, it means due no some name conflicts
# the name/command node is already taken by some binary.
# So, its get it back.
$ sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
Probable Issues: NPM not found
If your application connects local businesses to local customer, then you might have used Ransack for sorting and searching of records. For geocoding and reverse-geocoding, you might be using Geocoder gem. If you want to let users to sort results by distance then its pretty easy.
Things to remember,
- If you use
Model.near([lat, long]) method,
Ransack adds a new column called
distance to the
ActiverecordRelation object. You can access the method
distance by prying.
Its not quite easily graspable to sort your search results by Ratings if you have separate
Ratings table and there is an intermediate table called
Similar. Example Model schema is below for reference.
SOAP (Simple Object Access Protocol) is a protocol specification for exchanging structured information in the implementation of web services in computer networks. Its purpose is to induce extensibility, neutrality and independence. It uses XML Information Set for its message format, and relies on application layer protocols, most often Hypertext Transfer Protocol (HTTP) or Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission. – Wikipedia
How to make SOAP calls in ruby
One of the best ways to make SOAP calls will be using the library Savon. Its very easy to get started.
If your service provider has WSDL (Web Services Description Language) document. You can also host the WSDL file in your local machine or deploy along with the source code. Here is sample WSDL file if you wanna have a look. Basically this document consists of all the operations supported, format of the response, the endpoint URL of the services and other details. Continue reading