Web site Development beginners

Thread Starter

daljeet795

Joined Jul 2, 2018
295
Hello Everyone
I am sorry if this post is not suitable on this forum. I wanted to develop one website. I know it's not very task. I use Eclipse tool on Windows 10. I was looking website projects including server side (java program) and client side(html, css , java script ) for practicing. I didn't found website project in my search.

I am following tutorials and watching video on youtube. I am looking advice How to start learning. I have two way
  1. Get the example code and run on eclipse
  2. Break big task into small parts
Get the example code and run on eclipse : I already have tried this method but I didn't found website project

Break big task into small parts : Is it best to make some button's in html and write server code to activate buttons

I am also following tutorials and watching video on youtube. I am trying do best but your advice can point me in right direction

Thanks in advance
 

Thread Starter

daljeet795

Joined Jul 2, 2018
295
https://www.w3schools.com/ would be a good place to start. Quick and easy tutorials.
many many thanks JohnInTX, I am not asking for any links or tutorials. I am already following some of tutorials.

I want to run one complete web site program in eclipse on my Desktop so I can get simple idea and easily figure out client and server program
1. Should I have run sample code on eclipse? I already have tried this method but I didn't found complete website project. It's very easy to find client side code but it's very difficult to get both client and server side code together in one project.

2. Break big task into small parts : Is it best to write server side program in small part like look at this link https://www.w3schools.com/w3css/tryw3css_templates_pizza.htm there is only code for client side and now if I want to write code server side then how to start by Break big task into small parts

I explain two way I am looking advice on which one to follow What is best way according to you ?
 

wayneh

Joined Sep 9, 2010
17,496
I'm having trouble understanding your goals. You are asking about specific software tools but not so much the job you want to accomplish.

I have not used the tools you are describing, but I have developed multiple websites. Only my first efforts decades ago involved hosting a website on a local server. It's easier and more economical to use a hosting service. I happen to use Godaddy for my sites but there are many other options, and I believe you can even find free ones. The electricity consumption alone is justification for paying for the hosting service. They additionally do all the work to maintain reliable service and offer many tools for scripting your website. But you can certainly run a local server if you want. Macs run Apache by default. I'm not sure what Windows offers.

My experience learning this stuff was one step at a time. Get a server running, figure out how to show an html page, add an input field to that html page, and on and on. Then you learn website management software and how to use FTP to synch with your website files. You learn how to use a SQL database an php to manage users and access control. The learning never ends. If you expect to do this as a career (which I did not), it would be worth your time to take some classes and learn this stuff at a deeper level.
 

Thread Starter

daljeet795

Joined Jul 2, 2018
295
I'm having trouble understanding your goals. You are asking about specific software tools but not so much the job you want to accomplish
I want to make one website.. i'm not asking only for specif tool. I just mentioned the tool and programming language that i'm gonna use to make website.

I have developed multiple websites. My experience learning this stuff was one step at a time. Get a server running, figure out how to show an html page, add an input field to that html page, and on and on.
I can use any server and database but I use apache tomcat and MySQL Database..

I am just confusing with one step at one time.That's what i am asking here. I make it simple what I am asking.

I haven't written this code. it's just example. This is code for client side
Code:
<!DOCTYPE html>
<html>
<title>W3.CSS Template</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Amatic+SC">
<style>
body, html {height: 100%}
body,h1,h2,h3,h4,h5,h6 {font-family: "Amatic SC", sans-serif}
.menu {display: none}
.bgimg {
    background-repeat: no-repeat;
    background-size: cover;
    background-image: url("/w3images/pizza.jpg");
    min-height: 90%;
}
</style>
<body>

<!-- Navbar (sit on top) -->
<div class="w3-top w3-hide-small">
  <div class="w3-bar w3-xlarge w3-black w3-opacity w3-hover-opacity-off" id="myNavbar">
    <a href="#" class="w3-bar-item w3-button">HOME</a>
    <a href="#menu" class="w3-bar-item w3-button">MENU</a>
    <a href="#about" class="w3-bar-item w3-button">ABOUT</a>
    <a href="#googleMap" class="w3-bar-item w3-button">CONTACT</a>
  </div>
</div>

<!-- Header with image -->
<header class="bgimg w3-display-container w3-grayscale-min" id="home">
  <div class="w3-display-bottomleft w3-padding">
    <span class="w3-tag w3-xlarge">Open from 10am to 12pm</span>
  </div>
  <div class="w3-display-middle w3-center">
    <span class="w3-text-white w3-hide-small" style="font-size:100px">thin<br>CRUST PIZZA</span>
    <span class="w3-text-white w3-hide-large w3-hide-medium" style="font-size:60px"><b>thin<br>CRUST PIZZA</b></span>
    <p><a href="#menu" class="w3-button w3-xxlarge w3-black">Let me see the menu</a></p>
  </div>
</header>

<!-- Menu Container -->
<div class="w3-container w3-black w3-padding-64 w3-xxlarge" id="menu">
  <div class="w3-content">

    <h1 class="w3-center w3-jumbo" style="margin-bottom:64px">THE MENU</h1>
    <div class="w3-row w3-center w3-border w3-border-dark-grey">
      <a href="javascript:void(0)" onclick="openMenu(event, 'Pizza');" id="myLink">
        <div class="w3-col s4 tablink w3-padding-large w3-hover-red">Pizza</div>
      </a>
      <a href="javascript:void(0)" onclick="openMenu(event, 'Pasta');">
        <div class="w3-col s4 tablink w3-padding-large w3-hover-red">Salads</div>
      </a>
      <a href="javascript:void(0)" onclick="openMenu(event, 'Starter');">
        <div class="w3-col s4 tablink w3-padding-large w3-hover-red">Starter</div>
      </a>
    </div>

    <div id="Pizza" class="w3-container menu w3-padding-32 w3-white">
      <h1><b>Margherita</b> <span class="w3-right w3-tag w3-dark-grey w3-round">$12.50</span></h1>
      <p class="w3-text-grey">Fresh tomatoes, fresh mozzarella, fresh basil</p>
      <hr>

      <h1><b>Formaggio</b> <span class="w3-right w3-tag w3-dark-grey w3-round">$15.50</span></h1>
      <p class="w3-text-grey">Four cheeses (mozzarella, parmesan, pecorino, jarlsberg)</p>
      <hr>

      <h1><b>Chicken</b> <span class="w3-right w3-tag w3-dark-grey w3-round">$17.00</span></h1>
      <p class="w3-text-grey">Fresh tomatoes, mozzarella, chicken, onions</p>
      <hr>

      <h1><b>Pineapple'o'clock</b> <span class="w3-right w3-tag w3-dark-grey w3-round">$16.50</span></h1>
      <p class="w3-text-grey">Fresh tomatoes, mozzarella, fresh pineapple, bacon, fresh basil</p>
      <hr>

      <h1><b>Meat Town</b> <span class="w3-tag w3-red w3-round">Hot!</span><span class="w3-right w3-tag w3-dark-grey w3-round">$20.00</span></h1>
      <p class="w3-text-grey">Fresh tomatoes, mozzarella, hot pepporoni, hot sausage, beef, chicken</p>
      <hr>

      <h1><b>Parma</b> <span class="w3-tag w3-grey w3-round">New</span><span class="w3-right w3-tag w3-dark-grey w3-round">$21.50</span></h1>
      <p class="w3-text-grey">Fresh tomatoes, mozzarella, parma, bacon, fresh arugula</p>
    </div>

    <div id="Pasta" class="w3-container menu w3-padding-32 w3-white">
      <h1><b>Lasagna</b> <span class="w3-tag w3-grey w3-round">Popular</span> <span class="w3-right w3-tag w3-dark-grey w3-round">$13.50</span></h1>
      <p class="w3-text-grey">Special sauce, mozzarella, parmesan, ground beef</p>
      <hr>

      <h1><b>Ravioli</b> <span class="w3-right w3-tag w3-dark-grey w3-round">$14.50</span></h1>
      <p class="w3-text-grey">Ravioli filled with cheese</p>
      <hr>

      <h1><b>Spaghetti Classica</b> <span class="w3-right w3-tag w3-dark-grey w3-round">$11.00</span></h1>
      <p class="w3-text-grey">Fresh tomatoes, onions, ground beef</p>
      <hr>

      <h1><b>Seafood pasta</b> <span class="w3-right w3-tag w3-dark-grey w3-round">$25.50</span></h1>
      <p class="w3-text-grey">Salmon, shrimp, lobster, garlic</p>
    </div>


    <div id="Starter" class="w3-container menu w3-padding-32 w3-white">
      <h1><b>Today's Soup</b> <span class="w3-tag w3-grey w3-round">Seasonal</span><span class="w3-right w3-tag w3-dark-grey w3-round">$5.50</span></h1>
      <p class="w3-text-grey">Ask the waiter</p>
      <hr>

      <h1><b>Bruschetta</b> <span class="w3-right w3-tag w3-dark-grey w3-round">$8.50</span></h1>
      <p class="w3-text-grey">Bread with pesto, tomatoes, onion, garlic</p>
      <hr>

      <h1><b>Garlic bread</b> <span class="w3-right w3-tag w3-dark-grey w3-round">$9.50</span></h1>
      <p class="w3-text-grey">Grilled ciabatta, garlic butter, onions</p>
      <hr>

      <h1><b>Tomozzarella</b> <span class="w3-right w3-tag w3-dark-grey w3-round">$10.50</span></h1>
      <p class="w3-text-grey">Tomatoes and mozzarella</p>
    </div><br>

  </div>
</div>

<!-- About Container -->
<div class="w3-container w3-padding-64 w3-red w3-grayscale w3-xlarge" id="about">
  <div class="w3-content">
    <h1 class="w3-center w3-jumbo" style="margin-bottom:64px">About</h1>
    <p>The Pizza Restaurant was founded in blabla by Mr. Italiano in lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
    <p><strong>The Chef?</strong> Mr. Italiano himself<img src="/w3images/chef.jpg" style="width:150px" class="w3-circle w3-right" alt="Chef"></p>
    <p>We are proud of our interiors.</p>
    <img src="/w3images/onepage_restaurant.jpg" style="width:100%" class="w3-margin-top w3-margin-bottom" alt="Restaurant">
    <h1><b>Opening Hours</b></h1>

    <div class="w3-row">
      <div class="w3-col s6">
        <p>Mon & Tue CLOSED</p>
        <p>Wednesday 10.00 - 24.00</p>
        <p>Thursday 10:00 - 24:00</p>
      </div>
      <div class="w3-col s6">
        <p>Friday 10:00 - 12:00</p>
        <p>Saturday 10:00 - 23:00</p>
        <p>Sunday Closed</p>
      </div>
    </div>

  </div>
</div>

<!-- Contact (with google maps) -->
<div id="googleMap" class="w3-grayscale-max" style="width:100%;height:400px;"></div>

<div class="w3-container w3-padding-64 w3-blue-grey w3-grayscale-min w3-xlarge">
  <div class="w3-content">
    <h1 class="w3-center w3-jumbo" style="margin-bottom:64px">Contact</h1>
    <p>Find us at some address at some place or call us at 05050515-122330</p>
    <p><span class="w3-tag">FYI!</span> We offer full-service catering for any event, large or small. We understand your needs and we will cater the food to satisfy the biggerst criteria of them all, both look and taste.</p>
    <p class="w3-xxlarge"><strong>Reserve</strong> a table, ask for today's special or just send us a message:</p>
    <form action="/action_page.php" target="_blank">
      <p><input class="w3-input w3-padding-16 w3-border" type="text" placeholder="Name" required name="Name"></p>
      <p><input class="w3-input w3-padding-16 w3-border" type="number" placeholder="How many people" required name="People"></p>
      <p><input class="w3-input w3-padding-16 w3-border" type="datetime-local" placeholder="Date and time" required name="date" value="2017-11-16T20:00"></p>
      <p><input class="w3-input w3-padding-16 w3-border" type="text" placeholder="Message \ Special requirements" required name="Message"></p>
      <p><button class="w3-button w3-light-grey w3-block" type="submit">SEND MESSAGE</button></p>
    </form>
  </div>
</div>

<!-- Footer -->
<footer class="w3-center w3-black w3-padding-48 w3-xxlarge">
  <p>Powered by <a href="https://www.w3schools.com/w3css/default.asp" title="W3.CSS" target="_blank" class="w3-hover-text-green">w3.css</a></p>
</footer>

<!-- Add Google Maps -->
<script>
function myMap()
{
  myCenter=new google.maps.LatLng(41.878114, -87.629798);
  var mapOptions= {
    center:myCenter,
    zoom:12, scrollwheel: false, draggable: false,
    mapTypeId:google.maps.MapTypeId.ROADMAP
  };
  var map=new google.maps.Map(document.getElementById("googleMap"),mapOptions);

  var marker = new google.maps.Marker({
    position: myCenter,
  });
  marker.setMap(map);
}

// Tabbed Menu
function openMenu(evt, menuName) {
  var i, x, tablinks;
  x = document.getElementsByClassName("menu");
  for (i = 0; i < x.length; i++) {
     x[i].style.display = "none";
  }
  tablinks = document.getElementsByClassName("tablink");
  for (i = 0; i < x.length; i++) {
     tablinks[i].className = tablinks[i].className.replace(" w3-red", "");
  }
  document.getElementById(menuName).style.display = "block";
  evt.currentTarget.firstElementChild.className += " w3-red";
}
document.getElementById("myLink").click();
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBu-916DdpKAjTmJNIgngS6HL_kDIKU0aU&callback=myMap"></script>
<!--
To use this code on your website, get a free API key from Google.
Read more at: https://www.w3schools.com/graphics/google_maps_basic.asp
-->

</body>
</html>
Now I have to write server code for above website I can write in any language (c++, python, java, C#). I chose java

How to start writing code server code for above website. I need advice on How to start one step at one time ?
 
Last edited:

Thread Starter

daljeet795

Joined Jul 2, 2018
295
So you need your server to be able to run javascript such as the Google code starting in line #174?

Take a look here and here.
Thanks for all your valuable suggestion. Web application can have two broad parts: the frontend and the backend. I understand front-end is like what we see on browser. Basically we use html, css, javascript, bootstrap etc in client side

I did google search " Back end Developer". I visited some of links to understand role of back end developer for web application. It run on server side. Basically we use server side language such as c++, python, java, C#

I found out that if we don't write back end code then button's on header (Top of wbsite) will not work. User can't log-in to access website.

What happen if we don't write back end code or What happen if we write back end code
 
Last edited:

Thread Starter

daljeet795

Joined Jul 2, 2018
295
Hello,

The basic reference for web building would be w3schools:
https://www.w3schools.com/

Bertus
Thanks bertus for providing link. I already have seen that page. it's for front end and I am looking advice on back end code

It would be appreciate if someone can explain little bit why the back end code is important in web application.

What we can do with help of back end code in web application ?
 

wayneh

Joined Sep 9, 2010
17,496
I found out that if we don't write back end code then button's on header (Top of wbsite) will not work. User can't log-in to access website.
That's not entirely true - it depends on what you program the buttons to do. If you can live with html functionality, you won't need anything special to run on the server. Personally, I've also used php for database chores and access control for users, because I could not achieve these functions with html alone. I chose php because virtually every hosting company provides it and because I was able to find examples and tutorials covering the topics that I was interested in. I'm sure I could have gotten there with java as well but it seemed like a bigger learning curve at the time.
 

Thread Starter

daljeet795

Joined Jul 2, 2018
295
That's not entirely true - it depends on what you program the buttons to do.
This is simple front end code
Code:
<!DOCTYPE html>
<html>
<body>

<h2>Welcome</h2>
<button type="button">Home</button>
<button type="button">Manu</button>
<button type="button">About</button>
<button type="button">contect</button>
</body>
</html>
When I run this code on browser It show four buttons

upload_2018-7-14_2-26-30.png

Now can you give me idea.

What I can do for four buttons with back end code?

Do I really need back end code for above buttons ?
 

wayneh

Joined Sep 9, 2010
17,496
This is simple front end code
Code:
<!DOCTYPE html>
<html>
<body>

<h2>Welcome</h2>
<button type="button">Home</button>
<button type="button">Manu</button>
<button type="button">About</button>
<button type="button">contect</button>
</body>
</html>
When I run this code on browser It show four buttons

View attachment 156147

Now can you give me idea.

What I can do for four buttons with back end code?

Do I really need back end code for above buttons ?
Here's an html page that I use to get user credentials. My website will throw this at the user if they attempt to access a protected page without a sessions established. Note how it shows a button that will execute php scripting when pressed.

Code:
  <!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN"
    "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
  <html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]">
  <head>
    <title> Please Log In for Access </title>
    <meta http-equiv="Content-Type"
      content="text/html; charset=iso-8859-1" />
  </head>
  <body>
  <h1> Login Required </h1>
  <p>You must log in to access this area of the site.</p>
  <p>If you are not a registered user, <a href="a sign-up sheet">click here</a>
     to sign up for access!</p>
  <p><form method="post" action="<?=$_SERVER['PHP_SELF']?>">
<!--    User ID: <input type="text" name="uid" size="8" /><br />
        Password: <input type="password" name="pwd" SIZE="8" /><br />
    <input type="submit" value="Log in" />  -->
<p></p>
    <label for="username">Username: </label><input id="username" type="text" name="uid" value="<?php if(isset($_COOKIE["remember_me"])) echo $_COOKIE["remember_me"]; ?>"/>
    <label for="password">Password: </label><input id="password" type="password" name="pwd"/>
    <input type="hidden" name="redir" value="<?= $_REQUEST['redir'] ?>"/>
    <input type="submit" value="Login"/>
    <div id="remember"><label>Remember Me?<input type="checkbox" name="setcookie" <?php if(isset($_COOKIE["remember_me"])) echo 'checked="checked"'; ?>/></label></div>
  </form></p>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</body>
</html>
Here's the code that precedes that html:
Code:
<?php
/////////////////////////////////////////////////
function error($msg) {
    ?>
    <html>
    <head>
    <script language="JavaScript">
        alert("<?=$msg?>");
        history.go(-1);
    </script>
    </head>
    <body>
    </body>
    </html>
    <?php
    exit;
}
/////////////////////////////////////////////////

//// Check for credentials in the just-posted form or an existing session
$uid = isset($_POST['uid']) ? $_POST['uid'] : $_SESSION['uid'];
$pwd = isset($_POST['pwd']) ? $_POST['pwd'] : $_SESSION['pwd'];

if(!isset($uid)) {   //// No credentials
  ?>  html above
 

MrSoftware

Joined Oct 29, 2013
2,188
For your back end one popular language is PHP, it's a server side scripting language that is supported by most common servers such as Apache. You can write with many different styles, but REST (RESTful) is a popular way to go, depending on what you want to do. Look at POST and GET for getting data to and from the server. Then look at integrating a database, such as MySQL.

Look for an integrated server, such as a LAMP (Linux, Apache, MySQL, PHP) package. This will have everything wrapped up into a turnkey solution. Run it in a virtual machine to simulate a remote server.

If you like eclipse as an editor then great, but server side code will run on the server, so eclipse will be little more than a text editor.
 
Last edited:
Top