[yast-devel] web based YaST
When we discussed about web frontend, just look how Google do their staff with Python (for inspiration): http://www.youtube.com/watch?v=bfgO-LXGpTM http://code.google.com/appengine/docs/whatisgoogleappengine.html Miso -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Michal Zugec
When we discussed about web frontend, just look how Google do their staff with Python (for inspiration):
http://www.youtube.com/watch?v=bfgO-LXGpTM
http://code.google.com/appengine/docs/whatisgoogleappengine.html
Yes, nice ! I can see REST (http://www.infoq.com/articles/rest-introduction) and MVC (http://en.wikipedia.org/wiki/Model-view-controller) there. Both very useful for a web based YaST architecture. Together with a set of dialog templates to ensure UI consistency (and offload developers from dialog details). But using SQL statements (see the video) is ugly. Lets see when Google adds the active record pattern (http://en.wikipedia.org/wiki/Active_record_pattern) ;-) Active record is probably a good pattern to access backend information (aka 'SCR'). Not sure yet. Klaus -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Klaus Kaempf wrote:
But using SQL statements (see the video) is ugly. Lets see when Google adds the active record pattern (http://en.wikipedia.org/wiki/Active_record_pattern) ;-)
It is not ugly. Don't judge too fast! Actually the Google DataStore is not a relational database, but based on Bigtable. Amazon's SimpleDB is also a distributed hash. "The datastore API provides two interfaces for queries: a query object interface, and a SQL-like query language called GQL. A query returns entities in the form of instances of the model classes that can be modified and put back into the datastore." So the Sql part is only an interface. An ActiveRecord pattern is also provided: http://code.google.com/appengine/docs/datastore/modelclass.html Sql is a pretty good DSL. ActiveRecod is recommended only because applications use to do trivial stuff where verbosity and maintenance can be simplified by using ActiveRecord. Now go an shout to the world "use always ActiveRecord", and you will screw it up and all kittens will die. Nothing in computer science is bad or good by definition*. Right tool for the right job. Patterns can't be applied so early in design. Duncan * may be a couple of exceptions. -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Duncan Mac-Vicar P.
Klaus Kaempf wrote:
But using SQL statements (see the video) is ugly. Lets see when Google adds the active record pattern (http://en.wikipedia.org/wiki/Active_record_pattern) ;-)
It is not ugly. Don't judge too fast! [...]
Sql is a pretty good DSL. ActiveRecod is recommended only because applications use to do trivial stuff where verbosity and maintenance can be simplified by using ActiveRecord.
The main advantage of using patterns like ActiveRecord is abstraction which in turn makes it much easier to refactor/replace components in the stack. Properly used, it provides flexibility and prevents (database) vendor lock-in.
Now go an shout to the world "use always ActiveRecord", and you will screw it up and all kittens will die.
*g* I do shout "use abstractions" and "ActiveRecord is a good abstraction". Having to (re-)learn SQL for simple database manipulations (like the one showed in the video) just doesn't feel right. And doing it via _G_QL might lock you into Google ... Klaus -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (3)
-
Duncan Mac-Vicar P.
-
Klaus Kaempf
-
Michal Zugec