软件工程概论01

一、网站系统开发需要掌握的技术

  1,首先要学会HTML,这个是网页设计的基础,做静态动态网页都要用到的语言。

  2,其次是css,这个主要用于网页设计中的表现,负责网页中的字体颜色背景整体排版方面。

  3,然后是JavaScript,这是一种脚本语言,主要负责网页中的行为定义。

  4,然后就是网站后台处理要用到的动态语言,如jsp,php,等等,对涉及到数据库的网站还要用到SQL语言,和相关的数据库技术。

  5,如果要制作更炫酷的网页还要用到flash制作。

二、课堂测试(登录界面连接数据库)

源程序代码;

  1,html文件:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登录</title>

<script>
function r()
{

    var username=document.getElementById("username");

    var pass=document.getElementById("password");
    if(username.value=="")
    {
        alert("请输入用户名");
        username.focus();
        return;
    }
    if(pass.value=="")
    {
        alert("请输入密码");
        return;
    }
return true;
}
</script>
</head>

<body>
<center>
<h1>用户登录</h1>
<br><br><br><br>
<form action="land.php" method="post">
    <table  width="350" style="border-color" height="200">
        <tr align=center>
            <td>用户名</td>
            <td><input type="text" name="username"  id="username"></td>
        </tr>
        <tr align=center>
            <td>密 码</td>
            <td><input type="password" name="password" id="password"></td>
        </tr>              
        <tr align=center>
        <td colspan="2"><input type="button" value="登 录" onclick="r();"/> <input type="reset" value="重 置"/></td>
        </tr>
                               
    </table>
</form>

</center>

</body>
</html>

  2,php文件

<?php  
//登录  
if(!isset($_POST['submit'])){  
    exit('非法访问!');  
}  
$username = htmlspecialchars($_POST['username']);  
$password = MD5($_POST['password']);
echo $username;
$conn = mysql_connect("127.0.0.1:3306","root","") or die("数据库链接错误".mysql_error());  
 mysql_select_db("schoolwork",$conn) or die("数据库访问错误".mysql_error()); 
 if($conn==flase){echo "连接失败";}
$check_query = mysql_query("select * from tuser where username='$username' and password='$password' limit 1");  
if($result = mysql_fetch_array($check_query)){  
    //登录成功   
    echo $username,' 登录成功!欢迎~';    
    exit;  
} else {  
    exit('登录失败,请重试');  
}  
  
  
mysql_close($con);
?>

运行截图:

未按时完成的原因:

  对数据库连接DW方面的技术不了解,不会弄,课后尝试了很久亦没有成功。

三,这门课的希望和自己的目标

  从课程名字上看,“概论”应该是一个比较泛化的导论性质的课程,大致的看了一下老师推荐的《构建之法》,里面也是主要讲了软件工程的思想。但我目前迫切的想要学习到一线的技术,而不是泛泛的思想。关于思想方面,我可以自己看书,自己领悟,但是目前遇到的技术性的问题会让我好几天停滞不前,一直努力的寻求解决之法。所以我自己的目标也是希望能在这们课上学到真才实学,最后能独立的开发一个网站。关于我能付出的时间:周一周二下午,周二周四的晚上我都可以用于学习这门课上。

原文地址:https://www.cnblogs.com/420Rock/p/5228572.html