I am working to on an application which generates XML
based on user input.
Currently the application is in Design phase. And I am really confused on how to progress on this.
Well the Idea is that:
- The Application will have UI module, developed using
Angular
. REST Api
module developed usingJava
JAX-RS
. And- Will have a database of-course.
It should allow user to build and XML
like below diagram.
The output XML
will be accessed by another application.
The catch is: Each Activity
that you see in the picture will have its own different set of properties.
How do I store this kind of Data in a Relational Database
?
How does the data flow between UI and REST API layers?
Please give me some ideas or any case studies which already have this kind of requirements.
-
2How does any of this relate to XML (other than your data is a tree?)Caleth– Caleth2018年03月21日 12:56:40 +00:00Commented Mar 21, 2018 at 12:56
-
1Sorry i didn't understand your question.Kishor Prakash– Kishor Prakash2018年03月21日 13:09:59 +00:00Commented Mar 21, 2018 at 13:09
-
1Offhand, I don't see the need for any additional architecture here, other than ordinary OO and the patterns that Java-ee and Angular2 already provide.Robert Harvey– Robert Harvey2018年03月21日 16:28:30 +00:00Commented Mar 21, 2018 at 16:28
-
1If you're not storing relations, consider a non-relational database -- or the non-relational storage types for your DBMS. (JSON, XML, BLOB, etc.) How does the data flow? ... Not sure what your hangup is there. Until they need to be sent over the wire, they should either be domain objects or DTO's. As for actually sending them over the wire, that's not an un-Google-able problem.svidgen– svidgen2018年03月22日 04:43:10 +00:00Commented Mar 22, 2018 at 4:43
-
Sorry, I could not resistLaiv– Laiv2018年03月22日 07:53:47 +00:00Commented Mar 22, 2018 at 7:53
1 Answer 1
Allow me to react to this the way I would in a design meeting:
Architecture approach for developing a XML generator application
Why XML? Have you considered JSON?
REST Api module
Why REST? What problem does this solve?
Will have a database of-course.
Why? XML (and JSON) want to be a tree in a file.
How do I store this kind of Data in a Relational Database?
If you mean the XML, Relational Databases excel when the data has a fixed size, not when it's length is highly variable like XML. You'd have to store XML in a blob. Which isn't very useful. Why do this?
If you mean the data structure in your picture you'd need a self referencing table because an activity can connect to an activity.
How does the data flow between UI and REST API layers
Presumably the UI would be a REST client talking to a REST server.
Right now I have two solutions that generate XML from user input just fine: notepad and vim. What does this design do to improve on them?
Rather then let this be the start of a discussion please think about how you'd answer these challenges to your assumptions and come back to us with more focused questions.
Explore related questions
See similar questions with these tags.