-
Notifications
You must be signed in to change notification settings - Fork 102
Random thoughts and TODO for Boon
If you are new to boon, you might want to start here. Boon is a opinionated, low ceremony Java framework.
Sonic Boom! Java Boon!
What is Boon?
Boon is simple opinionated Java for the novice to expert level Java Programmer. It is a framework to fit the gaps between Python, Ruby, and Perl when you are in Java land.
Whenever possible no overloading (except for language literal simulations). Whenever possible toString shall produce valid JSON.
Universal methods to work with list, appendable, strings, sets, maps, etc. if applicable:
- len - length (map, list, set, string, char sequence, array)
- in - checks if value is in (map (checks for key), list, set, string, char sequence, array)
- idx - indexes object (map, list, set, string, char sequence, array)
- idx - does set (map, list, set, string, char sequence, array)
- add - adds item to object (map (adds entry), list, set, string, char sequence, array)
- copy - shallow copy (map, list, set, string, char sequence, array)
- slc - slices using slc(2, -2), slc(-2) syntax (map, list, set, string, char sequence, array)
- slcEnd - slices the end off
- before - tree maps, tree sets, (refers to the item before an "index")
- after - tree maps, tree sets (refers to an item after an "index")
- insert - inserts an item into a list like thing. (so far for lists)
- remove or subtract or sub or minus
Maps has valueIn which is like in.
Possible future (maybe, maybe not)
- str (turns any object into a JSON equiv string)
- count
- pop (list, array)
- push
- find - finds an object (map, list, set, string, char sequence, array)
- findAll - finds a collection of objects (map, list, set, string, char sequence, array)
- clone - deep copy (map, list, set, string, char sequence, array)
- str - converts object into readable string
- oStr - converts object into JSON
- sub - remove an item (map, list, set, string, char sequence, array)
- dir - list properties, methods and other information about a class
- dice - like slice but creates lists of lists or arrays of arrays, etc.
- divide - like dice but different - divide(2, list) would break up the list evenly into two lists.
- sum - add a list or array of values together
- max - find the max value in an array, map, set or list.
- min - find the min value in an array, map set or list.
- avg - find the avg value in an array, map, set or list.
- mode - find the mode
- median - find the median
- sort - add the ability to sort things (for lists array, if not primitive then check to see if comparable, then check if it has a toString defined, then do string order on toString)
- filter - add filtering (see DataRepo)
- see http://groovy.codehaus.org/GDK+Extensions+to+Object
- any
- every
- collect
- each
- each with index
- find and findAll
- equal (using truth)
- notEqual (using not truth)
- JMX support
- EL style lang support #{} (use Ruby style) since # is less common than $
- puts "Hello #{name.capitalize}!"
- puts ("Hello #{cap(name}", ctx(this))
- Create ReflectionUtils.respondsTo
- Create ReflectionUtils.invoke
- Create ReflectionUtils.ctx
if (respondsTo(bird, "fly")) { invoke(bird, "fly", far, high); puts ("Hello #{height}", ctx(bird)); } if (respondsTo(bird, "fly", integer, integer)) { invoke(bird, "fly", far, high); puts ("Hello #{height}", ctx(bird)); }
- templates built in
- GPath style path support for any java object, map, json or dom. (I wrote this a few times for different projects)
- ObjectGraphBuilder would be nice for testing graphs for data repo
- queue utilities
- add Queue as a FCC to the mix
- Process support
- add Regex support
- JDBC support
- Mongo support
Code coverage shall always be 90% or above. (It is not... mostly due to not all primitives being tested equally)
Ideas http://docs.python.org/2/library/functions.html
TODO:
- Add comparators to Sets.
- Missing slice tests for Maps.
- Need empty and not empty
- Add Arrays (len, in, idx, copy, slc, slcEnd, insert, add, conversion from collection)
- Add Strings (split single char, split list of chars, slc, len, in, idx, copy, slc, slcEnd, insert, add)
- Write article on universal methods
- Add classpath:// and directory scanning support to IO
- Write article on I/O utilities and JDK 7 FileSystem ** Add support for classpath search of resources
- Add Reflection utilities (deep dive properties) ** UnsafeField, MapField, ReflectionField, etc.
- Write article
- Create universal Object to Map/List utility
- Write article
- Create universal Binary serializer / deserializer
- Write article
- Create universal JSON serializer / deserializer
- Write article
- Add DataRepo Support to boon
- Write article
- Create proxies using interface
- Write article
- Add support for Ruby respondsTo
Publish
-[] create benchmark framework (profile?, time, stack eval) -[] write up sample for CharBuf usage -[] write up sample for CharScanner -[] write String Scanner, splits -[] Create benchmark comparing common things done in common ways compared to boon -[x] Announce Boon (basic introduction Sunday 10/21) DONE -[x] Slice article (Monday 10/22) DONE -[] Cleaned up ByteBuffer (Friday 10/26) Change to use new CharBuf port of ByteBuf -[x] Set slice (Wednesday 10/24) DONE
-[] Fast JSON parser -[] Fast JSON serializer -[] Add in Reflection/Dynamic invoke -[] Template Strings ${beanProp.name} -[] Refactor then fold in DataRepo code -[] Binary universal serializer to/fro GO to/for Python -[] JMX monitoring -[] Process utilities -[] Classpath file system -[] Thread mgmt libs -[] Args lib -[] Write highspeed scanner benchmark against others -[] Little HashMap for small maps that are expected to grow -[] Collections for primititves -[] add, slice, idx support for ByteBuffer and friends -[] Unsafe field access
Thoughts? Write me at richard high tower AT g mail dot c-o-m (Rick Hightower).
If you are new to boon start here:
- Java Boon Byte Buffer Builder
- Java Boon Slice Notation
- Java Boon Slice's work with TreeSets
- Java Boon Description
- More...
- Boon Home
- Boon Source
- Introducing Boon October 2013
- Java Slice Notation
- What if Java collections were easy to search and sort?
- Boon HTTP utils
- Boon Java JSON parser Benchmarks or hell yeah JSON parsing is damn fast!
- Boon JSON parser is really damn fast! Part II
- Boon JSON parser Round III now just not fast as but much faster than other Java JSON parsers
- Boon World's fastest Java JSON parser Round IV from fast to blazing to rocket fuel aka Braggers going to brag
- Boon gets adopted by JSON Path as the default Java JSON parser
- Boon graphics showing just how fast Boon JSON parsing is - about 50% to 200% faster than the graphs shown here now so wicked fast became wickeder - just got sick of making graphics
- 10 minute guide to Boon JSON parsing after I added @JsonIgnore, @JsonProperty, @JsonView, @Exposes, etc.
- Hightower speaks to the master of Java JSON parsing, the king of speed The COW TOWN CODER!
- Boon provides easy Java objects from lists, from maps and from JSON.
Easily read in files into lines or a giant string with one method call. Works with files, URLs, class-path, etc. Boon IO support will surprise you how easy it is. Boon has Slice notation for dealing with Strings, Lists, primitive arrays, Tree Maps, etc. If you are from Groovy land, Ruby land, Python land, or whatever land, and you have to use Java then Boon might give you some relief from API bloat. If you are like me, and you like to use Java, then Boon is for you too. Boon lets Java be Java, but adds the missing productive APIs from Python, Ruby, and Groovy. Boon may not be Ruby or Groovy, but its a real Boon to Java development.
Core Boon will never have any dependencies. It will always be able to run as a single jar. This is not just NIH, but it is partly. My view of what Java needs is more inline with what Python, Ruby and Groovy provide. Boon is an addition on top of the JVM to make up the difference between the harder to use APIs that come with Java and the types of utilities that are built into Ruby, Python, PHP, Groovy etc. Boon is a Java centric view of those libs. The vision of Boon and the current implementation is really far apart.
===
Contact Info
blog|[twitter](https://twitter.com/RickHigh|[infoq]http://www.infoq.com/author/Rick-Hightower|[stackoverflow](http://stackoverflow.com/users/2876739/rickhigh)|[java lobby](http://java.dzone.com/users/rhightower)|Other | richard high tower AT g mail dot c-o-m (Rick Hightower)|work|cloud|nosql
YourKit supports Boon open source project with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products: YourKit Java Profiler and YourKit .Net profiler.