How to choose a PHP framework

With the increasing popularity among web frameworks, it can get a bit difficult to decide which framework will be best suitable for your projects. While some take their decision on the basis of performance, others may look for a substantial built-in functionality or a well-documented framework. Here in this blog we will take a look on what features and factors should be considered before choosing any framework for the project. A PHP framework provides us with reusable code and a foundation to build web apps. It also helps in improving productivity and creating more stable sites. Most of the popular frameworks are based around MVC (model-view-controller), ensuring the separation of logic and presentation which in turn helps us to write clean and reusable code. Before deciding on a framework for your application, you should understand the needs and requirements of your application. Here are a few questions you should consider before deciding on a particular framework: 1. What is the main goal of your application? Will you be developing an ecommerce portal, a social platform, a blog or a business website? An ecommerce portal will require a framework with the facility for payment integration, while a blog site may need a framework with options for various themes and plugins to choose from. 2. Is good documentation available? Finding difficulty in understanding someone else’s code is every developer’s story. Picking a framework with a good documentation will make it easier for the programmers to understand the source-code and develop applications. 3. Does the framework have an active user base and development support? If the framework you are working on ends up feebly with no active development support, you can either continue using the framework and maintain it yourself or re-code your application to use a new framework. In order to make sure you don’t get stuck with a framework on a dead-end, take time to research the community of a framework while the project is still in the planning phase. The Frameworks Let’s discuss some of the popular PHP frameworks: CakePHP It is the most popular and one of the oldest framework. The idea behind CakePHP was to make developing applications fast by implementing “convention over configuration”. With the features like fast coding, better security and Ajax support, CakePHP helps in creating robust business websites which are completely customizable and in accordance with the W3C standards. Like last year when we started working on Neohapsis website, CakePHP was the mutual choice as client wanted a hacker safe website and this framework comes with built-in tools which covers security to a certain level. For example, it takes care of SQL injection, data validation, form spoofing and CSRF. Another website that we developed for Nucleus Software is a CMS based easy to update website. Using conventions from the framework we created admin backend, whole foundation of which is based on basic CRUD functionality. CodeIgniter CodeIgniter is a lightweight framework that provides simple platform to develop full-featured web applications. This is a perfect fit for developing any application from small scale informative website to an e-commerce solution. Having worked on multiple MVC platforms, I have learnt that when the key area of concern is scalability and ease of programming, CodeIgniter is the most suitable option. With loads of libraries, plug-ins and helpers available, it takes care of complex programming, all the while maintaining the performance. Here are a few benefits that I like with CodeIgniter: It’s easy to configure and customize as per the requirements It’s built with a simple to understand folder structure It makes programming quick and developer-friendly Easy integration with third-party libraries Easy to learn documentation and tutorials Laravel Laravel still in its early days has recently gained popularity among PHP developers. The main reason behind is built-in features like “flexible routing”, “easy database interaction”, “plugins”. This framework is suitable for various sectors like RESTful application, small business app or big enterprise solution. Laravel offers a number of features which makes it so popular: Eloquent ORM: It offers a very powerful active-record implementation, which makes it easy to perform any database query. Flexible Routing: A simple routing mechanism, which is very helpful for developing your own APIs. Form Model Binding: In a scenario where we want to edit/update any records in a database, we can use form model binding to populate the form with respective values from database table. Authentication: Laravel offers a built-in authentication library which is simple to implement. To perform a login operation, we just need to pass an array of credentials, while for logout this one liner works (Auth::logout();). View Existing Routes: With the continuous expansion of application, it gets difficult to check what routes have been registered. Laravel offers a simple command (php artisan routes) to list down all the registered routes in application. Commands: You can write your custom commands to perform tasks like fetch data from a third-party API, backup script for application, etc. You can run it as CLI or use them for CRON jobs. Form Validation Rules: Laravel offers various rules that can be used to add validation on any object. There are few other frameworks that you may consider. Zend Framework Based on the object oriented approach, Zend Framework is most suitable for experienced developers and for building enterprise-level and business critical applications with following features: Active user base and large community Modular architecture Video tutorials Symphony This framework follows Ruby-On-Rails like programming methods. With factors like Ajax helpers, internationalization, admin-interface generator this framework makes it easy to develop web applications. Some of the useful features that Symphony offers are: · One-click admin interface · Built-in testing framework · Easy debugging · Logs to track app’s activities Here’s a chart from Google Trends comparing popularity of different frameworks for last 12 months: At the end, choose a framework you are comfortable working with. With all the details mentioned above, you can now figure out which framework meets the requirements for your project. Hope this
Add placeholder attribute in Sitecore WebForms module

When I started creating forms in Sitecore module Webforms for Marketers (WFFM), the first thing that popped up was how do I add placeholder attribute in the textbox. I am sure many of you might get stuck on this issue, so here I explain how can one add the placeholder attribute in Sitecore Web Forms for Marketers. To begin, you need to create a class that inherits from SingleLineText with an additional property “Placeholder”. public class SingleLineText : Sitecore.Form.Web.UI.Controls.SingleLineText { [VisualCategory(“Appearance”)] [VisualFieldType(typeof(TextAreaField)), Localize] [VisualProperty(“PlaceholderText:”, 100)] public string PlaceholderText { get; set; } protected override void DoRender(HtmlTextWriter writer) { this.textbox.Attributes.Add(“placeholder”, this.PlaceholderText); base.DoRender(writer); } } Further you can create a new custom field type item under /sitecore/System/Modules/Settings/Field Types/Custom. Set Assembly and the Class. Oh yes! You also need to add Count Chars and Regex Pattern validation. Finally set “Textbox with placeholder” custom field type in Form Designer and Placeholder Text. And you are done. Webforms for Marketers field type with a placeholder attribute is ready for use!
Sitecore CMS installation: A step by step guide to set-up Sitecore 8.0

To start working with Sitecore, first of all you need to install Sitecore on your system and setup a development environment. Here in the blog I describe the easy steps to setup the environment for you. You can download the latest version of Sitecore from SDN. Sitecore CMS is distributed in two ways- It can be downloaded as an .exe file or one can get a ZIP file i.e. “an archived copy of a Sitecore CMS solution”. Downloading ZIP file gives more control on the installation and it’s easy to use. On extracting the ZIP file, you will find three logical components/folders: – WebSite : IIS document root – Data: Store for logs and data. – Database: Relational database files used by Sitecore solution To install Sitecore 8.0, the basic hosting environment requirements are: Microsoft .NET Framework 4.5 Microsoft SQL Server 2008 R2 SP1 IIS 7.0 Sitecore License File Sitecore installation uses three databases, mainly: – Master: It contains every version of all the content and data items – Web: It contains most recent version of all the content and data items. Data on published site is rendered using this database. – Core: It contains Sitecore settings and.Net membership provider tables for User/Role management Steps to Install Sitecore using ZIP file: 1. Choose a parent directory path for the project, for example – C:inetpub 2. Create a Folder with project name, for example – Sitecoredemo, and extract the ZIP folder inside that at the location C:inetpubSitecoredemo. The extraction will create folders as below: – C:InetPub Sitecoredemo Website – C:InetPub Sitecoredemo Data – C:InetPub Sitecoredemo Databases 3. Place the license.xml file to the /Data folder 4. Change the location of /Data folder in the web.config file placed inside Website folder to use the absolute path as below: 5. Open SQL server Management Studio and attach all these three databases (Core, Master & Web) using .mdf files placed in Databases folder. 6. Create new SQL server login and select User Mappings tab 7. Select Sitecore databases one by one and select the following check boxes In the Database role membership for field. For Master and Web databases db_datareader db_datawriter public For Core database aspnet_Membership_BasicAccess aspnet_Membership_FullAccess aspnet_Membership_ReportingAcces aspnet_Profile_BasicAccess aspnet_Profile_FullAccess aspnet_Profile_ReportingAccess aspnet_Roles_BasicAccess aspnet_Roles_FullAccess aspnet_Roles_ReportingAccess db_datareader db_datawriter public 8. Modify the ConnectionStrings.config file placed inside /Website/App_Config/ folder by providing values in a line for each database, for example: 9. Open IIS, create new Application Pool by inserting Projectname, appropriate .Net framework version and set managed pipeline mode as Integrated. 10. Now create new website in IIS by providing sitename as Sitecoredemo, Application Pool name as the newly created App Pool name, set physical path to the Website folder located at: C:InetPub Sitecoredemo Website 11. Limit anonymous users access to following folders inside /website /App_Config /Sitecore/admin /Sitecore/debug /Sitecore/shell/WebService Go to the Authentication panel and disable Anonymous Authentication for these folders. 12. Add following entry in your hosts file located at: C:WindowsSystem32driversetc: 127.0.0.1 Sitecoredemo 13. Now access your website by browsing the below address: http://Sitecoredemo You can access the Admin section using the below address: http://Sitecoredemo/sitecore With this, you complete your local development environment set up and now you can start with your development work. I will be discussing the set up of website solution in Visual Studio in my next blog. Advaiya has the Sitecore experience and expertise to integrate Sitecore solution with your business critical systems like ERP and CRM. You can contact us anytime to help you get the most out of this powerful content management system.
Easy navigation AB tests for content marketers

Websites have 2 core assets: content and navigation. While content marketers obsess over their content, they rarely think about their website navigation. This is madness. Since website navigation is the single-most-clicked asset for any website, failing to provide in the right website navigation is like flushing money down the toilet. Let’s Stop the Madness and Test Our Website Navigation Website navigation optimization – Getting website navigation right can be complicated. Looking only at historical data does not help, because website visitors typically go where the navigation takes them – so if your current “anchor position” navigation (the top left element of your website navigation) accounts for a high number of conversions, that is simply because you are driving the most visitors to that page. What we need to do is AB test what happens when we send 50% of the website traffic to one page and 50% to another, measuring both which links get clicked more and also which visited pages drive more conversions. This process of driving traffic to different experiences and measuring the performance differences is called AB Testing. 3 Website Navigation Tests You Start Today AB Test with Boosters Boosters, or floating “next page” recommendations, are the easiest way to get started. Just create an account at www.payboard.com, drop the script in the footer of your site, customize the design of your booster, and BAM! you are ready to start learning what pages are most effective at driving clicks and conversions. Payboard will run these experiments for you, and provide updates every week about your AB Tests: which tests are winning, and which tests to retire. Once you see a significant trend, you can decide to update your static navigation with some fresh, high-performing pages that your visitors need to convert. AB Test a Widget If you do not want a floating booster on your page, you can also use an “inline booster” that is anchored in the sidebar of your WordPress site. This is a two-step process (assuming that you already have the Payboard script added to the footer of your site): 1) add a “Text” widget to your sidebar (Appearance > Widgets > drag Text to Sidebar); and 2) paste the HTML below into the input box labeled “Content” and hit Save. <a href=”/”>Visit Our Home Page</a> Other than including the payboardInlineBooster class, this is just standard HTML, so you can add whatever formatting you want, point to whatever default destination you want, etc. Whenever the page is pulled up, Payboard will replace the destination and the anchor text with one of your other pages, and then measure which of your pages, when recommended, performs best from a clicks and clicked conversions perspective. AB Test Top Navigation The most important element on your website is your “anchor position” navigation – the top-left navigation element on your website. Let’s start there. Sure, you can do tests on any navigation element (e.g., the middle bottom, clicked .001% of the time), but your goal here is to learn what works at getting your visitors to click and convert, so let’s be bold! In WordPress, go to Appearance > Menus, and expand the top left navigation item so that you can add “payboardInlineBooster” in the CSS Classes (optional) box. Hit “Save Menu” and you should see your navigation update immediately. If you apply each of these elements, you can expect that 10% of your visitors will end up clicking on one of your tests, and you will learn faster about which of your content assets perform than if you only use one technique. Above, the top navigation encourages visitors to start a 30-day free trial, and below the top navigation encourages visitors to read about success stories. Start AB Testing Today. More Customers Will Thank You Tomorrow! AB Testing does take time to deliver value, but if you stick with it you will learn what your website needs to do to help visitors convert. If do not have the time or the available talent to implement your own AB Testing strategy, you can hire a content marketing firm like Advaiya to help you map out your testing strategy and get you moving in the right direction. Advaiya’s xBOM is a set of neatly packaged content offerings built to help you succeed. These offerings cover common scenarios – product and service launches, sales force training, partner enablement, and much, much more. The overall beauty of Website Navigation Optimization AB Testing is that the insights you gain will not only bump your conversion rates in the short-term, but help you understand more about your customers’ needs – and these insights are what will take your business to the next level over time.
Magento event module development

There are a number of e-commerce frameworks available in market, but Magento is one of the most popular choices for medium-to-large-scale portals. Its feature set and its architecture help set it apart from many of the other options available today. Along with the third party extensions, you can also develop your own module in Magento. In one of the websites, it was required to add an event module to enable the client to add events with photos, videos and other details. But even after spending a couple of hours, I couldn’t find any solution to fit with my requirements. Finally, I decided to develop a custom event module that would enable users to do the following: Add/edit event. Manage event to add photos and YouTube videos. View the event on Google map with marker that differentiates between upcoming, current and past event. Below is the screen shown, where you can add/edit event information: Screen to mark location on map You need to enter event venue in address field and it will then automatically locate location on map with marker. You can drag and drop the marker to adjust the location and save the event. Here is the screen showing the front end view of the event created: Past event detail For the past event, you can add photos and YouTube videos. It will be shown on the event details page as below: To change the default map to other country, open the following file: “App/design/frontend/base/default/template/advaiya/event” Open list.phtml file and update the latitude and longitude as country specific (default is US lat , long) geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(39, -95); Upload files to Magneto main folder and login/relogin into admin panel to install the module. Once the module is installed, it will show up in the top navigation named ‘event’. The sample code for the same can be downloaded here. Have anything to add? Please don’t hesitate to leave your comments or questions below!
Seven tips to a great content marketing strategy

Why has content marketing become the most important digital marketing trend? In the past some years, internet has transformed buying behavior. Customers are curious to know about your company, your services or products, your unique selling point and much more. Creating and sharing engaging and relevant content that respond to their curiosity is the most direct line to sales and loyalty. 48% of B2B marketers have a content marketing strategy, and 70% of B2B marketers are creating more content than they did one year ago. (Content Marketing Institute, 2015) Content marketing across website, social media, blogs and more can fuel traffic and leads, but a major percentage of marketers struggle to align content with conversions. How can you create engaging content and disseminate it specifically to the target audience? What can you do to put content in line with the conversions to encourage readers take action on your site? Let’s take a look. Know what your audience wants Before investing in content creation, make sure you’re thinking from the perspective of your audience, instead of serving what you want them to see. Whether you specialize in web design, sales or marketing, establish yourself as an influencer in that field by creating valuable content that people are looking for and can learn from. Search engine friendly content More search engine visibility leads to more credibility. Researching the relevant keywords for high search volume and naturally implementing them within your writing is critical in creating SEO friendly content. Whether you’re writing a blog or posting a tweet, keywords can help you optimize your content for a larger reach. Develop quality content While keywords play important part for promoting SEO, their impact banks on having a quality content. Panda (Google’s search algorithm), loves ‘High quality Pages’ and sweeps off low quality ones. Visitors want to find informative content they are looking for on your site, and if your site is keywords-stuffed, they will get discouraged and move on to one of your competitors. So, quality is the key. Headlines that can’t be overlooked Your headline can make or break your landing page, social post, blog or any piece of content. It either grabs the reader’s attention to explore more or repulse their minds to abandon the page. To capture their time and attention: Use your client’s voice Understand your client’s pain points Communicate value by clearly defining why they should read Identify what sounds best for your marketing goals Maintain the right balance of content that educates & content that sells Audience tend to build a natural inertia to sales speak. For sustainable selling, start from the content that educates them on the solutions they are looking for, and build their interest deeper. When they reach a level of engagement, then is the time to place a short message driving them towards the purchasing decision. Create a separate approach for each social network Content comes in all forms, and not every form is suited for every platform. Social media marketing differs for various platforms – Whitepapers might not serve the purpose on Facebook as it might do so on LinkedIn. Similarly, #hashtags might not be as valuable on Google+ as on Twitter. Build a customized approach and uplift your overall content marketing strategy. Publish a variety of content types in distinct forms Popular types of content that you can publish to accomplish your online marketing objectives and boost conversions: Blogs Infographics Whitepapers Press releases Case studies Presentations Videos Finally… Track your strategy via regular content reviews You should be reviewing everything from what queries led visitors to your website to the average time spent on a particular page, frequently visited pages, leads and conversions. Based on these insights, evolve your strategy and improve your content marketing model as per your needs. Advaiya helps businesses grow and succeed by combining technology and marketing in a systematic and intelligent way. Our teams align themselves around your success and offer the best for you through content marketing strategy , digital experiences, enterprise solutions, and custom development. To learn about how our services and offerings can help you in addressing your needs, write to us at connect@advaiya.com
How to amplify your social media content strategy?

Content strategy is about planning, creation, delivery and governance of content. Social media is similar to traditional mouth-publicity. It increases the reliability and credibility of a brand. It is not just a medium to publish your content, but, it is also a way to attract the potential buyers. The ‘Likes’ of Facebook posts can be treated as sales leads. But, how do you know that your content is reaching the potential customers? It is when you start generating leads through social campaigns, and they get converted into potential sales, then, you can be sure that you have applied an effective strategy to your social media plan. An effective social media content strategy is the one, which ensures that the customers get the required information and the right time. Therefore, it is important to deliver relevant, fresh, and consistent content across various channels, to target consumers. Businesses create content such as blogs, articles, whitepapers, case studies, videos, infographics, and invest in SEO, PPC, email marketing and advertising, to drive traffic and generate leads. An effective social media content strategy has some key considerations like: Whom are we making the content available to or who is our audience? What do they want to know/learn? What structure do they want their data in? What platform do they want their data on? What should be the data publishing frequency? What value does your content add to the already existing data? Moreover, to publish this content, there should be a process to follow which promises a good return out of it. Creating a series of effective content such as blogs, articles, eBooks, whitepapers and infographics Publishing the content on various social media channels Ensuring the popularity with the audience by the likes, retweets, shares it gets Tracking the followers or visitors and leads that have been charmed by your content Creating effective content and publishing it correctly (right content on the right platform at the right time and to the right audience) is just one part of the process. Measuring the impact of this is the critical part in content amplification process. Analytics enables marketers to gain insights of any social media content strategy. Thus, it allows businesses to redefine their strategy. Therefore, it is imperative to have an objective, a process and the right analytic tools which can interpret the effect of your social media plan and do the necessary course correction to strengthen your social media content strategy and make the social campaigns more powerful. The article was originally published in The Financial Express. Source: http://www.financialexpress.com/article/companies/how-to-amplify-your-content-strategy-in-the-social-media-world
How can SMEs gain from Social Media – Part II

In the previous blog of this series, we looked at how customers are increasingly changing the way (searching online) they look for information about a product, service, or business – both in locality or in distant geography. Small and mid-sized businesses are realizing the importance of having an online presence for their brand to reach, attract, convert, and retain more customers. We also saw some easy and effective first steps to quickly build your presence on social media. In this part let us look at a couple of ways in which you can use social media to effectively build a better brand, and connect with your real customers. Connect with customers and reach out to global audience with social media Use social media tools to connect with your existing and prospective customers. You can showcase your offerings, interact with customers, build communities to network with customers, and keep the conversations alive by following up on those conversations. Social media platforms (that have large user base) such as Google+, Facebook, Youtube, Twitter allow you to position your products and services to different audience in different ways based upon the specific audience’s needs. Branding and marketing You can use social media to build your brand by delivering consistent message and content across all the social media channels. Publish how-to videos, pictures, etc, about your products and services on your website and link your website to your social media channels. These efforts then clubbed with SEO tactics and improve your web presence and generate more traffic to your website. You can develop content such as manuals, whitepapers, videos, blogs, etc. that relates to customer’s needs/problems, explaining concepts, innovation in your domain, etc. For example, if you manufacture women accessories that complement their ethnic attire, you can provide videos for how to wear different types of ethnic attire like, how to wear a saree; or content for what to wear on what occasion, etc. If you provide accessories for a specific brand of mobiles or tablets, then you can provide videos related to using different features of this brand’s mobile phone or tablets. Analytics and Listening Use social analytics tools that can analyze the interactions that customers have about your brand on the social channels. These tools analyze whether people are talking positive or negative about your business or products and services i.e. sentiment analysis. By keeping your senses open to such social/sentiment information can give you relevant insights to improve your products, better segment and target customers, and uncover new business opportunities. Tools are also available that can help you to proctor what do people mention about your brand or products and services, and take necessary steps to better manage your brand’s reputation. Increase sales with quick offers You can quickly rollout new limited-period or seasonal / daily / hourly offers quickly to attract customers and generate more sales. You can also tie-up with companies like Groupon to provide best-buy deals on your products and services. Improving employee productivity Today’s new-generation workforce is technology savvy and always stays connected to their preferred social channels. Thus, if you provide them access to the social tools (for work) which they are familiar and prefer working with, it can help improve collaboration among employees, make them more productive, and help them better connect with customers.
Social media marketing tools and techniques – Part 1 | Advaiya

In a Building Presence Voicing Thoughts session at Advaiya, a few days back, I talked about social media marketing (SMM), covering its importance and a few take care areas. In a series of blog posts, based on the talk I gave, I will provide an overview of some of the key social media marketing concepts, tools, techniques, certain take care areas to consider while building your brand on social media, and some social media success and failure stories. So, what exactly is social media doing to us, or has already done to our lives? Of course, social media has changed our lives drastically. It has given us the power to create multiple (virtual) identities. With each of these identities, you can attach your choices and preferences. Social Media Marketing One great aspect of social media marketing is that it has capability to address to all the multiple identities of any individual as needed and, when needed. Social media marketing provides many advantages to both the customers and the marketers: Engagement: Across social networks, customers can engage with the messages they can like, share and explore easily. Quick Results: The results of social media marketing can be felt very quickly, may be even within minutes or hours of posting the content. Dynamic control: Not just the results can be seen quickly on social networks, marketing efforts, messages and modes can also be tweaked quickly and dynamically. Better Target Audience: Social networking sites often provide marketers with ability to define the target audience by age, locality, and many other parameters. Social media marketing involves the use of tools to successfully advertise and engage with audience online. Some of the commonly used techniques are: Targeting: Social networks like Facebook and Twitter provide advertisers with some additional information about the consumers, like their likes, dislikes and preferences. This provides the marketers with the capabilities to choose the right target audience to promote and market their offerings. Consumer’s online brand related activities (COBRAs) is another method used by advertisers to promote their products across social networks. It includes simple activities like uploading a picture of products they recently purchased and used is an example of a COBRA. Electronic word of mouth (eWOM) is equivalent to traditional word-of-mouth, except for that it is done digitally across social networks. Reviews and recommendations are a convenient manner to have a product promoted via consumer-to-consumer interactions. In the next blog I will talk about some methods/tools related to social media marketing, social analytics, social media measurement, etc, and also few examples of successful and unsuccessful social media marketing campaigns. In the meantime, I would like to hear about your experiences related to doing effective social media marketing.