Thursday, September 10, 2009
Tuesday, September 8, 2009
Exercise 4: Web application server
Perl script
Here is the basic perl program that we'll use to get started.
#!/usr/bin/perl
use strict;
use LWP::Simple;
print get('http://google.com');
getprint('http://google.com');
getprint store the document's contents in a file.However, LWP::Simple also provides a function called getstore, which stores the content of a URL in a given file.
getstore('http://google.com', 'google.html');
Sometimes, mirror function only makes sense to store a document if it's been updated.
mirror('http://google.com', 'google.html');
They return the HTTP response code, which in some cases is very useful. These can be checked against constants defined by the library. For example, below we check to see if everything went well:
my $response_code = getprint('http://google.com');print "nOKn" if ($response_code == RC_OK);
Python script
def f(x, y=[]):
y.append(x)
return y
print f(23) # prints: [23]
prinf f(42) # prints: [23, 42]
The second print statement prints [23, 42] because the first call to f altered the default value of y, originally an empty list [], by appending 23 to it. If you want y to be bound to a new empty list object each time f is called with a single argument, use the following style instead:
def f(x, y=None):
if y is None:
y = [] y.append(x)
return y
print f(23) # prints: [23]
prinf f(42) # prints: [42]
Javascript
SCRIPT language="JavaScript"
function open1[]
var open1 =window.open
['http://www.domain.com','','scrollbars=yes,height=600,width=800,resizable=yes'];
function open2
var open2 =window.open['http://www.domain.com','','scrollbars=yes,height=600,width=800,resizable=yes'];
function open3[]
var open3 =window.open['http://www.domain.com','','scrollbars=yes,height=600,width=800,resizable=yes'];
/SCRIPT
(This script has been changed to appear on this blog)
This script allows user can open multiwindow
Javascript is the script runs in clients. The first step to check all client forms to correct before send to server.
Reference:
http://www.devshed.com/
http://www.pcw.co.uk/personal-computer-world/features/2246064/debug-javascript-code-free
Here is the basic perl program that we'll use to get started.
#!/usr/bin/perl
use strict;
use LWP::Simple;
print get('http://google.com');
getprint('http://google.com');
getprint store the document's contents in a file.However, LWP::Simple also provides a function called getstore, which stores the content of a URL in a given file.
getstore('http://google.com', 'google.html');
Sometimes, mirror function only makes sense to store a document if it's been updated.
mirror('http://google.com', 'google.html');
They return the HTTP response code, which in some cases is very useful. These can be checked against constants defined by the library. For example, below we check to see if everything went well:
my $response_code = getprint('http://google.com');print "nOKn" if ($response_code == RC_OK);
Python script
def f(x, y=[]):
y.append(x)
return y
print f(23) # prints: [23]
prinf f(42) # prints: [23, 42]
The second print statement prints [23, 42] because the first call to f altered the default value of y, originally an empty list [], by appending 23 to it. If you want y to be bound to a new empty list object each time f is called with a single argument, use the following style instead:
def f(x, y=None):
if y is None:
y = [] y.append(x)
return y
print f(23) # prints: [23]
prinf f(42) # prints: [42]
Javascript
SCRIPT language="JavaScript"
function open1[]
var open1 =window.open
['http://www.domain.com','','scrollbars=yes,height=600,width=800,resizable=yes'];
function open2
var open2 =window.open['http://www.domain.com','','scrollbars=yes,height=600,width=800,resizable=yes'];
function open3[]
var open3 =window.open['http://www.domain.com','','scrollbars=yes,height=600,width=800,resizable=yes'];
/SCRIPT
(This script has been changed to appear on this blog)
This script allows user can open multiwindow
Javascript is the script runs in clients. The first step to check all client forms to correct before send to server.
Reference:
http://www.devshed.com/
http://www.pcw.co.uk/personal-computer-world/features/2246064/debug-javascript-code-free
Monday, September 7, 2009
Exercise 3: Database server
Case A: Microsoft SQL server
SQL server integration services
Microsoft SQL server 2008 inherits from the base of Data Transformation Services of Microsoft SQL server 2000 and improves the performance, usability and manageability aspects of the tool. That contains the Business Intelligence Workbench and SQL server Workbench. Moreover, those services enable to extract data from the data warehourse. Analysis Services to give the better performance.
Relational and XML data support
SQL server 2008 supports both relational and XML data. The XML is available through the addition of the XML data types and allows XML fragments and document. It have many new data types such as VARCHAR(MAX), NVARCHAR(MAX), which allows to store up to 2GB of data such as text, ntext, and image data types.
SQL computer manager
This utility is accessible from the Programs menu and implemented as the Microsoft Management console snap in.
SQL profiler
The SQL profiler is enhanced with a few new features. This includes the MDX Analysis Services statements and monitoring the operation of the Data Transformation services. Grouping and recorded events by views on the basic of selected criteria. Special file types can be used to extract and store events for ease of troubleshooting.
Database tuning advisor
It integrated with SQL profiler and reduces the time to tuning. It analyzes workload and physical implementation of one or more databases.
Command line utilities
The SQLWB.EXE launches the SQL server Management studio from the command prompt.
SQLCMD.EXE
This is a new and improved version of the OSQL and ISQL programs. It helps connect to other SQL server versions and connect to server via Dedicated Administrative connections.
Features of SQL server 2008




References:
http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032368942&EventCategory=5&culture=en-US&CountryCode=US
http://www.sqlsoft.com/coursedescriptions/SQL-243.html?c=1662
SQL server integration services
Microsoft SQL server 2008 inherits from the base of Data Transformation Services of Microsoft SQL server 2000 and improves the performance, usability and manageability aspects of the tool. That contains the Business Intelligence Workbench and SQL server Workbench. Moreover, those services enable to extract data from the data warehourse. Analysis Services to give the better performance.
Relational and XML data support
SQL server 2008 supports both relational and XML data. The XML is available through the addition of the XML data types and allows XML fragments and document. It have many new data types such as VARCHAR(MAX), NVARCHAR(MAX), which allows to store up to 2GB of data such as text, ntext, and image data types.
SQL computer manager
This utility is accessible from the Programs menu and implemented as the Microsoft Management console snap in.
SQL profiler
The SQL profiler is enhanced with a few new features. This includes the MDX Analysis Services statements and monitoring the operation of the Data Transformation services. Grouping and recorded events by views on the basic of selected criteria. Special file types can be used to extract and store events for ease of troubleshooting.
Database tuning advisor
It integrated with SQL profiler and reduces the time to tuning. It analyzes workload and physical implementation of one or more databases.
Command line utilities
The SQLWB.EXE launches the SQL server Management studio from the command prompt.
SQLCMD.EXE
This is a new and improved version of the OSQL and ISQL programs. It helps connect to other SQL server versions and connect to server via Dedicated Administrative connections.
Features of SQL server 2008




References:
http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032368942&EventCategory=5&culture=en-US&CountryCode=US
http://www.sqlsoft.com/coursedescriptions/SQL-243.html?c=1662
Exercise 2: Clients, Servers, and distributed paradigms
Peer-to-Peer properties
Peer-to-Peer (P2P) system is as a significant social and technical network, that shares CPU cycles and storage space. Two advantages make this system growth in the world: firstly, this is very cheap to use and the huge storage space in the large number of computing, and the second thing is the increase network connectivity .
The first thing is difference between P2P and Client/Server architecture is the P2P network does not have Server, each entity in the P2P network is the client and server that can send and receive all requests. In the other hand, client/server architecture is difference, that is any works do at server. Server receives all requests of clients and sends results to client. Moreover, the biggest difference between P2P and client/server architecture that is the safe of data or information in the network. It is significantly to see the equal permission in the P2P architecture, while server does almost jobs and each client has a different permission to accept server.
Java Versus .NET


Both Java and .NET is the new technology which is developed by Sun and Microsoft, and they are used by almost programming developers on the world. They have some positive and negative impacts.
The first similar is the both of them are the development framework, which the Java is the JDK (Java Development Kit) framework and .NET framework. Like C++, they have supported the OOP (Object Oriented Programming). The secondly, both of them already use the Virtual Machine to compile and run the application.
However, the most different is the cost, which the Java has more development tools to support such as eclipse and Netbean. Additionally, the .NET support more other languages, while java just support on java language. Java is 'write once run anywhere', while .net support many languages so they need to debug it all platforms.
Java has support to open source platform, whereas .net is not.
References:
David Dagon, Julian B. Grizzard, and others, Peer-to-Peer Botnets: Overview and Case Study, http://www.usenix.org/event/hotbots07/tech/full_papers/grizzard/grizzard_html/#tbl:hist
Peer-to-Peer (P2P) system is as a significant social and technical network, that shares CPU cycles and storage space. Two advantages make this system growth in the world: firstly, this is very cheap to use and the huge storage space in the large number of computing, and the second thing is the increase network connectivity .
The first thing is difference between P2P and Client/Server architecture is the P2P network does not have Server, each entity in the P2P network is the client and server that can send and receive all requests. In the other hand, client/server architecture is difference, that is any works do at server. Server receives all requests of clients and sends results to client. Moreover, the biggest difference between P2P and client/server architecture that is the safe of data or information in the network. It is significantly to see the equal permission in the P2P architecture, while server does almost jobs and each client has a different permission to accept server.
Java Versus .NET


Both Java and .NET is the new technology which is developed by Sun and Microsoft, and they are used by almost programming developers on the world. They have some positive and negative impacts.
The first similar is the both of them are the development framework, which the Java is the JDK (Java Development Kit) framework and .NET framework. Like C++, they have supported the OOP (Object Oriented Programming). The secondly, both of them already use the Virtual Machine to compile and run the application.
However, the most different is the cost, which the Java has more development tools to support such as eclipse and Netbean. Additionally, the .NET support more other languages, while java just support on java language. Java is 'write once run anywhere', while .net support many languages so they need to debug it all platforms.
Java has support to open source platform, whereas .net is not.
References:
David Dagon, Julian B. Grizzard, and others, Peer-to-Peer Botnets: Overview and Case Study, http://www.usenix.org/event/hotbots07/tech/full_papers/grizzard/grizzard_html/#tbl:hist
Exercise 1: E-commerce, distributed application and the Internet

Online communication is the web tool, that allows people can share their interests and discussion in the group or individuals. Online communication sites allow their members or visitors to communicate directly, easily, and conveniently. That is very important to e-commerce, which helps providers connection with their customers or discuss the other problem immediately and easier. Today, with many high technology to provide people connect together easily and be narrow the distance such as voice IP instead of phone and webcam allow people to communicate over internet faster with the good quality.
Amazon is blazing a trail in the world of commerce where no merchant has gone before. it allows customers can sit at home or their office make the shopping without physical leaving out to the store. On the Amazon website, customers can choose items that they want to purchase and make the payment by credit card, and then those items will be post to customer's address that they want to receive. Amazon is the Business to Customers (B2C) standard of web and it is established on the website 2.0 foundation. Moreover, this is easy to use that makes user conveniently to shopping. The website is more intelligent that know the customer's want.
Amazon.com used the high technology and technique to business, and support absolutely customer's need. there opens the new business function over internet.
Sunday, September 6, 2009
Workshop 4:
In the JavaScript, almost syntaxes are like the syntax of Java, C# and are nearly like the C syntax. In some cases, this is very easy to use and many developers have used it. On the other hand, Ruby syntaxes are nearly like real language and likely Visual Basic of Microsoft. Moreover, in the ‘if’ statement of Ruby provides two ways to use, which one is like C syntax and another one is like the normal language. Sometime this makes developers confuse to use. For example,
if(x>7&&x<12) {...}
and if x.between(7,12) do ...
both two syntax are correct in Ruby. Especially, JavaScript just runs at client and Ruby runs on server, the Ruby is the application server.
The first similar between JavaScript and Ruby is the variable, there is no difference between variable types such as decimal, string or datetime. Secondly, they are Object Oriented Programming.
if(x>7&&x<12) {...}
and if x.between(7,12) do ...
both two syntax are correct in Ruby. Especially, JavaScript just runs at client and Ruby runs on server, the Ruby is the application server.
The first similar between JavaScript and Ruby is the variable, there is no difference between variable types such as decimal, string or datetime. Secondly, they are Object Oriented Programming.
Workshop 3
Create MySQL database with passenger's information of taxi driver. passenger_controller and the model to provide function to insert, edit, and delete data.
rails -u mysql taxi : to create the mysql project, which the project's name is taxi
Create controller, model, and run server.



List of passengers and their information.

Edit the information of passenger.

control the value of field.
rails -u mysql taxi : to create the mysql project, which the project's name is taxi
Create controller, model, and run server.
List of passengers and their information.
Edit the information of passenger.
control the value of field.
Workshop 2
Model View Controller
The Model View Controller(MVC) design pattern was first described in 1979 by Trygve Reenskaug while working at Xerox on Smalltalk. MVC is not a new syntax construct like an if statement or a data type like an array or int but more a way of looking at how to structure programs and divide the parts up in a logical and useful way.
Following MVC guidelines has been shown to organize applications in a way that makes them easy to manage and maintain. After working with the MVC pattern for a while you will grow to see the benefits that the division of labor produce. Rails is a strict MVC frame work.
Model
The Model is all about the data. This includes getting the data in and out of the data store. The scaffolding we set up in part one gives us the four basic operation of using a data store Create, Read, Update and Destroy.
View
The View renders the Model in an interactive displayable format that takes the data in the Model and paints it up on the screen for you to see and interact with.
Controller
The Controller responds to events communicating with the Model and the View. This is like the Main loop in a state machine waiting for events like user actions or Model data to show up and reacting as the program dictates to those events.
References:
The Model-View-Controller (MVC)
MVC stands for Model-View-Controller
The Model View Controller(MVC) design pattern was first described in 1979 by Trygve Reenskaug while working at Xerox on Smalltalk. MVC is not a new syntax construct like an if statement or a data type like an array or int but more a way of looking at how to structure programs and divide the parts up in a logical and useful way.
Following MVC guidelines has been shown to organize applications in a way that makes them easy to manage and maintain. After working with the MVC pattern for a while you will grow to see the benefits that the division of labor produce. Rails is a strict MVC frame work.
Model
The Model is all about the data. This includes getting the data in and out of the data store. The scaffolding we set up in part one gives us the four basic operation of using a data store Create, Read, Update and Destroy.
View
The View renders the Model in an interactive displayable format that takes the data in the Model and paints it up on the screen for you to see and interact with.
Controller
The Controller responds to events communicating with the Model and the View. This is like the Main loop in a state machine waiting for events like user actions or Model data to show up and reacting as the program dictates to those events.
References:
The Model-View-Controller (MVC)
MVC stands for Model-View-Controller
Subscribe to:
Posts (Atom)