• Post Reply Bookmark Topic Watch Topic
  • New Topic

Declarative Programming in Java  RSS feed

 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Narayanan wrote an interesting article Declarative programming in Java in ONJava.com

What makes EJB components special is the declarative programming model through which we can specify the services such as security, persistence, transaction etc., that the container should provide. An EJB only implements the business logic; the services are associated through a deployment descriptor, which essentially acts as metadata for the EJB. At runtime, the container uses the metadata specified in the deployment descriptor to provide the services. The deployment descriptor is an XML file, not part of the Java classes that make up the EJBs. Is there a standard way to annotate the Java classes that make up the EJBs so that a developer can look at the class definition, together with annotations, and know everything about that class? It would be even better if the remote, home interfaces and the deployment descriptor could be automatically generated by a tool using the annotations. Better yet, can we provide the same kind of declarative services for a simple Java object? If so, how? This article examines how JSR-175: A Metadata Facility for the Java Programming Language will help us in finding answers to these questions and more.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just read it. What's it about, Jose?
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
err.. I just was looking a forum to post interesting articles I would like Ranchers to be aware of. Is this an adequate one?
[ May 09, 2004: Message edited by: Jose Botella ]
 
Nick George
Ranch Hand
Posts: 815
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your best bet is Meaningless Drivel
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't actually read the article, but...
This is a really bizarre use of the term declarative programming, which normally means something utterly different: it normally refers to a programming system in which you describe the problem, and the system finds the solution -- as in rule-based programming.
Configuring an EJB app is is what most people would think of as "configuration," not "declarative programming."
 
Blake Minghelli
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a really bizarre use of the term declarative programming
May not be as bizarre as you think. I haven't read the article either, but the books I've read so far on servlets and EJB all refer to the "configuration" (or at least certain aspects of it) as declarative programming. Declarative programming sounds so much fancier than configuration.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!