Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse normal field types for modvars #97

Closed
38 tasks done
Guite opened this issue Oct 9, 2011 · 1 comment
Closed
38 tasks done

Reuse normal field types for modvars #97

Guite opened this issue Oct 9, 2011 · 1 comment

Comments

@Guite
Copy link
Owner

Guite commented Oct 9, 2011

In the DSL of MOST we have entity fields and variables (config settings). In the generated modules we use Forms for both areas (editing an entity vs. changing the config).

We should remove variables and instead reuse the entity field elements (like StringField or EmailField) for modeling configuration settings, too.

The generator can still generate the current config pages from that, as there is still a big difference: modvars described in a model are not contained by an entity element, but by a modvars element. So the idea of this ticket is to get rid of modvar field type elements (like IntegerVar or StringVar), as these seem to be redundant.

Benefits:

  • no additional / special model elements requiring separate processing in all layers
  • several existing constraints, options and behavioural extensions can be reused for config settings
  • less elements needed in the ModuleStudio editors palette

DSL tasks:

  • change meta model to allow normal fields as children of variable containers
  • update validation constraints accordingly
    • a field does not necessarily have a data object (mapped superclass, entity) anymore
    • throw error for obsolete model elements
    • provide quick fixes for easy migration
  • update docs (validation reference, generator reference)

Tooling tasks:

  • remove variable elements from editor palette
  • update container mappings for variable containers (to allow fields being added)
  • hide some options in the properties view if a field is contained in a variable container
    • no extensions supported (would require a "real" entity)
    • also hide some general properties (displayType, dbName, primaryKey, unique, ajaxToggle etc.)
  • update docs (tooling chapters, editor layers)

Generator tasks:

  • Update PersistenceTransformer
  • Refactor references to obsolete DSL elements
  • introduce an AppSettings class
    • one member var for each field
      • avoid any entity-specific annotations (orm, gedmo)
    • accessor methods for each field
      • avoid any entity-specific extensions (e.g. notify change tracking policy)
      • ensure that modVar values are correctly casted for Sf forms compatibility
    • add service definition
    • two methods like load() and save() both using the VariableApi
    • call load inside constructor
    • ensure composite property is still properly handled
  • integration
    • extend ListEntriesHelper and reuse ListEntryValidator
    • extend UploadHelper
    • call save as part of form submission handling
  • update generator for config form type, reusing existing form field implementations
    • use AppSettings as data_class for the settings form type
  • update generator for config page template
    • reuse client-side validation
    • JS calls
  • handle user fields
    • persistence
    • deletion listener (AccountDeletionHandler property)
  • update docs (generator reference) (e.g. doctrine extension related properties are ignored for modvars of course)
  • test generation

#139 is about removing meta model support for special modvar elements afterwards.

@ghost ghost assigned Guite Nov 6, 2013
@Guite Guite modified the milestones: Enhancements, Future Aug 27, 2014
@Guite Guite modified the milestones: 0.8.0, Future Apr 23, 2017
@Guite Guite modified the milestones: 1.1.0, 1.0.2 Sep 6, 2017
Repository owner deleted a comment from rgasch Sep 6, 2017
@Guite Guite modified the milestones: 1.0.2, 1.1.0 Oct 3, 2017
@Guite Guite added the tooling label Nov 2, 2017
@Guite
Copy link
Owner Author

Guite commented Nov 9, 2017

Fixed in e725fe6

@Guite Guite closed this as completed Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant