Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Best Approaches  RSS feed

 
Jolene Dicks
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,
My development team and I are kind of new to programming with JSP, Java, XSL, XML, and Oracle. We are in the process of designing a system using JDeveloper and BC4J, and I had a few questions on the best approach to take for several items.
Firstly, our system is going to have a quite a few drop down objects and we need to know the most efficient way of filling those lists. Should we hard code the drop downs in the XSL file or should be store them in XML files? We want to stay away from storing all these values in the database to avoid round trips to the server and ultimately using up more resources. We want to keep it at the middle tier.
Secondly, we are also going to be using several multi-select objects throughout our system. We were thinking of using a similar control that alot of wizards use... Two list boxes with the ability to move items to and from those boxes. However, we are confused on how we should store those multi-selects in our database. How does one go about this?
Finally, are there any advantages to having multiple packages within one system or project?
I would greatly appreciate any input or suggestions on how any of you may be currently doing the things that I'm asking about. Your successes and failures... Thanks in advance.
Jolene
 
Tim Holloway
Bartender
Posts: 18709
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your drop-list items change infrequently, you could just put them in a text file and edit them with your favorite editor or an admin web page. Probably at the other extreme is to use Entity EJB's and let the EJB container cache mechanism keep them hot. This is a way to go if the list is very volatile.
Usually when I have something like your multiselects, I have a master list and just store the items actually selected, so the "from" list is built by making a copy of the master list and removing the objects that are in the current selection ("to") list (this is fairly easy to do with the Java collection classes). However there are other ways - it depends on what else is going on.
Multiple packages in a project are not so uncommon - after all, my JDBC drivers are in a "foreign" package, as are all the "java..." classes. Deciding to break a project up into packages such as "com.xyz.shoppingcart", "com.xyz.utils", <i>etc.</i> and determining what those packages should be is a great way to keep developers arguing all afternoon. There's no "right" way -- only ways that make it easier for people to find stuff.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!