Tigerfarm Tigerfarm

Computers, Localization, Travel, Southeast Asia, Sun Microsystems, Writing
« Previous page | Main | Next page »

Open Source Course Content: Web 2.0 | Frameworks | Solaris
Sunday Nov 11, 2007

Download YouTube Videos and Replay the Videos From Disk

To many times I have seen my favorite graphic or media files disappear from the Internet. Following is instructions to save your favorite YouTube videos to your hard drive.

Steps:
1. Download a special player, an FLV player from http://applian.com/flvplayer/. Install it. Note, I first checked it for viruses, and there were none.
2. Download your videos. I used the site http://www.youtubecatcher.com/.
2.1 First, I went to YouTube.com to get the URL for for the video I wanted to download.
Example: http://youtube.com/watch?v=uswYdQqHC6s
2.2 Second, copy the URL into YouTubeCatcher, and click Download. Save the file to disk, and give it a file name with the extension .flv, example, jeepney.flv.
3. Play the video file you saved to disk using the FLV Player.

Friday Oct 26, 2007

Solaris Associate Seminar Course

This course is for developers and administrators new to the Solaris operating system, or those investigating it's more advanced features. The first day is an introduction to the desktop and applications that come bundled with Solaris Developer Express distribution. Day 2 is an introduction to the Solaris environment and resources. Day 2 includes UNIX commands which some are different from other flavors of UNIX such as Linux. Day 3 is advanced topics of interest to people experienced with UNIX.

Full Course Description:
Day1: Introduction the Solaris Desktop and Applications * ready for students
Day2: Introduction to the Solaris Environment * in development
Day3: Advanced Solaris Features * ready for students

Online catalog: None at this time
Solaris Certification: Sun Certified System Administrator (SCSA), Sun Certified Network Administrator (SCNA), and Sun Certified Security Administrator (SCSECA)
Download the slides and demo source code from the open source project on Java.Net: Tigerfarm.


Modules for Day 1: Introduction the Solaris Desktop and Applications * ready for students
0. Course Introduction
PDF
Slides OpenOffice document
* About this course
Download Slides: PDF or OpenOffice document
Module 1 - Getting Started with the Solaris Desktop and the Firefox Internet Browser
Module 2 - Configuring Desktop Preferences
Module 3 - Applications
Module 4 - Administration
Module 5 - System Tools
Module 6 - StarOffice
Module 7 - Multimedia
Module 8 - Play Games on Solaris

FilenameDayDescription
SolarisDay1usr-StudentFiles.zip 2megsDay 1: UserStudent Workbook to do the labs.
SolarisDay1usr-StudentFiles.zip 15megsDay 1: UserSample user files for the labs

Modules for Day 2: Introduction to the Solaris Environment * in development
0. Course Introduction
PDF
Slides OpenOffice document
* About this course
1. Solaris Environment Introduction
PDF
Slides OpenOffice document
* An Introduction to Computer and the Operating Environment
* Solaris UNIX Commands
* Basic UNIX to able to use the computer
* Working with the Solaris package system: Install, configure, use, and monitoring a VNC server
2. OpenSolaris
PDF
Slides OpenOffice document
* Introduction: Gain an insight into OpenSolaris Technology.
* See how you can participate in the OpenSolaris community.
* Get ideas for OpenSolaris projects
3. Working with Environment Resources
PDF
Slides OpenOffice document
* An Introduction to performance
* CPU, Memory, I/O

FilenameDayDescription
SolarisDay2env-StudentWorkbook.pdf 0.2megsDay 2: EnvironmentStudent Workbook to do labs.

Modules for Day 3: Advanced Solaris Features * ready for students
0. Course Introduction
PDF
Slides OpenOffice document
* About this course
1. DTrace
PDF
Slides OpenOffice document
* Introduction to DTrace Concepts
* Overview of D-Language
* Aggregation
* Variables
* DTrace providers
* DTrace Visualization
2. Using ZFS on Solaris
PDF
Slides OpenOffice document
* Introduction to ZFS Concepts
* Data integrity model
* ZFS pooled storage
* Self healing data
* Configuring, Saving, restoring, and Cloning
3. Zones and Containers
PDF
Slides OpenOffice document
* Introduction to Zone Concepts
* Concepts and architectures
* Sun's Virtualization Spectrum
DTrace Reference slide - extra material
PDF
Slides OpenOffice document
* DTrace for programmers: Java, C, C++, PHP, JavaScript
* DTrace for database developers
* Providers, other advanced topics

Tuesday Oct 16, 2007

New Java EE Frameworks Seminar Course

This course is an overview of web site frameworks to develop Java web applications. The slides introduce concepts, and the labs re-enforce the concepts through sample demonstrations. The instructor walks through a sample application for each web site development approach: JSP and servlets, using tag libraries, Apache Struts, and JavaServer Faces (JSF).
Full Course Description: Frameworks: Developing Web Applications using Apache Struts, and JavaServer Faces
Online catalog: SEM-DTJ-3314
Download the slides and demo source code from the open source project on Java.Net: Tigerfarm.

FilenameModuleDescription
Projects-menuSetup.zip 0.5megsSetupSetup Instructions and plugins. Click here for HTML version of the instructions.
Projects-frameworks.zip 0.5megsFrameworksJSP/Tags/Struts/JSF Framework NetBeans Project files

Past Course Teachings:

Modules:

0. Course Introduction
PDF
Slides OpenOffice document
* About this course
1. Servlet and JSP Basics
PDF
Slides OpenOffice document
* Components of Java EE and the Application Server
* Define Java Servlets, Java Servlet Pages, and the Java Web Container
* Describe benefits and concerns of threads
* Define and test data persistence using a Bean
2. Servlets and JSP Application Programming
PDF
Slides OpenOffice document
* Introduce the Model View Controller (MVC) Application Design
* Servlets and Java Server Pages in an MVC Application
* Demostrate in the context of web application form processing life cycle using Servlets and JSP
3. Using Tag Libraries to Enhance the Servlets and JSP Application
PDF
Slides OpenOffice document
* Tags in the MVC Model
* Application Form Tags for JSP: useBean Tag, if tag, and foreach tag
* Expression Language
* Demonostrate sample improvements to the Servlets and JSP application
4. Apache Struts Framework
PDF
Slides OpenOffice document
* Describe the Struts framework
* Explain the Struts in the context of web application form processing life cycle
* Sample application is presented to highlight the structure of a Struts application
5. The JavaServer Faces Form Process
PDF
Slides OpenOffice document
* Describe JavaServer Faces technology and key concepts
* Explain the JavaServer Faces components processing life cycle
* Describe the structure of a JavaServer Faces application
* Sample applications are presented to highlight the JavaServer Faces components processing life cycle
6. Web Site Localization Using JavaServer Faces
PDF
Slides OpenOffice document
* The structure and requirements to localize a web site.
* How to add languages to a web application

Friday Aug 31, 2007

One Day Web 2.0 Seminar Course

This course is a programmers approach to Web 2.0. The slides introduce concepts, and the labs re-enforce the concepts through sample demonstrations.
Full Course Description: Web 2.0: Exploring Ajax, the Dojo Toolkit and jMaki to Develop Modern Web Site Interactivity
Online catalog: SEM-DTJ-3108
Download the slides and demo source code from the open source project on Java.Net: Tigerfarm.

FilenameModuleDescription
sem-dtj3108-labSetup.htmlSetup Web 2.0 course setup instructions
SetupEnvironment.htmlSetup Instructions to setup a development environment: NetBeans, Sun Java Application Server (GlassFish), and JavaDB
Ajax.zip 2megsAjaxAjax , CSS, and JavaScript NetBeans files. Includes a sample using JavaDB.
Dojo.zip 9megsDojo ToolkitDojo NetBeans files
jmaki.zip 10megsjMakijMaki NetBeans files

Past Teaches:

Click here for the previous web 2.0 course materials: samples and slides.

Modules:

0. Course Introduction
PDF
Slides OpenOffice document
* About this course
* About the labs
1. Using Ajax
PDF
Slides OpenOffice document
* Showing how Ajax works
* The XMLHttpRequest object, get and post
* DOM, Document objects, setting attributes
* Cascading Style Sheets (CSS)
2. CSS and Web Standards
PDF
Slides OpenOffice document
* Introduction to Web Page Standards
* Cascading Style Sheets (CSS) fundamentals
* Web page formating and layout using CSS
3. The Power of JavaScript
PDF
Slides OpenOffice document
* JavaScript event handling
* Moving graphics
* Dragging graphics
* Building an application with Google Map features
4. Web 2.0 Application Features
PDF
Slides OpenOffice document
* Internet transition to Web 2.0
* Web 2.0 application features
* Starting a Web 2.0 application within your company
5. Using the Dojo Toolkit
PDF
Slides OpenOffice document
* Introducing the Dojo Toolkit
* Creating a Dojo Toolkit web application
* Using the Dojo Toolkit to make an Ajax call
6. jMaki, a Web Application Framework for Rapid Development
PDF
Slides OpenOffice document
* Introducing jMaki
* Getting Familiar with the Features of jMaki
* Building applications with jMaki
* Using jMaki Glue

Saturday Jul 07, 2007

NetBean Project Distribution

This blog describes packaging a NetBeans project for others to download, install, edit, and run from their NetBeans IDE. To prepare a NetBeans project for distribution:
* Copy to the project directory to a work directory.
* Delete the directories: build, dist, nbproject/private, and any directory not used, example the test directory.
* Zip the directory up.
Now anyone with NetBeans, can:
* Download the project zip file.
* Unzip the file into a directory.
* Open the project, edit it, and run it.

Note, if you are distributing a project that requires a NetBeans plugin, example the jMaki plugin, include the same version of the plugin into the zip file.
Example package directory:

.../jMakiProject1
.../jMakiProject1/nbproject
.../jMakiProject1/src
.../jMakiProject1/web
.../jMakiProject1/0-setup
.../jMakiProject1/0-setup/readme.txt
.../jMakiProject1/0-setup/org-netbeans-modules-sun-jmaki.nbm

The goal is a complete set of files and instructions for the user to have a successful experience.
Click here to see a complete sample of mine.

Thursday Jul 05, 2007

Ajax Call Updated

Ajax is when:
A web browser event causes a JavaScript program to make a call to the server.
The server returns a response, and the JavaScript program handle the response, for example, by posting the response onto the browser.

In my Web 2.0 course, I updated the Ajax call because a student, Charles Phillips, in Washington, DC, USA, pointed that I need to handle Microsoft's newest browser, I.E.7. Thank you Charles.

Following is a description of Ajax demonstration code, a JavaScript program, an HTML file, and a server side JSP.
Click here, to download the complete files. If you are using NetBeans, unzip the file, and open and run in NetBeans 5.5 or higher.

Below is the updated JavaScript Ajax call.

var http = createRequestObject();
function createRequestObject() {
    var theRequestObject;
    if (window.XMLHttpRequest) { // Firefox, others...
        theRequestObject = new XMLHttpRequest();
    } else if (window.ActiveXObject) { // IE
        try {
            theRequestObject = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                theRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
        }
    }
    if (!theRequestObject) {
        alert('Error: the Request Object is not created.');
        return false;
    }
    return theRequestObject;
}

Below is the JavaScript code which uses the above Ajax object, http.
1. A URL is set in the object, http, using http.open.
2. The function processResponse() is set in the object, http, to process the response from the server, using http.onreadystatechange.
3. An http call is made to the server by the Ajax object, http, using http.send.

The function processResponse() is called when there is a state change in the Ajax call. The first state handled, (http.readyState == 1), is the state where the web browser is waiting for a response from the server. When there is a response, http.readyState == 4, this code handles the HTTP responses 404, 500, and 200, which are the most common responses.

function validateUserId() {
    document.getElementById('msgCall-1').innerHTML = 
       'Called: validateUserId: ' + document.getElementById('userId').value;
    // sample: http://localhost:8080/AjaxValidate1/validateData.jsp?userId=duke
    http.open('get', 'validateData.jsp?userId='+ document.getElementById('userId').value);
    http.onreadystatechange = processResponse;
    http.send(null);
}
function processResponse() {
    var count = 0;
    if(http.readyState == 1) {
        document.getElementById('msgCall-2').innerHTML = 'Waiting for response...';
    }
    if(http.readyState == 4) {
        if (http.status == 404) {
            document.getElementById('msgCall-2').innerHTML = 
                 '*** Error, URL:' + http.statusText + ' ***';
        }
        else if (http.status == 500) {
            document.getElementById('msgCall-2').innerHTML = 
                 '*** Error 500, statusText:' + http.statusText + ' ***';
        }
        else if (http.status == 200) {
            document.getElementById('msgCall-2').innerHTML = 
                 'Ajax response: '+http.responseText;
        }
    }
}

Below is the HTML code. The event to trigger the Ajax call, is the button Make Ajax Call.

<html>
    <head>
        <title>Ajax:Validate</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script src=ajaxCall.js></script>
    </head>
    <body>
        <h1>Ajax call to Validate a User ID</h1>
        User ID: <input type="text" id="userId" value="Duke">
        <br><button onclick="Javascript:showUserId();">
                 Show User ID</button>
        <br><button onclick="Javascript:validateUserId();">
                 Make Ajax Call</button>
        <p>
        <div id=msgCall-1 style="font-size: 25px;">Debug message 1.</div>
        <div id=msgCall-2 style="font-size: 25px;">Debug message 2.</div>
    </body>
</html>

Below is the JSP code to handle the Ajax call.

<%
    ServletContext app = getServletContext();
    RequestDispatcher disp;
    if ( (request.getParameter("userId")==null || 
          request.getParameter("userId")=="" ) )
    {
        out.print("invalid: Requires userid." );
        return;
    }
    if ( request.getParameter("userId").compareTo("Duke")==0 )
    {
        out.print("Invalid" );
        return;
    }
    out.print("valid" );
%>