300 likes | 420 Views
Using J2EE, J2SE and JSE to Implement Electronic Time Clock and Employee Scheduling System. Dr. Da-Wei Zhang – Project Lead Eugene Khusid – Senior Programmer Custom Software Solutions Princeton University. Presentation Overview. Presentation Goals Presentation Outline
E N D
Using J2EE, J2SE and JSE to Implement Electronic Time Clock and Employee Scheduling System Dr. Da-Wei Zhang – Project Lead Eugene Khusid – Senior Programmer Custom Software Solutions Princeton University
Presentation Overview • Presentation Goals • Presentation Outline • What is Time Collection • What is Time Clock and Scheduling • Architecture Overview • Implementation Highlights • Challenges • Post Project Items • Conclusion
Time Collection System Overview • Time Collection • Purpose • Scope (users, departments) • Architecture Overview
Time Collection Architecture BROWSER PPL Soft SSL Weblogic 8.1 (JSP, SERVLETS, EJB) Oracle 8i APACHE (HTML, JS) DataMall Reporting LDAP
Electronic Time Clock and Scheduling • What is Electronic Time Clock • What is Scheduling • Business Need for Electronic Time Clock and Scheduling • Reasons for In-house Development
BROWSER Weblogic 8.1 (JSP, SERVLETS, EJB) Time Clock Applet Time Clock Oracle 8i SSL Scheduling APACHE (HTML, JS) Time Collection LDAP Time Clock and Scheduling Architecture
Time Clock Architecture Detailed Browser (J2SE/JSE – Applet with Java Comm. API ) JSE - Java Communication Library SSL Weblogic 8.1 (J2EE – JSP, SERVLETS, EJB) APACHE (HTML, JS) Oracle 8i
Java Communication API • Part of Java Standard Extension (JSE) • Purpose – communicate with hardware via serial (RS-232) and parallel (IEEE 1284) ports • Usage examples – communicate with modems, card readers, etc. • More information is available at: http://java.sun.com/products/javacomm/index.jsp
Architecture Modularity Time Clock • Can run on different hardware (laptops, desktops, tablet PC) • Can support different input devices such as touch screens (kiosks) • No need to change architecture if decide to replace card reader with another device (ex: biometric device)
Architecture Modularity and Integration Time Clock and Scheduling • Modules customized for Princeton’s business • Can be ported to a different application (some work will be involved) • Integrated seamlessly with existing time collection architecture and DB design
Design Highlights • Performance • Transaction Management • All roads go to Rome (two ways to punch in)
Implementation • Good coding practices • Naming Shift, TimeClockDetail, ReportServlet, etc. • Comments /**Called by the servlet, this method in turns calls the appropriate methods based * on rptDetail.reportID to compose sql appropriate for this particular report. In * essence, there are three different types of sqls: scheduling reports, time clock * reports and scheduling-time-clock combination reports. * @param rptDetail ReportDetail * @return String */ public static String getSqlByReportType(ReportDetail rptDetail) • Formatting JBuilder
Implementation • Used patterns when appropriate (MVC, Observer) • Observer pattern applied in our applet: public class TimeClockApplet extends JApplet implements Observer, Runnable{ ... new SerialPortReader spr = new SerialPortReader(); spr.addObserver(this); … public void update(Observable o, Object parameter) public class SerialPortReader extends Observable implements SerialPortEventListener … addObserver(java.util.Observer observer) … notifyObservers(employeeID);
Implementation Reporting Framework Display swipes report JSP TimeMgmtReport JSP (choose your report and filters) Display schedule report JSP ReportServlet (traffic cop) Display swiped vs. Schedule report JSP ReportContext class (build a query) ReportDetail class (build output)
Technical Challenges • Using Java Communication API to communicate with card readers, signing applets, outdated security model • 24x7 availability
Non-technical Issues • Working closely with internal customers • Explaining new technology to users • Training • Timely response to problems
Post Project Items • Documentation • Business specification document • Mixture of use case and data flow documents • Many good comments in the code • Maintenance • Simplified by documentation, and • Testing
Conclusion • Use Java libraries for special tasks such as talking to hardware • Make architecture very modular • Use patterns when it makes sense • Develop frameworks • Follow good coding practices • Think about issues such as 24x7 availability • Post project items are important
Thank you! E-mail your questions and suggestions to: Dr. Zhang dzhang@Princeton.edu Eugene Khusid ekhusid@princeton.edu