Related
HI All I am at the end of the release of my project.So in order to keep working our manager asked us to generate Class Diagrams for the code we had written.Its medium project with 3500 java files .So I think we need to generate class diagrams.First I need to know how reverse engineering works here. Also I looked for some tools in Google(Green, Violet) but not sure
whether they are of any help.Please suggest me how to proceed.Also a good beginning tutorial is appreciated.
I strongly recommend BOUML. Its Java reverse support is absolutely ROCK SOLID.
BOUML has many other advanteges:
it is extremely fast (fastest UML tool ever created, check out benchmarks),
has rock solid C++, Java, PHP and others import support,
it is multiplatform (Linux, Windows, other OSes),
has a great SVG export support, which is important, because viewing large graphs in vector format, which scales fast in e.g. Firefox, is very convenient (you can quickly switch between "birds eye" view and class detail view),
it is full featured, impressively intensively developed (look at development history, it's hard to believe that such fast progress is possible).
supports plugins, has modular architecture (this allows user contributions, looks like BOUML community is forming up)
The tool you want to use is Doxygen. It's similar to Javadoc, but works across multiple languages. If figures out the dependencies, and can call graphviz to render the class diagrams. Here's an example of a few Java classes run through Doxygen.
This is more a toolchain than a tool and I haven't tried it out myself. But it maybe a starting point. Using UMLGraph, ant and GraphViz. Explained step by step: in this article.
I ve used Visual Paradigm for UML for what you want to do and it was quite good.
See here for details.
Just go Tools -> Instant reverse and select your packages.
You may be able to reverse engineer class diagrams with the open source modelleing tool ArgoUML http://argouml.tigris.org/
ObjectAid is pretty nice. You can drag classes into a diagram and arrange them the way you want.
Visual Paradigm for UML Standard Edition (or Better) will reverse engineer Java files in to Class Diagrams.
I guess if your boss just wants to keep you busy until the next project starts then there's no harm in it, but you will find pretty quickly that creating a class diagram with 3500 classes will tell you exactly NOTHING about your system. In fact, you don't really want a diagram with more than about 10 classes on it. So once you have reversed all the code into your modelling tool, you will want to start organizing and arranging to find the meaning. Create a new diagram, drop a single important class onto it and bring in all the classes that are directly related to that class. Repeat for maybe the 300 most significant classes. Don't worry, it isn't as horrible as it sounds, maybe a week's work.
For the record, my modelling tool of choice is Enterprise Architect by Sparx Systems. It will reverse java sources or .jar files. There is a free 30 day trial edition.
There are some tools available that will help you generate these diagrams. These cost money.
Otherwise you could to try to parse your Java files. This could be as simple to create a simple parser that reads the Java files and writes the name of the class and all the import statements to a file and generates a class diagram from there, graphviz can help you there.
I've been using Enterprise Architect for a number of years. A JBoss developer suggested it to me. It works very well for all types of UML modeling including the reverse engineering of class models (Java, C# and others). The basic version is currently $120 per seat, but it has most of the capabilities of much more expensive tools and it is much easier to learn. I particularly like its ability to generate HTML and RTF documentation.
It is very easy to synchronize code between the tool and your source code. Even bi-directional if you want.
Your PM may also like the activity and sequence diagrams that it can create. I also frequently use the deployment diagrams. It's very helpful to have all of this in one tool.
I have been tasked with porting a large Java codebase to the Android platform. The project makes extensive use of AWT which isn't' supported on Android.
I'm looking for a tool that lets me visualize all of the classes in the project. I'd like to be able to see all of the relationships between classes so that I can get a good idea of where to start the port.
If you have any suggestions that would help in this task I'd like to hear about them.
I use Structure101 almost daily to visualize and understand our code base. A great tool and quite reasonably priced too.
This question has been touched at StackOverflow many times before and here are some links:
Is there some tool to visualize java class hierarchies and relations?
Tool to visualize code flow in Java?
Recommended Eclipse plugins to generate UML from Java code
Good free UML tool for Java/Eclipse?
IntelliJ IDEA also has some tools to help, like Graphical Navigator in IDEA 8 and Code Navigator plugin.
Netbeans has an OK reverse engineering tool which spits out a heaps of UML. I haven't used it in a while, but when I did it was a tad buggy.
There is an Eclipse plugin called Creole which you could also try. http://www.thechiselgroup.com/creole
After spending a lot of time and code on programming in Swing, I thought this can't be state-of-the-art Java GUI building. After not finding a user-friendly visual gui bilder for eclipse I stumbled upon declarative GUI building with XML UI toolkits... and I thought: This must be it! I think it's the right way to go, easy and also close to web-programming.
But after looking around in the web and on SO, I got the impression that it is not very common! Although there are many implementations and APIs, it seems like most of them are kind of dead and had no updates in the last 5 years..
So I wonder: Is my feeling right, that XML is not very widespread for java GUIs? And if so - what are the reasons? Maybe it couldn't become accepted or it has some major drawbacks or people are doing everything in the web instead with fatclients or there are better alternatives, maybe javafx?
I just need to know if it is worth spending time in that area or better look for alternate ways. As I dont read developer magazines I just don't know what the trends in gui building are and which technologies are believed to have a future. But I can't imagine that people still spend so much time on writing nasty swing (or swt) apps.
There new fresh and interesting approach - it uses YAML. Check it out at http://code.google.com/p/javabuilders/
Sun's answer to that seems to be JavaFX.
It has a declarative language for specifying the GUI and there will be builder apps as well.
There is some prototype work going on for e4 (Eclipse 4), which would allow building a GUI by editing an Ecore model and customizing it via CSS.
See this blog post for some details and instructions to try it out yourself.
Five to ten years ago XML was very popular. Although fine to provide some kind of standardisation for transferring data between heterogeneous systems, it's not suitable for programming. It always starts with the easy stuff, and lets declare everything. But any real system requires code. XML then falls down. There is also the problem that XML is a bad syntax for humans, and even languages like Java are easier to read.
On the other hand, there is clearly a need for the rails of GUIs. Naked Objects is the closest reasonable attempt I have seen.
I came to the same conclusions as you about the declarative frameworks out there. It is not worth learning a new GUI syntax unless it's widely supported. XUL as an interface language is widespread, but there is no java rendering framework for it. I'd say HTML+CSS+Javascript and a Servlet container is the best Java platform for GUIs today, but sadly I haven't found a platform independent way to display web pages like a desktop application.
If you use Eclipse, you can now use WindowBuilder to help you in creating Swing apps in a user-friendly visual GUI builder. It's now available as a free download, and Google has donated the Swing GUI builder framework to the Eclipse Foundation.
I'd second Thilos suggestion with javaFX.
Additionally the trend is pointing to webapps, so I think that in the long run javaFX and web based UIs will catch up to swing+swt GUIs.
I do all my swing stuff by hand and none of my application is nasty. If you do not know how to create usable and good looking UI there is no technology to help you.
The answer is surely not going to be XML. What problem are you trying to solve? You want to have reusable building blocks, and a compact way of describing them. I don't see XML helping you there.
[edit] Creating a java code equivalent of XUL would be an immense improvement on XUL.
XML makes it really, really hard to do good separation of concerns and once and only once. It is however perfect for the mongolian horde approach. You need a layer on top of swing, it only provides the building blocks.
Haven't seen anything about it here but it seems to solve one of the problems with GWT - the fact that you have to write Java code to generate your GUI. Instead this software allows you to design the GUI using drag-and-drop tools - a WYSIWYG interface.
I'm not trying to sell the product, by the way.
I just want to know whether it works as advertised, is effective, easy to use, etc?
Anyone have any experience to answer these questions?
GWT-Designer is now freely available as the product has been acquired by Google. http://googlewebtoolkit.blogspot.com/2010/09/google-relaunches-instantiations.html
Google will improve the product which is already quite good.
I don't think that the lack of a GUI editor is a problem with GWT. Consider HTML, there are plenty of WYSIWYG editors for that (like Dreamweaver) but most experienced web designers don't touch that stuff with a barge pole, they hand code it. Not because they're masochists, but because they want control over the source, they want to make it clean and readable. Coding is a scientific artwork, best left to Human Beings ;)
I tried GWT Designer very early on, and I found that it was fairly poor (and only worked on Windows because it had some dlls that went along with it), but things may have changed drastically since then.
I'm using GWT Designer for my Capstone project. I did start from scratch, and it worked quite well. I'm no fan of WYSIWYG software, so I was pleasantly surprised. Here's a link to a post I did on it:
http://benarchie.blogspot.com/2010/12/gwt-designer.html
GWT-Designer is getting better all the time. Give it another look some time, it's catching up to things like visual studio in my opinion.
Personally I like GWT Designer for Eclipse and it is free.
It is a rapid development tool. Not a solution for non-programmers however it will accelerate a Java coders ability to learn how to use the GWT API. Once you learn the tool it will reduce coding time.
I found it necessary to frequently switch between code and WYSIWYG editor to get things exactly how I wanted them. The two editors work well together. You will still need to refer to Java Docs to gain a full understanding. Most of the Java Docs have excellent Java and UiBinder code examples in them which are ready to cut and paste.
Creating GUIs in UiBinder is definitely the way to go because it simplifies the hierarchical nature of laying out GUI elements. The API is missing some information about how to hand code in UiBinder however between GWT-Designer, Java Docs and Google, you will find an answer.
The built in Jetty web server also simplifies deploying and testing on your local machine. I was able to make small code changes and see the effect in the web browser immediately.
Try these tutorials.
http://code.google.com/eclipse/docs/gwt_uibinder.html
http://code.google.com/webtoolkit/tools/gwtdesigner/tutorials/stockwatcher.html
I've tried GWT Designer recently. It still looks poor. If you don't want to lose flexibility, I would recommend to use GWTLab
Just tried it then. Most of my ui.xml files wouldn't open because it doesn't currently support #UiField(provided=true).
The ui.xml files that didn't use this feature would often crash with things like UnableToCompleteException.
Maybe if you started from scratch using designer you might have more luck.
I had a year's subscription but did not renew it, being a bit disappointed with the product.
1) The designer injects all Java code adding creation/property setting/event handling to the module you are building in a most unecomic way. Additionally, it is pretty difficult to modularize the application. Compared to Flex, for instance, the number of lines of code gets easily double or triple in a module and seeing the forest from the trees is not easy.
2) Web applications I built only a a couple of years ago CEASED WORKING possibly due to changes in Javascript engines. That was something I did not expect and is very possibly GWT's fault.
3) The GUI designer needs A LOT of CPU power and so does the build phase.
The concept is nice, however, I admit and GWT designer is the only of its kind. The feeling of difficulty in modularizing may well be my lazyness.
EDIT: Shortly after I wrote the above comment Instantiations/Google introduced the UiBinder concept which makes a lot more sense than the original amalgamation. Now it is a lot more professional.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Question for all the GWT gurus out there - which is the best GWT widgets library out there? And why?
List based on the answers:
Default
Sencha GXT
Smart GWT
Vaadin
GWT-Bootstrap
GwtBootstrap3
Rocket GWT (inactive)
Tatami (inactive)
ErraiFramework
GWTMaterialDesign
И наконец- новое поколение основанное на JsInterop:
GWT + Polymer Elements
GWT + Polymer
Angular and GWT
GWTMaterialDesign
Do not bind yourself to ANY of these libraries. Use Vanilla GWT to create the structure of your project. In particular, use the MVP pattern and an Event Bus. Please, see google article to know how to best design your client application with GWT: Building MVP apps
After, you can use any widget of these libraries (say a table, or a combobox, a datepicker, etc) and incorporate it to your project. Try to use extended components ONLY if you don't see a way to do it with vanilla GWT. This way you don't tie yourself to these libraries which are ALWAYS a pain when you try to do something that doesn't appear in the demo application, contain many bugs and their support are poor at best.
How to look for widgets should follow this order:
First check GWT Incubator to see if
there's what I'm looking for.
http://code.google.com/p/google-web-toolkit-incubator/
Then, if you are looking for
something "cooler" check GWT Mosaic
http://code.google.com/p/gwt-mosaic/
Careful with other libraries, I've worked with them (and still have nightmares).
Depends on what you mean by "best". Best looking? Best API? Best for extending to your own custom needs?
E.g., I was just evaluating table classes to use in our application. We've been using GWT-Ext, but it has many performance problems for us, and is very hard to get the tables sized the way we need them. I came very close to going with GWT-Mosaic, but decided instead to build off the widgets in the GWT Incubator.
So, why did I make this choice? It seems that too many of the libraries out there come with their own, for lack of a better word, baggage. Either you have to dive whole-hog into some MVC framework (which may not be entirely compatible with the rest of your code base), or you have to adopt someone's new fangled layout system, or you have to live with the fact that you cannot really debug the code (because its just JSNI wrappers).
Don't get me wrong, the GWT Incubator isn't perfect...the widgets there are in some amount of flux. In my case, this was the best choice, though. It gives me good (but definitely not perfect):
API
Extensibility
Look and feel (well, this is kinda weak, but that's what CSS is for.)
So...the answer (for me) is a combination of:
Stock GWT widgets (with lots of custom styling)
GWT Incubator tables
A few home-grown widgets
(I should add: the "baggage" I'm referring to isn't necessarily a bad thing. But, if you just want a widget or two, it can raise the bar on what it takes to just get your work done and how good youe application looks.)
See this component library GWT Bootstrap this is a implementation in gwt of Twitter Bootstrap.
GWT alone is a pretty good library.
I didn't use all of the mentioned ones but can recommend Ext GWT.
I prefer vanilla GWT.
Some of the other APIs look pretty and their showcases really show off the widgets, but I always find that the performance isn't the best....when I say performance I mean more like response time. I hate when an application feels sluggish.
Most of the libraries mentioned are not open source and even worse: are just wrappers on top of a JavaScript library. The power of GWT lies in the fact that the application works on different browsers (because of the code generation for the "big" browsers specifically). These JavaScript underlying libraries can cause lots of problems.
I agree with jgindin GWT Incubator and GWT Mosaic are the best so far.
Not saying it's "the best", but I've been using GWT-Ext at work lately. It's got some pros and cons:
Pros:
Relatively easy to setup and use
Decent sized community behind it
LOTS of examples online, all of which have accompanying code
Good selection of widgets that cover a wide range of functionality
Cons:
Makes assumptions about your data's format and structure that you may not be able to accommodate
Library is just a JSNI wrapper, which makes it harder to debug and extend
Future support and development on the library is uncertain
Some annoying cross-browser issues still exist (especially with layouts)
Search function on their forums is essentially useless. (This is becoming a big pet peeve of mine >_<)
Do NOT use any of them! If you plan to develop a large scale application, you should consider using MVP pattern. The best implementation around is MVP4G framework, it supports GWT code splitting out of box. There are a lot of great examples, you can start with. The most valuable one is Mvp4GModules.
Add the new one: GWT-Bootstrap :)
There isnt a stable release right now, but will have soon.
My experience shows that there are always many problems with 3rd party libraries. The best way - is to use well-known and well-maked technology itself plus your own components. It may take a longer time to write and maintain them, but TCO is always at lower level.
3rd party libraries often can break your plans unexpectedly. And it's hard to find and fix the source of problem.
So I'd suggest to use plain GWT.
I think SmartGWT is fine if you just whant to use the Widgets as they are,
but if you would like to extend or modify the widgets as I do in
the Gxt Scheduler I think that Ext-GWT is a better choice.
for me EXT-GWT (aka GXT) is the best library currently available,I use it in 6 months project,and it helps a lot with many predefined components like grids,trees....
It's beautiful as well
SmartGWT is a good library and it has a lot of examples but the user interface is not that sleek. For user interface Ext GWT is good.
gwt-mosaic's user group doesn't seem very active and I couldn't find a user's manual besides the wiki snippets. gwt-mosaic introduced me to two interesting tools.
1) gwt-mosaic includes a wrapper for Tibco's PageBus which is a publish/subscribe tool for the JS parts of your app (RPC handlers, widget callbacks, widget setters). This is an alternative to gwt's event bus.
2) gwt-mosaic encourages the use of Beans Binding (http://code.google.com/p/gwt-beans-binding/) for binding data to widgets and validating widgets.
smartgwt isn't cheap for the full feature set and support. The jar is too large for appengine unless you remove the theme files you don't use. They invest engineering on the server side too.
I've heard ext-gwt is sluggish and the JS files are large.
The gwt widget incubator looks deprecated. I believe the deluxe grid will be released with the new gwt.
The lack of look-and-feel, binding, and validation standards is hampering the interoperability of widget libraries.
Definitely not SmartGWT. Their framework is bloated and has a very half-baked nature. They have a million widgets, but trying to get them to work for your project is not easy. Datasources complicate the process of managing your data in a very big way, for example, in order to get to data in your datasource, you must use fecth and inspect often. While you can cache the results, it is not always easy to interrogate them.
RPC is another weak and convoluted area. There is contradicting information in the documentation and in the forums. While the documentation will say that you should rarely use a custom operation as part of a ds, they forum will tell you that it's perfectly fine. Learning to use these tools effectively is an uphill climb on the best of days.
They will oversell the product. For example, the charting/analytics package contains graphs... But those graphs won't display negative values or let you manipulate axis labels in any meaningful way. And they openly respond to queries about this on the forum with a "yeah so what" attitude. "We don't plan on adding that to 3.0x even though that's one of our selling points, it's on our road map." When they sold me the package, they never mentioned that I couldn't display negative values. Really? What graph would not need to be able to show negative values? I can think of only one- the one depicting the number of unhappy Isomorphic customers.
Stay away from these guys, and head over to any competitor's site, for example ExtJS, JQuery, heck even quxdoo. There are a few projects out there that are really gaining ground and actually offer a good solution.
Take great caution if you ever evaluate this product. It looks nice, but about two weeks in to the project using it, you'll start seeing what I mean. Widgets are half baked, datasources are extremely over complicated, and just because you paid for forum support, doesn't mean you'll actually get anything other than snide, condescending answers that at first will make you think you missed something. You didn't they're generally very arrogant.
Best of luck, and stay away from this product if you value your development time and maintainability. Oh and one last thing. Look at the MVC example on their web site. It has literally nothing to do with MVC other than the label reads "MVC". They'll try to convince you that such frameworks are for inexperienced developers, and that such a concept has no place in real programming... Kinda like those try catch blocks.
Google's default library is the most powerful library.
Ext GWT adds bells and whistles but apart from that it's similar to Google's.
We're currently liking the GWT Mosaic widgets. We've worked with ext-JS and we've rolled our own widgets in the past. ext-JS licensing and bulk were a problem for us. Rolling our own isn't what we want to do. Mosaic gives us a happy middle ground which we like to think will be an even happier middle ground as the project matures.
I would say if you need only a few widgets then build your own. You might copy-paste some concepts from the libraries mentioned. But they all lack one or the other thing.
I have played with most of them and abandoned every one.
One thing to be aware of is that from the forums GWT-Ext looks like it will no longer be developed/maintained much (maybe not at all?). On their website they recommend migrating to SmartGWT.
Didn't see this one mentioned, Vaadin (previously known is IT Mill Toolkit), but maybe that's because it's not technically exactly GWT; as their FAQ says:
How does this differ from GWT?
GWT applications run in the browser,
while Vaadin applications run on the
server. We do actually use GWT as a
"rendering engine" on the browser
side, so you can combine Vaadin and
GWT.
smartGWT is slow and examples are lacking and it is very hard to find answers for even the basic questions, i.e. see all my non answered questions on this forum.
I'm dumping smartgwt.
Comparison of the two EXTs here with pros and cons.
We have built a large HR portal and a couple of smaller applications using GWT Portlets. The focus of the project is not so much on building a collection of widgets but on creating a simple programming model.
From the website:
GWT Portlets is a free open source web framework for building GWT (Google Web Toolkit) applications. It defines a very simple & productive, yet powerful programming model to build good looking, modular GWT applications.
The programming model is somewhat similar to writing JSR168 portlets for a portal server (Liferay, JBoss Portal etc.). The "portal" is your application built using the GWT Portlets framework as a library. Application functionality is developed as loosely coupled Portlets each with an optional server side DataProvider.
I am using GWT for a year. After lots of research, I have decided GWT Mosaic as a widget library.. Mosaic uses some of the GWT incubator components such as PagingScrollTable.. But the features of the combobox and table are not sufficient for us.. That is why, we have extended these components to add needed functionality.
Check out SpiffyUI: www.spiffyui.org
It is not just a widget library but complex UI/UX GWT framework.
Two important things -and what the most of libraries miss- are unit testing and debugging. It is where GWT shines. If you use a library which is based on vanilla js, you give away the ability to unit test and debug your project. As a GWT developer you should consider these points and use a library with no or minimal js dependency.
We've been doing gwt projects for more than 2 years, and we stick to the default widgets. We made our own open source library to autopopulate the default ones or our own widget extensions. Please check it, it's called gwt-jet. It's very well tested since we use it in large production environments, and we hope it will grow safely thru time.