Kalyan Dasika

Greenhorn
+ Follow
since Mar 16, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kalyan Dasika

Hi,

I have a line of text that needs to be displayed on a web page, printed in PDF and also possibly output as xml. There are multiple places in my application where this property is displayed. Recently we encountered a situation where this text had a "Less Than" symbol, a well know html character. The text gets truncated in html but prints fine in PDF. If I use StringEscapeUtils.escapeHtml in JSP it prints the entire text without problems. But I have a lot of places in the application where this property is rendered in HTML. I can find all these places and use StringEscapeUtils... to escape the HTML character. But I felt it is bad design. What if I have future needs to display this character else where. It could be a potential ongoing problem.

So I thought why not wrap the escaping logic in the domain object that returns this text. But soon it started printing the lt; in the PDF reports. Not a good option either.

I thought of the visitor pattern. But somehow I need to provide a context e.g. html, pdf, xml etc. to get a well formatted text.

Any ideas on how I may proceed from here?

Thanks in advance,
Kalyan
Hi Venkat,

I really appreciate you for taking the time to respond to my questions. Your suggestion on introducing Scala in small iterations and in testing situations seems very workable and I would try to push my team into embracing it.

I can see the advantages these languages bring to the software development plate. In your experience with talking to people that are using, can you share with us in what kind of scenarios did they choose Scala over Java or Scala over Groovy.. I mean it seems to me that you could end up having a mix of all these new crop of languages in your development cycles.

14 years ago
Hi Venkat,


Is the verbose nature of the Java programming language killing it?

If languages like Scala, Groovy can make life easier for developers why can't the language (Java) support similar syntax?

How would you recommend the use of languages like Scala in a typical enterprise developing software that has more people experienced using Java? Is there a steep learning curve?

Thanks
14 years ago
To Michael Swierczek,
Did you try making use of the commons collection Predicate utils? We use it extensively in our searches of various type of associated collections. The ease of use, performance and most importantly "avoiding all the ugly looping code" made us use this neat solution.
- KD
to print the first statement add the following line





this will print the first statement as well.
Has anyone used JSF to render trees? How is the performance when these tree grow big?
We currently use a Java script component (works only with IE) to build and display trees that could grow bigger dynamically as you navigate (by clicking a child node). We were looking into replacing it with the browser independent JSF tree component.

the tree could grow to about half a million nodes os please give your thoughts if we are thinking in the right direction. The emphasis here is "Faster response time". The current tree component is decent enough but its getting really hard to maintain and we're stuck on using only IE.

Thanks
19 years ago
JSF