Jakarta Commons - Don't re-invent the wheel

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

1 Favorite

Jakarta Commons - Don't re-invent the wheel - Presentation Transcript

  1. Jakarta Commons Torsten Curdt don’t re-invent the wheel
  2. Increase Productivity
  3. Re-use to Excel
  4. •Faster •Better designed •Less time •Smaller team
  5. How did we do it?
  6. Know your libraries!
  7. Sharing QA
  8. Heritage
  9. Charter “Creation of small re-useable components that can be used across projects. They are supposed to have as few dependencies as possible, meant to be well tested and compatible with the current de-facto standard version of the JDK”
  10. Growth Sandbox Proper Dormant
  11. Project Stats 45 Sandbox 34 Proper 34 38 Dormant 23 11 10 0 Active Inactive
  12. Proper
  13. CLI Options options = new Options(); options.addOption(\"h\", false, \"display usage\"); CommandLine line = parser.parse(options, args); if(line.hasOption(\"h\")) { HelpFormatter f = new HelpFormatter(); f.printHelp(\"myprogram\", options); ...
  14. Collections Map map = new CaseInsensitiveMap(); map.put(\"One\", \"One\"); map.get(\"ONE\"); Map colorMap = MapUtils.toMap(new String[][] {{ {\"red\", \"#FF0000\"}, {\"green\", \"#00FF00\"}, {\"blue\", \"#0000FF\"} });
  15. Email SimpleEmail email = new SimpleEmail(); email.setHostName(\"mail.myserver.com\"); email.addTo(\"jdoe@somewhere.org\", \"John Doe\"); email.setFrom(\"me@apache.org\", \"Me\"); email.setSubject(\"Test message\"); email.setMsg(\"A simple test of commons-email\"); email.send();
  16. IO InputStream in; OutputStream out; IOUtils.copy(in, out); ... byte[] data = IOUtils.toByteArray(in);
  17. JXPath XPathContext context = JXPathContext.newContext(dom); String value = (String) context.getValue(\"/my/xpath/to/value\");
  18. Lang String s = “Apache Jakarta Commons”; StringUtils.right(s, 7); // “Commons” String n = “0”; StringUtils.leftPad(s, 4, ‘0’); // “0000”
  19. Logging public class C { private Log log = LogFactory.getLog(C.class); ... if (log.isDebugEnabled()) { log.debug(\"log message\"); }
  20. Net NNTPClient client = new NNTPClient(); client.connect(\"news.server.net\"); NewsgroupInfo[] = client.listNewsgroups(); client.disconnect();
  21. Primitives ArrayByteList list = new ArrayByteList(); list.add(byte); list.removeElementAt(index); byte[] bytes = list.toArray();
  22. VFS FileSystemManager fs = VFS.getManager(); FileObject jar = fs.resolveFile( \"jar:lib/aJarFile.jar\" ); FileObject[] childs = jar.getChildren(); for (int i=0; i < childs.length; i++ ) { ...
  23. Overview attributes, beanutils, betwixt, chain, cli, codec, collections, configuration, daemon, dbcp, dbutils, digester, discovery, el, email, fileupload, httpclient, io, jelly, jexl, jxpath, lang, launcher, logging, math, modeler, net, pool, primitives, scxml, transaction, validator, vfs
  24. Sandbox
  25. CSV String[][] data = CSVParser.parse(string); CSVParser parser = new CSVParser(reader,’;’); String[][] data = parser.getAllValues();
  26. Exec OutputStream out; OutputStream error; CommandLine cl = new CommandLineImpl(); cl.setExecutable(\"path/to/exe\"); cl.addArgument(\"arg\"); exec.execute(cl, out, error);
  27. Javaflow class MyRunnable implements Runnable { public void run() { for(int i=0; i<10; i++ ) Continuation.suspend(); }} Continuation c = Continuation.startWith( new MyRunnable()); Continuation d = Continuation.continueWith(c); ...
  28. JCI JavaCompiler compiler = new EclipseJavaCompiler(); ResourceStore store = new MemoryResourceStore(); CompilationResult result = compiler.compile( new String[] { \"org/MyClass.java\" }, new FileResourceReader(directory), store );
  29. OpenPGP keyRing = new BouncyCastleKeyRing( secret, public, password); signer = new BouncyCastleOpenPgpSigner(); signer.detachedSign( fileInputStream signatureOutputStream, keyId, keyRing, true );
  30. Proxy o = (MyObject) new CglibProxyFactory() .createInterceptorProxy( new MyObjectImpl(), new LoggingInterceptor(log), new Class[]{ MyObject.class }); o.test(”test”); [DEBUG] - BEGIN test(test) [DEBUG] - END test()
  31. Overview compress, csv, exec, i18n, id, javaflow, jci, openpgp, pipeline, proxy
  32. Dormant
  33. Overview benchmark, cache, clazz, codec- mulipart, combo, contract, events, feedparser, filters, functor, grant, graph2, http, jex, jjar, jpath, jrcs, jux, latka, mapper, messenger, pattern, periodicity, reflect, resources, rupert, scaffold, services, servlet, simplestore, tbm, test, threading, threadpool, workflow, xmlio, xmlunit, xo
  34. Not invented here
  35. We need you!
  36. Thanks!

+ tcurdttcurdt, 3 years ago

custom

1118 views, 1 favs, 0 embeds more stats

Many projects use at least some of them - the Jakar more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 1118
    • 1118 on SlideShare
    • 0 from embeds
  • Comments 1
  • Favorites 1
  • Downloads 50
Most viewed embeds

more

All embeds

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories