A Website Design Tutorial

A Website Design Tutorial

For website design,  plenty of languages come in mind, like, HTML, JavaScript, CSS, PHP, ASP, Perl and many more. Furthermore, it depends upon your need that you want a website just for publishing articles, some videos and images or you want a website in which your clients can create account and you can keep their records in a database or you want an E-Commerce website to sell services and products online. In this article, i will describe a web architecture   and explain that which language fit in  the architecture.

A Typical Web Architecture

In the figure, there is a typical web architecture that has three components Client(Browser), Server+Database(A Web Hosting Company) , I will try to make you understand by  user authentication example.
User Authentication Algorithm
First example is, when you Log in into Facebook account.
STEP-1. You open the www.facebook.com
Corresponding Action- Server sends a file which contains  HTML+CSS+JavaScript
STEP-2.  You fill the login form and submit 
Corresponding Action- Browser sends login and password detail to PHP OR ASP  script at the server from which your login and password will be extracted.
STEP-3. PHP or ASP sends login and password detail to MySQL or MS-Access.
STEP-4. If login and password match MySQL or MS-Access will send your record to PHP script.
STEP-5. PHP will embed those data with HTML+CSS+JavaScript and account will be displayed.

Furthermore, you might have got idea that that how languages interact each other to accomplish a task , now I will explain what each languages do. First, HTML( Hyper Text Markup Language), which describes a web page structure such as a heading, a paragraph, placement of an image, link to other pages and meta description of a website.

————————————————————————
The first example  is of a heading tag.

<h1> This is a heading</h1>
Where
<h1>——> Heading Opening Tag
</h1>——> Heading Closing Tag
_________________________________________________
The second example is of linking a web page to other web page.
<a href=”http://www.computex.online/” target=”_blank”>Computing Blog</a></div>
If you put this code in HTML website it will show Computing Blog and if click page will be opened.
Here <a is a tag stands for anchor tag 
href-> Hyper reference
target is a property that means if you click on the link another tab will be opened. 
_________________________________________________
It must be noted that there is not any other optional markup  language, HTML is standard.
_________________________________________________
_________________________________________________
Moreover, now CSS term comes here CSS stand for   Cascading Style Sheets that makes HTML tags stylish, such as, colour of heading tags, colour of paragraph tag and it styles tables too.
____________________________________________
Here example is
<style>
h1
{
color : red;
text-align: centre;
}
</style>
In the example, style tag is used for embed CSS code into HTML and in the example h1 tag will be red in all document and alignment will be centre.
______________________________________________
CSS is standard language for stylising HTML tags.
______________________________________________

Now i will explain about JavaScript, HTML creates static web pages, suppose you want to see time  dynamically see time on your web page HTML can not do, so, JavaScript creates dynamic web pages i.e. when a change happens on server JS will update web page without interface of user, furthermore, pop-up messages can be built by HTML It can be only built by JavaScript. In addition, JS not only builds dynamic web page but also support calculations, input authentication that reduce the overload of server.

______________________________________________
Example
<script>
function sum(a, b) {
    return a+b;
}
</script>
_______________________________________________
JavaScript code can be embedded into HTML using script tag.

Vb Script from Microsoft is competitor of JavaScript and Internet Explorer uses it.

_______________________________________________
_______________________________________________   
    
   The above all languages are for web browser, now we come at server side scripting language there are many server side scripting languages, such as, PHP , ASP, Perl, Ruby, and Python here i will describe an example from  PHP.
Usually, PHP is needed when you fill an HTML form and MySQl commands will be embedded in PHP to interact with database and record will be stored .
_______________________________________________
Example is
<form action=”server.php” method=”post”>
Name <input type=”text” name=”name”><br>
Age <input type=”text” name=”email”><br>
<input type=”submit”>
</form>

Name

Age


Here server.php  in which MySQL code  is embeded
 <?php
$server = “host”;
$username = “user”;
$password = “pass”;
$database=“record”
$cn = new mysqli($server, $user, $pass, $nameage);//SQL code
$sql = “INSERT INTO record($_POST[“name”],$_POST[“age”])VALUES(‘$_POST[“name”]’,’$_POST[“age”]’)” ;// SQL code
<?
Examples of two Blogging Platforms
1-Blogger- Blogger which is of Google in which you can only manipulate HTML/Java script in the form of widgets i.e client side scripting language but can not develop server side applications, such as, you can not keep the record of audience in a database.
2- WordPress.org- Here I have also written the  name extension name because there is also a www.wordpress.com, but you can purchase a hosting and build a website using www.wordpress.org. Furthermore, if you purchase domain name and hosting you can use HTML+CSS+JavaScript on client side and PHP and MySQL on server side. 
Conclusion
To sum up, I hope that by this example you will understand  that how languages interact each other to accomplish a task on web and also what languages you will need when you are going to develop a website, if you have any query feel free to comment.





Leave a Comment

Your email address will not be published. Required fields are marked *

©Postnetwork-All rights reserved.