Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
What kind of tools or techniques exist for this purpose?
Other than display logic, which is notoriously hard to test, my advice would be don't put logic in JSPs. Instead move it into POJOs and it's problem solved.
Check out HtmlUnit or Watij.
They provide a headless-browser mechanism that allows you to write tests by navigating HTML pages, filling in forms, pressing buttons etc.
Having said that, I try to put as little functionality in my JSPs (or similar) as possible, and focus my testing on the underlying business logic objects and their creation of beans for JSP display. But final testing of the JSPs is definitely a good idea.
Try JspTest. Use it for testing the view logic in a JSP page.
Strip it out? ;)
In Container testing (using say Cactus) or compile the JSPs to servlets and then mock in the response/reply objects.
JUnit In Action has a section of unit testing JSPs & server side code. I would highly recommend the book.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have programmed in Java and although offers many possibilities for the graphic customizable interface, it is always enclosed in 4 lines (which form the rectangle) ... I know (because I've used it) that you can modify the edges of the application, make round or polygonal, but you have to get deep in the code and that can be tedious.
There are some other language (Java or tool) that allows for the really striking graphical interfaces, without suffering much programming?
If you don't bother switching languages, you could try C++ with openframeworks.
That library allows you to use openGL in a simple way.
It may be time to retool. Java is still a great language for enterprise-type development. However, what is hot now, and will be for the next several years is full-stack development with javascript. Node on the backend, Angular or some other declarative framework on the front end (jQuery is popular now, but it is imperative and not really a framework, just a DOM manipulator). Now you can have an integrated environment, one language, and you can concentrate on css, html5, and tons of javascript-based libraries to do practically anything you want to do.
Just my opinion (so of course this will be voted down)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking for a way to perform automated input field filling and button submission on the clientside in a browser. I also want to write some logic based on which different form fields or buttons are to be clicked.
What is the tool of choice for this when knowing Java only, but already several years of experience?
Or could I use Seleniumhq for this? Could selenium implement some kind of "business logic" (like decimal computation) before deciding to click a specific button?
Selenium has two versions, a basic version called Selenium IDE and a version called "Selenium WebDriver" where you can use any one of many programming languages to control your browser session.
Since you are able to control the WebDriver in Java, you would be able to incorporate your decision- or business-related logic there.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
We are at the starting point of a GUI focused webapplication. Business logic will be in the background. The web GUI will have multiple languages and will also contain complex charts. Chart data will be calculated via the webservice in the background, accessed via REST interface. All input fields should get validated on entering new values. The application must also run well on tablets. What is the best Java Scripts Frameworks or any combination of framework recommanded for this approach. Is Dojo the choice or better GWT? What is your experiance, other better recommendations?
Too many possible answers. Personally I like GWT. It's very flexible. But also I'm a Java developer and I don't like Javascript, and GWT saves you (mostly) from the pain and torture of writing Javascript.
Anton,
Really a matter of choice and personal taste, however, if you want to adopt a mvvm approach where your client objects are syncronised automatically, I'd suggest knockoutjs. This framework is eveolving daily and takes a remarkable amount of grunt out of complex work. Take a wander over to it:
http://knockoutjs.com/
Quote from the page:
By encapsulating data and behavior into a view model, you get a clean, extensible foundation on which to build sophisticated UIs without getting lost in a tangle of event handlers and manual DOM updates.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Coming from .NET, I'm used to Ninject, that's a small simple ioc-container. Is there anything simple and lightweight for Java?
The simpler the better!
Pico container or google-guice. See a comparison here.
Btw, few people will call spring "ligthweight", but it can be used as such with only the basic features. Hence it's included in the above comparison.
CDI? (almost the same thing as Guice, but is a JSR rather than proprietary)
Guice?
Silk DI is a 120K jar with no further runtime dependencies needed. So it is way more lightweight than e.g. guice or spring and still smaller as pico-container but has an even more powerful feature set. Also it doesn't cheat by splitting features into a separate additional jars like multibind for guice or the gems for pico-container.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking for a collection of rich, well-written, stable, customizable and cool jsp 'controls'.
JSF has richfaces, primefaces, icefaces
GWT has ext-gwt, gwt-ext, advanced-gwt, on-gwt
Does something like this exist in JSP? Some tag library that has calendars, sortable and pageable tables, ajax autocompletes, pick-lists, partial requests, etc.
I know displaytag, ajax-tags and jspcontrols, but these aren't so complete as the ones listed above for the other display technologies.
If no such library exists, please advise which are the best libraries that cover parts of what I'm looking for.
Have a look at SweetDEV RIA (which is/was used by a french bank), it looks close to what you're looking for. See the demo here.
Some other projects you might want to check (they don't cover all your needs though):
Rialto TagLib
Prize Tags
jQuery UI Taglib
See also:
Java Ajax Frameworks
Open Source JSP Tag Libraries
It seems to me, most features you listed (except partial requests and maybe pick-lists (what's that?)) rely mostly on javascript and not on back-end logic. I mean, calendar doesn't pull list of days out of database, it functions in the browser completely. Thus, it makes more sense to have them done in js.
I won't be too original recommending jquery for that, it has many fabulous plug-ins, and jquery-ui isn't bad either.
edit I worked very little with both jsf and gwt, so can't tell how much power their offer and if it works better than js solutions.