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

3 Questions

 
Brunno Silva
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1 - Is it possible to use JSR 296 in a SCJD project implemented in Java 6? As I believe the answer probably is negative: Is it possible to create a similar, although simpler, implementation in my project?

2 - Is it possible to use metadata? For example, if I receive a spec to build a restaurant booking system and each restaurant table only accommodate 4 clients, do I have to create a constant in my source code or is it possible to store the value in a properties file, load it during run-time and set it in my objects?

3 - Is it possible to use metaprogramming? It improves decouple and flexibility, but the code becomes slightly more complex and not so easily to understand if it was coded directly. Is it possible to do according SCJD rules? Do you believe it's a good approach?
 
Gabriel Vargas
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow, that questions . I didn't know that spec so i take a quick look an can found some interesting things.


1 - Is it possible to use JSR 296 in a SCJD project implemented in Java 6? As I believe the answer probably is negative: Is it possible to create a similar, although simpler, implementation in my project?


JSR 296 is proposed to Dolphin (Java 7) in the package javax.swing.application, i think this wolud be a great release to SCJD because simplifies swing implementations (at least JSR talks about that) but isn't avaible in Java 6 . You are expected to make a framework (is better if is based in patterns) for your gui implementation so you can do that.


2 - Is it possible to use metadata? For example, if I receive a spec to build a restaurant booking system and each restaurant table only accommodate 4 clients, do I have to create a constant in my source code or is it possible to store the value in a properties file, load it during run-time and set it in my objects?


You can do that but an advice in this forum "Keep it simple as possible", if you found it overcomes requiriments don't do that, but if you find it fit requerimients you must justify it in your choices.txt.


3 - Is it possible to use metaprogramming? It improves decouple and flexibility, but the code becomes slightly more complex and not so easily to understand if it was coded directly. Is it possible to do according SCJD rules? Do you believe it's a good approach?


Same at the last, make a good design but keep it simple as possible. Remember in begining of assigment tell us:


The IT director does not anticipate much reuse of the first Java technology system, but intends to use that system as a learning exercise before going on to a web based system.


I hope it helps you.
 
Brunno Silva
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSR 296 is proposed to Dolphin (Java 7) in the package javax.swing.application, i think this wolud be a great release to SCJD because simplifies swing implementations (at least JSR talks about that) but isn't avaible in Java 6 . You are expected to make a framework (is better if is based in patterns) for your gui implementation so you can do that.


I'm creating an app similar to the SCJD test, just for training, before the actual certification test. In my initial plans, I intended to use JSR 296, but shortly before coding the GUI, I changed it and created a similar framework with the features below:

1. GUI lyfecycle management.
2. ResourceBundle loading and management.
3. Support for defining, managing and binding Actions.
4. Persistent session state.

All of them are present in JSR 296, but with more advanced options (like background Actions). Do it too complex? Indeed, I'm almost removing feature 2. As I noticed, the act of implement a feature not requested in the spec isn't a very good idea. Unless my test request internationalization, I'm not going to use ResourceBundles.

You can do that but an advice in this forum "Keep it simple as possible", if you found it overcomes requiriments don't do that, but if you find it fit requerimients you must justify it in your choices.txt.


Hum... All right. My current thought is to keep in plain text only persistent data (like user preferences) and any business rules defined in the spec as "dynamic" (it may change in the future).

Same at the last, make a good design but keep it simple as possible.


All right, but all this talk raised one more question:

4 - How to deal with "change"? I mean, do I need to create an app capable to change only in the requisites defined as "dynamic"? If I do so, I don't need OO at all. Right now, I'm thinking in let only the app high-level with change-friendly design. The low-level will have a more rigid, but simple, design, unless the spec requests, directly or indirectly, the opposite.

I hope it helps you.


Yes, it did. Thanks a lot.
[ July 28, 2007: Message edited by: Brunno Silva ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic