Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update DESIGN

  • Loading branch information...
commit 6dafb6ee62ab522c57ea07439f2d55c55142870b 1 parent ed6f9e7
sushantk authored
Showing with 40 additions and 19 deletions.
  1. +40 −19 DESIGN
59 DESIGN
View
@@ -1,18 +1,19 @@
Principles
- * Simple for user
- * Reduce boiler plate code
- * Markup and code equally easy
- * Performance
+ * Module oriented
+ * Simple to get started
+ * Reduce boiler plate code and markup
+ * Markup and code equally accessible
+ * Super performant!!
Progressive complexity
// traditional single source and renderer
"foo" : {
- "source" : {
+ "model" : {
"url" : "..."
}
- "renderer" : {
+ "view" : {
"template" : ".."
}
}
@@ -26,7 +27,7 @@ Progressive complexity
"controller" : {
}
- "source" : [
+ "model" : [
{
"@id" : "default",
....
@@ -37,7 +38,7 @@ Progressive complexity
},
]
- "renderer" : [
+ "view" : [
{
"@id" : "default"
"template" : ".."
@@ -49,23 +50,44 @@ Progressive complexity
]
}
-/* model source allows a data object construction from the raw data.
- it also allows a run one or more sub sources in parallel.
- it also allows model to provide overriden parameters.
- on completion, it allows model to chain more sources or construct the final data. */
+// controller class
+interface Controller {
+ // Config tree would contain the id and the params
+ Callback getModel(Context a_context, ConfigTree a_module, ConfigTree a_model);
+
+ DataObject getFinalResponse(Map<String, DataObject> a_data);
+}
+
+// this model allows a data object construction from the raw data.
{
- "@id" : "user_weather"
- "@class" : "SourceModel",
+ "@id" : ""
+ "@class" : "ModelDataObject",
"dataObject" : {
- "@class" : "UserWeather" // constructor gets the raw data
+ "@class" : "WeatherDataObject" // constructor gets the raw data
}
- "model" : {
- "@class" : "ModelUserWeather" // constructor gets the raw data
+ // sub model
+ model: {
+ ...
}
+}
- [
+/* This model extends from the ModelDataObject.
+ it allows to run one or more sub models in parallel.
+ it also allows model to provide overriden parameters.
+ if aggregator is not specified, all the sub models are run
+ on completion, it allows model to chain more sources or construct the final data. */
+{
+ "@id" : "user_weather"
+ "@class" : "ModelAggregate",
+
+ "aggregator" : {
+ "@class" : "ModelUserWeather"
+ }
+
+ // sub models
+ model: [
{
"@id" : "user_setting",
...
@@ -82,7 +104,6 @@ Progressive complexity
Streaming
Open connection
-
Client side framework
Callback
Please sign in to comment.
Something went wrong with that request. Please try again.