Opened 11 years ago

Closed 10 years ago

#12924 closed enhancement (fixed)

Split view factory code out of mobile ViewController

Reported by: Chris Mitchell Owned by: ykami
Priority: high Milestone: 1.8
Component: DojoX Mobile Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description

Consider refactoring the parse and _instantiate functions in ViewController? out into a new dojox/mobile/app/viewfactory module, so that different mimetypes/fileext/datatypes can be mapped to custom classes that create views from data (similar to javax.activation pattern.

Attachments (2)

data-handlers-class.png (5.3 KB) - added by ykami 10 years ago.
data-handlers-flow.png (10.2 KB) - added by ykami 10 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by Chris Mitchell

Owner: changed from Ed Chatelain to ykami

comment:2 Changed 11 years ago by Chris Mitchell

Type: defectenhancement

comment:3 Changed 10 years ago by ykami

In [27503]:

Refs #12924 !strict Externalized the hard-coded parse() method, and added componentized data handlers, which are fully customizable.

comment:4 Changed 10 years ago by ykami

DataHandler

DataHandler provides an interface between content data and content handlers. DataHandler calls DataSource to retrieve data, and calls ContentHandler to parse the data and create a new view. DataHandler is called from ViewController.

FileTypeMap

FileTypeMap provides a map that can be used to determine content type by the URL of the content data.

DataSource

DataSource encapsulates access to the view content data. It is called from DataHandler.

ContentTypeMap

ContentTypeMap provides a map that can be used to determine content handler class by a content type.

ContentHandler

ContentHandler parses the given data, and creates a new view with the data.

Version 0, edited 10 years ago by ykami (next)

Changed 10 years ago by ykami

Attachment: data-handlers-class.png added

Changed 10 years ago by ykami

Attachment: data-handlers-flow.png added

comment:5 Changed 10 years ago by ykami

In [27594]: Refs #14461 !strict. Fixes for View and ViewController to use the data handlers. The hard-coded data handlers were removed.

(the ticket number I used was wrong.)

comment:6 Changed 10 years ago by ykami

In [27731]:

Refs #12924 !strict Fixed initialization error.

comment:7 Changed 10 years ago by ykami

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.