HTTPS SSH

What is SimplifyWorks?

Simplifyworks is an open source platform providing a bunch of ready made components with main focus on making your document workflow really simple. You can read more about it on the project website.

How to start using SimplifyWorks framework

Clone all needed repositories

  • SimplifyWorks parent - maven parent of all following submodules with common dependencies
    • Clone git@bitbucket.org:simplifyworks/simplifyworks-parent.git
  • SimplifyWorks core - jar module with base framework functionality (backend java and react UI components)
    • Clone git@bitbucket.org:simplifyworks/simplifyworks-core.git
  • SimplifyWorks test - for running junit tests
    • Clone git@bitbucket.org:simplifyworks/simplifyworks-test.git
  • SimplifyWorks module example - example of jar module with some business functionality
    • Clone git@bitbucket.org:simplifyworks/simplifyworks-module-example.git
  • SimplifyWorks app example - war module that links core framework and business module(s) together - final war application
    • Clone git@bitbucket.org:simplifyworks/simplifyworks-app-example.git

Install Tomcat 8 and JDK 8

  • Configure jndi datasource in tomcat (conf/context.xml):
    <Resource name="jdbc/simplify"
            auth="Container"
            type="javax.sql.DataSource"
            username="username"
            password="password"
            driverClassName="com.mysql.jdbc.Driver"
            url="jdbc:mysql://url.to.db/dbname?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true"
            maxActive="8"
            maxIdle="4"/>    
  • Add jdbc connector to tomcat

Install NodeJs

Download and install NodeJS from nodejs.org

Development using IDE (Netbeans or Eclipse)

  1. open all 5 projects in netbeans (this manual describes version 8.1)
  2. check maven version (at least 3.1 is required)
  3. switch maven profile for SimplifyWorks App Example to "devel"
  4. configure application url and port of tomcat server in application.properties (in SimplifyWorks App Example/src/main/resources/)
    • in case you want to run application with clean db schema you have to set flyway.core.baselineOnMigrate=true, flyway.appexample.baselineOnMigrate=true, flyway.moduleexample.baselineOnMigrate=true (then application will create all db tables on start, for next run you can set this properties back to false)
  5. prepare application example project and server
    • Netbeans
      • in run tab - select installed tomcat 8
      • in actions tab - for actions Clean, Build, Clean and build and Build with dependencies add maven property maven.devel=true (disables some maven tasks that are run when building production war, build is then faster)
    • Eclipse
      • create server (and server runtime) using installed tomcat 8
      • in server settings set custom location
  6. build (in this order):
    • parent
    • core
    • test
    • module example
    • application example (with selected profile = default)
  7. run npm install in
    • SimplifyWorks Core/src/main/resources/
    • SimplifyWorks Module Example/src/main/resources/
    • SimplifyWorks App Example/src/main/webapp/
  8. configure link-target.bat (or link-target.sh) in root folder of SimplifyWorks App Example - edit symlink path to bussiness module and core
    • Eclipse - also change the location in section scripts in local/package.json to something like "start": "watchify -o ../../deploy/wtpwebapps/simplifyworks-app-example/js/bundle.js -v -d main.jsx"
  9. run this batch (or sh) file and let it running (it creates symlinks and creates one bundle.js with all needed jsx packed)
  10. after running batch file you can run (or debug) web application (project Simplifyworks Application Example)
  11. bundle.js is now automatically packed in case of change in any jsx file - only refresh of page in browser is needed
  12. you have to run this batch file before running web application othervise tomcat cannot see this file