Jena is Java toolkit for developing semantic Web applications. It includes an RDF API, ARP, an RDF parser used for the W3C semantics Web sandbox, RDQL (an RDF query language and processor), and a DAML API. Here is a link:
For reference, this is where I got the jpeg’s for the playing cards.
WordsEye Textures: Playing-Cards
Here’s a good example of using the Strategy Pattern and Template Method in combination. This is known as the Bridge Pattern.
java.net: Principles, Patterns, and Practices: The Strategy, Template Method, and Bridge Patterns
I have made a concerted effort to learn a design pattern. I have applied the Strategy design pattern to one part of the patience game I have designed for the AJUML project. I have used the Strategy pattern to apply the rules of the patience game. By applying this pattern my design has instantly become more object-oriented and thus more extensible and reusable. Now I can easily add new rules without having to change code. All I have to do is create a new class implementing the Rule interface.
The only design pattern I know thoroughly is the MVC pattern, specifically the model 2 version. Today’s presentations introduced me to some new design patterns and I wish to investigate further as I now see the benefits of such a vocabulary covering the recurring problems encountered by software developers.
There are several design patterns which are divided into 3 categories:
- Chain of Responsibility
- Template Method
- Factory Method
- Abstract Method
My second group presentation is about UML statecharts. I have not used statecharts before but after spending an evening and an afternoon designing a statechart for a lift I have gained a thorough understanding.
In statecharts we have:
- Guard conditions
- Initial and End states
- Internal actions: entry and exit actions
- Internal Transitions
- Completion Transitions
- Composite States: super and sub states
Statecharts attempt to model all states of a single object and how you get from one state to another. Events trigger transitions to other states. Each transition has a guard condition to distinguish itself and each transition may have an action that is performed. When a new state has been entered entry actions may be performed and before a state is exited an exit action may be performed. Whilst a state is active an activity action can be run. When a state is complete a completion transition leads the object into a new state. A completion transition does not have an event name but will include a guard condition and any actions. A state can have a timer function so that after a period of time there will be a transition from one state to another.
Over the past week and a bit the AJUML lectures have been about Collections, Exceptions, Classes & Objects, JDBC and HTTP. We have a final lecture on Friday that will cover servlets/JSP. I am familiar with all of the course content so far so have not found it a struggle.
We have been set two formative assessments. The first assessment is a series of presentations. The second assessment is a programming exercise that models a simple one-player patience game with the option of extending the code to a two-player patience game such as Malice & Spite that can be played on the web.
The first round of presentations were about IDE’s. My group chose JBuilder 9 Enterprise Version. The second presentations concern UML with my group giving a presentation on Statecharts. I think we have one more presentation to do next week some time, not sure of the topic yet.