Technology has advanced to the point where programming has become an essential part of our lives. We use software and applications for communication, entertainment, education, and work, and these are all built on programming languages.

Adding JavaScript To HTML Page

 JavaScript is applied to HTML page in a similar manner like CSS. Whereas CSS uses <link> elements to apply external stylesheets and <style> elements to apply internal stylesheets to HTML, JavaScript only needs one friend in the world of HTML, the <script> element.

There are three different ways using which user can add JavaScript into webpage.

1. Inline JavaScript

2. Internal JavaScript

3. External JavaScript

 

Inline JavaScript

JavaScript written within the HTML element with the event handling attribute then it is called as inline JavaScript. This method is used when we have to call a function in the HTML event handler attribute. Many cases where we have to add JavaScript directly are onclick, onmouseover, onload etc. In this method, JavaScript can be added in HTML directly without using <script> tag.

<HTML>

<HEAD>

<TITLE>Inline JavaScript</TITLE>

<//HEAD>

<BODY>

<form>

<Input type="Button" value="Clickme" onclick="alert('Button Click')">

</form>

</BODY>

</HTML>


Share:

JavaScript

 JavaScript is a light weight object oriented programming language used for scripting the webpages. It is an interpreted and full fledge programming language, used primarily by web browsers to provide dynamic and interactive experience for the end-user. Most of the functions and applications that make the Internet indispensable to modern life are coded in some form of JavaScript. 



Today, JavaScript can execute not only in the browser, but also on the server, or actually on any device that has a special program called the JavaScript engine. A JavaScript engine is a computer program that executes JavaScript(JS) code.

Uses of JavaScript:

1. Adding interactivity to website : If you want a website to be more than a static page of text, you will need to do some Java Scripting.

2. Developing mobile applications : JavaScript isn't just for website, it's used for those applications you have on your phone and tablet as well.

3. Creating web browser-based games : Ever played a game directly from your web browser. JavaScript probably helped make that happen.

4. Back end development : JavaScript is mostly used on the front end of the things but it's a versatile enough scripting language to be used on back end infrastructure, too.

5. Client-Side validation : JavaScript contains built in function to validate the data before it is sent to the server.

6. Event Handling : JavaScript helps to handle the event which occurs when end users interact with the webpages. Eg. onclick, onmouse over, on keydown and so on.

7. Building web servers and developing server applications : A web server can be created by using Node.js. Node.js is event-driven and not waits for the response of the previous call. The HTTP module can be used to create the server by using the createServer() method.


Features of JavaScript

  • JavaScript is an object based scripting language.
  • Giving the user more control over the browser
  • It handles date and time
  • It detects the user's browser and OS
  • It is light weighted
  • JavaScript is a scripting language and it is not Java.
  • JavaScript is interpreter based scripting language.
  • JavaScript is case sensitive.
  • JavaScript is object based language as it provides predefined objects.
  • Most of the JavaScript control statements syntax is same as syntax of control statements in C language.
  •  An important part of JavaScript is the ability to create new functions within scripts. Declare a function in JavaScript using function keyword.

Limitations of JavaScript

  •  Depends a lot on the browser 
  • Inability to use local devices
  • JavaScript can be disabled 
  • Not Search Engine Friendly
  • JavaScript cannot protect your page source or images
  • It doesn't have any multithreading or multiprocessor capabilities
  • For security reason, JavaScript doesnot allow the reading or writing of files
  • It doesn't have any multiprocessor/multithreading capabilities.
  • As there is no support available, this cannot be used for networking applications
  • Cannot access webpages hosted on a different domain
  • Cannot Access databases 
Share:

PHP: Hardware and Software


 T
alking to hardware requirements, it has been seen that PHP sucessfully run on 100 MHz Pentinum machine running Linux and Windows NT , respectively. Performance of such machine was fine for use as a personal development environment. A site expected to receive thousands of requests a day would need faster hardware, of course. Although more resources are needed when comparing a PHP-powered site to a flat HTML site, the requirements are not dramatically different. PHP work on any types of hardware whether it is Intel or , Power PC and Sparc CPUs.

Regarding to operating system PHP run smoothly on Windows NT and its successors, but later version of PHP requires at least Windows 2008/Vista. For UNIX operating systems, PHP works well with Linux and Solaris, as well as others. If you have chosen a PPC based system such as a Macintosh, you may chooose Linux PPC, a version of Linux. You may pursue the commercial WebTen Web Server that runs in the Macintosh OS. Chad Cunningham has contribute has contributed patches for compiling PHP in Apple's OS X. In 1999 Brian Havard added support for IBM's OS/2. 

PHP still works best with the Apache Web Server. You can make PHP work with almost any web server using CGI version, but I don't recommend this setup for production web series. If you are using UNIX, we recommend this setup for production Web sites. If you are using UNIX, we recommend compiling PHP as an Apache module. 


Other software requirements for PHP are:

A PHP engine : Version 5. Included in XAMPP-Windows.

A web server: Apache HTTP Server 2.0 is recommended. Included in XAMPP Windows.

A database server : MySQL Server 5.0 is recommended. Included in XAMPP Windows.

A PHP debugger: XDebug 2.0 or later.


Installing PHP : To install PHP, I suggest to install AMPP software stack, AMPP package is combination for "Apache MySQL PHP Perl" package. Among the different available option from AMP, I suggest you to choose XAMPP.

XAMPP is the most popular software package which is used to set up a PHP development environment for web services by providing all the required software components. During the process of software deployment, most of the web servers use almost similar components, so use of XAMPP provides easy transition from local server to live server. XAMPP is a AMP stack which stands for cross platform, Apache, MySQL, PHP, Perl with some additional administrative software tools such as PHPmyAdmin, FileZilla, Mercury mail server and JSP Tomcat server. Other commonly known software packages like XAMPP are WAMP, LAMP and others.

The XAMPP server is used to test the PHP pages. It works as local server. It contains a MySQL database to manage or save data on a local server. 


Advantages of XAMPP:

It is free and easy to use and easily available for Windows, Linux and Mac OS.

It is a begginers friendly solution package for full stack web development.

It is a open source software package which gives a easy installation experience.

It is very simple and lightweight to create set up for development, testing and deployment.

It is a time saver and provides several ways for managing configuration changes.

It handles many administrative tasks like checking the status and security.


Software component of XAMPP :

Apache plays the role of processing the HTTP request. It is the actual default web server application. It is the most popular web servers maintained by Apache Software Foundation.

MySQL plays the role of database management system in XAMPP. It helps to store and manage collected data very efficiently. It is an open source and most popular.

PHP is the server side scripting language which stands for Hypertext Preprocessor. It is embedded with HTML code which interacts with the webserver. It is an open source and work well with MySQL and has become a common choice for web developers.

Perl is the high level programming language designed for text editing which serves purpose like web development and networking programming.

Share:

PHP

 PHP is a widely used open source general purpose Server side scripting language that is especially suited for web development and can be embedded into HTML. PHP  that earlier stood for Personal Home Pages is a widely used open source general purpose scripting language and so, now known as Hypertext Preprocessor. PHP is typically used as a server side language(as opposed to a language like JavaScript that's generally executed on the client side). 

                         


  PHP is used to develop dynamic websites or web applications. PHP scripts can only be interpreted on a server that has PHP installed. The client computers accessing the PHP scripts require a web browser only. A PHP file contains PHP tags and ends with the extensions ".php".

PHP is known as a server sided language. That's because the PHP doesn't get executed on your computer, but on the computer you requested the page from. The results are then handed over to you, and displayed in your browser. 

            Typically PHP is used for Server Side Scripting, Command Line Scripting and even for creating desktop applications.

    PHP is compatible with all major Operating Systems including Linux, Windows and MAC OS. It is also compatible with most popular web servers such as Apache and LiteSpeed. PHP can be used to create dynamic content such as PDF's, images and is compatible with the most popular types of database tools such as MySQL.

PHP can aslo be used to add extra functionality to your website by integrating applications built for 3rd party websites such as facebook or by creating PHP based mailing lists or you can even create Wordpress Plugins for commercial use.

PHP is an HTML embedded Web scripting language. This means PHP code can be inserted into the HTML of a web page. When a PHP page is accessed, the PHP code is read or "parsed" by the server the page reside on. The output from the PHP functions on the page are typically returned as HTML code, which can be read by the browser. Because the PHP code is transformed into HTML before the page is loaded, users cannot view the PHP code on a page. This makes PHP pages secure enough to access databases and other secure information. 


The Uses for PHP are :

  • It is utilized to make a dynamic site.
  • To interact with a web server.
  • To collaborate with any back-end.
  • To communicate with the local record arrangement of the OS.
  •  To actualize the business sensible layers.
  • It can Encrypt Data.
  • Access Cookies variable and set treats.
  • Utilizing PHP you can limit the client to get to explicit page.
  • PHP typically used to yield HTML code to the program.
  • It is utilized for interface web application with Database.
  • It is utilized to send and get Emails.
  • You can utilize PHP to discover the present date, and afterward assemble a schedule for the month.
  • It can encode information.
Features of PHP 

1. Simple

It is very simple and easy to use, compare to other scripting language, it is very simple and easy.

2. Interpreted 

It is an interpreted language, i.e., there is no need for compilation.

3. Faster

It is faster than other scripting language e.g. asp and jsp.

4. Open source

PHP is an interpreted scripting language(actually precompiled opcodes), free, open source and distributed under a license authorizing the modification and redistribution.

5. Platform Independent

PHP code will be run on every platform, Linux, UNIX, Mac OS, and Windows.

6. Case Sensitive

PHP is case sensitive scripting language at time of variable declaration. In PHP, all keywords, classes, functions, and user defined functions are NOT case sensitive.

7. Error Reporting

PHP have some predefined error reporting constants to generate a warning or error notice.

8. Real Time Access Monitoring 

PHP provides access logging by creating the summary of recent accesses for the user.

9. Loosely Typed Language

PHP supports variable usuage without declaring its data type. It will be taken at the time of the execution based on the type of data it has on its value.


Advantages of PHP

The following are the advantages of PHP:

1. PHP is free : You don't have to pay anyone to use PHP. Whether you run the PHP engine on a beatup 10 year old PC in your basement or in a room full of million dollar :enterprise class" servers, there are no licensing fees, support fees, maintenance fees, upgrade fees, or any other kind of charge.

2. PHP is Cross Platform :PHP can be used with a web server computer that runs Windows, Mac OS, Linux and many other version of UNIX.

3. PHP is widely used : PHP is used on different websites from countless tiny personal homepage to giant's websites.

4. PHP hides its complexity : Powerful ecommerce websites can be built using PHP as well as simple sites. Simpler and complex features can be used simultaneously which doesn't get in the way with each other's. 

5. PHP is built for web programming : Unlike other programming languages, PHP was created for generating webpages.

Share:

Translate

Wikipedia

Search results