Re: Hierarchy Change propolsal



Please take a look at resent changes to serialization branch. It has proof of concept about this issue.

Please don't spec to build or make check this changes, I have implemented Serializable interfaces in both ObjectModel and JSON classes, remains Serializable for now, but don't build nor make check this code.


2013/10/8 Daniel Espinosa <esodan gmail com>
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)



--
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)


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