home mail me! syndication

overthinkings

of Ruben Daniels

MVC and Javeline PlatForm


fig 1. Model-view-controller.

I’m not someone that knows the intricate details of design patterns. Whilst trying to tell people how Javeline PlatForm works I’ve often used the MVC design pattern to describe the functions. It’s even in the JumpStart Guide. In writing this article I talked to Arnold Daniels, who friendly explained to me that I was completely wrong. He simply explained to me the basics of MVC, which instantly made it clear to me why it’s nearly impossible, if not impracticle to apply this design pattern to widget based GUI systems. He said:

In MVC you have the following: The controller that handles a request. The view that represents the GUI, but doesn’t offer any functionality. And the model that contains all the business logic. Data is not part of the software. The model talks to the datasource.

This made me realize that MVC is not the right design pattern to fit on Javeline PlatForm. Still a bit confused I checked wikipedia.

Model-view-controller (MVC) is an architectural pattern used in software engineering. Successful use of the pattern isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other.

Ok, so the pattern is different, but the goal is the same: Clear seperation between layers, to make it easier to change or replace each, without effecting the others. I tried to create as much seperate layers in Javeline PlatForm as I found to be useful, and then allow them to be changed or replaced runtime. An extra advantage of this is reuse and seperation of tasks when working in a team. The layers are Data, Bindings, Components, Actions, Skins, Validation, Language, State.

These layers allow seperation of

1. Design (Skin) and the actual application
2. Back-end integration (Data, Bindings, Actions) and UI logic (Validation, State, Components)
2. Language and the rest of the application

The upcoming two articles will focus on SmartBindings (the Bindings and Actions layers) and Property Bindings (State).

No comments yet »

Your comment

HTML-Tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>