Java beginner web-development toolkit/environment - java

I have been tasked to develop an interactive website using java & mysql: using servlets to retrieve & massage data, applets to do special handling of the data client-side, and to handle requests from the client for different data views.
What would you recommend as an proper general-purpose toolkit/environment for web development using java.
I need to know what to use for the following:
Server side (tomcat?/?)
CMS
Editor / IDE
General tools/utilities
Directed (special purpose) tools/utilities
Testing and QA tools/utilities/techniques
Reference material (both on- & off-line)
Please evaluate the suggested solution(s) and supply alternatives/improvements/support.
Suggested Java web-development toolkit/environment
By cdb:
Server side:
Tomcat6
CMS:
Drupal (not necessary in preliminary phase)
Editor/IDE:
NetBeans (good for a beginner)
General tools:
(Almost everything is in NetBeans... go for it later)
Directed (special purpose):
(Almost everything is in NetBeans... go for it later)
Testing and QA:
JUnit and use Firebug (Do manual testing first)
Reference material:
HeadFirst Series on JSP, JavaScript, etc.
SCRIBD (online)
[edit]
Framework:
Spring Web MVC 2.5 - (this seems to contain most of the other frameworks)
Options distilled from the answers
Server side
Apache Tomcat - "HTTP web server environment for Java code to run"
Jetty - "HTTP server, HTTP client and javax.servlet container"
GlassFish - application server (based on Tomcat + more features)
JBoss - application server ("J2EE based application server implemented in 100% Pure Java")
CMS
Drupal
Editor / IDE
Eclipse - IDE
NetBeans - IDE
IntelliJ - propriety IDE
General tools/utilities
Maven - ".. a tool that can now be used for building and managing any Java-based project."
log5j also here[SourceForge] - "java logging library for Java versions 5 and above"
Directed (special purpose) tools/utilities
CruiseControl - team based "tool and an extensible framework for creating a custom continuous build process"
Spring Framework (- design)
Testing and QA tools/utilities/techniques
Watij - "Java API created to allow for the automation of web applications"
HtmlUnit - "It models HTML documents and provides an API that allows you to invoke pages, fill out forms, click links, etc..."
Firebug - (Firefox) "edit, debug, and monitor CSS, HTML, and JavaScript live in any web page"
Hudson - "Building/testing software projects [...] Monitoring executions of externally-run jobs"
LiveHttpHeaders - view & edit http request headers live
JUnit - "framework to write repeatable tests"
Reference material (both on- & off-line)
A List Apart - "For people who make websites"
Java - TiJ

Server side
Tomcat6
CMS
Drupal (not necessary in prilim phase)
Editor / IDE
NetBeans (good for a beginner)
General tools/utilities
(Almost everything is in NetBeans... go for it later)
Directed (special purpose) tools/utilities
(Almost everything is in NetBeans... go for it later)
Testing and QA tools/utilities/techniques
JUNIT and use FireBug (Do manual testing first)
Reference material (both on- & off-line)
HeadFirst Series on JSP, JavaScript, etc.
SCRIBD (online)

For web-development I use (and would recommend) the following:
JSP/Servlet API
Spring MVC
JQuery
XHTML & CSS
Fitnesse
With regards to resources, all these technologies are well documented on their respective sites, the only exception being XHTML & CSS for which I'd suggest http://www.alistapart.com.
With regards to editors both IntelliJ and (I believe) Eclipse have very good HTML, CSS, JSP and JavaScript editors.
Also use Firefox (as Brian has suggested) with both the Web Developer plugin and Firebug - both of these are indispensable.

Tomcat and Jetty are both well-known/supported servlet containers. If you're building a deployable for customers you may want to test on both, if you don't control the deployment.
For testing, check out (along with your normal unit test frameworks of JUnit/TestNG) Watij and/or HtmlUnit. These will allow you to automate the actual web/browser interactions and will save you a world of grief in the long run. The downside is that you'll have to invest some time in setting up your tests.
Related to automated tests, I think you need an automated build / continuous integration system. Numerous abound in the Java world. Two common ones are CruiseControl and Hudson.
For a lot of the above, standard Java/development tooling applies e.g. the 'standard' IDEs (Netbeans/Eclipse/Intellij - Intellij is worth paying for, btw). The same applies for CMS and there are lots of resources on this website about the pros/cons of SVN/Git/Mercurial etc. It's worth checking that your choice of CMS integrates with your IDE.
I would check out Firebug for simplifying development (on Firefox). It makes the front end development a lot easier. LiveHttpHeaders will ease diagnosis of issues relating to HTTP transfer.

CMS
Tortoise SVN
Editor / IDE
eclipse
General tools/utilities
Maven (build and deploy tool)
Cruise Control
GWT/ext-GWT/ICEFaces - web component technology
Spring - dependency injection framework
Hibernate - ORM
Axis 2.0 web service development kit
Jboss
Directed (special purpose) tools/utilities
log5j - for logging
Testing and QA tools/utilities/techniques
- Watij
- Firebug
- QTP for automated testing
- Junit Perf (Junit test cases for performance testing.)
Reference material (both on- & off-line)
Java docs of each of the technologies
Google ofcourse :)

Try vcl.js is all in one (front end and backend) enterprise web development tool,
Visual Component Library- include Page,Grid,Input,Gauges,Charts and many more
Pure JavaScript
Single page application
.Net Backend
Data binding
Twitter bootstrap
Simple database query execution
Routing
AMD - Module loader
I guess the idea is that you don’t need to learn jquery,Sammyjs or any other framework

First paragraph edited by request of slashmais : This answer is not really aligned with others, and the rephrased question. It's more of a complement to other answers.
I believe the personal preferences are really important in choosing between technologies. I see it as (dis)liking some things, and choosing the technologies that correspond. The rest of the answer gives examples:
For example, suppose I believe the developer's actions should be checked in real-time as much as possible, to receive immediate feedback, and also completion if possible, and avoid early so many errors. This (dis)liking determines some preferences:
use a statically type language (like java)
use an IDE that compiles as you type (like Eclipse)
any Xml must be validated, via strict xsd. If the content have references to other information (such as java code), then it should be checked (like Spring checking for bean classes).
for the view technology, because it depends on my java code, I must have a verification that includes my actual java code. An idea could be to code my view in Java. (like Wicket).
my properties need to be in properties files for translation. But using String keys in my code (or view) is not acceptable. I would run a small tool that create java enums from each property file, and my code would reference the enums.
... and so on
Other example, suppose I strongly prefer "Convention over Configuration". That is, I agree to follow stricts rules in my project, getting much less plumbing to do manually (because default values fit):
Maven is the build tool of choice. It will impose many constraints, but also provide out-of-the-box many "build" features...
For a web application, I couldn't use Struts 1, because they are these huge configuration files in struts-config.xml, mostly with plumbing code. I would definitely switch to something like Spring MVC, that has default values for mapping urls to controllers.
and so on ...
Other example, suppose I believe so much in the Model-View-Controller separation, for clarity and reuse, that I want to stretch it a bit. I could use:
in the view, I would cleanly separate my model (clean Html, no formatting, no script), my view (or formatting, external css only), and my controller (javascript, using the non-obstrusive javascript policy).
in the webapp, I could use Spring MVC to separate well those layers.
in the business (this example is a bit constrived :-) ), I could have a rich domain model, use extensively the command pattern ("controllers"), and expose explicitely my business services as an interface API ("view").

Related

Easiest web development method from Java perspective?

I have always been a front-end Java programmer, sometimes had to do C# on .NET but for the most part, Java is probably all I know about.
Just currently I have to do a small-scale website doing extremely simple thing and I really don't know where to start. My HTML skill is probably as good as I am with XML on Android, which is fair to say far less complicated than the HTML source code modern website have. I have almost no experience with PHP either, and no strong background on building or managing a database.
Is there some sort of technology that builds fully working website using mainly Java? It may have other languages I have to familiarize with but for the most part, I'd like to have little learning curve. For the backend I'm very sure I'm going to use cloud server services like Azure or Parse.
This is a very special project of me so I can't let anyone code it rather than me and myself only. Thank you and have a good day.
Use Servlets and JSPs for web development it's a start point and then java webservices as you already know XML.
I suggest you to build all your front-end using the following set of technologies: HTML5, AngularJS, JQuery, javascript, bootstrap. Your backend could exchange json with the front-end. The Bootstrap is the base for all your website and you could get a free template from the web itself, which would severely reduce your hard work at web designing. You would need just to adapt the links and calls, and the AngularJS would handle the controller and other stuffs ( have a chance to learn about ). Some JQuery components, or even AngularJS components would enhance your system usability and combined with javascript would bring most of hard work to front-end. I had the chance do start a system from zero and this is what I did, and now I have an AngularJS app working together with java by having java on the backend ( spring, hibernate, etc ) receiving and providing json data. At github you find some angularjs seed examples which you could use in your app and, again, save time and effort.
My apologies in advance, My answer is a bit broader in scope,
The Best Development Model for developing any website regardless of your language choice in Azure App Service is to take advantage two powerful features offered by Azure App Service, the Continuous Deployment feature and Deployment slots.
Start your website on a git repository and you may have node modules or bower packages, but on build your git will crunch it down to a working website with proper gulp files. Check out this blog to understand the process.
Once you have the git repo working for a simple website, your development process becomes much smoother. You can commit a change and Continuous deployment will automatically start a deployment for you to get your latest bits into your web app.. Check this blog for more details on Continuous Deployment.
You can use deployment slots to stage your changes and swap to maintain multiple versions of your web app on the cloud to easily build a production level application that has a last known good state. Check this blog for more details on Deployment slots.
The two features are the most used features while developing, deploying and servicing any project I work and I have found them very useful to understand them and use them in all their glory.
I am not a Java developer, but from the your question I can see you are looking to start on web development, the quick and powerful way (purely subjective here :D) is to use Asp.Net 5 with Angular 2 Beta. Here is an end to end tutorial on how to setup a development environment. Asp.Net 5 should be friendly toward Java developers as it is very light weight and simple to use and works great with vscode and visual studio community edition.
Let me know if the long answer helped, if you need a pure java environment that should be possible too :).

FatWire and Java

I would like to know what is the relationship between Java and FatWire.
I know it is possible to create templates using JSP but does it involve any standard Java programming? Also, is it possible to integrate it with MVC frameworks such as Spring or Grails?
Fatwire (now Oracle WebCenter Sites) is a CMS system originally based on an XML language. A JSP API (with the same features of the original XML language) was added later and it became prevalent. One of the biggest drawback of this design is that most of your coding must be done in JSP (that is a view only technology). So you have the (content) model and the view but not a controller layer.
But the real problem is that either you extend the Fatwire application with Java code (restarting the application server at each change, or using JRebel) or you have to code everything in JSP. Almost the website implementation I have seen so far uses a lot of JSP and some spare java classes, so websites have the tendency to be written with the crippled java available in JSP (you cannot share a class for example, or leverage the full Java OOP).
If you want to use full Java, you may use frameworks that implements MVC. For example, AgileSites (Disclaimer: I am the main developer of AgileSites). AgileSites basically uses JSP as interface to the CMS (as the documentation recommends) but those JSPs calls java code stored in hot swappable jar, built automatically while you do your development. So you can code everything using plain Java, without having to restart the application server at each change (only the jar, that is small, is rebuilt, when you save a file). On top of this Java enabling technology, AgileSites gives you plenty of features: clean separation of presentation from controller, using pure java controllers and pure html views, embedded unit testing support, an integrated build for continuous integration, scaffolding, a very simplified API covering 80% of normal needs (while giving full access to the full API) and more.
Fatwire templates can be developed using JSP, XML and HTML. Developing it using JSP has many advantages and Fatwire comes with JSP tags (called ICS tags) for standard based development. Most commonly you can see a JSP based template containing scriptlets of Java code invoking Fatwire's asset api which is implemented in Java.
Latest addition to this is Fatwire Web Experience Management (WEM) framework which are a collection of REST services with SSO that will enable you to write applications around Fatwire.
For example, I have developed REST based applications to integrate SVN, Translation systems and provisioning systems with Fatwire using Java.
Also, the latest Fatwire (Oracle Webcenter Sites) comes with set of developer tools called CSDT which is actually a Eclipse plugin that lets you develop templates within Eclipse (that has all the good features such as versioning, syntax checking) and facilitates local development, versioning of templates and continuous integration.
Yes, Java and FatWire can be used mutually. Code your java classes, wrap them and deploy in war or jar format in your app server lib folder. While coding inside JSPs, call your java classes or methods in JSPs and use them as required.

Vaadin vs. Bootstrap

I am planning to make an application that has views with complex forms and logical validation on the client side. I plan to use AJAX for submits and have some visual appeal.
I want a recommendation from those who have experience developing with Bootstrap and/or CoffeeScript and Vaadin. I have two options:
Using Bootstrap / CoffeeScript and some framework for the server site, such as Play Framework, Rails or Django
Vaadin
The criterion that concerns me is related to the complications that may arise in the client side JavaScript and/or HTML5 validation as well as in CSS and HTML code to be written using Bootstrap. Is it worth using CoffeeScript over Vaadin in a practically ria app? I see that there are many who have chosen Bootstrap and I'm sure they have their reasons.
Help me with the decision. Some relevant documentation could be helpful, too.
Vaadin
Vaadin in an amazingly good tool for building interactive desktop-style web apps developed in pure Java and delivered via regular web browsers.
Benefits
Vaadin 6, 7, and 8 apps run entirely on the server-side. The JavaScript library automatically installed by Vaadin into the user’s browser window simply:
Draws on-screen whatever the server-side app tells it to.
Feeds user actions (clicking, typing, and so on) back to the server for the app to consider and respond.
So there is no "logical validation on the client side" or "html5 validation", at least not from the Vaadin app developer’s point of view. The Vaadin framework may do so under-the-covers in its internal implementation, but that is none of my concern as a Vaadin app developer. That’s the core benefit of Vaadin: I don't care how Vaadin gets my forms onto the user’s screen. As a Vaadin app developer, I am not writing any JavaScript, HTML, DOM, CSS, or AJAX. Just pure Java.
The style is similar to Swing: Instantiate a layout (a form), add labels, add buttons, add fields, add other widgets. Attach validators as needed. Nest additional layouts, for complicated forms. All of that executes in memory on the server-side, all in pure Java. Finally tell the layout to show itself. Poof, like magic, Vaadin tells the browser to display a likeness of that form.
If you want to develop desktop-style business-style apps that happen to be deployed through a web browser, Vaadin is a wonderful tool.
Trade-Offs
Trade-offs include:
Lots of memory and CPU usage on the server-side.
Giving up control over the HTML/CSS/JavaScript.
Scaling
Your web app lives on the server, not the client. All your business logic, the users’ entered data, the internal representation of all the users’s forms such as row items in a table, all this lives on the server. Multiply that by number of users. This means a Vaadin app can demand much memory and CPU usage.
That may limit scaling up. But given 64-bit Java, multiple gigs of memory, and multiple cores on even the lowliest of machines such as a Mac mini, scaling-up is likely an issue only for the largest/busiest of apps.
And even in those rarer of large/busy app there may be ways to handle scaling in Vaadin. All of the app lives in a Servlet Session. Some web infrastructure allows such session state to be moved between servers or even persisted out to storage to be picked up by other servers.
Or your app may scale well. Simulations with 11,000 simultaneous clients have been done. See:
Vaadin Scalability Study - QuickTickets (company blog post)
Scaling with Vaadin and WildFly Webinar with Arun Gupta (video presentation, YouTube)
Control Over HTML, CSS, JavaScript
If your team is more comfortable or experienced with conventional web app architectures, then Vaadin may not be for you. In Vaadin you write your app entirely in pure Java, and Vaadin translates that to HTML, CSS, and JavaScript automagically.
You can tweak the CSS a bit. And even without touching CSS, Vaadin’s "themes" (Valo, Reindeer) give you much control over colors, sizes, and fonts if you wish to override the defaults. But know that Vaadin is in the “driver’s seat” in generating the HTML & CSS; you are just passenger who is allowed a small bit of “backseat-driving”.
If your goal is something other than developing desktop-style apps, if you want to take full control of the HTML/CSS, then Vaadin may not be for you.
Updates
Vaadin 8 released
On Feb 22, 2017, Vaadin 8 was released. Biggest enhancement is re-written data model and data binding API utilizing modern Java features, such as generics with type parameters and lambda expressions. Also, more efficient with memory and CPU.
Vaadin 7 released.
While largely the same architecture as Vaadin 6, 7 is better than ever. See: What's New.
I would go with Rails 3.2 + Bootstrap + Backbone.js, the stack we use here.
Rails: Nice community, solid platform, very easy to develop for, can deploy to Heroku (God bless Heroku).
Bootstrap 2.0: HTML5-compliant, nice out-of-the-box features, good community (just look at their github page), sensible js plugins.
Backbone.js: Very nice for client-heavy applications, plays nice with the rest of the stack (specially jQuery), provides a good user experience when used right, unobstrusive. Specially good for dynamic forms since you can refactor a lot of code using specialized views (autocompletes, tables with multiple items, related select boxes, etc.).
As for documentation, both Rails's and Bootstrap's are top notch and you can find a lot of books about them. Backbone.js, despite its large user base, is more specialized, but you can still find a lot of good screencasts and e-books in the Net (I recommend the works of peepcode and thoughtbot).
Good luck with your app!
PS: Another good point of using Rails is the set of gems and addons you can use. Full text search? Sunspot. Audit and Versioning? PaperTrail. BDD? Cucumber. I suggest you checkout the Ruby Toolbox site.

RIA platform like Netbeans RCP

Does anyone have any experience with a really good RIA platform. I'm going to begin developing an application, and I intend to use Netbeans RCP for the thick client. I'd also like to create a RIA version of the same app. I've looked around for a RIA framework that rivals what you can get with the Netbeans RCP, and really haven't found one. My requirements are as follows.
Modular - I would like to be able to add and remove features without recompiling
Out of the box features - I'd like to have feature out of the box that are similar to Netbeans RCP (or most any other RCP), such as a menu system built in, a windowing system (allowing docking and remembering where windows were between sessions), Authentication and Authorization support out of the box, as well as the "Options' pane support (I really like how I can add amodule, and have that module expose options through the standard "options" dialog).
Actions and commands - I'd like to be able to handle actions from other modules without needing to couple the action to the other module.
I would like to deploy the app through GlassFish, but that's not a deal breaker.
Modern - the framework should use the latest standards, and I'm planning on moving to J2EE7 as soon as I can, so the platform must be actively updated to support such a migration.
I'm willing to pay, but the license must not be "per server" or "per instance"
Java isn't a must but I'm planning on using java for the rest of the app (services layer) and the Netbeans RCP front end.
I've been a .net developer for the last 6 years, and have just recently looked into the world of java, and I'm really amazed at the rich community, I thought .net had a large open source community, but the java one is orders of magnitude bigger. I don't know of anything even close to the Netbeans RCP in the .net community, let alone a RIA version.
I've looked at a few frameworks, but most of them seem to be mostly libraries that you can use to build applications, I really don't want to spend the time and maintanance cost to build the infrastructure listed above. Things I've looked at are....
Tepestry
"SmartClient"
GWT
Wicket
These all seem to be good building block, but I want an out of the box solution. The application will be mostly CRUD operations, but I will also be streaming video through the app, as well as handling alerts and events from the server.
Thanks for any advice
Joshua
Eclipse with the GWT plugin is fairly easy to get running out of the box. Step through the GWT tutorial first and you'll be ready to go. I realize you've already looked at GWT but the Eclipse plugin simplifies a lot of grunt work.
Indeed. GWT Eclipse plugin simplifies compilation, depoloying and running them (Jetty). It also has App Engine support.

What are the main tools/frameworks used nowadays in Java?

I am a .NET / C++ programmer switching to Java. I had previous exposure to Java 10+ years ago in university.
What would be the typical things to be learned in order to be able to program web applications in Java?
I can think of:
JSP/Servlets
Eclipse
EJB
What else do people use these days?
The idea would be to be able to land on a Java project and make myself useful
Hibernate and Spring
I migrate between a lot of clients who use Java heavily. Here's what I see people use:
a) a lot:
JDBC
Servlets
Ant
Log4J
Eclipse/Intellij
b) quite often:
JSP
Spring
Maven
Web Services
the Apache Commons libraries
c) barely ever:
EJBs (not since 2002 or so!).
I've not come across Hibernate or other ORMs. I'm not sure why, I confess, since it seems popular in the context of SO.
Tools department:
Eclipse and Netbeans
(For web-centric Java development, see the Eclipse based Aptana IDE)
If you are focusing on web applications specifically, it's important to know and understand many topics that are independent of Java:
JavaScript
SQL
CSS
XML (XPath in particular)
HTML
HTTP
You need to get a grasp of these concepts before learning Java frameworks that may or may not simplify the creation of code dealing with them.
As far as Java-specific libraries and frameworks go, these are essential:
Servlets and JSPs
JDBC
Ant
Apache Commons -- for the love of all that's good, don't re-invent common libraries!
These are nice to have but are too narrow to focus on before learning everything above:
Spring
Hibernate
Maven
JSF
Grails is also a Java platform web application framework, although it's coded in the Groovy language rather than Java, which is more like Python or Ruby and is dynamically typed.
It is based on the Project and Company, i am writing few tools/framworks which i came across
IDE :
Eclipse
Jboss developer
Ibm Rad
Spring tool suit(sts)
Repository
Svn
Smartsvn
tourtoise
Git
Built Tools
- Ant
- Maven
Presentation
-Html, javascript, jquery, ajax
-Html with jsp
-Html with Struts tags
-Html with Spring tag liabaries
Controller
-Servlets
-Struts
-Spring
Business
-Ejb
-Spring
Database
-Jdbc
-Spring
Other
- WebService - Soap , Rest
- Putty
- FileZilla
- log$j
- Mokitio
- Junit

Categories

Resources