Hierarchy Change propolsal



I'm getting review your code and draw a DIA file for object hierarchy, for better understand.

After writing a different implementation about Serialization, get in my mind to redesign GXml hierarchy converting some classes to GObject Interfaces.

SERIALIZATION

In order to avoid conflicts with JSON (actual in 0.3 series) implementation and Object Model in serialization branch, I suggest:

a) Leave Serializable interface without default implementations

b) Add a Serializable implementation using a SerializableJson class for actual JSON and move actual code to this class

c) Add a Serializable implementation using a  SerializableObjectModel class for Object Model in serializable branch

d) Remove Serialization class from GXml and move its implementation to SerializableJson class

e) Look at Serializable definition at DIA file to find if proposed methods, properties and signals cover JSON implementation needs.

GENERAL GXML CLASS HIERARCHY

As notice from your initial statement, GXml will in future get its own parser for XML files to avoid libxml2 library, then may is time to redefine classes as interfaces and add new classes implementing them using, at first, libxml2 core, while adding new classes implementing a new parser.

For example Node will be an interface.

Document is another candidate interface, then a libxml2 class to implement Document interface could be  LbxDocument. May be Document could be just an abstract class, implementing default methods from Node interface and leave derived classes details about parsing XML documents, in this case to LbxDocument.

For SERIALIZATION, I can start to work on, if you agree.

--
Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (en trámite, pero para los cuates: LIBRE)

Attachment: GXml-UML.dia
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]