Tuesday, 16 October 2012

OOP'S concepts


Difference between Abstract class and Interface in PHP

Filed under: PHP — Tags:  — Renga @ 11:50 AM
S.No
Abstract Class
Interface
1
For abstract class a method must be declared as abstract. Abstract methods doesn’t have any implementation.For interface all the methods by default are abstract methods only. So one cannot declare variables or concrete methods in interfaces.
2
The Abstract methods can declare with Access modifiers like public, internal, protected. When implementing in subclass these methods must be defined with the same (or a less restricted) visibility.All methods declared in an interface must be public.
3
Abstract class can contain variables and concrete methods.Interfaces cannot contain variables and concrete methods except constants.
4
A class can Inherit only one Abstract class and Multiple inheritance is not possible for Abstract class.A class can implement many interfaces and Multiple interface inheritance is possible.

Tuesday, 9 October 2012

REST Webservice Useful Links

http://www.9lessons.info/2012/05/create-restful-services-api-in-php.html

http://viralpatel.net/blogs/restful-web-service-tutorial-introduction-rest-restful/

http://www.fliquidstudios.com/2009/01/13/introduction-to-writing-a-rest-server-in-php/

http://www.theserverside.com/discussions/thread.tss?thread_id=50335

http://www.techrepublic.com/article/take-advantage-of-the-benefits-of-loosely-coupled-web-services/1050425

http://framework.zend.com/manual/1.12/en/zend.rest.introduction.html

Are you working with multiple devices like iPhone, Android and Web then take a look at this post that explains you how to develop a RESTful API in PHP.  Representational state transfer (REST) is a software system for distributing the data to different kind of applications. The web service system produce status code response in JSON or XML format.

Create a RESTful Services API in PHP.


Difference between SOAP and REST in Web services- 1. REST has no WSDL interface definition 2. REST is over HTTP, but SOAP can be over any transport protocols such HTTP, FTP, STMP, JMS etc. 3. SOAP is using soap envelope, but REST is just XML.


Q) What is differnce between loosely coupling and tightly coupling?

Ans: Coupling generally refers to the act of joining two things together, such as the links in a chain. But in software development, coupling typically refers to the degree to which software components/modules depend upon each other. The degree to which components are linked defines whether they operate in a tightly coupled relationship or in a loosely coupled relationship. With tightly coupled components, each component and any auxiliary dependent objects must be present at execution time as well as compile time. On the other hand, loosely coupled components can operate independently from one another.

Monday, 8 October 2012

Important points in Zend SOAP webservice

1)Mention the comments in defined class which we are called in SOAP webservice.

If u r not mention the comments the result will not displayed.

HTML Iframes

An iframe is used to display a web page within a web page.


yntax for adding an iframe:
<iframe src="URL"></iframe>
The URL points to the location of the separate page.

Iframe - Set Height and Width

The height and width attributes are used to specify the height and width of the iframe.
The attribute values are specified in pixels by default, but they can also be in percent (like "80%").



Use iframe as a Target for a Link

An iframe can be used as the target frame for a link.
The target attribute of a link must refer to the name attribute of the iframe:

Example

<iframe src="demo_iframe.htm" name="iframe_a"></iframe>
<p><a href="http://www.w3schools.com" target="iframe_a">W3Schools.com</a></p>

Try it yourself »








Example

<iframe src="demo_iframe.htm" width="200" height="200"></iframe>


Iframe - Remove the Border

The frameborder attribute specifies whether or not to display a border around the iframe.
Set the attribute value to "0" to remove the border:

Example

<iframe src="demo_iframe.htm" frameborder="0"></iframe>