1. Apache James:
The Java Apache Mail Enterprise Server
Hupa:
The James WebMail client
Manuel Carrasco Moñino
manolo@apache.org
@dodotis
2. About me
● Apache James
● HUPA
● GWT:
● Gquery & Gquery-plugins
● GwtExporter
● GwtUpload
● Chronoscope
● Jenkins
● Performance plugin
● Emma plugin
● Linux
● LXP a light and visual window manager based on icewm
3. Contents
●
Introduction to the James Project
– Components
– What is new in the release 3.0-beta3
●
Hupa
– Architecture
– What is GWT, MVP, How to Test
– Hupa Status
– Hupa Roadmap
●
Becoming an open-source contributor.
4. What is James?
“The Apache James Project delivers a rich set of
open source modules and libraries, written in
Java, related to Internet mail communication
which build into an advanced enterprise mail
server”.
5. Server Components
●
Server is the main project in James and
delivers a full featured modular mail-server
composed by:
– SMTP, LMTP
– POP3
– IMAP4 (James-v3)
– NNTP (James-v2)
– Queue/Spool
– Mail Storage
– FetchMail
6. Projects
James is divided in projects, so as they can be used in other products easily:
● Server: Enterprise mail server, it depends on other modules to be built.
● Protocols: framework for mail protocols implementations (smtp, lmtp).
● IMAP: flexible codec for IMAP and command processors .
● MailBox: a library providing a flexible Mailbox storage accessible by mail protocols
(Imap, pop, smtp), supports maildir, openjpa, hbase, jackrabbit.
● Mime4J: parser for mime messages like javax.mail but more tolerant.
● Mailets: email processing engine, it defines and implements a Mailet-API.
● JSieve [*]: Java Framework implementation of the Sieve mail filtering language.
● JSPF [*]: Java Sender Policy Framework implementation.
● JDKIM [*]: Java Framework Implementation for DomainsKeys identification Mail.
● MPT: Mail Protocol Tester (testing of ASCII based line protocols).
● PostAge: application for generating mail traffic on mail servers.
● HUPA: Hupa is an IMAP-based RIA Webmail written in GWT.
[*] These frameworks provide mailet implementations to make easier to integrate with James Server
7. Advantages of using James
● Pure java implementation.
● Performance in mind.
● Test based developing: TDD
● Open-Source components.
● Easy to Build (maven).
● Easy to Install in any platform.
● Easy to Use, Manage, and Integrate (APIs).
● Easy email processing: Mailets and Matchers
● Active developing and mailing lists.
8. Whats new in James-3beta
● Imap
● Mailboxes (maildir, hbase, openjpa, jcr)
● More ddbb are supported (ie: Oracle)
● Better logging
● JMX management
● Performance (Sockets, storage, etc)
● NIO support (Using Netty)
● Easy writing SMTP extensions, filters, etc.
● NNTP not supported any more, it is left in v2 because
it is not widely used.
10. Hupa Architecture
Pure JavaScript
Pure Java
Any server (James, Gmail ...)
11. What is GWT
Java to Javascript Compiler and Optimizer
It is a full SDK. Not a Js Framework
Not a Js Library
12. Why a compiler? And why Java?
● A high level language allows that the developer doesn't get lost with
low level details (DOM, Ajax, Cross domain, Compression, Obfuscation,
Dependencies ...)
● Java syntax is closed to JS, so in theory the Java to Js compiler was
easier to develop
● Huge Java ecosystem: IDE, re-factoring, Debug, Code reuse, Maven,
TDD, CI …
● Patterns, MVP, RPC, Pojos …
● Type checking, reduce errors.
● Separate code maintenance from the effectiveness of the executable.
● Normally the compiler would produce better js code that the code we
could write by hand (less code, compressed, obfuscated, remove
unused stuff, etc).
13. What does the SDK provide
●
Generators, Compiler, Linker, Optimizer, Obfuscater: one
compiled js per browser (like c++ asm per processor).
●
Client side libraries: DOM, XML, JSON, RPC, RF, I18n, MVP,
Widgets
●
Server libraries: RPC, RF
●
Eclipse plugin
●
Multi-browser Dev mode
●
Unit testing and Debug tools.
●
Performance tools (speed tracer)
●
Compiler Statistics
●
Everything is open sourced (Apache v2.0)
14. Java Code (IDE)
Java Server Java Client
Side Side
Toolkit (SDK)
GWT development GWT compiler
Debug/Hosted/Test Compiler/Optimizer
GWT server JRE Emulation
libs RPC/RF Libs & Widgets
Test Runner FF/IE/Ch-Plugin
3ª Party 3ª Party
Server libs Server libs
JavaScript Bundles
J-Byte Code
(css, sprite)
RPC/RF/JSON/XML RF/JSON/XML Other Backends
JVM App-Server Browser
(php, ruby, ...)
15. MVP: Model View Presenter
● Define the View Interface and
decouple the Presenter so as it do not
need any browser specific stuff.
● Testing of the view is not necessary
since we use tested components
(widgets)
● Fast developing using TDD and
MockView run in JVM instead of
browser using Gin and Guice for DI
(minimize usage of GWTTestCase).
● EventBus facilitate decoupling of
presenters.
● The Dispatcher (Command pattern) or
RF simplifies the transport layer and
data binding.
16. Hupa, Status
● Time ago, Hupa was a reference of a GWT MVP application.
● Hupa MVP design is based of a set of libraries available for
gwt a couple of years ago:
– Gwt-presenter: for the 'MVP' and 'EventBus' patterns
– Gwt-dispatch: for the 'Command' pattern
– Gin + Guice: for dependency injection.
● Hupa was developed before GWT-2.0 was released, when
LayoutPanels, uibinders, Cells, etc. were not available.
● Many of the libraries which Hupa are using are unmaintained
or have an equivalent feature in modern GWT.
17. Hupa, RoadMap
● Replace gwt-dispatch by RequestFactory
● Replace gwt-presenter with the available stuff in GWT-2.4
● Remove gwt-incubator dependency in favor of CellTable
and CellTree
● Use LayoutPanels instead of css workarounds
● Use gwt-decorated panels
● Use gQuery in client side to enhance and simply views
● Implement new features: Contact management, Oauth,
LocalStorage, Gadgets, etc.
18. Become an opensource
contributor
● Checkout the code.
● Play with it, test it, find bugs.
● Open JIRA tickets reporting problems, asking for improvements.
● Attach patches which fix bugs, add new features, improve performance,
contribute to readability, etc. Don't forget unit Tests.
● Subscribe to mailing lists, and participate asking and answering
questions.
● Committers will appreciate your work and will propose you to be part of
the team.
● Other way you can utilize is to propose new projects: Apache incubator,
labs, GSOC, etc. Find a mentor or use mailing-lists for that.