Author Archives: zhengjunli

Feb-17 how to install SQL and JSP

This week, we meet up again and we have made the decisions about how to splits people into groups and start our project. There are groups in Coloring, Puzzle, Content Frames, Home Page, PhoneGap and Database. And I choice to been in the Database group, I wish to build a database in order to replace the content in the app easily to make the app will being used wildly. None of our group member have very specific experience on build such a database in a web. So we have to starting from doing a research on it.

And what I have done this week is installed both Java and mySQL on the computer. And most important thing to know about is how to make the connection between these two. So I found out a good example on the web to show such thing.

 

 

<html>
<head><title>Enter to database</title></head>
<body>
<table>
<%@ page import=”java.util.*” %>
<%@ page import=”javax.sql.*;” %>
<% 

java.sql.Connection con;
java.sql.Statement s;
java.sql.ResultSet rs;
java.sql.PreparedStatement pst;

con=null;
s=null;
pst=null;
rs=null;

// Remember to change the next line with your own environment 
String url= 
“jdbc:jtds:sqlserver://nameofyourdatabaseserver.or.ipaddress/yourdatabasename”;
String id= “username”;
String pass = “password”;
try{

Class.forName(“net.sourceforge.jtds.jdbc.Driver”);
con = java.sql.DriverManager.getConnection(url, id, pass);

}catch(ClassNotFoundException cnfex){
cnfex.printStackTrace();

}
String sql = “select top 10 * from tbl_sys_user”;
try{
s = con.createStatement();
rs = s.executeQuery(sql);
%>

<%
while( rs.next() ){
%><tr>
<td><%= rs.getString(“cust_id”) %></td>
<td><%= rs.getString(“rdate”) %></td>
<td><%= rs.getString(“email”) %></td>
</tr>
<%
}
%>

<%

}
catch(Exception e){e.printStackTrace();}
finally{
if(rs!=null) rs.close();
if(s!=null) s.close();
if(con!=null) con.close();
}

%>

</body>
</html>

 

(From: http://www.java-samples.com/showtutorial.php?tutorialid=619 )

From the blog zli1 » cs-wsu by zhengjunli and used with permission of the author. All other rights reserved by the author.

Feb-10 learning mozilla

Since this is the beginning of the project start, our class have being meet for three times. And We decided to use a web based to create the app. And we will use HTML, CSS and JAVA SCRIPT to write code on them. I was reading about a web : https://developer.mozilla.org/en-US/learn , given by the professor in general about how to install and basic function in these three area.
I have learn a couple useful things from the web:
To get start a JavaScript:
“Getting started with JavaScript is very easy. You don’t have to have complicated development programs installed. You don’t have to know how to use a shell, program Make or use a compiler. JavaScript is interpreted by your web browser. All you have to do is save your program as a text file and then open it up in your web browser. That’s it!”
To get start a HTML
” HTML files are nothing more than simple text files, so to start writing in HTML, you need nothing more than a simple text editor. “
With these simple examples on the web, this week, I am being able to create a local web page.

From the blog zli1 » cs-wsu by zhengjunli and used with permission of the author. All other rights reserved by the author.

CS 401 second week blog

On monday, it is the first meeting for our class. We meet at Worcester Art Museum. We have talk a little about what our app should look like. According to the discussion, the app should have :

home page,

history chapter,

archaeology,

materials and construction

conservation

other example

activities

-Coloring

-Puzzle

Hence, this week, I look at phonegap web and mozilla. And looking forword for more idea next week.  

From the blog zli1 » cs-wsu by zhengjunli and used with permission of the author. All other rights reserved by the author.

My first blog

Hello all,

My name is Zhengjun Li. I would prefer people call me Li.I am a senior from Worcester State. I am an international student from China. I study computer science and math.

First of all, I am so excited about this software development class. I expect to exam what I have learned from previous classes. Also, I am looking forward to have a meaningful and heuristic view of what I have  learned and what I need to know.

On the other side, this is a very challenging class for me. Since I had one week short internship in a software company, I have a basic understanding of Javascript. I did not really touch the HTML and CSS before. So getting know how to use these software and apply them into the real case project is     a big challenging, in which is all the meaning of this class, in my option.

Looking forward to a fun semester.

Li

From the blog zli1 » cs-wsu by zhengjunli and used with permission of the author. All other rights reserved by the author.