GithubHelp home page GithubHelp logo

darkflag / joda-beans Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jodaorg/joda-beans

0.0 2.0 0.0 3.12 MB

Java library to provide an API for beans and properties.

Home Page: http://www.joda.org/joda-beans/

License: Apache License 2.0

Java 99.95% CSS 0.04% HTML 0.01%

joda-beans's Introduction

Joda-Beans

Joda-Beans provides a small framework that adds properties to Java, greatly enhancing JavaBeans. An API is provided that defines a bean and property model, together with a code generator to make it work in practice.

The key concept is to allow each property on a bean to be accessed as an object. This enables technologies such as XPath, XML conversion, DB mappings, WebApp validation and Swing bindings.

Joda-Beans is licensed under the business-friendly Apache 2.0 licence.

Why Joda Beans?

Joda-Beans has been created to plug a gap in the Java language - properties. The concept of properties is familiar to those coding in almost every other modern language. Java stands alone in its pursuit of the terrible JavaBean approach, and personally I believe that properties should have been added to Java before generics and closures.

JavaBeans are typically created by manual coding or one-off IDE generation, such as by Eclipse. The same approach is taken to the creation of equals and hashCode methods. However, none of these approaches provides for a simple and fast mechanism to query a bean for the properties it exposes.

Joda-Beans provides a solution. As a developer, you just write the fields much as you would today. Then you add annotations to the bean and properties. Finally, you run a code generator, which creates the get/set methods plus framework methods that allow the properties to be effectively queried. A key point is that the code generator may be run again and again on the Java file, and is non-destructive.

See these sample classes used for testing - a simple user account class, example usage, example of validation.

Documentation

Various documentation is available:

Releases

Release 1.7 is the current release. This release is considered stable and worthy of the 1.x tag.

Joda-Beans requires Java SE 6 or later and depends on Joda-Convert There are a number of optional dependencies which help with integration.

Available in the Maven Central repository

Support

Please use GitHub issues and Pull Requests for support.

joda-beans's People

Contributors

jodastephen avatar andreas-schilling avatar cjkent avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.