I am quite new to Java EE, in the past I developed mostly on .NET. Soon I'll start with a project based on Java EE (using Struts2). I am sure that there is some way to create a Template for the site which can be changed quickly (something like the Masterpages in ASP.NET).
What solutions are there? Which is preferred?
Thanks in advance
Johannes
I don't know ASP.NET and Masterpages but you might want to look into the Tiles plugin.
Edit: looking at the Masterpages documentation it seems like Tiles really is the equivalent you're looking for.
If you're looking for a template for the site to use with Struts2, one option is to use Sitemesh
Related
Does anyone know if there is any equivalent to Microsoft's ASP.NET Model View Control Framework with Visual Studio/C# but for Eclipse with Java?
Or put it another way one could build a website in C# using MS Visual Studio with ASP.NET MVC, is there anything similar for Java using the Eclipse IDE?
I've built up good knowledge with Java and the Eclipse IDE creating some Android Apps that I'd like to leverage, now I need to turn my attention to web apps and I'd like to stick with Java and the Eclipse IDE. Cheers!
There are a bunch. I'd check out Play!
but there are also: Apache Wicket, Spring MVC and some others.
There is also a version of Play! for Scala which is a bonus if you intend on moving up from Java to Scala one day.
There is also a similar question with a more detailed answer here:
Choosing a Java Web Framework now?
Spring MVC is worth a look. Spring goes way beyond "just" MVC, with APIS for DB, JMS, and loads more, which may be a little offputting if you're just keen to get to grips with an MVC platform, but it's arguably worth it.
http://static.springsource.org/spring/docs/current/spring-framework-reference/html/mvc.html
http://static.springsource.org/docs/Spring-MVC-step-by-step/
Tapestry or Wicket is worth trying.
Yes, there are a lot of them. Your problem is that there are too many, actually. Narrowing down the list can be a challenge. Everybody has their favorites (mine is Apache Tapestry, because it's actually fun to use, and very powerful).
My recommendation is to pick 3 or 4 (I'd go with Tapestry, GWT, Spring MVC and Wicket), and then spend a couple days working through the introductory tutorial that each of them offers. You'll soon know which one feels right to you, and you'll be basing your decision on your own experience rather than the strongly-worded opinions of strangers.
I am trying to review the different available wiki engines and was interested in one that is java based. Could you recommend or list any java based wiki engine so that i can have check it out.
I am familiar with the following JSPWIKi, Elsie.
Thanks
There are quite a few available. I'd check out the open-source ones first.
I have to say XWiki impressed me most, but that was for a feature set we were looking for quite a while ago, it may not match your exact needs...check out the full list I linked, see if anything fits you well.
You might like to think about Confluence. It's not open source, but it's extensible, if you wanted to make some kind of plugin.
I'm using JSPWiki since a few years.
JSPWiki is a feature-rich and extensible WikiWiki engine built around the standard J2EE components (Java, servlets, JSP).
VQWiki and Confluence have worked well for us.
Another great Java based Wiki engine is GWiki http://labs.micromata.de/display/gwiki/Home it can be embedded and extended by macros written in in Java or Groovy.
I hear about Haml as a templating engine mostly in the Ruby world. Can it also be used in Java projects?
2 years after this question was asked (:P) there are:
scaml -
http://scalate.fusesource.org/documentation/scaml-reference.html
jade -
http://scalate.fusesource.org/documentation/jade.html
It seems someone started a project for Java.
There's a list of Haml implementations on the Wikipedia page. At the moment, there isn't one for Java.
Update
There has been a Java implementation for a few years now : https://github.com/raymyers/JHaml
Scalate can be integrated with Spring
Perhaps through JRuby?
planning to add HAML support in JPublish. It will use JRuby.
Use JRuby!
How to is in this answer.
HAML is dependent on Ruby. I know there is a Python clone of HAML, not sure about Java.
Although, SASS/Compass are language agnostic.
Im porting a project from php to java. The project is a web-app based on php and ajax techniques with a javascript front-end. What java-frameworks would you use for something like this?
Does the result have to be written in Java, or does it just have to run on the JVM? In the latter case, you might want to consider Grails, which uses Groovy, a Java-based dynamic language that compiles to Java byte code and has full access to the Java standard API.
How well do you know Java?
Why are you porting it?
I can't really tell based on your description, but there are lots of Java web frameworks out there. Pick one. I prefer Spring.
I fear that you're about to be very disappointed. I anticipate a lot of questions like "Why can't I do X in Java? It's easy in PHP!"
Apache Wicket is a possible java based web framework you might consider. The default would be the java servlet and jsp frameworks.
without seeing the source code - you will need a complete rewrite. just "porting" will probably not work.
out of all available frameworks i'd recommend two: wicket if you want clean lightweight technology. with ajax. jsf/seam if you are in a corporate environment where it it easy to get tons of experienced developers.
I really like Stripes.
There's a really good book out on it too. Stripes ... and Java Web Development is Fun Again.
This question seems to come up alot. Related:
What Web Application Framework for Java is Recommended?
Best java mvc framework implementation for web apps
Does it make sense to use a framework for a simple java web app?
What language/platform to choose for a new web application?
In my opinion you would still do the same but generate the html with JSP and javabeans instead of php. javascripts and ajax will still work without a problem if the outputed html is the same.
It depends by the size of your project, the features and your resources.
If the project have'nt a lot of particular needs you can use Struts. Thsi is a stable framework, not really advanced but simple and powerfull for the development.
Another frameworks more recent and advanced are Spring and Wicket.
Before you start, I recommend you to do a check-list of your need:
Do you must porting a O/R mapping too?
Have you a stable developer knowing Java/J2EE?
Do you think to add some feature during the porting or in short-run?
etc etc
good luck! :)
I would port it to GWT
Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. Its goal is to enable productive development of high-performance web applications without the developer having to be an expert in browser quirks, XMLHttpRequest, and JavaScript. GWT is used by many products at Google, including Google Wave and the new version of AdWords. It's open source, completely free, and used by thousands of developers around the world.
I've used ZenTest and autotest to work on Ruby projects before, and I used to using them for test-driven development a la this configuration. I have a project that I'm currently working on in Java, and I was wondering if there is something similar in the Java world to achieve the same effect.
Might I also suggest Infinitest, it is under active development and works with other languages besides Java. I believe it works fine with Scala, but I haven't had much luck using it with Groovy.
It is free for personal use and is being developed by Improving.
I use junit max which is a eclipse plugin written by kent beck
Although not a lot of people use autotest like tools in java, there is one (although not so mature).
A blog about it.
Autotest for java.
I used the tool and looks pretty cool for first release.. I would request him to come up with next version soon...
I was looking for something like this a couple of weeks ago when I had to start doing some java. I couldn't find anything anywhere (being new to java) and I don't use eclipse so I hacked this together and will hopefully make it more useful in the future when I find some time:
http://github.com/feydr/crappe