• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem with webobject attributes in WOBuilder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with webobject attributes in WOBuilder


  • Subject: Re: Problem with webobject attributes in WOBuilder
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 15 Jun 2006 10:33:01 -0700


On Jun 15, 2006, at 5:08 AM, John Stewart wrote:

A slight afterthought...

My idea of MVC is that the only the View deals with appearance, although may need a certain amount of logic to handle this. The Controller carries the business logic and shouldn't be concerned with appearance, though has to handle I/O of data to the View.

For example, the Controller can tell the View that it wants to display something as "On" or "Off", but doesn't care how this is done.
The View could display this as verbal "On" or "Off", or could use icons for red & green traffic lights.
The View should contain all "ViewLogic" necessary to create this appearance. A useful encapsulation which allows that to be changed later without affecting the Controller.


I was hoping to handle the View entirely in .html + .wod, so if the .css changes I just change the references in there. However, the .wod logic won't cope with that,

No, not as you outlined it. But I think you are trying to do it wrong. You _can_ do something like


...
class = application.properties.cssClassFor.inputForm.
...

With a bit of support code in Application. This assumes that you have a properties file with entries like

inputForm = MyInputFormClass;


so I have to extend the View to include a chunk of Java code. Still MVC as long as I separate it from the Controller code. However, I'm stuck with the WOComponent being part of the View, and also the Controller due to pageWithName. Javascript isn't an option as our client has it turned off for security policies.

Just extra the pageWIth Name calls to another object, say PageFlowController. Then do


nextPage = mySession.pageFlowController().nextPageFrom(this);


I suppose it's just the nature of webapps that the "Page" is both View and Controller, though it's good to separate these code-wise. WO makes a good attempt at this, as long as the View logic doesn't go beyond boolean.

Not the nature, just the path of least resistance.

Chuck

--
Coming sometime... - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Problem with webobject attributes in WOBuilder (From: "John Stewart" <email@hidden>)
 >Re: Problem with webobject attributes in WOBuilder (From: "John Stewart" <email@hidden>)
 >Re: Problem with webobject attributes in WOBuilder (From: David Masters <email@hidden>)
 >Re: Problem with webobject attributes in WOBuilder (From: "John Stewart" <email@hidden>)

  • Prev by Date: Re: Euro symbol and other characters distorted
  • Next by Date: Re: How to include a Framework in a WebObjects Application
  • Previous by thread: Re: Problem with webobject attributes in WOBuilder
  • Next by thread: Re: Problem with webobject attributes in WOBuilder
  • Index(es):
    • Date
    • Thread