Title: STUDENT ATTENDANCE
1STUDENT ATTENDANCE RESULT REPORTING SYSTEM
USING PERL
- Advanced Issues In Programming
- Date Created 18 October 2005
2Table of Contents
- Part 1 Project Overview
- Part 2 Language Overview
- Part 3 Language Description
- Part 4 Project Evaluation
3Project Overview
Part 1
- This section presents
- The objectives of this project
- An introduction to the system
- The System functionalities
- The programming environment
- The reason why PERL is chosen
4Project Objectives
- PERL is known as an efficient tool for
text-processing and reporting, the objectives of
this project are
- To evaluate these two well-known features of
PERL - To assess other PERL language design and features
(e.g. object-oriented, security) as compare to
other programming languages, such as C, JAVA,
ASP, VB etc.
5System Introduction
- The Student Attendance and Result Reporting
application is designed for this project to
evaluate the PERL language. - The system is developed as an add-on reporting
tool to the standard student and course
management system, for analysis and data mining
purposes. - The system emphases on the reporting features of
PERL, e.g. generating summary reports,
comparative charts. - Additionally, the system also provides upload
functions to interface with and display master
data (e.g. course details, student details)
6System Functionalities
- The Student Attendance and Result Reporting
system enables the lecturers to
- Manage student attendance timesheet and results
- Manage student assignment submissions and exam
results - Generate tabular reports (e.g. Result list)
- Generate graphical reports (line, pie, bar charts
etc) of student attendance and results for
analysis purpose.
7System Screenshots
Course Search List
Course Attendance Comparison Report
8Programming Environment
- The Student Attendance and Result Reporting
system is developed using the Open Source - LAMP
- Linux / Apache / MySQL / (PERL/ PHP / Python)
platform
- Apache as the web server
- MySQL as the database
- PERL, PHP, HTML as the scripting languages
- Windows XP as the operating systems
9Why PERL
- PERL is chosen as the development language for
this project for a number of reasons cited in
most of the PERL articles
- PERL is free
- PERL is growing and evolving
- PERL is available for almost every hardware
platform - PERL scripts can be created with any text editor
- PERL is an interpreted language
- PERL is powerful and fast
- PERL is easy to learn
- PERL supports various databases
10Language Overview
Part 2
- This section briefs
- History of PERL
- Programming Paradigm of PERL
- Application Areas of PERL
- Language Features of PERL
- Compilation / Interpretation / Execution Model
11History of PERL
- PERL is an acronym for "Practical Extraction and
Report Language" - PERL was developed by Larry Wall in 1987, in
response to a management needs for a
configuration management system. - PERL was originally developed as a data reduction
language (i.e. a language that is capable of
consuming large quantities of data efficiently),
and operated as a Shell scripts on Unix
platforms. - Since then, releases have generally come out
about once a year. Version 5.8.6 is the latest
release
12Programming Paradigm of PERL
- Perl has features that support a variety of
programming paradigms, such as procedural,
functional, and object-oriented
- Procedural ? PERL syntax patterned after C
variables, expressions, assignment statements,
brace-delimited code blocks, control structures,
and subroutines are derived from C. - Functional ? PERL can also be used in a
functional style, as it supports higher-orders
functions and abstractions. - Object-oriented ?PERL added some of the OO
supports to the language, e.g. creation of
classes, inheritance, encapsulation and
polymorphism/Dynamic Binding.
13Application Areas of PERL
- PERL is widely used in finance and
bioinformatics, where it is valued for rapid
application development, ability to handle large
data sets, and the availability of many standard
and 3rd-party modules - Large projects written in PERL include
- The Country Answer Seizure System used in MCI
WorldCom Asia Pacific headquarters to report the
incoming and outgoing calls on a real-time basis - Slashdot and early implementations of PHP and
UseModWiki, the wiki software used in Wikipedia
until 2002.
14Language Features of PERL
- PERL supports most declarations and features of
C - PERL also takes features from Shell programming
with the built-in functions for common tasks,
like sorting, and for accessing system
facilities - With its OO model, PERL enables class-based
methods, inheritance, polymorphism and
encapsulation - PERL supports rational databases (MySQL, Oracle,
MS SQL) and flat file data - PERL provides automatic memory management
dynamic typing, regular expressions, and
interpreted execution that runs on a virtual
machine - PERL creates Internet aware system, allows access
to HTTP, HTTPS, FTP, IRC Servers.
15Compilation / Interpretation / Execution Model of
PERL
- PERL is implemented as a core interpreter,
written in C. The interpreter has an
object-oriented architecture. - The execution of a PERL program divides broadly
into two phases compile-time and run-time. - At compile time, the interpreter parses the
program text into a syntax tree. - At run time, it executes the program by walking
the tree. The text is parsed only once, and the
syntax tree is subject to optimization before it
is executed, so the execution phase is relatively
efficient. Compile-time optimizations on the
syntax tree include constant folding, context
propagation, and peephole optimization.
16Language Description
Part 3
- This section explains the data types in PERL
- Scalar Data Objects
- Composite Objects
- Structured Objects
- Abstract Data Types
- Active Objects
17Scalar Data Objects
- A scalar is a variable (i.e. number, string or
reference) - All variables are marked by a leading sigil,
which identifies the data type. - Numbers are written in the usual way strings are
enclosed by quotes of various kinds.
attendance_benchmark 98 student_name
Joe" exam_pass_color blue' my graph
new GDGraphbars(300, 300) create a bar
chart
18Composite Objects
- PERL does not support pointers.
- A list is a composite data object in PERL
- A list is an ordered collection of scalars
- A list may be written by listing its elements,
separated by commas, and enclosed by parentheses
where required by operator precedence.
_at_scores (32, 45, 16, 5) _at_mark_colors
(red, blue, black) my
_at_course_attendance (Advanced Issues
Programming", Requirement Modeling",
Project Management,
Networking, 90, 98,
100, 86)
19Structured Objects
- In PERL, hashes are a good approximation of
structured data types like structs or records. - A hash, or associative array, is a map from
strings to scalars It is a variable that holds a
list. - The strings in a hash are called keys and the
scalars are called values.
package Student
make Student the default package
obj 'first' gt 'Joseph', 'last' gt Tang'
obj is a hash reference bless
obj
bless obj into Person print Student
name obj-gt'first' obj-gt'last'\n"
prints Student name Joseph Hall
20Abstract Objects
- Trying to create an Abstract Object in PERL is an
error. - PERL only allows the creation of Abstract Class
which provides a specification to create
user-defined data types and APIs or interface.
package course sub new my type
shift my args _at__ me-gtcourse_code
argscourse_code me-gtcourse_desc
argscourse_desc me-gtcourse_type
argscourse_type me-gtcourse_level
argscourse_level me-gtcourse_duration
argscourse_duration foreach my i
(qw(course_code course_desc course_type
course_level course_duration)) create
accessor
21Active Data Types
3 approaches to tackle routine tasks/processes in
PERL
- Backticks ()
- system() and exec()
- open() and parse
date/usr/bin/date to get current date
open PS, /usr/bin/ps ef while(ltPSgt)
do routine tasks, example create weekly
management report
22Project Evaluation
Part 4
- This section discusses
- Pros and Cons of PERL (Reporting features)
- Pros and Cons of PERL (other language features)
- Compare PERL to other languages
- Conclusion
23Pros and Cons of PERL(Reporting Features)
PERL uses GDGraph module to create charts.
24Pros and Cons of PERL(Other Language Features)
PERL derives features from C, Shell and
Object-Oriented model
25Compare PERL to other languages
26Conclusion
- In summary, PERL probably presents one of the
best choices for software development, especially
on the text-processing and reporting, with its
powerful language design and features
- Efficiency PERL and the add-ons packages
provides very useful functions for
data-interaction and for creating report
dynamically. - Portability PERL is platform independent.
- Maintainability Its OO model allows reusability
and maintainability. - Security Built-in security is provided "out of
the box to protect the user environment.
However, it may be a daunting challenge to
complete simple tasks with active websites,
requiring rather more learning, especially on its
installation, before starting than ASP, PHP or
JSP.