08 October, 2012

New Ruby on Rails Gem Announced by Mindfire Solutions


Mindfire’s Ruby on rails development team has created a gem called “Survey” and shared it in GIT (GIT link : https://github.com/mindfire-solutions/survey). Through this gem anyone can run a survey – all you need to think of is a set of questions and answers, rest all you need to do is add this gem to your Rails application.

Mindfire has been working in Rails application development for more than 2 years now and our development team has been contributing to the knowledge base by sharing our learning with the community at large through articles and tips (on new or useful things we learned during application development). This is one more step in that direction where we realized that there are no survey gems available for quick use by Rails developers worldwide, so we created one and shared in GIT.

Prerequisites for using this gem are:
  • Ruby 1.9 or higher
  • Ruby on Rails 3.1.3 or higher
  • Application must have an authentication system with admin and normal user privileges.
  • As we are using jQuery in the gem, so your application must support (include) jQuery-rails gem.

Details of the Survey gem:

Survey is composed of various modules those are listed and explained below:
  1. Categories: All the questions and the answer sets are categorized. An admin user can add categories and a normal user can just view the categories.
  2. Questions: Questions are the basic module of Survey. Questions can only be added by an admin user. They are broken into following types:
  • Text Box: A question with a text box as an answer field.
  • Text Box (Date): A question with a textbox and a calendar. Accepts only date as answer.
  • Drop Down: A question with a drop down of choices. One of the choices needs to be selected to answer the question.
  • Check Box: A question with check boxes. When a question can have multiple answers.
  • Radio Button: A question with radio buttons. It can be used for selecting one out of multiple options.
  1. Selections: Selections are the pre-defined choices/options for the questions of types Drop Down/ Check Boxes/ Radio Buttons etc. While creating a question if one chooses the question type to be any of the above three, a link is provided for adding a selection. A question can have as many selections as needed.
  2. Validations: For the questions with Text Boxes, we can limit the input by adding validations. Validations can be chosen from the pre-defined list that appears if the question type is Text Box.
  3. Question Sets: A Question Set is set of questions and sub-sets. Each question/sub-set that is added to the question set is called a Question Set Item. A Question Set is classified as follows:
  • Assembly: A question set that cannot be integrated into other sets. Only Assembly Question Sets can be evaluated.
  • Sub-Assembly (Sub-set): A question set that can be integrated into other sets.
  1. Question Set Items: A question set item is any item that is being added to the question set. It can be a question or Sub-assemble question set.
  2. Conditions: If the question set item is a question then we can add a condition based on the choice a user would made. For example, if the item is a question that states “Which car do you own?” and the selections are “A. Skoda, B. Audi, C. VolksWagon etc” now we can add condition if the user chooses selection A then we can show a question/set of questions, if user chooses B then we can show a different set/question or may be nothing. A condition can be applied to a question with Text Box too, but instead of using selections as a base the validations would be considered. If the question type is Radio/Dropdown the multiple selections in a condition would mean, if either of the selections. While in case of check box multiple selections would mean all of the selected options need to match with the user selections. Text Box (Date) type questions do not have any conditions.
  3. Evaluation: Evaluation is sort of answering the questions in a set. A published and assembly type question set can only be evaluated. Any user can participate in the evaluation of a question set. Though they can view/edit evaluations made by them, they are not allowed to view evaluations made by other users in the system.

Why do we use frameworks in PHP development?


It helps a lot to understand why we use frameworks in PHP development before zeroing in on a particular framework. A PHP Framework forms the basis of the platform that allows software developers to develop web applications. Hence it provides the detailed structure to develop an application.

The advantages of using a PHP Framework are manifold. First of all it helps save time. Secondly, it helps avoid the need to produce repetitive code, and thus helps the developer go for Rapid Application Development (RAD). Therefore one can always imagine how difficult it would be not to have a PHP Framework in place. These difficulties manifest while producing applications because the developer has to repeatedly code a lot of PHP. Notwithstanding the above fact, it also becomes imperative for the developer to execute the connection between his database and the application that he has been trying to develop from scratch. In these circumstances using a PHP framework makes custom PHP development easier by ensuring that this connection remains intact.

Essentially, PHP development is based on the Model View Controller (MVC) fundamentals which is an architectural pattern featured in a number of popular programming languages. The MVC architecture helps separate the domain logic from the user interface. Hence it is often quoted that, the key to understanding PHP Frameworks better comes through a thorough knowledge about the MVC architecture.

Although it may seem very convenient to pick up the most popular PHP framework in the market, it is also quite important not to get confused with what you need your framework to do and the features that are already bundled in the framework. Not every PHP Framework offers the same support for databases, communities, and an easy to follow user guide. At the same time if you are an end user company and you would like to build a content management system for your company using PHP, then you would obviously require some expert counsel from a professional PHP development company. When you are at this juncture of the software development phase then you can always approach Mindfire Solutions to address your PHP development needs. With over 10 years of custom PHP development experience along with deep expertise in the numerous PHP frameworks widely available in the market, Mindfire Solutions can be your ideal software development partner to help you from start to finish of your project. Not only will it help you decide judiciously on the framework to be used, it will undertake with utmost professionalism all the tasks that are essential towards the completion of the project.

Mindfire Solutions is a 12-year old leading Software Development and IT services company with a strong track record of working with SMBs like you who are present across geographies. Our 750+ spirited software engineers located across three advanced development centres in India have collectively executed more than 1000 projects for our 300+ client base. Along with a guaranteed Mindfire promise of unparalleled quality, we also have 100 hours risk free trial* for new clients.