Welcome!

Open Source Cloud Authors: Elizabeth White, Pat Romanski, Greg Schulz, Carmen Gonzalez, Patrick Hubbard

Related Topics: Open Source Cloud, Java IoT

Open Source Cloud: Article

OpenXava 4.0: Rapid Java Web Development

The OpenXava 4.0 has been released recently, with many User Interface improvements

OpenXava is a framework for rapid development of business applications using Java. It is easy to learn and one can have an application up in no time. At the same time, OpenXava is extensible, customizable and the application code is structured in a very pure object oriented way, allowing you to develop arbitrarily complex applications.

The OpenXava approach for rapid development differs from those that use visual environments (like Visual Basic or Delphi) or scripting (like PHP). Instead, OpenXava uses a model-driven development approach, where the core of your application are Java classes that model your problem. This means you can stay productive while still maintaining a high level of encapsulation.


The all-new version of OpenXava, OpenXava 4.0, improves significantly the user experience, producing a Rich Internet Application user interface. Additionally, some interesting improvements has been done for the developers, such as Groovy, JPA 2.0 or Dependency Injection.

The best way to taste the new features of OpenXava 4.0 is downloading it and following the Quick Start guide.
Below you have some of the main new features present in OpenXava 4.0.

Better User Experience
The next screenshot of a simple OpenXava 4.0 module shows some of the new features:

Another new useful feature of OpenXava is the use of dialogs. OpenXava use them for creating and editing reference and collection elements, though the developer can show his own dialogs in his own actions. Moreover, the user has the possibility of hidding and showing any frame in the view. So he can hide any reference, group or collection to adapt the user interface to his necessities and preferences. The next screenshot shows these features:


These are only some of the user interface new features. OpenXava 4.0 has around 40 improvements of the user interface.

More Options for Developers
OpenXava 4.0 allows to use Groovy for coding all the parts of your application, now it uses JPA 2.0, you can use Dependency Injection in you actions and the way for doing typical tasks has been simplified.
For example, you can use Groovy to define you entity, as following:

@Entity
@Table(name="TOrder")
@View(members="""
    year, number, date;
    customer;
    details;
    amount;
    remarks
    """
)
class Order extends Identifiable {
    
   [email protected](length=4)
   [email protected](CurrentYearCalculator.class)
    int year
       
   [email protected](length=6)    
    int number
   
   [email protected]
   [email protected](CurrentDateCalculator.class)
    Date date    
   
   [email protected](fetch=FetchType.LAZY, optional=false)
   [email protected]("Simplest")
    Customer customer   
    
   [email protected](mappedBy="parent", cascade=CascadeType.ALL)    
   [email protected]("""product.number, product.description,
quantity, product.unitPrice, amount""")

    Collection<OrderDetail> details = new ArrayList<OrderDetail>()  
    
   [email protected]("MEMO")
    String remarks
       
   [email protected]("MONEY")
    BigDecimal getAmount() {
        BigDecimal result = 0
        details.each { OrderDetail detail ->
            result += detail.amount
        }
        return result
    }
        
   [email protected]
    void calculateNumber() throws Exception {         
        Query query = XPersistence.getManager()
            .createQuery("select max(o.number) from Order o " +
                    "where o.year = :year")
        query.setParameter("year", year)        
        Integer lastNumber = (Integer) query.getSingleResult()
        this.number = lastNumber == null?1:lastNumber + 1
    }
        
}

You can use the Java standard for Dependency Injection, JSR-330:

public class ChangeActiveYearAction extends ViewBaseAction {
 
   [email protected] // Standard annotation from JSR-330
    private int activeYear; // Getter and setter are not needed
 
    public void execute() throws Exception {
        assert activeYear == 2010; // The value from session object
        activeYear = 2012; // It changes the value of session object
    }
 
}

Thus the activeYear session object is injected in the activeYear field before call to execute(); and after execute() execution the value of the activeYear field is assigned back to the actionYear session object. So, you can change session objects state from inside an action, even with immutable and primitive types.

There are some improvements to the actions that do not add new functionality, but allows you to simplify the coding of some typical cases. For example, now it's easy to add and remove actions programatically from an action thanks to the new methods addActions(), removeActions(), clearActions(), setControllers(), returnToPreviousControllers() and setDefaultControllers() present in BaseAction. Other new methods of BaseAction such as getRequest(), getContext() and getManager() add a lot of possibilities with little effort.

These are only some of the new features for developers. OpenXava 4.0 has around 90 improvements for the developers.

More Stories By Javier Paniza

Javier Paniza is the project lead for OpenXava project. He works as software developer at Gestión 400, a software company for public administration in Spain. He has been developing with Java Enterprise since 1998. Also he has been J2EE mentor for development teams in banking projects.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@ThingsExpo Stories
Amazon started as an online bookseller 20 years ago. Since then, it has evolved into a technology juggernaut that has disrupted multiple markets and industries and touches many aspects of our lives. It is a relentless technology and business model innovator driving disruption throughout numerous ecosystems. Amazon’s AWS revenues alone are approaching $16B a year making it one of the largest IT companies in the world. With dominant offerings in Cloud, IoT, eCommerce, Big Data, AI, Digital Assista...
SYS-CON Events announced today that Systena America will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Systena Group has been in business for various software development and verification in Japan, US, ASEAN, and China by utilizing the knowledge we gained from all types of device development for various industries including smartphones (Android/iOS), wireless communication, security technology and IoT serv...
SYS-CON Events announced today that Outscale will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Outscale's technology makes an automated and adaptable Cloud available to businesses, supporting them in the most complex IT projects while controlling their operational aspects. You boost your IT infrastructure's reactivity, with request responses that only take a few seconds.
Everywhere we turn in our industry we can find strong opinions about the direction, type and nature of cloud’s impact on computing and business. Another word that is used in every context in our industry is “hybrid.” In his session at 20th Cloud Expo, Alvaro Gonzalez, Director of Technical, Partner and Field Marketing at Peak 10, will use a combination of a few conceptual props and some research recently commissioned by Peak 10 to offer a real-world consideration of how the various categories of...
In his keynote at @ThingsExpo, Chris Matthieu, Director of IoT Engineering at Citrix and co-founder and CTO of Octoblu, focused on building an IoT platform and company. He provided a behind-the-scenes look at Octoblu’s platform, business, and pivots along the way (including the Citrix acquisition of Octoblu).
DevOps at Cloud Expo – being held October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real r...
Five years ago development was seen as a dead-end career, now it’s anything but – with an explosion in mobile and IoT initiatives increasing the demand for skilled engineers. But apart from having a ready supply of great coders, what constitutes true ‘DevOps Royalty’? It’ll be the ability to craft resilient architectures, supportability, security everywhere across the software lifecycle. In his keynote at @DevOpsSummit at 20th Cloud Expo, Jeffrey Scheaffer, GM and SVP, Continuous Delivery Busine...
SYS-CON Events announced today that Outscale, a global pure play Infrastructure as a Service provider and strategic partner of Dassault Systèmes, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Founded in 2010, Outscale simplifies infrastructure complexities and boosts the business agility of its customers. Outscale delivers a secure, reliable and industrial strength solution for its customers, which in...
SYS-CON Events announced today that CollabNet, a global leader in enterprise software development, release automation and DevOps solutions, will be a Bronze Sponsor of SYS-CON's 20th International Cloud Expo®, taking place from June 6-8, 2017, at the Javits Center in New York City, NY. CollabNet offers a broad range of solutions with the mission of helping modern organizations deliver quality software at speed. The company’s latest innovation, the DevOps Lifecycle Manager (DLM), supports Value S...
SYS-CON Events announced today that Peak 10, Inc., a national IT infrastructure and cloud services provider, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Peak 10 provides reliable, tailored data center and network services, cloud and managed services. Its solutions are designed to scale and adapt to customers’ changing business needs, enabling them to lower costs, improve performance and focus intern...
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
In order to meet the rapidly changing demands of today’s customers, companies are continually forced to redefine their business strategies in order to meet these needs, stay relevant and continue to see profitable growth. IoT deployment and development is integral in this transformation, and today businesses are increasingly seeing the value of investing their resources into IoT deployments. These technologies are able increase ROI through projects such as connecting supply chains or enabling sm...
In his opening keynote at 20th Cloud Expo, Michael Maximilien, Research Scientist, Architect, and Engineer at IBM, will motivate why realizing the full potential of the cloud and social data requires artificial intelligence. By mixing Cloud Foundry and the rich set of Watson services, IBM's Bluemix is the best cloud operating system for enterprises today, providing rapid development and deployment of applications that can take advantage of the rich catalog of Watson services to help drive insigh...
SYS-CON Events announced today that SoftLayer, an IBM Company, has been named “Gold Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2016, at the Javits Center in New York, New York. SoftLayer, an IBM Company, provides cloud infrastructure as a service from a growing number of data centers and network points of presence around the world. SoftLayer’s customers range from Web startups to global enterprises.
SYS-CON Events announced today that Super Micro Computer, Inc., a global leader in compute, storage and networking technologies, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Supermicro (NASDAQ: SMCI), the leading innovator in high-performance, high-efficiency server technology, is a premier provider of advanced server Building Block Solutions® for Data Center, Cloud Computing, Enterprise IT, Hadoop/...
With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend @CloudExpo | @ThingsExpo, June 6-8, 2017, at the Javits Center in New York City, NY and October 31 - November 2, 2017, Santa Clara Convention Center, CA. Learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
SYS-CON Events announced today that EARP Integration will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. EARP Integration is a passionate software house. Since its inception in 2009 the company successfully delivers smart solutions for cities and factories that start their digital transformation. EARP provides bespoke solutions like, for example, advanced enterprise portals, business intelligence systems an...
Existing Big Data solutions are mainly focused on the discovery and analysis of data. The solutions are scalable and highly available but tedious when swapping in and swapping out occurs in disarray and thrashing takes place. The resolution for thrashing through machine learning algorithms and support nomenclature is through simple techniques. Organizations that have been collecting large customer data are increasingly seeing the need to use the data for swapping in and out and thrashing occurs ...
SYS-CON Events announced today that Progress, a global leader in application development, has been named “Bronze Sponsor” of SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Enterprises today are rapidly adopting the cloud, while continuing to retain business-critical/sensitive data inside the firewall. This is creating two separate data silos – one inside the firewall and the other outside the firewall. Cloud ISVs oft...
The 21st International Cloud Expo has announced that its Call for Papers is open. Cloud Expo, to be held October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, Big Data, Internet of Things, DevOps, Digital Transformation, Machine Learning and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding busin...