User Tools

Site Tools


magik-demo:developer:magik-project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

magik-demo:developer:magik-project [2013/05/14 20:33]
admin
magik-demo:developer:magik-project [2017/07/06 15:24]
Line 1: Line 1:
-This document describes how to manipulate with MAGIK project. \\ 
-In particular how to:  
-  * [[#Install MAGIK]] 
-    * [[#​Download|Download]] 
-    * [[#​Install|Installation]] 
-  * [[#Import MAGIK Project in Eclipse]] 
-  * [[#MAGIK Project Description]] 
-  ​ 
  
-===== Install MAGIK ===== 
-=== Requirements === 
-  * [[http://​tomcat.apache.org/​download-70.cgi|Apache Tomcat 7.0]] 
-  * [[http://​www.postgresql.org/​download/​|PostgreSQL]]. One of PostgreSQL tools to manage the database is [[http://​www.pgadmin.org/​download/​|pgAdmin]]. 
- 
-=== Steps === 
-  - Deploy WAR file to Apache Tomcat server. There are two ways to do it: 
-    - Using **Tomcat Web Application Manager** 
-      * Start Tomcat.  ​ 
-      * Open **Tomcat Web Application Manager** which usually can be accessed through ''​http://​[yourwebsiteorlocalocalhost]/​manager''​ . 
-      * Select WAR file to be uploaded, then click **Deploy**. 
-    - Manual copying 
-      * Stop Tomcat. 
-      * Delete existing deployment. If you have previously deployed "​foo.war"​ in TOMCAT_HOME/​webapps,​ then it has been unpacked into webapps/​foo/​... You must delete this directory and all its contents. On Unix, this can be done with ''​rm -r $TOMCAT_HOME/​webapps/​foo''​. 
-      * Copy WAR file to TOMCAT_HOME/​webapps/​. 
-      * Start Tomcat. 
-  - Create new designated PostgreSQL database for MAGIK web application. Detail explanation on how to create PostgreSQL database can be found [[http://​www.postgresql.org/​docs/​8.1/​static/​manage-ag-createdb.html|here]]. ​ 
-  - Run MAGIK web application,​ which can also be done in two ways: 
-    - Through **Tomcat Web Application Manager**, click the chosen application. 
-    - Through web browser, e.g.: localhost/​foo 
-  - Specify database connection for MAGIK web application. ​   
-  
-[[magik-demo:​developer:​magik-project|Back to Top]] | [[magik-demo:​start|Back to Home Page]] 
-===== Import MAGIK Project in Eclipse ===== 
- 
-=== Requirements === 
-  * ''​unibz''​ credentials with reading rights for svn ''​https://​babbage.inf.unibz.it/​repositories/​svn/​osavkovic/​MAGIK-DEMO/''​ 
-  ​ 
-=== Steps === 
-  * Download Eclipse 3.x. Choose a workspace folder (not the one using for MEGIK-DEMO SVN). 
-  * Install Eclipse plugin ''​subversion.tigris.org''​ for SVN control (see instruction http://​web.mit.edu/​6.005/​www/​fa11/​psets/​ps0/​subclipse.html) 
-  * Import MAGIK project: 
-              * ''​File>​Import>​SVN>​Check''​ out project from SVN 
-              * Create new repository location, and enter in the URL field: ''​https://​babbage.inf.unibz.it/​repositories/​svn/​osavkovic/​MAGIK-DEMO/​Implementation''​ (use your unibz credentials for the username and password). ​ 
-              * Select MAGIK folder and press Next. Again Next. And Finish. Now the Eclipse should import the project and MAGIK folder (with small database icon) appears in the package explorer. 
- 
-  * **DLV API**: 
-      * DLV systems offers DLV Wrapper to use DLV in Java Object Environment (''​http://​www.dlvsystem.com/​dlvsystem/​index.php/​DLV_WRAPPER''​). ​ 
-      * Wrapper Installation:​ 
-               * Go to ''​http://​www.dlvsystem.com/​dlvsystem/​files/​DLVwrapper-v4.2.jar''​. Add this file to your MAGIK libraries (RightClick on ''​project>​Properties>​Java Build Path>​Libraries>​Add external JARs''​). 
-               * Depending on the OS (Win, Mac, Linux) one will use different DLV executable. I committed DLV executables for major systems into  ''/​dlv''​. ​ 
-               * To test your DLV API, I created a ''​JUnit''​ class ''​TestDLVAPI'',​ which one should run to test whether ​ DLV API is installed. NOTICE: set a path variabile DLV_PATH to the absolute path of your DLV executable. (later this should be done to be independent of an OS...) 
- 
- 
-[[magik-demo:​developer:​magik-project|Back to Top]] | [[magik-demo:​start|Back to Home Page]] 
- 
- 
-===== MAGIK Project Description ===== 
-MAGIK Web application is developed using Eclipse as a Web development platform, with the type of [[http://​help.eclipse.org/​indigo/​topic/​org.eclipse.wst.webtools.doc.user/​topics/​ccwebprj.html|Dynamic Web project]]. ​ 
-To deploy MAGIK web application in the web server, one needs to [[http://​help.eclipse.org/​indigo/​index.jsp?​topic=%2Forg.eclipse.wst.webtools.doc.user%2Ftopics%2Ftwcrewar.html|export the Eclipse project as WAR file]].\\ 
-\\ 
-The structure of the project is as follows: 
-  * ''​**Web Deployment Descriptor**''​ → the standard Web application deployment descriptor (the web.xml file). 
-  * ''​**Java Resources**''​ 
-    * ''​**src**''​ → contains the project'​s Java source code for classes, beans, and servlets. When these resources are added to a Web project, they are automatically compiled and the generated files are added to the ''​WEB-INF/​classes''​ directory. 
-      * ''​[[#​it.unibz.inf.magik.additional|it.unibz.inf.magik.additional]]''​ 
-      * ''​[[#​it.unibz.inf.magik.beans|it.unibz.inf.magik.beans]]''​ 
-      * ''​[[#​it.unibz.inf.magik.core|it.unibz.inf.magik.core]]''​ 
-      * ''​[[#​it.unibz.inf.magik.db|it.unibz.inf.magik.db]]''​ 
-      * ''​[[#​it.unibz.inf.magik.exception|it.unibz.inf.magik.exception]]''​ 
-      * ''​[[#​it.unibz.inf.magik.hibernate|it.unibz.inf.magik.hibernate]]''​ 
-      * ''​[[#​it.unibz.inf.magik.test|it.unibz.inf.magik.test]]''​ 
-      * ''​[[#​it.unibz.inf.magik.web|it.unibz.inf.magik.web]]''​ 
-  * ''​**[[#​WebContent|WebContent]]**''​ → the mandatory location of all Web resources, including HTML, JSP, graphic files, and so on. 
-    * ''​**META-INF**''​ → contains the MANIFEST.MF file, which is used to map class paths for dependent JAR files that exist in other projects in the same Enterprise Application project. 
-    * ''​**css**''​ → contains cascading style sheets. 
-    * ''​**js**''​ → contains JavaScript file. 
-    * ''​**WEB-INF**''​ → contains the supporting Web resources for a Web application,​ including the web.xml file and the classes and lib directories. 
-      * ''​**/​classes**''​ → for servlets, utility classes, and the Java compiler output directory. 
-      * ''​**/​lib**''​ → contains the supporting JAR files that the Web application references. Any classes in .jar files placed in this directory will be available for the Web application. 
-        * [[http://​www.dlvsystem.com/​dlvsystem/​index.php/​DLV_WRAPPER|DLV Wrapper]] 
-        * [[http://​jdbc.postgresql.org/​|PostgreSQL JDBC Driver]] 
-        * [[http://​www.hibernate.org/​|Hibernate]] 
-  * ''​**Libraries**''​ → contains the supporting JAR files that the Web application references, including "​virtual"​ JAR files that do not physically reside in the Web project, but are associated with Java projects. This folder mirrors the content of the ''​lib''​ folder. 
-  * ''​**doc**''​ → contains all the documentation files related to the project. 
- 
-It is also possible to compile the project as standalone application to be deployed in local machine. One only needs to change one line in ''​[[magik-demo:​documentation:​code:​functionality#​index.jsp|WebContent/​index.jsp]]'':​ 
-<code java> 
-sessionSchemas.setWebApp(true);​ 
-</​code>​ 
-into 
-<code java> 
-sessionSchemas.setWebApp(false);​ 
-</​code>​ 
- 
-[[magik-demo:​developer:​magik-project|Back to Top]] | [[magik-demo:​start|Back to Home Page]] 
magik-demo/developer/magik-project.txt · Last modified: 2017/07/06 15:24 (external edit)