Java Program GUI to develop java Programs without typing coding - java

Is there any Java GUI available to develop java programs without typing single line of java code and using GUI mode?

No GUI in Java but you can use an open source content-management-system (CMS) example : Jahia, Hippo, Liferay, EXo Platform, Ametys, Magnolia, OpenCms ...

As I understand your question, you want the code to be generated without having to know the syntax and libraries of Java in a way similar that you can generate HTML based web pages using some CMS tools.
Let me ask you here: How would you define your business requirements in such a case using a tool?
There are tools which can generate quite a bit of Java code. e.g. IntelliJ can generate Data objects in a Hibernate/JPA based application if you can provide the data schema and a way to connect to the database, all of your favorite IDEs can generate boilerplate code like getters/setters/equals/hashcode etc.
Also, most of the modern IDEs can generate skeleton Java code and required configuration if you provide the frameworks you want to use like Spring, Hibernate, REST etc., but there is no direct way to generate business logic as there is no way for a tool to know what your business goals are.

I fear there isn't way to develop an application whitout coding. You could install a business-oriented applicazion like Liferay or other good CMS, but the question is always "Could this application do all you will need in future?"
I think if you have simple and flexibles needs you could, maybe related with web site world tring to use one of these solution could solve. In general I say You probably need to write some line of code anytime.
If you are thinking to some of "more custom" than a simple web site, or a content based application, try to eplore some scaffolding tool like play framework, that can do easily lot of things, reducing programming load.

Related

How to make a Java program to generate another Java application at run time

Can I make a Java program to generate another java application at runtime.
I want to make a "installer" program, which takes user input and generates an application as per user requirement, instead of just configuring the pre-built application according to the user needs.
I came across this solution - how to compile & run java program in another java program?, but I don't want to make clients install JDK on there computer.
Dynamically create table and Java classes at runtime -
which also need JDK, but I got a work around:
ToolProvider.getSystemJavaCompiler() returns null - usable with only JRE installed?
Can I make a complete application using above methods?
Is it a bad idea to generate such program?
Can I make Spring and Hibernate applications like that?
Or is there any existing framework for doing so?
(if possible it should create tables in db and generate html files as well. I came across http://velocity.apache.org/, so is it possible to generate java code using that.)
Your goal doesn't make a lot of sense from a practical perspective. I hope that my answer will help you to understand why.
Can I make a java program to generate another java application at runtime.
Yes you can. But it is a lot of work, especially if the application if complicated.
I want to make a "installer" program, which takes user input and generate an application as per user requirement, instead of just configuring the pre-build application according to the user needs.
That is possible ... in theory.
The problem is that you have to write a program that is capable of reading and understanding the user's requirements, and can then converting those requirements into code. Normally ... this is what a programmer does. Writing a program to do what a programmer does is not practical. (My guess is that it is 20 or more years beyond the "state of the art" of artificial intelligence to do such a thing.)
Now if the problem domain was sufficiently restricted, and the requirements were tightly specified in an unambiguous notation, then it might be feasible to do this. However, benefits of generating a program rather than configuring an existing one (based on the same requirement notation) are pretty small. And probably not worth the effort.
... but I don't want to make clients install JDK on their computer.
If you are generating Java programs you need a Java compiler. So if you insist on using a JRE (in Java 8), you need to include a 3rd party Java compiler in your application.
However, for Java 9 onward this is moot:
Oracle no longer provides JRE distributions for Java 9+ so you would need to get your client to use a 3rd-party source for their JRE.
You could (should) be using the Java 9+ jlink utility to produce a custom JRE for you application, and that can include the standard Java compiler.
If you are trying to generate code at the bytecode level, your problem is immediately ten times harder.
Sorry, I am using Java 8
Are you aware that Java 8 is "end of life" for commercial use? That is likely to affect your clients.
Can I make a complete application using above methods?
Maybe yes, maybe no. It depends on the problem domain. The more complicated it is, and the more diverse / general the requirements, the harder it will be.
Is it a bad idea to generate such program?
Yes. It is a bad idea. It is a lot more work than writing an application that is configured in the conventional way. (Noting that the configuration could include writing plugins in Java, rules in some scripting language, and so on.)
I would advise only generating source code or bytecodes if you already have a conventional application with most / all of the required functionality that you can use as a prototype for the generated generated code. (If you can't write such a prototype by hand, then writing a generator that will create one is not realistic.)
And even when it is feasible, I would question the wisdom of building a generator. There doesn't seem to be a significant pay-off for the extra effort. (For example, where is the benefit for the end user?)
Can I make spring and hibernate application like that?
I don't see why you couldn't generate such an application. But see 1) and 2).
Or is there any existing frameworks for doing so?
There are frameworks that could be used in some cases:
Templating frameworks like Velocity1 can be used to generate Java source code.
Bytecode engineering frameworks could be used to generate code directly.
1 - Indeed, I have used Velocity for Java source code generation. It worked, though I'm not convinced it was an ideal solution.
Sure you can. You can also leverage a project like GraalVM to generate native binaries for a given platform.
However, it is a lot of work, and the end result won't probably be as useful as you think. Any use case you have in mind will probably be a lot better served by an app that you just configure to do different tasks, so your efforts are probably best spent in that direction.

Advantages of using php in frontend and java at the backend

I want to use PHP in the frontend(for UI and calling services) and java at the backend(for database interaction and creating REST services) for my web application.
I want to know the advantages and disadvantages of this kind of approach.
If thats the case, I will strongly recommend to look at Groovy with Grails.
Assuming that the time is the main concern. By using Groovy with Grails, you can get faster development, and with all the power of Java, seamlessly.
Ease of development
Higher productivity
No need to have two teams one for PHP and other for Java. Java folks will get Groovy very fast
Get the power of popular and state-of-the-art frameworks like, Spring and Hibernate
Run it on JVM
Everything of Java is available
Grails unit tests
[Edited]
From your comments to the question, it seems like you are looking for some powerful web templates, as available in Joomla or Drupal CMSs.
Ug, that sounds messy. Things like security have to either be implemented cleverly or duplicated (think form validation vs server side validation, you probably want both). Pure Java or pure PHP solutions will have things like that built in.
Next, it becomes a bit tricky to debug certain things. If you have an issues you have two logical "stacks" to sieve through.
Finally, I personally don't know of web server that runs both Java and PHP so you I bet you'll have to have two webservers which means twice the configuration and twice as many fail points.
Advantages:
Site could scale better in java, because PHP does not have a proper thread model.
Java is a strongly typed language with a lot of good IDEs to help you write code properly. It also has a very good testing framework support.
Disadvantages:
Two codebases(PHP and java). Can add extra complexity.

Java or Groovy CMS

I'm considering developing a school information system using the Grails web framework. Before a school can use the system, they will need to setup the following data
School data
Students
Teachers
Subjects
Classes
etc.
I'm considering using a CMS in order to get the ability to CRUD these entities "for free". The CMS may also provide other features out-of-the-box that I could use.
Ideally the CMS should be implemented in Java or Groovy, does anyone know of something suitable? I looked at the Weceem CMS plugin for Grails, but it's missing some core concepts I need, e.g. the ability to add users to groups.
Thanks,
Don
Java is good for rock-solid, high-performance, secure Enterprise apps. Java is considerably less good for getting a relatively simple Web project out the door in a short time.
Therefore, were I in your position, my personal gut feeling would be to go with something Grails based. I'm not very aware of any projects that already partially implement what you want, but if you can find one (Google?) then grab it! That will leave you more time for polishing and adding bells and whistles.
If you're not tied to Java, I'd recommend looking at Drupal for PHP as your CMS. Many sites, even sites of major Java organizations such as SpringSource, have used Drupal as their CMS because it offers so much out of the box.
Magnolia CMS 1 in version 4.3 has full-blown Groovy support. After 7 years of active development, a CMS like Magnolia provides you with a ton of stuff you need to run a website. I wouldn't even think about starting from scratch no matter what framework you use. Understanding the problem you are trying to solve and finding a solution to it is usually taking more time than actually implementing said solution. Even if you believe you know what you need now, rest assured your requirements will overrun you before you know it.
I know it's not Grails related, I would use the DaisyCMS, as it's java based you can add an extra Java Web applications to the Jetty and add extra functionality to the CMS using Grails for your other functinality. I hav enot tried this, it's just a suggestion.
Use Grails scaffolds to get simple CRUD functionallity.
Do you really want to build it from scratch? There are already open-source CMS. In your case I would evaluate open-source CMSs and if necessary would contribute code.
Does it need to be Java/Grails? There are good ones written in PHP or Python (django, joomla).
I tried Grails 1 year ago. It is very straightforward as long as you align with the concepts and standards (e.g. simple CRUD scaffolding). But if there a special requirements you get to similar efforts as with a Java framework like Spring MVC (though grails is also based on Spring MVC).

I want to make a "Web 2.0" application without using JavaScript directly

I'm a full time Java developer of around 4 years, professionally. I'm a GWT fanatic. I love Java. Here's the problem: In my free time I often fall victim to the verbosity of my favorite tools for doing "heavy" development. I also often fall into the trap of obsessively engineering my software. I'll end up with the most beautiful unfinished implementation, ever.
So, here's what I normally work with.
GWT - I use this for dynamic UI and web layout. I love the ease of re-use and it has taught me to absolutely hate javascript. I really can't even bring myself to do much HTML/JS anymore.
Hibernate - POJO to Database, easy-peasy. What i really need from this other than the mapping is that it allows me to have an application that works across multiple databases.
Spring - Mostly security. I've written my own custom LDAP bits for a project.
XML - I've used dom4j and other implementations, including xstreamer. I'd like to use JiBX for XML transport. The problem with this is that I need XML messages that conform to a specific standard rather than being autogenerated. Object->XML->Object are also common enough that it can be a performance bottleneck with large messages (250KB+).
I tried Lombok for a little while and liked it but had occasional issues with it and then I blew up a partition and lost all that work. I don't really feel like doing the same thing again (half the fun was in learning how to do it, now that I know... meh). This taught me why other people want to reduce the explicit code and replace it with an implicit system.
I've been looking into Grails but that runs me into the JavaScript problem (you know, that I don't like it) pretty quickly. I could use GWT with Grails on the back end but I get back into the problem of getting deep in the weeds with GWT. It has also occurred to me that there might be a way to have Grails tags in GSP that are made up of GWT widgets. I'm not really sure how I feel about that.
Another problem I have with Grails is that validation logic before form submission is separated from validation constraints after submission. I don't see how they can be unified (yet) to produce "pretty" front-end validation. I went out of my way to start a JSR-303 compliant validation project for GWT to help solve some of this problem for GWT and really liked the results. It isn't finished but I still find it useful.
So, help me find a better way!
TL;DR - I want to have a Database (and Database-Independent) to GUI solution that allows for dynamic web programming all in one language. Failing that, as close to one language as possible.
TL;DR is TL;DR - I hate JavaScript now, help.
EDIT: I know that it is techincally impossible to do "Web 2.0" development without JavaScript. I'm just trying to not be the guy who has to write it. (Getting a tool such as GWT to do it for me from a language I do like, for example.)
Just learn JavaScript.
Resistance is Futile
...and you will be assimilated.
PD: I'm an ex JavaScript enemy. Now it's my favourite language.
You can certainly develop an entire Web 2.0 project without coding Javascript using GWT (we have), but at the end of the day you still have to know HTML/CSS & Javascript.
This might sound like a stupid statement, but it's not once you consider that GWT is not a perfect abstraction, nor is it designed to be. It wasn't written in Java so that you didn't have to ever code in Javascript again, instead they did it because Java has better IDE's, is statically typed and makes maintenance a hell of a lot easier.
So yes, by all means go with GWT (and check out the new OOPHM, because it's AWESOME) but don't forget that you'll always need an understanding of the underlying frameworks of the web, if you want to develop for the web.
Have you heard of Echo?
It doesn't provide the database part of the problem, but it would work well with any database that you can work well with.
Echo is a platform for building
web-based applications that approach
the capabilities of rich clients. The
applications are developed using a
component-oriented and event-driven
API, eliminating the need to deal with
the "page-based" nature of browsers.
To the developer, Echo works just like
a user interface toolkit.
The latest iteration, Echo3, features
the ability to write applications in
either server-side Java or client-side
JavaScript. Server-side applications
run in any Java Servlet Container and
do not require developer knowledge of
HTML, HTTP, or JavaScript.
You might want to take a look at some of the AJAX powered JSF libraries. IceFaces and RichFaces are both solid.
Been there, done that. I was a GWT developer for 3 years... I started using it in v1.1! GWT is fantastic, and works really well for small applications. But the development comes to a crawl once you it a moderate application size, even if you divide your application in sub-modules.
It is also quite ironic that a UI framework has such limited UI creation tools. :)
Personally I bit the bullet and learned javascript. It isn't as bad as I thought. Especially with jQuery. :)
Obviously there is no perfect framework. But just the fact that GWT has been out for 3.5 years now, and it still largerly ignored in the Java world should tell you something. Since you're doing this on your free time, I would recommend learning the most popular framework: Struts. You'll see its limitation, and also why it is so popular. Of course, you'll need jQuery for that 2.0 functionalities. :)
Take a look at JRapid, a rapid development platform for Java developers. It generates very powerful Ajax enabled UI without the need of coding.
Not sure if you would like this , but have you heard about Haxe?
You might not like it but its AIO (all in one) solution (sort of).
I can understand your dislike of JavaScript and it certainly has its problems but I think your fighting nature at this point.
Web 2.0 is strongly based on JavaScript for a good reason as it provides the ability to perform tasks on the client machine without requiring page loads.
I'm sure there are alternatives but if you want the look and feel of Web 2.0, you will end up doing a lot more work with little reward. JavaScript is the accepted and functional tool for the job.
I'd say stick with GWT and just drink more of the Koolaid. It's a completely awesome development model that seems to be lost on those who haven't tried it.
If you want to improve your GWT experience, jump to the bleeding edge (I work off trunk, it's quite stable) and use the other Google originated projects like GIN, gwt-incubator and Guice. Especially watch Ray Ryan's GWT best-practices Google I/O talk: http://www.youtube.com/watch?v=PDuhR18-EdM
As for the "framework" part: forget 'em. Just use normal servlets and let GWT take care of the RPC for you. Servlets are a pain when you have to deal with JSP and you're own AJAX calls, but when they're only implementing asynchronous app logic, it's not that bad at all. Guice Servlet makes it all quite easy. You can still use a JVM hosted language to write your servlets if you want.
GWT has an incredible advantage over other JavaScript frameworks in that the layer of abstraction it provides allows for major future advances without any changes to your code. If the GWT compiler and browser detection scripts can take advantage of new browser features then you benefit from a simple recompile.
The big annoyance I see in your requirements in XML... hopefully that's just for integration with a 3rd party service and your client-server communication can just be GWT-RPC.
I don't use javascript or ajax, in medium-large application they create a lot of problem with compatibility, because moving some part of code inside client, create security breaches and problem with different browser.
I use only HTML(5) and CSS2/CSS3, and I have a lot successes.
I use this 2 ways:
using "puzzle-techinque". Write a lot of small and simple template (or tiles) to create the big page. I use only JSTL and Spring tag, with Rich/Prime/Ice-faces I encountered a lot of problem with rendering, page building and flow controller, so I discarded them.
using my custom library to parse HTML pages. I create template with my custom grammar, put inside the parser and write on output stream. This is the best way.
If you say me your preferred language and context, I can help you to perform JS-free.

What's an example of Java functionality that I could add to a JRuby/Rails project?

This is actually two questions rolled into one.
Is there a particular type of Java functionality that people are using JRuby for or is it mainly because of the performance advantage that JRuby gives versus the MRI?
The reason I ask is, I'd like to add some Java functionality to a Rails project (just to show that it's possible). Ideally this Java functionality would also be useful rather than redundant. Which leads to my next question . . .
What's an example of something that would make a good demonstration of Java functionality being added to a simple Rails CRUD app?
I guess anything you can do in a Ruby class, you could just as easily do in a Java class (with about twice as much code), so I understand the question may be hard to answer. I'm just wondering if there is a particular type of functionality that is more appropriate to do in Java.
There's nothing at stake here, by the way. I'm just playing around and testing things out.
I'd find a focused Java library that fills an existing need in Java and work on leveraging that library within your rails application. One possibility is to use JTS (Java Topology Suite) to manipulate geographic regions in a rails app and convert them for display on a map within your rails app.
I think the Ruby class libs (gems) can do pretty much anything the Java libs can do, so there's not much of a compelling reason to use JRuby on Rails in a "stand-alone" scenario.
I use it to integrate with a vendor Java app. Knocking up a quick controller and some views is much easier than extending using Java/Swing.
Also in a "Enterprise" environment, a rails developer may be obliged to deploy to Tomcat or Glassfish. The Warbler gem for JRuby enables this.

Categories

Resources