Latest Post

Latest POSTS

PHP (Hypertext Preprocessor)

php (Hypertext preprocessor)

PHP is a script language and interpreter that is freely available and used primarily on Linux Web servers. PHP, originally derived from Personal Home Page Tools, now stands for PHP: Hypertext Preprocessor, which the PHP FAQ describes as a "recursive acronym."

    PHP is an alternative to Microsoft's Active Server Page (ASP) technology. As with ASP, the PHP script is embedded within a Web page along with its HTML. Before the page is sent to a user that has requested it, the Web server calls PHP to interpret and perform the operations called for in the PHP script.

     An HTML page that includes a PHP script is typically given a file name suffix of ".php" ".php3," or ".phtml". Like ASP, PHP can be thought of as "dynamic HTML pages," since content will vary based on the results of interpreting the script.

PHP is free and offered under an open source license.

Example #1 An introductory example :-
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  
   "http://www.w3.org/TR/html4/loose.dtd">  
 <html>  
   <head>  
     <title>Example</title>  
   </head>  
   <body>  
     <?php  
       echo "Hi, I'm a PHP script!";  
     ?>  
   </body>  
 </html>  

PHP Presentation :-


Application programmaing Interface (API)

Java API is not but a set of classes and interfaces that comes with the JDK. Java API is actually a huge collection of library routines that performs basic programming tasks such as looping, displaying GUI form etc. In the Java API classes and interfaces are packaged in packages. All these classes are written in Java programming language and runs on the JVM. Java classes are platform independent but JVM is not platform independent. You will find different downloads for each OS.

Java Collections API - Presentation:


Concepts of Object Oriented Programming

The Object Oriented Programming is a  type of programming in which programmers define not only the data type of a data structure, but also the types of operations (functions) that can be applied to the data structure. In this way, the data structure becomes an object that includes both data and functions. In addition, programmers can create relationships between one object and another.

The concepts used in OOPs are
  • Objects
  • Classes
  • Data Abstraction and Data Encapsulation
  • Inheritance
  • Polymorphism
  • Dynamic Binding
  • Message Passing
Objetcs
  • Object is defined as the basic run time entity that contains data and its related methods.
  • Object may be a person, place or any item that the program has to handle.
  • The methods are operating on the data.
  • The objects may be either physical or logical.
  • When a program is executed, the objects interact by sending messages to one another.
Classes
  • A class is defined as a collection of Objects with same type of data and functions.
  • Once a class is defined we can create number of objects belonging to that class.
  • Class is a user defined data type
Data Abstraction
  • Abstraction refers to the act of representing essential features without including the back ground details.
  • Also by the feature of data abstraction it is possible to create user defined data types and thus increase the power of programming language
Data encapsulation
  • Data Encapsulation is the process of combining data and functions into a single unit called class.
  • By this method one cannot access the data directly.
  • Data is accessible only through the functions present inside the class.
  • Data Encapsulation provides data hiding.
Inheritance
  • Inheritance is a process of deriving new classes from existing classes.
  • The derived classes contain all attributes and functions of existing classes plus its own attributes and functions.
  • Existing class is called as Base class or Super class and inherited class is called as Derived class or Sub class.
  • The inheritance concept gives data reusability
Polymorphism
  • Polymorphism means the ability to take more than one forms.
  • An operation may exhibit different behavior in different instances.
  • The behavior depends on the type of data used in the operation.
Dynamic Binding
  • Binding refers to the connection between the function call and the corresponding function code to be executed.
  • Dynamic binding means code associated with the given procedure call is not known until run time.
Message Passing
  • Message passing is a process of sending request to execute a function for an object.
  • Message passing involves specifying the name of the object, name of the method and the information to be sent. 
Object Oriented Programming Concepts - Presentations:





Paradigms of Programming Languages

The Paradigms of programming Language gives the model to the programmer to write the programs.The different Paradigms of programming languages are
  1. Unstructed Programming (or) Monolithic Programming
  2. Procedural Programming
  3. Structural Programming
  4. Object Oriented Programming

 Monolithic Programming:
  • In this whole problem is solved as a single block.
  • All the data are global and there is no security.
  • To share the codes jumps are allowed and so contain lot of go to statements.
  • This is suitable only for small problem.
  • Difficult to follow and correct errors
                         Eg, Assembly Language, BASIC.

Procedural Programming:
  • The given problem is divided in to a number of sub problems depending upon its functionality.
  • The sub problems are called procedures or Methods.
  • Any procedure can be called at any point during the program execution.
  • The program has global and local variables.
  • Global variables can be only be used 




Features of procedure oriented Programming:
  1. Large Programs are divided in to small function or Procedure.
  2. Uses Top-Down programming Approach.
  3. Data moves freely from one function to another.
  4. Most of the functions share common data.
  5. Emphasis is given for algorithms.
Disadvantages:
  1. Very difficult identify which data is used by which function.
  2. Error Correction is difficult.
Structural Programming:
  • The program is divided into modules and the modules are then divided into functions.
  • The usage of goto statement is removed or reduced.
  • Each module can work independent of one another.
               Example: ADA, C++.




Object Oriented Programming:
  • The Program is divided into number of small units called Object. The data and function are build around these objects.
  • The data of the objects can be accessed only by the functions associated with that object.
  • The functions of one object can access the functions of other object.


Features:
  1. Emphasis is given on data rather than procedures.
  2. Problems are divided into objects.
  3. Data structures are designed such that they organize the object.
  4. Data and function are tied together.
  5. Data hiding is possible.
  6. New data and functions can be easily loaded.
  7. Object can communicate with each other using functions.
  8. Bottom-up programming approach is used
Difference between Structured and Object Oriented Programming
 
Structured Programming Object-oriented Programming
Top-down approach is followed. Bottom-up approach is followed.
Focus is on algorithm and control flow. Focus is on object model.
Program is divided into a number of sub modules or functions or procedures. Program is organized by having a number of classes and objects.
Functions are independent of each other. Each class is related in a hierarchical manner.
No designated receiver in the function call. There is a designated receiver for each message passing.
Views data and functions as two separate entities. Views data and functions as a single entity.
Maintenance is costly. Maintenance is relatively cheaper.
Software reuse is not possible. Helps in software reuse.
Function call is used. Message passing is used.
Function abstraction is used. Data abstaction is used.
Algorithm is given importance. Data is given importance.
Solution is solution-domain specific. Solution is problem-domain specific.
No encapsulation. Data and functions are separate. Encapsulation packages code and data altogether. Data and functionalities are put together in a single entity.
Relationship between programmer and program is emphasized. Relationship between programmer and user is emphasized.
Data-driven technique is used. Driven by delegation of responsibilities.

Programming Paradigms - Presentation:




Protocols

Protocols is a set of rules or an agreement that specifies a common language that computers on a network use for communication with other computers. It also specifies the conditions under which a particular method of doing it. They give the specfication on how the computers talk with each other. There are various protocols suites available.

       Ethernet : This is used to transfer information on a LAN.It specifies a number of wiring and signaling standards for the physical layer, two ways of network access (Media Access Control/Data Link Layer) and a common address format.

     Internet Protocol (IP) : This protocol provides communicable global addresses of to the computers. The computers identify each other by the IP addresses.

    Transport Control Protocol (TCP) : This protocol guarantees reliable, proper delivery of data from the sender to the receiver.It breaks large message, transports them reliably and reassembles them.

    File Transfer Protocols (FTP) : This is used to connect two computers over the Internet so that user of one computer can transfer files and perform file commands on the other computer. It exchnage files over any network that supports TCP/IP protocol.

   Hyper Text Transport Protocol (HTTP) : This protocol used to retrieve Web Page from a Web server.

   Simple Mail Transport Protocol (SMTP) : This protocol is used for email transmission.