A big part of this course is integrating state-of-the-art software engineering tools into your development process. The tools listed on this page are the core recommended tools for the first assignment as well as for your projects.
Index of this page
- Java basic reference information
- IDE's including Eclipse and IntelliJ
- git (which now has its own page, here)
- Maven for building Java projects
- Unit Testing
- SparkJava lightweight pure Java web server
- Database possibilities
- TravisCI continuous build tool
- Docker for reliable, platform-independent builds in a sandbox
- Deployment options to get your app running in the real world
- Diagramming tools for UML and mocking UIs
The official Java platform for the course is the Oracle Java SE. We require Java 8 as it has several new features you will want to use. Download the SE from Oracle.
Java Documentation and Resources
- The Java Standard Edition (SE) API & Documentation home
- This is the main Oracle page for Java SE docs.
- The Java 8 API docs
- this page documents every method in every class in the core API.
- The Java Tutorial
- Oracle's on-line Java tutorial. There are trails for both basic and advanced topics.
Editors / Integrated Development Environments
If you are not using a modern editor or IDE this course can be a good opportunity to pick one of them up.
Eclipse used to be the best Java IDE but its now a bit bloated. Download link. The Simple Java Application tutorial from the Tutorials on the welcome screen is a good start point, and the built-in Help menu is useful for learning more.
If you are doing Android programming this is the required choice for you - Android Studio is an extension of IntelliJ. See the Android page for information on getting that version of IntelliJ. For non-Android use here is the Download and Tutorials and documentation.
This Github-sponsored editor is getting more popular; you need to use the command-line for building, debugging, etc. Download link.
The modern lightweight editor that Atom ripped off. Download link.
git and Github
Maven has become a standard for building Java projects - its
make for Java combined with Ruby's gems for automatic project configuration. It can build, test, run, deploy, generate documentation, and more. If you have a Java project you need to use Maven (or Gradle, a similar build tool).
- A brief introduction to Maven
- Maven Homepage for documentation, tutorials, etc.
- Maven project support is now built in to both Eclipse and IntelliJ (make sure you have a recent version), so no explicit install of Maven is necessary.
A Key to Maven is it can be used to build everything you want built, including tests, docs, deployment, etc. Since your project group shares a single Maven file you will also all be on the same versions of all libraries and plugins declared in Maven.
Here are some Maven plugins or dependencies for some of the packages and features we are recommending:
- the dependency for JUnit testing using the Surefire Maven testing plugin
- Maven JavaDoc Plugin
- The Sparkjava web server Maven dependency
- The sql2o Java database library Maven dependency
- the SQLite Maven dependency
- Deploying your website on Heroku with the Maven Heroku plugin
Java unit testing with JUnitJUnit is a unit testing framework developed for Java. While we are primarily recommending JUnit, you may also want to look at TestNG which has more features.
- Don't install it directly, use the Maven plugin described above under Maven.
- junit.org - the home page has getting started information as well as documentation.
- JUnit Test Infected -- an example of JUnit in action if you are not familiar with it.
Python unittest aka PyUnit
Python has many testing frameworks; start with unittest as it is the most commonly used one.
Ruby and Swift
Ruby and Swift have their own built-in testing frameworks; use them!
SparkJava simple web/RESTful serverThe official recommended web server for the class is SparkJava, a lightweight all-Java web server.
- It has the distinct advantage of being a Java package so it integrates very well with Java applications
- Don't install it directly, use the Maven dependency information described above under Maven.
- If you need a more fully-featured web server or want to learn more about them for the experience, Apache Tomcat is a good choice for Java.
Databases: SQLite or Postgres
Many projects make use of a database back-end.
We recommend all projects start with SQLite
- It is a very simple database good for apps with limited load and limited concurrent accesses.
- The full database is encapsulated in a single file; as such it is also handy for databases on phones.
- It has a full Java implementation.
- You don't need to install SQLite directly, you can use the Maven dependency information described above under Maven.
- It still may be handy to install the standalone app from the above homepage so you can use the
sqlite3top-loop to manually query the database.
- It also can be handy to have a tool to directly browse the data in the database - DB Browser for SQLite is a standard one.
- For projects making more extensive use of a database, we recommend Postgresql. There is no pure Java version of Postresql, you will need to download and install it.
Java Database connection: sql2o
- We recommend the
sql2olibrary for database support within Java.
- It is not a database, it is just a Java wrapper on a database. It can be used with all the common databases: MySQL, Postgresql, SQLite, etc to support performing database operations in your Java code.
- It supports a smart mapping between your database and your objects unlike the JDK's JDBC database wrapper, but is still giving you "manual" control of the database unlike fancy frameworks ("ORM's") like Hibernate.
- Don't install it directly, use the Maven dependency information described above under Maven.
- Angular.js - the most widely used of the three. The homepage points to many great tutorials, courses, and videos, and the Thinkster guide is also worth looking at. See the lecture Todo app example for some simple Angular code.
- React - Facebook's framework, its #2 and seems to be catching up to Angular.
- Ember - another very good framework, 3rd in popularity.
- We use Postman in lecture to test RESTful APIs
- To debug web apps, the Chrome dev tools or Firefox dev tools are good choices.
Continuous integration: TravisCI
Continuous integration frameworks automatically run your tests on each push to your master branch. It is a great gatekeeper to make sure your master branch is always working.
- We recommend using TravisCI as it has strong integration with GitHub
- All projects in the course jhu-oose organization at GitHub have been granted free access to the private, commercial Travis-CI.com service.
- (For public repositories after OOSE you can use travis-ci.org for free.)
- If you want to set up your own CI server, look at Jenkins
- The documentation, which includes tutorials on how to set up the Continuous Integration server for different kinds of projects.
- Travis has been enabled for all your projects and all you need to do to set is up is to push an appropriate
.travis.ymlfile to your repository - no other actions at all are needed!
- When setup is done, every time you push code to your repository, Travis is going to build your project, run your tests and do whatever more you configure it to do (e.g. run static analysis tools, report code coverage metrics).
- Go to travis-ci.com and hit the login button to login and to see the output (use your GitHub ID to log in).
- You can also set it up to get a summary via e-mail (see here) and on the Pull Request page you create on GitHub. Finally, you can add a badge (see here for details) to your project's README.
If your project is difficult for course staff to build, you may need to deploy your app in Docker so we can reliably run it. This will also help your group interact since the build environment will be guaranteed to be the same for all team members.
- The Docker homepage has most of the relevant information.
- You probably also want to use Docker Compose for easy specification of your build environment
- If you are using Spark, see this Spark in Docker tutorial
We are primarily focusing here on how you can deploy your RESTful server. There are many potential methods.
The simplest approach is to not openly deploy it, just run on a group member's computer.
- In the simple case it only allows the one person running it to play with the app, limiting testing.
- For testing multi-user apps it helps to have a public-facing server, one way to do that is use e.g. ngrok which can expose your
ooseisawesome.ngrok.ioso all team-mates can access the same server. Well it looks like they are now charging to get your custom URL so if you want that feature consider localtunnel as another alternative (note you need node.js and npm installed to run localtunnel)
Platform as a Service (PaaS)
Here you are relying on a third party to deploy and run your server.
- You give them the code for your application, and they build and run it for you.
- Note your application has to be pretty standard and fit their expectations and assumptions, otherwise it won't work. For example you can't access the file system.
- Examples include Heroku or AWS Elastic Beanstalk.
Heroku is one of the better PaaS options so we recommend it. It is free, working across many langauges/platforms, and having excellent documentation.
- The Heroku dev center documents how to deploy your app to Heroku.
- The basic idea for say a Java project is
- You push a branch from GitHub to Heroku
- The Heroku server will run mvn install on your repo
(or, it will use the analogous build tool for whatever language your project is).
- You set up a Heroku Procfile which will contain the command to fire up your server
- Your server will then be running on your assigned Heroku URL
- GitHub can also be configured to automatically push a certain branch to Heroku when it changes -- see Deploying with Git.
- An alternative to deploying from GitHub is to deploy directly from your computer; for example if you are using Java/Maven, see this Maven plugin to directly deploy from Maven.
- Its also possible to add a button to your GitHub README - Deploy to Heroku button info.
Infrastructure as a Service (IaaS)
If you need more control than PaaS, consider IaaS: this is like PaaS except you have your own (usually Linux) VM to configure however you want as you are the super-user for it.
- This requires either experience with or willingness to learn some basic Linux
- Fortunately for running back-ed software Linux is not that hard (its hard for the front-end stuff like drivers, peripherals, etc).
- Industry IaaS standards include AWS EC2, Digital Ocean and Linode.
- JHU CS also can host you: go to this page and request a VM.
Diagramming and mocking tools
Pencil and paper or whiteboard and marker work very well, but there are also useful tools for mocking UIs and for drawing UML diagrams. Feel free to use whatever, but here are some good ones to check out.
- Lucidchart (Free for students, just request upgrade) - draw any kind of diagram, along with UML it has modes for mocking Android and iOS.
- InVision, a free Web/Android/iOS prototyping and collaboration tool.
- Pixate - free Android and iOS prototyping
- Modelio, UMLet, Visual Paradigm (Community Edition), and Argo UML - some free UML diagramming apps