This year's Jazoon conference is to take place next week in Zurich, Switzerland. Some of the presentations will given by speakers from Day. Hope to see you there:
Thomas Mueller: Testing Zen
Technical short talk, Tuesday, 2009-06-23, 16:30
Test driven development not only improves code quality, it also let's you refactor or replace legacy source code with little risk. Testing also saves time because the earlier a problem is found, the faster and easier it can be corrected.
Unfortunately writing tests is boring. There are many possible use cases that should be tested. Writing tests for every feature is a lot of work, and manually writing tests for all possible combinations is almost impossible.
However with fuzz testing (randomized testing), you don't need to write much, and still get very good results. This talk explains how a typical randomized test looks like, and how to combine it with other techniques such as unit tests, integration tests, and measuring code coverage.
Automated unit tests should run quickly. Many applications use a database, and in many cases this database is the bottleneck when running tests. This talk shows how an embedded in-memory Java database speeds up your tests, and can speed up development as well.
Thomas Mueller: Java Persistence Frameworks
Technical short talk, Wednesday, 2009-06-24, 16:00
In Java, there are many ways to access relational databases. Today, there are almost as many persistence frameworks as there are web frameworks.
Some frameworks are based on a standardized interface like JDO and JPA, some have their own API. Some just simplify using JDBC and SQL. Most frameworks need XML configuration, but not all of them. Some provide a string based query language similar to SQL, while some newer ones don't.
Todays main technologies are:
- SQL using and the JDBC API
- JPA (specially Hibernate, JPOX, OpenJPA)
- Apache iBATIS
- JDO (JPOX)
- Apache Cayenne
- Apache Commons DBUtils
We list the market share of each technology, and discuss the key differences.
Last year a whole new breed of persistence frameworks appeared: Frameworks with a fluent API and an integrated DSL (domain specific language); frameworks that don't need strings for dynamic queries. This new technology was strongly influenced by Microsoft's LINQ. Those frameworks support compile-time type-checking, auto-complete in the IDE, and protect against code injection. They better bridge the "object-relational impedance mismatch" than older frameworks, but they are not ready for prime time yet.
SQL injection is the biggest server-side security vulnerability today. SQL injection is a subset of code injection. Unfortunately, most persistence frameworks don't protect against code injection. The talk gives examples how to inject code and how to protect against it.
Michael Marth: Scalable Agile Web Development: REST meets JCR meets OSGI
Technical long talk, Thursday, 2009-06-25, 13:30
This session is a very hands-on lab that shows how a real web application is developed from scratch in a very agile fashion leveraging a heavy-weight enterprise ready back-end yet allowing for unprecedented agility in development in building rest-style web applications. Thinking of a classic j2ee stack this may sound like a contradiction.
Agility of development begins with the amount of tooling and setup we need to get started, so expect to see the entire walk-through from installation of the server software to the development of a complete application within the time constraints of the session.
(1) Web architecture, think outside the box.
(2) Meet: apache sling.
(3) Building a real-life webapp from scratch.
Michael Dürig and Michael Marth: Building RESTful Web Applications with Scala for Sling
Jazoon Cutting-Edge, Thursday, 2009-06-25, 16:00
In this session we demonstrate how to build RESTful web applications for the Sling framework using the Scala programming language.
Apache Sling is a web application framework which eases development of content centric applications. Sling is based on REST principles and uses a JCR content repository (JSR-170/JSR-283) for storage. Based on the JSR 223 specification (Scripting for the Java Platform) it integrates various scripting languages as OSGi bundles.
Scala is a scalable programming language for the JVM which is fully interoperable with Java. It is designed to express common programming patterns in a concise, elegant, and type safe way. Scala smoothly bridges the gap between object oriented and functional paradigms. Despite being strongly typed, Scala has the touch and feel of a genuine scripting language. It has the ability to infer types of expressions rather than relying on the programmer to explicitly declare them. Scala thus combines the best of the two worlds: flexible scripting and strong tool support e.g. documentation, safe refactoring and fail fast compilation. Its flexible syntax lets programmers easily define their own internal DSLs, effectively extending the language without leaving it.
In our session, we show how to take advantage of Scala to create RESTful web applications with Sling. We use its DSL capability and support for XML literals to create type safe web site templates. In contrast to conventional web site template mechanisms (e.g. JSP), we do not rely on a preprocessor but rather use pure Scala code.
- Short introduction to Apache Sling. Just enough to get everyone started.
- Short overview of Scala and its relevant features.
- Demonstration of how Scala can be used with Sling to create RESTful web applications.