1 / 14

Transforming the e-Concordiensis

Transforming the e-Concordiensis. Edward Maas Senior Capstone Design Project Advisor: Professor Cass. About the Project. Client: Concordiensis ( School Newspaper ) Website: http://concordy.union.edu Project: created a robust electronic publishing infrastructure.

vic
Download Presentation

Transforming the e-Concordiensis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Transforming the e-Concordiensis Edward Maas Senior Capstone Design Project Advisor: Professor Cass

  2. About the Project • Client: Concordiensis ( School Newspaper ) • Website: http://concordy.union.edu • Project: created a robust electronic publishing infrastructure. • Transformed From: HTML & PDF Articles

  3. Technology Used • Custom Content Management System • Open Source JAVA Tools: • Model-View-Controller for the Web • Struts (http://struts.apache.org/ ) • Object / Relational Persistence and Query Service • Hibernate (http://www.hibernate.org/ ) • Image Manipulation • Image Conversion (TIFF-to-PNG) • Tiff2png tool (http://www.libpng.org/pub/png/apps/tiff2png.html) • Image Scaling • JMagick (http://www.yeo.id.au/jmagick/)

  4. 2 2 How it works? • Request • Business Logic • Data Access (hibernate) • View • Response 5 1 4 3

  5. How Struts is Used! • Created Forms (model) • AddArticleForm, LoginForm, etc <form-bean name="LoginForm" type="org.apache.struts.validator.DynaValidatorForm"> <form-property name="username" type="java.lang.String" /> <form-property name="password" type="java.lang.String" /> </form-bean> • Wrote classes to process forms edu.union.struts.LoginForm.java: // Get Username & Password from form String username = (String)(newLoginForm.get("username")); String password = (String)(newLoginForm.get("password")); // Check to make sure they’re in the database & passwords are correct Staff authUser = (Staff)smanager.getBySignInCredentials(username, password); //On Login Success return (mapping.findForward("success")); Hibernate Call

  6. Struts Usage Continued… • Create Action Mappings (controller) • Validation & Forwards <action path="/admin/LoginForm" type="edu.union.struts.LoginForm" name="LoginForm" scope="request" validate="true" input="/Login.jsp"> <forward name="success" path="/AdminIndex.jsp" /> </action> • Failure is defined globally <global-forwards> <forward name="failure" path="/admin/Login.do" /> <forward name="login" path="/admin/Login.do" /> </global-forwards>

  7. Data Organization (relational) ER Diagram

  8. How Hibernate Works! • Define HBM • XML config, Struts uses one too! • Defines correspondence between tables and classes • Defines Keys / Relationships • Create Value Object Classes public Integer getId() { return this.Id; } public void setId(Integer Id) { this.Id = Id; }

  9. Data Organization • Sets Represent Multi-valued Relationships • Update can be made with a single action Hibernate Data Pseudo Diagram

  10. Hibernate In Action! • Create Queries (HQL) List users= session.find( "from Staff as staff where " + "staff.username = ? and staff.password = ?", new Object[] { uUsername, uPassword }, new Type[] { Hibernate.STRING, Hibernate.STRING }); • Integrate within Controller (Struts) • Staff authUser = (Staff) smanager.getBySignInCredentials(username, password);

  11. AssignPhoto Form Custom Layout Tag: StoryTag.java Struts at work – CheckImages.jsp Presentation Layer ! • JSP Templates (Green) • Struts & Standard JSP Tags for form elements (Black) • Custom Java Tags (Yellow)

  12. Putting it All Together! • Code written primarily on Linux • Revisions tracked with cvs • Build & Deployment Process: Apache Ant • Java Container: Jakarta Tomcat 5.x

  13. Next Steps & Neat Additions! • Present Finished Product to Concordy Editors for beta testing • Deploy Database and Application on VU • Performance Test under actual traffic! • Add Editing features to data in the Content Manager • Fix Access Control Lists • Create RSS Syndication Feeds • More cross browser/ machine layout & GUI

  14. Questions ?

More Related