Archive for the ‘technology’ Category

Solidus: Next Generation of Spree Commerce

With Spree being acquired by First Data Corporation, they have stated that their support for the Spree open source project will be less. So, there is a new platform which is rumored to be equally good as Spree i.e. Solidus. It is a new open source e-commerce platform for high volume, complex super stores which is built on Ruby on Rails. It is a mountable engine that provides a scalable, stable, and highly customizable platform for e-commerce. solidus-ecommerce-platform-open-source-Blue-Stout

Let us dig a little bit deeper to know more about it.

Spree Commerce has been one of the best open source solutions built on Ruby on Rails. The reason behind is its lightweight code, minimal and modular approach from the first step. Apart from this, it is highly customizable and can be integrated easily. This is the reason, developers working on Spree were highly motivated, boasted quicker site load times and overall better storefront performance. Now that Spree is moving away from the open source project, there is a new solution for the enthusiasts: Solidus.
As mentioned above, Solidus is a new open source project which is carried by Spree’s open source community. They are creating high-quality code to overcome some of the problems people faced while using Spree. But, the truth is Solidus is not a replacement of Spree, it is a fork of Spree.
By fork we mean the development team has chosen a different path to build the same product on a different way. Spree Commerce project has been forked into Solidus. Spree 2.4 gave Solidus a foundation of Spree and diverged to a different direction. Related image

Is it better?

Solidus is a forked version of Spree 2.4, so it is similar to Spree. But it is moving forward with a vision of making following things better:
  • Increase the code integrity
  • Well defined extension points for simple and safer customization
  • Making it more secure
  • Introducing clear and stable API
  • Clear and straightforward migration path

Let us check out the Pros and Cons of choosing Solidus-

Pros-

  • It is Spree 2.4 but a better version as Solidus has improved the product immensely.
  • Dedicated development team.
  • Solidus has created a slack channel for developers to always have access to support.

Cons-

  • Many companies are not using it yet.
  • Many companies think that the solution is ‘too new’ to be used.
If we think about it, logically, then Solidus is just a newer and better version of Spree. So the ‘too new’ argument is actually invalid. Related image

Let us check out Pros and Cons of Choosing Spree-

Pros-

  • Highly customizable
  • It is simple and can be used according to customer’s need

Cons-

  • Spree is no longer supporting the open source project
  • The vulnerabilities and issues of Spree may not be resolved
  • Major contributors have moved on to other projects
How to migrate to Solidus if I am still using Spree?
Migrating to Solidus is pretty easy. But you need to keep few things in mind before migrating to Solidus. First, if you are using any earlier version of Spree than 2.4, then you need to upgrade it to version 2.4 before migrating. Second, if you are using the latest version of Spree, Soludius would recommend you to upgrade it to Solidus 1.1 which includes updated migrations to support data from Spree 3.0.

Wrapping up

In conclusion, there is no need to panic if you are still using Spree. It is not a huge change or leap. In fact, it is a continuation of Spree with improvements. Solidus has got the support of some major brands like Bonobos, AYR, and Stembolt, so we can say that the future looks promising.

Things You Should Know About SEO

Competition brings out the best in everyone, especially when it comes to business. Almost every business has a website which is important for growth, but what is the use of that website if it is not visible to the visitors? Having a website is meaningless if it doesn’t help you in growing your business. Image result for SEO If your website doesn’t show up in the first few pages of the search engine, the people would not even notice it. According to a research, 89% of people use search engines to look for products, services, and information. But how do you manage to rank well on search engine pages? The answer is through Search Engine Optimization.

Know more about search engine optimization

It is the process of getting traffic from the free, organic and natural search results on the website, also known as SEO. Most popular search engines rank the web pages on what the search engine considers most relevant to users. The term refers to the process of tuning a website to achieve a high ranking for specific keywords or phrase. Image result for SEO SEO is not what it used to be 2 years ago. Now, the key to SEO is meaningful content.

Problem

The main problem you will face is that very few companies and people know how to optimize a website or what to do afterward. Yes, it is possible to create an attractive site, but there are hundred such websites which look the same. SEO majorly depends on the content of your website. So, you are supposed to put original content on your website. Image result for SEO You need to hire a company who know about search engines and how they prioritize and rank the website. They should know about things like website traffic, social networking, and other technical aspects.

Conclusion

Image result for SEO So, after know about the search engine optimization and the problems, we conclude that the focus of SEO should be on the searchers, not the search engine. All the search engines have the same criteria of ranking page. They rank on the basis of what is most relevant to the user. So, rather than focusing on what search engine wants, the company should focus on what the user wants to see. This is what makes your website’s ranking better.  

Five Reasons to Use Spree For Your Storefront

Online stores have become pretty obvious. If you own a business that is related to selling something, then it has become necessary to take your business online. But the question that bothers a person more is which e-commerce platform is ideal for them? According to recent marketing strategies and research, an ideal e-commerce platform is the one which is cost efficient, easy to use, scalable, provide support, etc. Basically, the answer is Spree Commerce. spree-commerce-integration-service Spree Commerce is known for the best features, functionality, and user experience. More than 20,000 online stores are running on Spree Commerce. This is not enough, let us check out the reasons why Spree is the best storefront for online business-

1. It is absolutely free

Image result for spree commerce Yes, you read it right, it is free! It is an open source project which is completely free. You can simply download, set it up, and start your project. You can make any modifications in the code according to your project, you don’t have t buy any license or give a part of your revenue.

2. Ruby on Rails is the master

Image result for ruby on rails Spree is based on Ruby on Rails. It is an elegant, fast, and modern programming language that provides amazing solutions. It completes the work in less time, efforts, and resources; and also enhances the functionality, comparing to other e-commerce platforms. You can easily customize your platform according to your and customer’s needs.

3. Order management

Image result for order management on spree Managing orders, customers, and payments become a time-consuming task. Spree Commerce makes this work easy and efficient. It makes the management system fact. It gives and efficient, simple, and easily functional dashboard. You can easily adjust payment methods, product sorting, tax rates, currencies and other vital settings in just a few clicks.

4. Advanced Tools, Features, and Integration

Image result for order management on spree Apart from amazing management, it has a set of amazing features that improve the performance of your store. There are different options for SEO like keyword targeting, back linking, permalinks, meta-description of products, etc. It also supports major payment methods and gateways. It can be easily integrated with external services like Jirafe, Mandrill, Amazon, Bronto, Odoo, Shipstation, Zendesk, Netsuite, Mailchimp and etc.

5. The community is amazing

Image result for spree community Spree has a huge community with very active developers who develop the platform, add new functionalities, and solve challenges together. They also have support which solves the issues you get. There are free workshops, training, and the famous annual SpreeConf. Spree Commerce provides a complete set of documentation as well.

Conclusion

In conclusion, a good developer can build an efficient and smart solution for your e-commerce site. It gives a robust e-commerce solution. It is best for the start-up or small businesses that are short of finances. It is an amazing solution to boost your sales as well.

Ruby Metaprogramming

Ruby is definitely one of the most widely used languages nowadays. And if you are also working on Ruby, you must have heard the word ‘metaprogramming’. Even if you have used metaprogramming, there are chances that you didn’t understand it completely. Metaprogramming is an important concept of Ruby, and you need to understand the usefulness of this concept. the-black-magic-of-ruby-metaprogramming-1-638

What is ‘metaprogramming’?

It is a technique in which the written code writes itself, you can say programming of programming. This might sound confusing, but it is pretty simple to understand and work with. It helps you to add, edit, or modify the code while it is running. It can be used to create new methods or delete the existing ones. One can also reopen or modify existing classes, catch methods that do not exist. Repetitive coding can also be avoided to keep your program DRY.
Also Read-Capybara Basics For Automated testing of Ruby on Rails Application

How ‘Ruby‘ calls methods?

To understand the concept and scope of metaprogramming, it is important to understand how Ruby find a method when it is called. When a method is called in Ruby, it located that method within the code including the inheritance chain.
  1. class Employee
  2.  def test
  3.    “hello”
  4.  end
  5. end
  • charlie_will = Employee.new
  • charlie_will.test # => “hello”
  The test method is called in the example, Ruby first looks for the parent of the charlie.will object because it is an instance of the Employee class, and it has available a method called test, so this method is called. Things get more complicated however when the object is an instance of a class which has inherited from another class:  
  1. class Animal
  2.  def eats
  3.    “food”
  4.  end
  5.  def lives_in
  6.    “the wild”
  7.  end
  8. end
  9. class Pig < Animal
  10.  def lives_in
  11.    “farm”
  12.  end
  13. end
  14. babe = Pig.new
  15. babe.lives_in # => “farm”
  16. babe.eats # => “food”
  17. babe.thisdoesnotexist # => NoMethodError: undefined method `thisdoesnotexist’ for #<Pig:0x16a53c8>
In the above example, mixed inheritance is introduced. Methods defined higher in the inheritance chain needs to be considered by Ruby. When babe.lives_in is called Ruby first check the Pig class for the method, and it is called because it exists in the Pig class.
But if babe.eats method is called the story would be different. Ruby first checks the Pig class for eats method, as it does not exist in it then ‘Animal’ class will be called. In our case, it will respond as eats method exists in Animal class so it will be called. The method babe.thisdoesnotexist will throw an exception NoMethodError because the method does not exist. It means method defined in the lowest level of inheritance chain will be called if the method doesn’t exist, and an exception will be raised.  

After going through the example, we have discovered that Ruby looks up each method as follows:

  1. Ask object’s parent class if it can respond to the method, call it if found.
  2. If it does not respond, call the next parent class, continue until you reach the top of the inheritance chain.
  3. If nothing in the inheritance chain responds to the method call, the method does not exist.
 

Introducing Singleton Method

Singleton class is designed to give you the hold on to Object Oriented programming. It allows you to create an object that inherits from other classes and call their methods. It specifically does it for a single object. It is also known as Eigenclass.
  1. greeting = “Hello World”
  2. def greeting.greet
  3.  self
  4. end
  • greeting.greet # => “Hello World”
On different thing you would notice here is ‘self’. The greeting.greet method has access to the entire object it has been attached to; in Ruby, it will be referred to that object as ‘self’. In this case, it refers to the String value we attached to it. If we had attached it to anything else, it would have returned that object.
greeting = “I like cheese”
  1. class << greeting
  2.  def greet
  3.    “hello! ” + self
  4.  end
  5. end
  • greeting.greet # => “hello! I like cheese”
Singleton class method allows you to add many methods at once without prefixing all the method names. This syntax also allows you to add anything you would add while declaring the class including attr_writer, attr_reader, and attr_accessor methods.

How does it work?

When you work on the singleton class, Ruby needs a way to add methods to the object we are adding to, something that language doesn’t allow. To do so it creates a new class which is called ‘singleton class’. This class is, made the parent of the object we are working on, given the method and changes instead. It is also made an instance of the previous parent of our object so that the inheritance chain remains unchanged:

some object instance > singleton class > parent class > … > Object/BasicObject

Singleton class add one more step to the Ruby lookup method. Now Ruby looks up in the following way-
  1. Ask the object if its singleton class can respond to the method, calling it if found.
  2. Ask object’s parent class if it can respond to the method, call it if found.
  3. If it does not respond, call the next parent class, continue until you reach the top of the inheritance chain.
  4. If nothing in the inheritance chain responds to the method call, the method does not exist.
Not only can objects gain methods from their inherited classes, but now they can also gain individually unique methods as the program is running.

Putting metaprogramming to work with instance_eval and class_eval

Singleton classes are definitely helpful, but if you want to work with objects dynamically you need to be able to re-open them at runtime within other functions. Ruby does not allow you to have any class statements within a function syntactically, but instance-eval helps to do this. This method is defined in standard Kernel module of Ruby and allows you to add instance methods to an object just like our singleton class syntax.
  1. foo = “bar”
  2. foo.instance_eval do
  3.  def hi
  4.    “you smell”
  5.  end
  6. end
  • foo.hi # => “you smell”
The instance_eval method can take a block to evaluate, which can be used to define new methods as if you are writing a class. These methods will be added to the singleton class of the object.
The methods defined by instance_eval will be insurance methods. You cannot add attr_accessor to an instance method; to do so you need to operate on the class of the object instead of using class_eval:  
  1. bar = “foo”
  2. bar.class.class_eval do
  3.  def hello
  4.    “I can smell you from here”
  5.  end
  6. end
  • bar.hello # => “I can smell you from here”
Although instance_eval and class_eval are quite similar, their scope and application are slightly different. But you can remember which one to use in each situation by keeping in mind that instance methods are made by instance_eval while class methods are made by class_eval.  

Conclusion:

After reading all this, you must be still wondering what and where is metaprogramming? Coming back to the point, metaprogramming allows you to create more flexible code, be it through beautiful APIs or easily testable code. Moreover, it also allows you to do that using powerful programming techniques and syntax. IT allows you to create DRY, highly reusable and extremely concise code.  

App Advertising Monetization Models

The mobile advertising market is on its top game at this point in time. Simultaneously, many new mobile ad companies are introducing themselves. And every company has different monetization model. These models can be easily integrated into applications with their SDK. Let us check out these mobile ad monetization models- 201408-Revenue-models

Offer Walls

This model is generally used in games where the user buys virtual goods for real currency. The Offer Wall enhances user engagement with incentive offers as an integral yet nonintrusive part of the user experience. It gives the player a chance to earn virtual goods by performing different actions on the wall. For example, a user gets virtual sign up bonus to sign up into an app. StartApp, Fiksu, and TapJoy offer this model.  

Reward Ads

As the name says, this kind of ad model give away rewards at different levels. The reward is triggered by some event in the app like crossing a level or getting an achievement. A pop up comes on the user screen through which they will get a discount, gift card, coupon, etc. It is a win-win situation for everyone involved. The user will get a reward, and the owner of the app will also get compensated. Pokkt and Kiip are the lead players of this model. Image result for reward advertising

Banner Ads

Most of the people think that it is one of the most effective ways of advertising, whereas the reality is it is an ineffective method. This kind of ads occupies the top or bottom part of the app screen. When the user taps on the ad, different options open up from watching a video to downloading an app. The dominant players for banner ads are Google’s AdMob and Chartboost. Image result for banner advertising

Interstitial Ads

These ads show up at the transition points in an app. Generally, right before the user starts an app or after a game level is completed. Such ads drop off the user to advertiser’s desired URL. AdMob, TapJoy, Unity Ads use this model the most. Image result for interstitial mobile advertising

Native Advertising

Native advertising is basically content based advertising. The content of the particular website or app is shown in the apps’ news feed. This ad model is considered as the most effective way to generate revenue through mobile advertising. Facebook was the first one to adopt native advertising, and show tremendous growth. AdRoll, ShareThrough, and PubNative offer this model. Image result for native mobile advertising

Notification Ads

The notification ads show up on the screen even when the user is active or working on the app which makes it one of the most undesirable model. This model is only supported by Android. Advertiser will be able to push notification ads at any time. AirPush and LeadBolt work with this mechanism. Image result for notification mobile advertising If you are planning to develop an app that includes mobile advertising, you should research and select the different ad models, then design the app to support the model.  

Android O Features Every Developer Should Know

Google has launched the third developer preview build with Android O for Android app developers. It has been confirmed that the Android version will be Android 8.0. In the third preview, final Android O APIs and various alluring features were released. The features are categorized in two major categories viz. Fluid experiences and Android Vitals. Let us have a look at them- Android-O-Logo

FLUID EXPERIENCES

Fluid experiences are majorly launched for improving the UX. These features will help the Android app developers to offer better user experience. Check out the features that can be used for mobile app development:

#1 Picture in Picture

This feature allows the user to perform multiple tasks simultaneously, like in smart televisions. In this feature, the screen will be divided into two halves which mean you can play a video and do another task simultaneously. For including this feature in your project, you have to specify the user behavior while switching apps. If one of the apps include video, you have to change the code to handle playback, else updating is not required.

#2 Smart text selection

Smart text selection is the result of Google AI. It will help people to perform tasks related to text selection. It will make the selection task much easier, one need not select the whole content. When you will tap on a phrase, it will be selected automatically. This feature will work for all apps, by default.
Also Read:Current Trends for Android App Development

#3 Autofill framework

Autofill framework is a boon for e-commerce Android app developer. It will enable the app to pull from user data and suggest for different form fields while will make the login process easier and faster. This feature is also available by default, but the performance can be optimized by the developers.

#4 TensorFlow Lite Google

It is a special version of an open source TensorFlow software library that helps mobile apps remain fast and small with machine learning. Image result for android O

ANDROID VITALS

In Android O, features associated with security of Android app marketplace and optimization of app performance are under this category. Some of the features are as follow:

#1 Google Play Protect

With the introduction of this feature, no app will go on Google play store without examining its security. The apps will be scanned every day to overcome threats. Android O will run escalating security checks even on the unofficial app store. It will allow the users to check for malicious apps and even search for a lost phone.

#2 OS Optimizations

Major improvements in Android O includes improvement in boot time of Android devices, memory management, battery consumption, and overall performance. The boot time of Android O on Pixel is two times faster than Android N. Though there are limitations such as background executions, location sensing and scanning for wifi networks.

#3 Android vitals dashboard

Google has launched the dashboard on Play console which will help the developers to check their app’s performance, identify issues and overcome them. It will also play a major role in app optimization and to grow the user base.
Also Read:Kotlin- The Next-Gen Android App Development Language

#4 Android Go

It is a new OS for low-end devices which is a lightweight version of Android O, designed for the smartphones with 1 GB or less RAM. The apps available on Play Store will also be optimized to run on low memory devices.

#5 Instant Apps

Lightweight apps can be published with this feature. It will also allow users to experience app without downloading and installing them. In addition, it will also help the developers to drive revenue without a download.

#6 Dots Notification

This feature is a total savage for some users as it will display notification badges to show pending notifications without opening the app. These are some of the amazing features of Android O. You can also share your knowledge and experience with us by commenting below. We would love to hear from you.

5 Signs That Show it is the Time to Redesign your Website!

There are very few people who like changes. Changes are difficult, but they are important. Talking about the changes, let us talk about redesigning a website. Redesigning a website is like revamping your whole work portfolio. Your clients will not say to you that your website is old, and you should redesign it. Then how would you know if you need redesigning? Well, there are signs which you can see clearly. You may try to ignore those signs, but you also know that you have to address the issues. So, check out the signs which show that your website needs redesigning:

#1 It has been ages since you redesigned it.1

If it has been more than one year, then it is high-time to revamp your website. The technology is changing every day, so you also need to change or adapt it.

#2 The website is not responsive.3

As I said, the technology is changing on the daily basis that is why responsive websites have become too mainstream. Not having a responsive website means indirectly losing your customers. The websites which are not responsive, do not work on all platforms and devices.

#3 The bounce rate of your website increases.

2 The high bounce rate means non-interactiveness of your website. The reason could be the user interface, the theme or may be the design.

#4 It takes forever to load a page.

4 Page loading is one of the most important things. According to a survey, the user hardly waits more 2-3 seconds for loading a web page. If the page does get loaded the user simply leaves the website, which also increases the bounce rate.

#5 Your website uses flash.5

  Flash was an age old technology. If you are still using flash player, then you are living in the old world. iPhones and iPads do not support it, and also the websites using Flash are not index-able in the search engines. So, these are the reasons why re-designing is important. It is not just for the users, but it is important for business purposes. The world in flowing with the wave of digitisation, and you should also try it.

Code Generation with Bake all in CakePHP

Each MVC module contains a Model, a Controller and multiple views for each table in the application. It can be a big pain to write all the controllers, models and views for your application from scratch and define the relationships. Not only it’s time consuming, banal, it is prone to errors in defining relationships and constraints. To make life easy its time to use Cake’s scaffolding console for code generation, known as Bake. Launching Bake: For Baking, we will have to use PHP executable. Rather than typing PHP path each time, I prefer to include php executable path to the environment variable paths, for comfort rather than necessity. For windows, it’s accessible via -> Right click on “My Computer”->Properties. -> Go to “Advanced“ tab. Click on environment variables. -> Go to system variable path and edit it. -> Add PHP path (Mine is xampp E:/xampp/php) and cake console (E:/xampp/htdocs/cake/console) paths, separated by semicolons. You might need to restart system after adding these paths. Sometimes the bake command doesnt work on windows even after changing environment variables. Make sure you use the correct forward slash for this when giving path for console and php. Sample Path post editing should look like C:Documents and SettingsEnbake>path PATH=C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:Program FilesTortoiseSVNbin;E:/xampp/htdocs/campaign3/cake/console;E:/xampp/php;

Sample PATH variable

Time for pre heat Go to the app folder of your application through console. Type “cake bake”. This will give you following screen.  We have two options here:
  1. If your database.php is updated with connectivity settings, this will pick existing tables and give you option to bake them. Cakephp Bake Console
  2. But if DB information is missing in databse.php, we can configure it using ‘D’ as an option to bake. It will prompt us for all the settings and create necessary models, views & controllers.
Super Bake : bake all If you are sure about your DB and don’t want to go individual on baking separately for MVC, you can avail option of bake all. Instead of models this time it will ask you for each entity and on pressing the number it will create models, controllers and views. Hope baking will be as simple as walking through the cake & will save you precious time in coding skeleton for controllers, models and views. Especially when doing a feasibility study or brief demo to the client on the app. Optional Enhancements: Over 1.2 the recent released 1.3 bake has had a significant jump, and a number of features and enhancements have been added.
  • New tasks (FixtureTask and TestTask) are added to the main bake menu
  • TemplateTask has been added for use in the shells.
  • All the different bake tasks now can use connections other than default for baking. Using the -connection parameter.
  • Multiple validations on models has been added.
  • Self Associated models using parent_id are now detected. For example if your model is named Thread, a ParentThread and ChildThread association will be created.
  • Baked Tests include as many fixtures as they know about, including plugin detection (plugin detection does not work on PHP4).
Happy Baking !!!