Monthly Archives: May 2016

How to disable back button after logout in CodeIgniter 3?

In CodeIgniter when we perform a login and logout functionality. Often we got a problem that is once user click logout button or link and then we start to think that “How to disable back button after logout in CodeIgniter” System end the user’s session and redirect him to on a differ page. But if he click on the back button he can view the secure area again. To prevent this problem. I use this trick :-

 

How to replace NULL values with empty string in MySql Select ?

I had faced an issue in one of my project. When i was working with webservices. In that case i need to send empty string into response send NULL as value was not allowed and i had already seted NULL values as default fot many colums of tables. Also i dont want to interate the result and replace the null with empty string hence it slow down performance.

In that case i search the doc and got a three MySql functions :-

  1. COALESCE
  2. NULLIF
  3. IFNULL

There are two ways to achive this. In first case we can use COALESCE and NULLIF together and query will like this:-

And in second case we can use IFNULL and query will look like

And as i was using CodeIgniter as framework and using inbuilt active records. So, i used this as:-

And for second case

This was the two way i found to achive this.

How to choose right frameworks for you Next Project

There are to many paid and open source  Frameworks, CMS, E Commerce, Learning Management, Customer Relationship Management (CRM) and many more tools available over the web and within a month new frameworks or CMS is launched. For example for last few years CodeIgniter was used allot. But CodeIgniter was not updated himself with the time and it is now moving out of market now like FuelPHP or Kohana. Same tragedy was happened with Prado and the developers present Prado in a new form as Yii. Which is full stack modern framework suitable for any application.

When i was a new bie, when i start the projects or learn new things. I search on the google and search for the frameworks used mostly. But after travel of 4 years in development. I start to think and understood that each framework has different features and tools. Before start a new project i do a little research to find best Suitable fretwork that suit the my need and fulfill all requirements of mine. For example a small application CodeIgniter is good, but for high traffic site i prefer Zend Framework 2 or Symfony 2.

Each of this framework follow the MVC pattern but each architecture and configuration is differ. For example CodeIgniter follow the classic MVC pattern but ZF2 and Symfony2 are fully modular and extensible.

  • CodeIgniter is suitable for small level to large level application.
  • ZendFramework2 is suitable for Medium to large level application.
  • Symfony2 is suitable for the High Performance Large level application.

In this days Test Driven Development methods are used for the development. For this Continuous Integration and PHPUnit Testing are used for each time. In my next post i will discuss about the Features and drawbacks of this frameworks one by one

Benefits of APS Standard for Developers

APS is world’s first Open Source Standard for Cloud Services. I had written about APS   in my previous post that can be seen here.

There are a number of benefits that come with the use of APS both to developers and service providers. Below as some of these benefits:

There are a number of benefits that come with the use of APS both to developers and service providers. Below as some of these benefits:

Benefits of APS to application developers

  • Makes it easier for developers to reach their target market– APS are known to make it easier for Independent Software vendors to distribute their applications to service providers mainly by enabling developers to package their applications using a set of standards that are not only convenient for service providers but also familiar to them.
  • Minimize on time and resources– Since most hosting and telecommunication service providers have adopted the use of standard socket platforms for APS, developers who package their applications in APS find it much easier to distribute their applications by just plugging them into the infrastructure of telecommunication and hosting service providers.
  • Increase development options– APS make it easier for developers to either package their APS applications on their own or get the help of an APS packaging integration partner.
  • Facilitates cross-promotion and upsell of developer’s services– the design nature of APS is in such a way that enhances the workability of applications together and in a manner that can make it easier for them to be sold together. This therefore makes it easier for service providers to identify complementary services that can work well with a developer’s application and thus target them as potential application buyers.
  • Software updates management– APS make it easier to manage software updates. This is mainly because with an APS, a developer only needs to update his/her APS package and all the partners will apply the updates without any need for custom development.

APS Standard Benefits for Service Providers

APS is world’s first Open Source Standard for Cloud Services. I had written about APS and benefits to developer  in my another post that can be seen here.

There are a number of  APS Standard Benefits  that come with the use of APS both to developers and service providers. Below as some of these benefits:

Benefits of APS to application Service Providers :-

  • Create User Friendly Cloud Application :-  Using the APS standard SP can create user friendly cloud services offering and can select from a wide range of cloud application. This will reduce the Application Life cycle cose.
  • Design and Sell Bundle of Cloud Service:- APS has a mechanism to search the resources utilized by other applications. Suppose you have more than one application. And an user is currently using one of your application then the APS will directly ask user to install and configure other service. APS take care about affiliate marketing for you and increase upsell and cross-sell capabilities.

What is Application Packaging Standard ?

Technological advancement has seen many businesses and organizations take their daily business activities to another level mainly by making use of the internet. This has seen many of these businesses and organizations take advantage of simple web applications to achieve and realize their goals and objectives. As usual, any web application will need to make use of a hosting service so that it can go live and be accessible by the global internet users. The use of shared hosting services can present a host of challenges to basic and intermediate internet users especially when it comes to the management and provisioning of simple web application. However, standards such as Application Packaging Standards (APS) came to make these tasks much easier mainly by providing a set of specifications for the integration, management and provisioning of cloud based apps and services.

You can find more about APS here