lundi 29 juin 2015

Which design pattern/s should I use when writing a parser?

I am writing XSD parser , which will be used to generate asp.net controls on a form according to the parsed XSD .

The XSD is loaded from some location ( for example from DB) to a XsdSchema object , and then using .NET classes (Schema Object Model) to read the elements of that schema to produce list of controls to be rendered on a form .

Which patterns you think are the best to be used in this scenario ?

(Currently I've created classes to represent different kinds of controls -text , date , list and etc. , and my xsd parser class has a method that returns a list of those classes according to the parsed XSD .

Those "Ui Element" classes were created to somehow not to tie the parser to asp.net layer )

I want to write the parser in some smart manner according to some design patterns for a simpler changes in the future .

Thanks.

Aucun commentaire:

Enregistrer un commentaire