I want to avoid writing <table></table> and other stuff like that, by writing Java (or Python) classes. Example:
Html html = new Html(); obj.setCoordinates(120,50); html.add(obj);
Which API is the best for this ?
Update
I’m currently trying Vaadin, a Java web framework which extends GWT. It offers web functionality with a coding style similar to a desktop API.
I might be misunderstanding your question. Like others say, it’s an extremely bad idea to move all of the HTML generation into your code in terms of printing out HTML elements. A better approach is to create a template for the HTML you’re trying to create, leaving holes into which you insert your dynamic content (e.g. you have a place where the rows of your tables will be inserted. I use StringTemplate and it sounds good for what you’re trying to do. See the Fill A Table example in this introductory page