Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is EL practical?

 
Zhixiong Pan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,
As we all know, EL is listed in objects. But some one told me that EL is not used very often in real work. I also think more rules(such as EL) will like two side sword, sometimes efficient, sometimes the burden on mind. Do you think so?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EL is not used very often in real work

That's probably because people don't know about it, and are still both feet deep into the scriptlet concrete.

Look at a page using EL, and the same page using scriptlet. Which one looks cleaner ?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's probably because people don't know about it, and are still both feet deep into the scriptlet concrete.


When I said 'EL' my co workers said 'Whats that?'.
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and above all.... these days you have solid frameworks like struts that do everything for you.. with all the tags...
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Niranjan Deshpande:
and above all.... these days you have solid frameworks like struts that do everything for you.. with all the tags...

http://struts.apache.org/1.2.7/userGuide/dev_bean.html Note: - Some of the features in this taglib are also available in the JavaServer Pages Standard Tag Library (JSTL). The Struts team encourages the use of the standard tags over the Struts specific tags when possible.


JSTL and EL are very nice. Anyone who discounts them for any reason makes me cynical. Usually the person is simply afraid of having to learn something new. My projects that have used JSTL and EL are soooooooo much easier to maintain than those without it.
 
Hendy Setyo Mulyo
Ranch Hand
Posts: 219
Firefox Browser Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Using JSTL & EL can make our code simpler. For example if you want to iterate a list you just need to use

<c:forEach var="book" items={books}">
<c ut value="{book.title}" />
</c:forEach>

rather than using scriptlet

<%
for (int i = 0, n = books.size(); i < n; i++) {
Book book = (Book) books.get(i);
out.println(book.getTitle());
}
%>

and still have a lot of examples that proves JSTL & EL is making our code simpler...

Conclusion: use JSTL & EL for simplicity and maintainability.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSTL and EL are very nice. Anyone who discounts them for any reason makes me cynical. Usually the person is simply afraid of having to learn something new. My projects that have used JSTL and EL are soooooooo much easier to maintain than those without it.


Tell me about it ! When I tell me co developers I hate struts they raise their eyebrows. Another layer of things to learn like struts tags, struts filters, form beans, validation bla bla bla. The goal is to have a simple front controller and more than half the developers who work with struts dont know why it is used in the first place. Struts is being used so often that people dont know what JSTL and EL are !!! All the projects I maintain/develop use struts. Sigh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic