1 / 34

Set up a Luminis Development Environment

Set up a Luminis Development Environment. David Wolowicz Luminis, LUM01 Tuesday Oct 03 2006 2:15-3:00. Session Rules of Etiquette. Please turn cell phones/pagers off or switch to vibrate mode If you must leave the session early, please do so as discreetly as possible

ismail
Download Presentation

Set up a Luminis Development Environment

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. Set up a Luminis Development Environment David Wolowicz Luminis, LUM01 Tuesday Oct 03 2006 2:15-3:00

  2. Session Rules of Etiquette • Please turn cell phones/pagers off or switch to vibrate mode • If you must leave the session early, please do so as discreetly as possible • Please avoid side conversations during the presentation. Thank you

  3. Outline • Introduction • What is a channel? • Eclipse introduction • uPortal Quick-start • Setting up Eclipse for Channel Development • Compiling and deploying Channels • Subversion (SVN) • Unit testing in Eclipse • How UVic is using Eclipse • Questions

  4. Outline • Introduction • What is a channel? • Eclipse introduction • uPortal Quick-start • Setting up Eclipse for Channel Development • Compiling and deploying Channels • Subversion (SVN) • Unit testing in Eclipse • How UVic is using Eclipse • Questions

  5. What is a Channel? Channels are: • Pluggable user interface components • HTML/XHTML/WML/XML snippets • Portlets* • Java code based on the iChannel framework • The interpretation of data into a small user interface component

  6. What is a Channel? For the developer: • All channels displayed in Luminis are made extending the iChannel framework in Java • Channels are compiled using Java 1.3 • Compiled channel files can be stored in a Java Archive (jar) that is named as a “Channel Archive (car)” file • The channel creates XML that is parsed with the corresponding XSLT template

  7. Outline • Introduction • What is a channel? • Eclipse introduction • uPortal Quick-start • Setting up Eclipse for Channel Development • Compiling and deploying Channels • Subversion (SVN) • Unit testing in Eclipse • How UVic is using Eclipse • Questions

  8. Eclipse Introduction Eclipse is a free software / open source platform-independent software framework for delivering what the project calls "rich-client applications", as opposed to "thin client" browser-based applications. So far this framework has typically been used to develop IDEs (Integrated Development Environments), such as the Java IDE called Java Development Toolkit (JDT) and compiler that comes as part of Eclipse (and which are also used to develop Eclipse itself). However, it can be used for other types of client application as well.

  9. Eclipse Introduction Eclipse has plug-ins for: • Compiling and source editing (Java, PHP, C++, CSS…) • Collaborating (CVS, SVN, FTP, WebDav…) • Unit testing • Creating visual interfaces • Administrating databases • Modeling and code generation • Business intelligence and reporting • Debugging • And many, many more (Search for “Eclipse Plug-ins”)

  10. Eclipse Introduction Demonstration of Eclipse.

  11. Outline • Introduction • What is a channel? • Eclipse introduction • uPortal Quick-start • Setting up Eclipse for Channel Development • Compiling and deploying Channels • Subversion (SVN) • Unit testing in Eclipse • How UVic is using Eclipse • Questions

  12. uPortal Quick-start The easiest way to start developing channels is by using the uPortal Quick-start Package • Download uPortal 2.1.5 Quick-start from • Install as per instructions • You require: • JDK 1.3 or higher. • JDK must include tools.jar. • JAVA_HOME environment variable must be set. • Nothing else should be running on port 8080 and 8887. • Path to uPortal_2-1-5-quick-start folder should not contain spaces.

  13. uPortal Quick-start You will be using (n) copies of the JDK and JRE and we will use Eclipse to run application in each environment. Set your JAVA_HOME variable to the most resent version. JRE 5 (JAVA_HOME) JDK 1.3 JDK 1.4 Eclipse Some other Java App Tomcat uPortal 2.1.5

  14. uPortal Quick-start In Eclipse: • Install the Sysdeo Tomcat Plug-in (http://www.sysdeo.com/eclipse/tomcatplugin) • Go into the Eclipse preferences (Window->Preferences) and add all of the JREs that you would like to use (Java->Installed JREs). • Create a new Java project and point it at your uPortal Quick-start directory • Under the Eclipse Preferences set the Tomcat plug-in to use JRE 1.3 and point the plug-in at your Tomcat Home • In the Eclipse Preferences set the Ant to use the JDK 1.3.1 tools.jar file (I believe you can do this on a per target basis too) • Drag your Build.xml to the Ant view. You should now be able to start HSQL from the Ant targets provided and start Tomcat from the Sysdeo plug-in buttons

  15. Outline • Introduction • What is a channel? • Eclipse introduction • uPortal Quick-start • Setting up Eclipse for Channel Development • Compiling and deploying Channels • Subversion (SVN) • Unit testing in Eclipse • How UVic is using Eclipse • Questions

  16. Setup Channel Development I have created a small zip file with the directory structure and build.xml file for compiling and deploying the Car files • Download and Un-zip the starter pack • Create a Java project in Eclipse that points to the Un-zipped source code • Make sure the source folders are correct and set the location for where you want automatic compilation to output to. • Add the uPortal Quickstart Project to the new project • You will need to add the jar files from the uPortal Library to the project. You can do this a number of ways. I include a custom user Library.

  17. Setup Channel Development To Create a custom library from a project: • Go to the Project properties and the Libraries tab of the Java Build Path Section • Select “Add Library” then “User Library” • Select “User Libraries…” then “New…” • Enter a name and press OK. • Select the new Libray and press “Add Jars” • For uPortal go to the “lib” folder and select all of the .jar and .zip files • You now have a re-usable library for use in projects

  18. Setup Channel Development To Create a custom library from a project: • Go to the Project properties and the Libraries tab of the Java Build Path Section • Select “Add Library” then “User Library” • Select “User Libraries…” then “New…” • Enter a name and press OK. • Select the new Libray and press “Add Jars” • For uPortal go to the “lib” folder and select all of the .jar and .zip files • You now have a re-usable library for use in projects

  19. Outline • Introduction • What is a channel? • Eclipse introduction • uPortal Quick-start • Setting up Eclipse for Channel Development • Compiling and deploying Channels • Subversion (SVN) • Unit testing in Eclipse • How UVic is using Eclipse • Questions

  20. Setup Channel Development You should now have a Channel Project with no errors in the source code. You can now drag and drop the build.xml files into the “Ant View” or run it by right clicking on it. We now need to setup the build parameters for Ant.

  21. Setup Channel Development Included in the Project is the folder “buildsettings”. Build settings can have (n) folders. Each folder is for a publishing configuration. Here are the files that you need to change: • /buildsettings/chandev.properties • Change the directory to the root of your project folder • /buildsettings/Dev/chandev.properties • This file is the publishing configuration for the “Dev” environment • Set build.car.dir to the directory you want the car file to go to • /buildsettings/Dev/replacements.properties • This file replaces certain strings in the source code and related files (xslt, xml, properties…) • The first string is the string that will be replaced, the second sting is the replacement. ie: String.to.Replace=theReplacementString

  22. Setup Channel Development You should now have a channel development environment for creating basic channels. If you want to create channels that are only compatible with Luminis you should Copy the Luminis Web-0Inf folder to your local machine, create a library, and include it in your channel development project. Including the uPortal source code in your project like we have will allow Eclipse to provide the included Javadoc information from the uPortal source code.

  23. Outline • Introduction • What is a channel? • Eclipse introduction • uPortal Quick-start • Setting up Eclipse for Channel Development • Compiling and deploying Channels • Subversion (SVN) • Unit testing in Eclipse • How UVic is using Eclipse • Questions

  24. Subversion Subversion is an open source application used for revision control. It is sometimes abbreviated to svn in reference to the name of its command line interface. Subversion is designed specifically to be a modern replacement for CVS and shares a number of the same key developers.

  25. Subversion There are a number of Subversion Clients, I recommend: • Tortoise SVN • Free Windows Client • Windows explorer integration • Can create repositories (I don’t know much about this) • Subclipse • Eclipse plug-in • Free client

  26. Subversion Demonstration of Subversion

  27. Subversion Things to remember using subversion with Eclipse: • Add the .project and .settings to the SVN ignore properties. You might also want to exclude your bin directory if its in your shared directory. • It’s nice to be able to recreate your project from the repository. While the project settings will not all be there, you can create projects from browsing the SVN (Checkout as Project)

  28. Outline • Introduction • What is a channel? • Eclipse introduction • uPortal Quick-start • Setting up Eclipse for Channel Development • Compiling and deploying Channels • Subversion (SVN) • Unit testing in Eclipse • How UVic is using Eclipse • Questions

  29. Unit Testing Eclipse has a JUnit built in. The project that was provided has a sample Unit test in it. You will need junit.jar to the project. Eclipse will notify you of this In the provided project the Unit tests are kept in a separate “source” directory. You can keep yours anywhere.

  30. Unit Testing I have not figured out a method of emulating the RuntimeData and static data required to test a channel; but, you can still test all of your public methods, and any additional classes that you write. To Run the included test: • Make sure that any compilation errors are resolved • Right click on the file, Select Run As-> Junit Test This will bring up the results in the JUnit View Eclipse has many magical ways of going from test to code, code to test and do some automatic code generation things.

  31. Outline • Introduction • What is a channel? • Eclipse introduction • uPortal Quick-start • Setting up Eclipse for Channel Development • Compiling and deploying Channels • Subversion (SVN) • Unit testing in Eclipse • How UVic is using Eclipse • Questions

  32. The UVic Environment • SVN is used to distribute Production code changes • Eclipse is used to do versioning, Java, XML, XSLT and JSP development and operations. • Request Tracker and SVN are used to track bugs, ticket requests and associate changes to them. • Luminis server drive shares are published to directly from Eclipse • iPlanet web based server administrator is used to restart the server and clear any JSP cache

  33. Outline • Introduction • What is a channel? • Eclipse introduction • uPortal Quick-start • Setting up Eclipse for Channel Development • Compiling and deploying Channels • Subversion (SVN) • Unit testing in Eclipse • How UVic is using Eclipse • Questions

  34. Questions? Dave Wolowicz Sr. Web Developer University of Victoria wolowicz@uvic.ca 250-721-6117 Please complete the session evaluation. Thank You

More Related