I am a Java developer. Is there some Django/Ruby-on-Rails kind of framework for Java? I don't like to create the admin panel for each project I do. It's boring to do the same thing again and again. Also for my new project I have a short deadline and I would like to use some kind of Java framework that speeds up development.
Like everyone else has said, Spring, particularly Spring Boot, is the Django of Java.
If you want to use Django on a production site, use a Java servlet container, such as Apache Tomcat. Full JavaEE applications servers such as GlassFish or JBoss are also OK, if you need the extra features they include.
Both Spring Boot and Django are famous frameworks. Both frameworks have almost identical characteristics. So, if you're excellent with Java, Spring Boot is a good choice for your project. But, if you're good with Python, Django is a fantastic choice.
Ruby on Rails Considered the Ruby contemporary to Django, Rails is a full-stack framework written in Ruby that follows a model-view-controller architecture compared to the MTV pattern of Django.
Take a look at LightAdmin pluggable administration interface for Spring/JPA-backed web applications.
Usually, in web application development, you need to have some kind of administration back-end with usable UI and it's boring to develop it from scratch all the time and maintain it in the future.
Personally, I solved this for my Java projects by simply plugging LightAdmin library and doing some customizations from DSL configurations.
All you need to do is to declare Maven dependency & enable administration panel in your web.xml. Right after this you'll have a feature-rich UI with complete CRUD support, filtering, scopes, security, etc.
LightAdmin's DSL for admin panel customization example:
@Administration( Booking.class ) public class BookingAdministration { public static ScopesConfigurationUnit scopes( final ScopesConfigurationUnitBuilder scopeBuilder ) { return scopeBuilder .scope( "All", all() ) .scope( "Smoking Apartments", specification( smokingApartmentsSpec( true ) ) ) .scope( "Non Smoking Apartments", specification( smokingApartmentsSpec( false ) ) ) .scope( "Long-term bookings", filter( longTermBookingPredicate() ) ).defaultScope().build(); } public static FiltersConfigurationUnit filters( final FiltersConfigurationUnitBuilder filterBuilder ) { return filterBuilder .filter( "Customer", "user" ) .filter( "Booked Hotel", "hotel" ) .filter( "Check-In Date", "checkinDate" ).build(); } public static FieldSetConfigurationUnit listView( final FieldSetConfigurationUnitBuilder fragmentBuilder ) { return fragmentBuilder .field( "user" ).caption( "Customer" ) .field( "hotel" ).caption( "Hotel" ) .field( "checkinDate" ).caption( "Check-In Date" ) .field( "smoking" ).caption( "Smoking" ) .field( "beds" ).caption( "Beds" ) .build(); } public static DomainTypePredicate<Booking> longTermBookingPredicate() { return new DomainTypePredicate<Booking>() { @Override public boolean apply( final Booking booking ) { return booking.getNights() > 20; } }; } public static DomainTypeSpecification<Booking> smokingApartmentsSpec( final boolean isSmokingApartment ) { return new DomainTypeSpecification<Booking>() { @Override public Predicate toPredicate( final Root<Booking> root, final CriteriaQuery<?> query, final CriteriaBuilder cb ) { return cb.equal( root.get( "smoking" ), isSmokingApartment ); } }; } }
Recently I found a framework which looked very much like django. It's called playframework and you can find it here:
http://playframework.org/
I suggest you watch the video on the front page.
Another Java based django-like framework is Spring Roo, but in my opinion it's not quite ready. Last time I used it the documentation was virtually non-existent.
http://www.springsource.org/roo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With