Saturday, 7 January 2012

Yii Framework And Its Features


Yii is a free, open-source Web application development framework written in PHP5 that promotes clean, DRY design and encourages rapid development. It works to streamline your application development and helps to ensure an extremely efficient, extensible, and maintainable end product. Yii is a perfect choice for any sized project. However, it has been built with sophisticated, enterprise applications in mind.

Features of Yii Framework : Whether you are one developer building a fairly simple Web site, or a team of distributed developers building an extremely complex Web application, using Yii is like augmenting your development team with additional experienced, professional, and efficient resources.

1.  Model-View-Controller (MVC) design pattern : Yii implements the model-view-controller (MVC) design pattern, which is widely adopted in Web programming. MVC aims to separate business logic from user interface considerations, so that developers can more easily change each part without affecting the other. In MVC, the model represents the information (the data) and the business rules; the view contains elements of the user interface such as text, form inputs; and the controller manages the communication between the model and the view.

2.  Database Access Objects (DAO), Query Builder, Active Record, DB Migration : Built on top of the PHP Data Objects (PDO) extension, Yii Data Access Objects (DAO) enables accessing to different database management systems (DBMS) in a single uniform interface. Applications developed using Yii DAO can be easily switched to use a different DBMS without the need to modify the data accessing code. Yii Query Builder offers an object-oriented method for building SQL queries, which helps reduce risk of SQL injection attacks.

3.  Form input and validation : Collecting user data via HTML forms is one of the major tasks inWeb application development. Besides designing forms, developers need to populate the form with existing data or default values, validate user input, display appropriate error messages for invalid input, and save the input to persistent storage. Yii greatly simplifies this workflow with its MVC architecture.

4.  AJAX-enabled widgets : Extending Yii is a common activity during development. For example, when you write a new controller, you extend Yii by inheriting its CController class; when you write a new widget, you are extending CWidget or an existing widget class. If the extended code is designed to be reused by third-party developers, we call it an extension.

5.  Authentication and authorization : Yii has a built-in authentication/authorization (auth) framework which is easy to use and can be customized for special needs.The central piece in the Yii auth framework is a pre-declared user application component which is an object implementing the [IWebUser] interface. The user component represents the persistent identity information for the current user. We can access it at any place using Yii::app()->user. Using the user component, we can check if a user is logged in or not via CWebUser::isGuest; we can login andlogout a user; we can check if the user can perform specific operations by calling CWebUser::checkAccess; and we can also obtain the unique identifier and other persistent identity information about the user.

6.  Skinning and theming : In Yii, each theme is represented as a directory consisting of view files, layout files, and relevant resource files such as images, CSS files, JavaScript files, etc. The name of a theme is its directory name. All themes reside under the same directoryWebRoot/themes. At any time, only one theme can be active.

7.  Web services : Yii provides CWebService and CWebServiceAction to simplify the work of implementing Web service in a Web application. The APIs are grouped into classes, called service providers. Yii will generate for each class aWSDL specification which describes what APIs are available and how they should be invoked by client. When an API is invoked by a client, Yii will instantiate the corresponding service provider and call the requested API to fulfill the request.

8.  Layered caching scheme : Yii provides various cache components that can store cached data in different media.
A. CMemCache: uses PHP memcache extension.
B. CApcCache: uses PHP APC extension.
C. CXCache: uses PHP XCache extension.
D. CEAcceleratorCache: uses PHP EAccelerator extension.
E. CDbCache: uses a database table to store cached data. By default, it will create and use a SQLite3 database under the runtime directory. You can explicitly specify a database for it to use by setting itsconnectionID property.
F. CZendDataCache: uses Zend Data Cache as the underlying caching medium.
G. CFileCache: uses files to store cached data. This is particular suitable to cache large chunk of data (such as pages).
H. CDummyCache: presents dummy cache that does no caching at all. The purpose of this component is to simplify the code that needs to check the availability of cache. For example, during development or if the server doesn't have actual cache support, we can use this cache component. When an actual cache support is enabled, we can switch to use the corresponding cache component. In both cases, we can use the same code Yii::app()->cache->get($key) to attempt retrieving a piece of data without worrying that Yii::app()->cache might be null.

9.  Error handling and logging : Yii provides a complete error handling framework based on the PHP 5 exception mechanism. When the application is created to handle an incoming user request, it registers its handleError method to handle PHP warnings and notices; and it registers its handleException method to handle uncaught PHP exceptions. Consequently, if a PHP warning/notice or an uncaught exception occurs during the application execution, one of the error handlers will take over the control and start the necessary error handling procedure.

10.  Security :
A. Cross-site Scripting Prevention : Yii incorporates the work of HTMLPurifier and provides developers with a useful component called CHtmlPurifierthat encapsulates HTMLPurifier. This component is capable of removing all malicious code with a thoroughly audited, secure yet permissive whitelist and making sure the filtered content is standard-compliant.

B. Cross-site Request Forgery Prevention : To prevent CSRF attacks, it is important to abide to the rule that GET requests should only be allowed to retrieve data rather than modify any data on the server. And for POST requests, they should include some random value which can be recognized by the server to ensure the form is submitted from and the result is sent back to the same origin.

Yii implements a CSRF prevention scheme to help defeat POST-based attacks. It is based on storing a random value in a cookie and comparing this value with the value submitted via the POST request.

C. Cookie Attack Prevention : Yii implements a cookie validation scheme that prevents cookies from being modified. In particular, it does HMAC check for the cookie values if cookie validation is enabled.

11.  Automatic code generation : Yii is equipped with a Web-based code generation tool called Gii. It supercedes the previous yiic shellgeneration tool which runs on command line. In this section, we will describe how to use Gii and how to extend Gii to increase our development productivity.
12.  Friendly with third-party code : Yii is carefully designed so that third-party libraries can be easily integrated to further extend Yii's functionalities. When using third-party libraries in a project, developers often encounter issues about class naming and file inclusion. Because all Yii classes are prefixed with letter C, it is less likely class naming issue would occur; and because Yii relies on SPL autoload to perform class file inclusion, it can play nicely with other libraries if they use the same autoloading feature or PHP include path to include class files.

Saturday, 24 December 2011

Varnish Caching System with Php


Varnish is an open source HTTP accelerator designed for content-heavy dynamic web sites. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture. A high level overview of what Varnish does can be seen in the video attached to this web page.

Varnish stores data in virtual memory and leaves the task of deciding what is stored in memory and what gets paged out to disk to the operating system. This helps avoid the situation where the operating system starts caching data while they are moved to disk by the application.

The principal configuration mechanism is VCL (Varnish Configuration Language), a domain-specific language (DSL) used to write hooks which are called at critical points in the handling of each request. Most policy decisions are left to VCL code, making Varnish far more configurable and adaptable than most other HTTP accelerators. When a VCL script is loaded, it is translated to C, compiled to a shared object by the system compiler, and linked directly into the accelerator.

Varnish supports load balancing using both a round-robin and a random director, both with a per-backend weighting. Basic health-checking of backends is also available.
Official Website
Download latest version
Varnish Magento Extension

Friday, 2 December 2011

Full-text Search with Sphinx and PHP


Sphinx is an open source search server which combines very fast full-text search with a great scalability. It's growing up fast and we not only inventing new features for full text search itself, but also creating new ways to integrate Sphinx into PHP based applications.If you are not yet using Sphinx, we'll be highlighting some key steps on how to serve Full-Text queries to your PHP based applications from start to finish.

If you are an advanced Sphinx Search user, this talk will describe where one can offload MySQL or standard Database functions to Sphinx. From some specific queries one can run on the Sphinx to how to increase both performance and scalability of your applications (web-based or otherwise).

Besides tips and tricks centered around integration with PHP/MySQL based applications, you will learn about the recent 2.0.1 release straight from the proverbial 'horse's mouth.' This talk will utilize and focus on real-world examples from installation and integration to handling search results.

Sphinx is the acronym for SQL Phrase Index. Some key features of this search engine are (from official site):

1. high indexing speed (upto 10 MB/sec on modern CPUs)
2. high search speed (avg query is under 0.1 sec on 2-4 GB text collections)
3. high scalability (upto 100 GB of text, upto 100 M documents on a single CPU)
4. supports distributed searching (since v.0.9.6)
5. supports MySQL natively (MyISAM and InnoDB tables are both supported)
6. supports phrase searching
7. supports phrase proximity ranking, providing good relevance
8. supports English and Russian stemming
9. supports any number of document fields (weights can be changed on the fly)
10. supports document groups
11. supports stopwords
12. supports different search modes ("match all", "match phrase" and "match any" as of v.0.9.5)
13. generic XML interface which greatly simplifies custom integration
14. pure-PHP (ie. NO module compiling etc) search client API
Watch Online : 
http://www.ustream.tv/embed/recorded/14937201

Reference Links :

Tuesday, 8 November 2011

A good website design and development tips


It is simple, some websites work while others don't and become annoying or useless to their viewers. As a professional web design business, we have created and re-created many sites. The "great" ones have certain things in common. Ezeelive has some useful tips to help you design a successful website :
1.   It is important that your website design is simple and easy to navigate and use. It is also important to note that websites should be clear of clutter and unnecessary design elements. Websites should still be attractive and memorable.
2.   To keep the viewers on your site, your website should download quickly. If your viewer is kept waiting for extended periods of time, they will become frustrated and take their business elsewhere. To reduce the time it takes to download your website, consider the following:
A)  Minimize the elements that increase the file size. These include graphics, flash and scripts
B)  Optimize your HTML and script code. This means you need to get rid of unwanted and unused scripts and tags - your web developer should do this.
C)  Maximize content area
D)  Keep the design simple
3.   It is important that you design a website that is suitable for all screen resolutions. This means that the amount of scrolling needs to be reduced. Also if your website becomes unattractive from one resolution to another, potential clients might click out of your website before they know what you are offering and are all about.
4.   The color of the background needs to make it easier for the viewer to read the text, not more difficult. Examples of colors that do not work well together include red text on a blue background. It is best to use dark text on a light background. The colors used should be suitable for the nature of your website. Some examples include professional, personal or for children.
5.   Popup windows are a big no-no. They irritate the reader and can cause you to lose business. It is also important to note that too many adverts on a page can be annoying especially if they break up important or interesting text. Too many adverts can make the page very cluttered and busy.
6.   Keep the website current and up to date. Let us help you develop an awesome website with all the latest and stable techniques and programs.
7.   It is important that all design elements are considered when designing a website. These include font design, color and size as well as pictures and other illustrations. These design elements need to complement each other and not clash.
8.   Using white space is very important on your website. This makes it easier to read, manage and explore. It also makes the page appear neat, tidy and easy to read.
9.   To ensure that your website is working as it should, be sure to update and test your website regularly.
10.   The content on your website is mainly what your clients are after. Ensure that the content is informative, concise, relevant, appealing and easy to read.
11.   Keep your target audience in mind. Think about the people who would be interested in visiting your Web site.
12.   Provide a form for visitors to contact you. Visitors are more likely to fill out a form to contact you than clicking on an e-mail link. Always make things easy for your visitors... especially contacting you.
13.   Browser compatible. Check your Web site in the most popular browsers to make sure everything is displayed properly. The top two browsers used are Internet Explorer and Netscape Navigator, but there are others such as the Chrome, Internet Explorer all the versions, Firefox, Safari, AOL browser, Opera and Web TV to name a few. Various versions of the same browser also display differently. It is a good idea to have a program on your computer that checks browser and version compatibility.
12.   Validate website Html, Css, JavaScript, Using W3C Markup Validation Services.
In the last
These tips are handy and necessary when considering designing or upgrading your website. They will ensure that you are on your way to a winning website design.

Friday, 28 October 2011

Advantages of Php Web Development


Now a day PHP has turn out to be the most demanding web programming language for web development. There are several reasons why PHP Development is in great demand these days. If you would like to hire PHP developers to develop your business or not, it's a fine thought to be aware of these advantages associated with the development of PHP to understand your best options.
PHP has become one of the most useful web programming platforms, as well as Linux and MySQL. The only costs associated with working with these technologies are the cost of hiring PHP Web developers.
Benefits of development in PHP language:
1. It is an open source language therefore it's free.
2. PHP development provides the best performance at an affordable price which is a great dynamic pages.
3. Coding is very easy to learn
4. PHP language syntax is similar to those of C and C++ languages.
5. Any changes to the site during or after the development can be done easily.
6. The framework and the internal structure of the design is very good.
7. Open source system available for fast development.
8. Run on all the major server plateform

See the more detail on other platforms:

The most ordinary program that you experience in web development today is Java, .NET and PHP. The development of PHP has several points, which give the winning edge over those languages.


.Net programmers Vs PHP programmers:
.NET is a very effective web development program. This is the product of Microsoft, and it is able to reach almost any program you can think if you have got good developer for coding. However, why PHP over the results of the .NET is the cost factors related to the .NET, and the complications involved at the beginning of problems. The development of .NET is just possible in a Windows atmosphere.
Both Windows and other software necessary for .NET appear to be little costly, and therefore the cost of production increases. PHP and related software and operating systems can be gained free of charge. Linux, MySQL, Apache servers etc are all open source and freely obtainable programs!! Its gives the top of PHP, and makes it more attractive for employers to hire PHP developers.


Java programmers Vs PHP programmers :
Java is also very effective web development program. However, development of Java is often perceived as much more complex than PHP. A Java programmer requires a giant deal of experience to take full advantage of the program. But PHP programming is much easier than Java. At the same period PHP is an openness server and Java does not.

So if you are looking for PHP Development Company, Ezeelive is highly professional PHP development company that provides custom PHP development services and banks on its expert PHP development team to deliver inventive PHP web development services, which are cut above the rest. Our developers are also proficient in Lamp programming or Lamp development because of their deep knowledge of Linux, MySQL and PHP. By outsourcing your PHP development to us you get tremendous benefits from our offshore PHP development center in India.

Friday, 21 October 2011

Advantages of Prestashop Ecommerce System


Prestashop is robust, professional grade e-Commerce shopping cart that you can download, install, and use for free. In the back end, you will use a full featured back end to manage your inventory, orders, shipping, and customers in real time. Your customer’s payments are sent directly to your commercial bank account using the latest security technology. You can even add your own modules to the shopping cart.
There are main reasons why we should choose Prestashop E-commerce System:


1. Free and open source : If your budget is tight it will save your money which can be used for advertizing (Google AdWords, banners…)

2. Size of software :
2.2 MB (1292 files)

3. SEO friendly :
This is the first thing you should check. It is critical for your web store to be SEO friendly. It is easy to change URLs, Title tags in Prestashop so your SEO experts will be happy with this platform.

4. Animated add to cart :
Prestashop has in-built animated add to cart feature.

5. Multilingual :
In most cases you’ll need to translate your web store in one or few languages. Prestashop supports all major languages.

6. Prestashop is easy to develop :
It’s important to know that there will be developers who can help you for a reasonable price and within reasonable period of time. For e.g. Magento developers are quite expensive because Magento  is not easy to maintain (develop) – it’s quite complicated system.

7. Fast and it does not require expensive servers to run :
We tried Magento but it required too much server resources and configuration so we went back to Prestashop.

8. Many free modules :
You can start your shop in minutes if you are in a rush and of course you save money.

9. It has modules and themes shop :
You can buy required module or theme and improve your shop in minutes. Take a look here. Prestashop validates those modules and ensures quality – so you are not taking any risks. Besides unique solutions costs much more. Developers can sell modules multiple times so they charge less and they are wiling to fix their bugs because they get money for their products.

10. It’s easy to learn :
You do not have to be an e-commerce expert to master Prestashop.

11. It has big community :
Check Prestashop forum. You’ll find answers to most of your questions.

12. It is rapidly improving :
Sometimes it’s annoying because you have to update your Prestashop constantly. But every new release gets better and better. E-commerce is changing rapidly so does and Prestashop.

Saturday, 15 October 2011

Comparison between Magento and Prestashop Ecommerce System

Comparison between Magento and Prestashop Ecommerce System

Magento, Prestashop Developer Mumbai

Hello Friends..Thanks for your comments on my previous blog comparison between Magento and Zen-cart.
Recently i finished one project in Prestashop and i found that its very good E-commerce system for small business solution.  And also i found prestashop and little less feature than Magento Provides, Here below i provide brief comparison between Magento and Prestashop

About Magento:

Magento is Open Source eCommerce software. Magento eCommerce was launched on March 31, 2008. Within two years of development, Magento has become one of the most popular eCommerce software.

About Prestashop:

PrestaShop is Open Source e-commerce software for Web 2.0. PrestaShop is available as licensed software and was officially launched in August 2007 for small and medium enterprises. Prestashop is based on the Smarty template engine.

Comparison between Magento & Prestashop

1. Size of software

Presta - 2.2 MB (1292 files)

Magento 10.3 Mb (5521 files)

2. Installation

Prestashop installation requirements are less.

Magento installation needs a lot of extensions like PDO, CURL etc

3. Features

When it comes to features, Magento is a way ahead from Prestashop. Customer groups, product comparison, CMS are there in Magento. Magento’s SEO features make it the most suitable ecommerce software. Magento also provide Multi-Store feature which is very powerful. When it comes to design also, Magento is a clear winner.

Prestashop’s search feature is very impressive. The search on Prestashop frontend is relatively faster than magento.

4. Code contrast

Prestashop is based on PHP5 and Smarty template engine. The first model MVC is not excellent. It will be difficult if you touch the first Prestashop code. The line of code is much more for smarty adoption; which increases the workload for extending development.

Magento adopts Zend framework. The developers are not only required to master PHP, but also required to have good knowledge about Zend framework.

5. Shipping & Payment Modules

Magento offers wide range of shipping and payment modules, whereas such feature is missing in Prestashop.

6. Search Engine Optimization (SEO)

Magento is relatively more SEO friendly than Prestashop.

7. Design Flexibility

Design of Magento seems to be difficult than Prestashop. So, if you don’t have much technical skills and you want to customize the Magento Design, then you should hire magento expert.

8. Backoffice

The back office of Magento is less intuitive which requires more technical skills to manage it effectively. Whereas, backoffice of Prestashop is relatively simple and easy.

9. Community

Magento has comparatively larger community. Magento Community have 130,000 members, Prestashop have 30000 members. (Figures are approximate).

Function contrast:
Features Prestashop Magento
Open Source 100% 100%
Pricing Free Free
Templatable Smarty Smarty
Multi-Language Yes Yes
Multi-Currency Yes Yes
Product Reviews Yes Yes
Product Ratings Yes Yes
Downloadable Yes Yes
Related Products Yes Yes
Product Features Yes Yes
Newsletters Yes Yes
Discount Coupon Yes Yes
SEO URLs Yes Yes
Backup & Restore Yes Yes
Printable Invoices Yes Yes
Sales Reports Yes Yes
Free Shipping Yes Yes
Wholesale Yes Yes
News & Events No No
Wish List No Yes
Testimonlals No No
Track order No No
F.A.Q No No
Gift Certificate No No
Recently Viewed No No
Points No No
Bulk Category Add No No
Bulk Product Add No No
Product Comparison No Yes
Statistics Yes No
Affiliate No No
Memberships Yes No
One-page Checkout No No
Order Barcode No No
Merchandise return (RMAs) No No
RSS Feed No Yes
TAG No Yes
Send to friend No No
Access Restrictions No No
Live Chat Software No No