|
Bugzilla – Full Text Bug Listing |
| Summary: | Create ancestor for rest-service models | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.2 | Reporter: | Josef Reidinger <jreidinger> |
| Component: | WebYaST | Assignee: | Josef Reidinger <jreidinger> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Enhancement | ||
| Priority: | P4 - Low | CC: | kkaempf |
| Version: | Milestone 8 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Development | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Josef Reidinger
2009-10-01 09:25:30 UTC
As I write on mailing-list http://lists.opensuse.org/yast-devel/2009-10/msg00108.html it is quite hard to do only validation, it should be part of some backend ancestor which provide functionality. Klaus - what do you think about it? Do model ancestor which provide same behavior as ActiveResource and ActiveRecord also for DBus? Or postpone it after feature freeze and release? I like the proposal but wonder if there isn't a gem/plugin already which provides what we need. So my gut feeling is that this needs some more research and should not be rushed before feature freeze. After looking for possibilities I extent this task. Nowadays, module contains many non-problem related code which is repeatedly done like assigning values from xml, generating xml or validating. Target of this task, is to provide ancestor of models for rest-service. This ancestor should be based on ActiveModel (is present in rails from 3.0, so it need pack it as gem), which provide basic functionality of ActiveResource and ActiveRecord. Above it it should contain smarted xml generated, because current one have problem with complex data structures. After change model should contain only reading data from DBus and writing to DBus, and common rails syntax for attributes (for validation or protection). Klaus do you agree with this improvement? (planned to work after release of first stable version) Yes, absolutely ! Lets discuss the details on the mailing list. After some discuss on opensuse-ruby ( http://lists.opensuse.org/opensuse-ruby/2009-12/msg00000.html ) there is few points which ancestor should follow. - Do not use ActiveModel as it is introduced in rails3 and still experimental - But use ActiveModel compatible interface (http://www.engineyard.com/blog/2009/my-five-favorite-things-about-rails-3/ (part 4 - Active model - requirements)) So write own ancestor (use modules) which increase as requirements increase, use compatible interface and inspire by ActiveModel. Enclose modules to separate namespace. merged to master. Requirements for improvements should be handled in separate bug reports. |