Can Haml be used in Java web apps? - java

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.

Related

zedgraph or equivalent for java

I recently had a remarkably easy programming experience when I used zedGraph to add graph plotting to my father's ODE solving program in C#. He now wants me to do the same in java. Does anyone know if it's possible to use zedGraph in java, and if so how? Failing that, is there a similar package for java?
As it's a library witten for .net according to the project description, no you can't.
There are many alternatives: http://www.jroller.com/dgilbert/entry/19_free_open_source_chart

What is the Masterpage equivalent in Java (Struts2)

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

convert java applet code in to java script

Is any way to convert a java applet code to java script?
Not really, no. They're different languages with different libraries.
If you want to develop for the client-side Web with Java, have a look at GWT
I don't think there is a good way to do so. Please remember: Java and JavaScript are two entirely different technologies. Don't mix them up.
Not directly and without effort as far as I know. However people have ported many things to HTML/JS, like Quake 2 on GWT. So you could invest some time and step into the code and port it with GWT.
Advantages of going with GWT arise from the fact that your applet is in Java language, which is the same language you use for GWT. Here is a list of what you can use in your code: GWT JRE Emulation
No.
Google Web Toolkit (GWT) is what you might need. I recommend book GWT In Practice 2008
12 years later there is now a tool called "JSweet" which claims to do exactly that: converting Java code to JavaScript: https://www.jsweet.org/
There is also a blog post from 2019 of someone using JSweet to convert some Java Applets to JavaScript: https://www.lprp.fr/2019/08/jsweet-convert-applets-to-javascript/

Java based Wiki Engine

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.

Is there something like ZenTest/Autotest for Java and JUnit

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

Categories