Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Tool Naming Tips Aaron Zeckoski

Slides:



Advertisements
Similar presentations
The Professional Open Source Company Tomcat in JBN Enterprise Manager A review of the features for managing Tomcat and a walk through of the configuration.
Advertisements

JSP and web applications
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Intro Sakai Auth Permissions Aaron.
RSF Programmers Café and ORM in Sakai with RSF and Hibernate Antranig Basman, CARET, University of Cambridge.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai development tips Aaron Zeckoski
OpusCollege and Spring-DM. OSGi based web applications – three strategies OSGi container embedded in another container: OSGi Bridge Server (OBS)  e.g.
Raptor Technical Details. Outline Workshop structured by Raptor workflow – Raptor Event model. – ICA log file parsing – ICA/MUA event storage – ICA event.
Hyrax Installation and Customization ESIP ‘08 Summer Meeting Best Practices in Services and Data Interoperability Dan Holloway James Gallagher.
Developing in CAS. Why? As distributed you edit CAS 3 with Eclipse and build with Maven 2 – Best Practice for Release Engineering – Difficult edit-debug.
Apache Struts Technology
XML Namespaces Each schema file associated with a URL to uniquely identify where elements come from – Like packages in Java
An Introduction to XML Based on the W3C XML Recommendations.
Servlets Enterprise Systems Programming. Servlets  Servlets: server-side Java programs that enable dynamic processing of web-based requests  Web-based.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmers’ Café Sakai NWU Workshop, South Africa Recap of Sakai Services Antranig.
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Configuring Sakai from Outside the Web Application Tony Atkins.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Data Persistence and Intro to Hibernate.
Reasonable Sakai Widgets Aaron Zeckoski Gonzalo Silverio Antranig Basman
Creative Commons Attribution- ShareAlike 2.5 License Sakai Programmer's Café Sakai Oxford Tetra ELF Workshop Sakai Persistence and Intro to Hibernate Aaron.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 9: Customize! Navigating with a Master/Detail.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmers’ Café Sakai NWU Workshop, South Africa Introduction to Sakai and Sakai.
Module - Technical Basics
The ATLAS Production System. The Architecture ATLAS Production Database Eowyn Lexor Lexor-CondorG Oracle SQL queries Dulcinea NorduGrid Panda OSGLCG The.
SelfDiagnose “who is to blame” ernest micklei, April 2007.
Troubleshooting Kinetic Request and Task You will never find a more wretched hive of scum and villainy.
Using JavaBeans and Custom Tags in JSP Lesson 3B / Slide 1 of 37 J2EE Web Components Pre-assessment Questions 1.The _____________ attribute of a JSP page.
Tomcat Spencer Uresk. Notes This is a training NOT a presentation Please ask questions This is being recorded
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
Introduction to JavaServer Pages (JSP) Slides from Dr. Mark Llewellyn.
Matrix Mapping Tool Sam Gross Internship at Virtual Technology Corporation.
CMPUT 391 – Database Management Systems Department of Computing Science University of Alberta CMPUT 391 Database Management Systems Web based Applications,
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmers’ Café Introduction to Sakai and Sakai Services Aaron Zeckoski
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Introduction to Spring Framework,
Creative Commons Attribution- ShareAlike 2.5 License Sakai Programmer's Café Sakai Oxford Tetra ELF Workshop Sakai Development Practices, Best, and otherwise.
The Simplest Possible Tool - Iteration 1 Vancouver Bootcamp Mike Osterman
Universidade Fernando Pessoa UFP Tools Development Nuno Fernandes Luís Borges Gouveia Feliz Ribeiro Gouveia.
Introduction to Web Dimitar Nenchev Ivan Nakov
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Persistence and Hibernate Aaron Zeckoski
1 Apache TomEE // JavaEE Web Profile on Tomcat Jonathan #TomEE.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Training Workshop Tata Interactive Systems Mumbai, India.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai development and app/tool tips Aaron Zeckoski
Persistence – Iteration 4 Vancouver Bootcamp Aaron Zeckoski
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Sakai code exercises Aaron Zeckoski.
Sakai WebApp Structure
Java Enterprise Edition Programming Page 1 of 9Configuring Servlets Web Application Context Name  In multiple web applications, a “context name” is used.
Persistence – Iteration 4 Vancouver Bootcamp Aaron Zeckoski
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Introduction to Reasonable Server Faces Aaron Zeckoski
Introduction – ORM, Helloworld Application
Developing with the Framework Zach A. Thomas, Texas State University
CS422 Principles of Database Systems Object-Relational Mapping (ORM) Chengyu Sun California State University, Los Angeles.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Introduction to Spring Framework.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Comparative Display Technologies.
HIBERNATE/Java Overview of technology for Hibernate by محمد حسن کاظمی پوران Master : M.M.Nematollahi.
Creative Commons Attribution- ShareAlike 2.5 License Sakai Programmer's Café Sakai Oxford Tetra ELF Workshop Comparative Display Technologies in Sakai.
Deploying Web Application
External Web Services Quick Start Guide
Persistence – Iteration 4 Vancouver Bootcamp
Sakai Persistence and Intro to Hibernate
Aaron Zeckoski Sakai Tool Naming Tips Aaron Zeckoski
Sakai WebApp Structure
Introduction to Sakai and Sakai Services
Aaron Zeckoski Tomcat Debugging Aaron Zeckoski
Understanding and Designing with EJB
Enterprise Java Beans.
CS4961 Software Design Laboratory Understand Aquila Backend
Directories and DDs 25-Apr-19.
WebSphere & EJB’s Experiences, Deployment & Best Practices
Directories and DDs 21-Jul-19.
Directories and DDs 14-Sep-19.
Presentation transcript:

Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Tool Naming Tips Aaron Zeckoski

2 Sakai tool environment Many tools exist in a typical Sakai installation –As a developer, you have to be careful when working in a large scale environment The primary issue is with naming collisions –Some names must be unique in the Sakai instance (not used by any other installed tools) Tools have many interconnections and use a custom request cycle so some programming practices must be followed

3 Namespace collisions Most namespace collisions will cause an error to occur on tomcat startup Typically you will see that part of the spring tree died and therefore all spring beans are destroyed Sometimes Sakai will still load but the offending tool will not Tip: Watch tomcat logs when starting up new tools URL:

4 Sakai tool xml file naming The tool id (e.g. sakai.tasklist) in the tool xml file must be unique –Typical id is sakai.toolname –Tool xml file located in tool/src/webapp/tools/ Typical filename is sakai.toolname.xml <tool id="sakai.tasklist" title="Programmer's Cafe - Task List" description="Programmer's Cafe - Task List">

5 Sakai project.xml naming The id (e.g. sakai-tasklist-tool) in each project.xml file must be unique –Typical id is sakai-toolname-location –Maven project.xml files are located throughout a typical Sakai app 3../../master/project.xml Programmer's Cafe - Task List sakaiproject sakai-tasklist-tool ${sakai.version}...

6 Spring bean naming The id ( e.g. org.sakaiproject.logic.CrudPlusLogic ) of each bean in components.xml must be unique –Convention for the id is to use the fully qualified classpath of the interface for the class –component.xml must be located in impl/pack/src/webapp/WEB-INF/ <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" " <bean id="org.sakaiproject.crudplus.logic.CrudPlusLogic" class="org.sakaiproject.crudplus.logic.impl.CrudPlusLogicImpl" init-method="init">

7 Database table naming Database table names have to be unique since Sakai shares a common schema (or database) Convention is to prefix the table name with the tool name (e.g. TOOLNAME_TABLE) –Good names: SAM_ANSWER, EVAL_ANSWER, GB_GRADES –Bad names: ANSWER, GRADE, CONFIG

8 Hibernate HBM files All Hibernate HBM files have to have unique names since Sakai uses one common Hibernate SessionFactory Convention is to prefix the hbm filename with the tool name (e.g. ToolnameItem.hbm.xml) –Good names: EvalAnswer.hbm.xml, TasklistTask.hbm.xml –Bad names: Answer.hbm.xml, Task.hbm.xml, Item.hbm.xml

9 Hibernate Persistent Classnames All Hibernate persistent classes must have unique classnames (this does not include the fully qualified classpath) Convention is to prefix the class name with the tool name (e.g. ToolnameItem.java) –Good: EvalAnswer.java, TasklistTask.java –Bad: Answer.java, Task.java

10 web.xml servlet name The servlet-name in the web.xml file must match the tool id from the tool xml file –web.xml is located in tool/src/webapp/WEB-INF –If this does not match you will get an uninformative NPE (Null Pointer Exception) in the tomcat log and the tool will fail to load sakai.tasklist org.sakaiproject.tool.tasklist.TasklistTool 1

11 Questions?