Can Groovy do everything Java can? [closed] - java

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I tend to think that Groovy is a super-set of Java... But I would like to hear opinions of more seasoned developers.
Is there anything that you can do in Java, but not in Groovy?
Java EE specs are fairly complex and maybe some of them are not accessible via Groovy?

do { ... } while() comes to mind. You can emulate it using closures or whatever.
...
We are currently working on a Java EE 6 coded mostly in Groovy. No problems whatsoever. CDI, transactions, jsf's managed beans, all work flawlessly. Of course we are kinda restricted when it comes to metaprogramming, so we usually use it for tests, mocks and when there are only groovy objects talking.

You can do everything with Groovy you can do with Java. The only complication is when you want the two to interact.
You can also use all the popular frameworks like Spring. In fact, Spring even lets you configure your beans with a Groovy bean definition DSL.

Related

In Java design is composition not used much anymore? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
A Java developer (with lots of experience in sophisticated, high-performance environments) very recently commented that "composition is not used much anymore." I was surprised by this comment. Is this true?
On the one hand, other answers on this forum indicate that difference between composition and aggregation can be ambiguous (can the whole exist without the part; does the part exist throughout the life of the containing object?). But perhaps in all of these cases the question stands--how to add behavior to an existing class or class hierarchy.
The context of his comment was a discussion of possible alternatives to inheritance. If this developer is correct, what has replaced composition in working practice? Mix-ins through added interfaces?
Any perspectives are welcome!
If anything, it's probably used now more than ever thanks to dependency injection frameworks like Spring. The model that all of the Java developers I know use is to build classes that relate to one another in functionality more by interface and purpose and to use Spring to inject them according to a particular configuration (ex the ability to replace entire security frameworks just by changing a spring configuration file and adding a few new JAR files).

Is it possible to make a website using GWT and JavaScript? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm going to work on a website with a few of my friends, but I don't really have much experience with JavaScript, HTML, or CSS.
I looked at GWT and thought it'd be good for me since my best language is Java.
Most of the friends I'm working with, however, are familiar with web development in JavaScript and will likely use it on the project.
Is it possible for me to GWT to contribute and for them to use JavaScript on the same project?
Not easily. GWT generates Javascript blocks that are intended to be self-contained, and they don't readily interoperate with other Javascript libraries, even something as ubiquitous as jQuery. In my experience, with the exception of analytics and other aspect-type scripts, you're better off picking one approach or the other and using it for everything.

In what scenario the framework should not be used? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have the first meeting with my project manager and she assigned me a project which to be start soon. She explained to me few points related project e.g. technology, functionality, end user expectation etc.
MVC based web application
Not to use any framework
Server Side : use only Java, servlet, jsp
UI : Javascript, jQuery can also be used
integratation with existing project (at later stage)
There is one point i can not understand why she asked me to not to use any framework although i could not ask why. Does anybody clarify ? If i use any framework like spring then will it create any problem while integration with existing project.
I can recognize 2 sub questions in your question.
In what scenario the framework should not be used?
why she asked me to not to use any framework?
Answer 1
I can imagine situation when you don't need any framework. It is if you have to create extremely simple 1-2 screen application without any security, access rules and probably without DB based persistence. This means that IMHO framework-less application is good as a student exercise just to understand how things work.
Answer 2
She is ... not professional enough. I am sorry to say it but this is pretty obvious. To implement MVC without framework you have to perform a lot of dirty work. I believe that the key reason for this strange requirement is "integratation with existing project" that is probably created without any framework, so PM thinks that framework could bother you during this integration.
Moreover, product manager should never dictate R&D how to implement project. Project manager can politely ask to implement certain set of features.
I am sorry if my answer is helpful.

Java Functional testing [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have a Java application that has a GUI for user interactions.
The GUI is implemented with SWT.
Now I want to make some Functional Tests for the application. As whitebox as possible.
I have been trying some frameworks like Maveryx, and SWTbot. But Maveryx is just a pain to configure and it didn't seem to integrate very well with a CI server. SWTBot I simply wasn't able to get it to find all the necessary classes after installing it on eclipse.
I would like to know what are other people using to test their Java GUI applications. And if possible to point me towards some tutorials about that frameworks.
Ours is awt/swing/java2d application . We use jemmy for it. According to the documentation it works with SWT as well. Please give it a try.
If you are willing to pay some money, Rational Functional Tester (very expensive) or Squish could be considered. Both are very good products, squish is significantly cheaper (or it used to be)

java spring framework knowledge consolidation [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I recently followed some spring related tutorials and I get the feeling that I will forget the concepts learnt so far quickly, since projects I am engaged in at the moment, do not use spring.
I would love to consolidate the things I have learnt and stay in touch with spring. My question is what kind of a project should I start in order cover most of the concepts that I learnt in spring?
Thanks.
Think of a Project for yourself. A photo sharing app for example. This is how I do it. I think of a project for myself and code it in my free time - thus stay in touch with Spring for example.
btw, my last project using spring has now over 100 registered users, which I did not expect and they all demand other functionality - this way you have to improve also.
I might suggest openshift as your deploy environment - it's free with plugins for eclipse.
You might also ask/answer spring related questions here on SO - this is always helpful of course.
Think about some examples and try to resolve with spring, Write blogs about spring, contribute some open source projects that use spring. This is the way that I learn spring and still doing. :)

Categories

Resources